Chromium Code Reviews| Index: content/renderer/media/video_capture_impl.h |
| diff --git a/content/renderer/media/video_capture_impl.h b/content/renderer/media/video_capture_impl.h |
| index e47c35dba8d115451fc0e71c4405e52667ae273b..e25b1ea8fc426c17b5c8643c3b72af264d903957 100644 |
| --- a/content/renderer/media/video_capture_impl.h |
| +++ b/content/renderer/media/video_capture_impl.h |
| @@ -24,9 +24,11 @@ |
| #include "content/common/content_export.h" |
| #include "content/common/media/video_capture.h" |
| +#include "content/renderer/media/captured_encoded_video_source_impl.h" |
| #include "content/renderer/media/video_capture_message_filter.h" |
| #include "media/video/capture/video_capture.h" |
| #include "media/video/capture/video_capture_types.h" |
| +#include "media/video/encoded_video_source.h" |
| namespace base { |
| class MessageLoopProxy; |
| @@ -35,7 +37,9 @@ class MessageLoopProxy; |
| namespace content { |
| class CONTENT_EXPORT VideoCaptureImpl |
| - : public media::VideoCapture, public VideoCaptureMessageFilter::Delegate { |
| + : public media::VideoCapture, |
| + public VideoCaptureMessageFilter::Delegate, |
| + public CapturedEncodedVideoSourceImpl { |
| public: |
| // media::VideoCapture interface. |
| virtual void StartCapture( |
| @@ -47,6 +51,7 @@ class CONTENT_EXPORT VideoCaptureImpl |
| virtual int CaptureWidth() OVERRIDE; |
| virtual int CaptureHeight() OVERRIDE; |
| virtual int CaptureFrameRate() OVERRIDE; |
| + virtual media::EncodedVideoSource* GetEncodedVideoSource() OVERRIDE; |
| // VideoCaptureMessageFilter::Delegate interface. |
| virtual void OnBufferCreated(base::SharedMemoryHandle handle, |
| @@ -60,6 +65,30 @@ class CONTENT_EXPORT VideoCaptureImpl |
| // Stop/resume delivering video frames to clients, based on flag |suspend|. |
| virtual void SuspendCapture(bool suspend); |
| + // EncodingVideoCaptureMessageFilter::Delegate interface. |
| + virtual void OnCapabilityAvailable( |
| + const media::VideoEncodingCapability& capability) OVERRIDE; |
| + virtual void OnBitstreamCreated( |
| + int stream_id, |
| + const media::VideoEncodingParameters& params, |
| + const std::map<int, base::SharedMemoryHandle>& handles) OVERRIDE; |
| + virtual void OnBitstreamDestroyed(int stream_id) OVERRIDE; |
| + virtual void OnBitstreamConfigChanged( |
| + int stream_id, |
| + const media::RuntimeVideoEncodingParameters& params) OVERRIDE; |
| + virtual void OnBitstreamReady( |
| + int stream_id, |
| + int buffer_id, |
| + size_t size, |
| + const media::BufferEncodingMetadata& metadata) OVERRIDE; |
| + |
| + protected: |
| + // Services for CapturedEncodedVideoSourceImpl. |
| + virtual int device_id() OVERRIDE; |
| + virtual scoped_refptr<base::MessageLoopProxy> app_loop_proxy() OVERRIDE; |
| + virtual scoped_refptr<base::MessageLoopProxy> io_loop_proxy() OVERRIDE; |
| + virtual void Send(IPC::Message* message) OVERRIDE; |
|
Ami GONE FROM CHROMIUM
2013/06/08 00:18:01
Keep order same as in interface definition.
hshi1
2013/06/10 19:12:31
Done.
|
| + |
| private: |
| friend class VideoCaptureImplManager; |
| friend class VideoCaptureImplTest; |
| @@ -98,7 +127,6 @@ class CONTENT_EXPORT VideoCaptureImpl |
| void StartCaptureInternal(); |
| void AddDelegateOnIOThread(); |
| void RemoveDelegateOnIOThread(base::Closure task); |
| - virtual void Send(IPC::Message* message); |
| // Helpers. |
| bool ClientHasDIB() const; |
| @@ -130,6 +158,7 @@ class CONTENT_EXPORT VideoCaptureImpl |
| bool device_info_available_; |
| bool suspended_; |
| + bool encoding_supported_; |
| VideoCaptureState state_; |
| DISALLOW_COPY_AND_ASSIGN(VideoCaptureImpl); |