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..cadfaf4c28048ca39983c98e3f7851217a896824 100644 |
| --- a/content/renderer/media/video_capture_impl.h |
| +++ b/content/renderer/media/video_capture_impl.h |
| @@ -27,6 +27,7 @@ |
| #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 +36,9 @@ class MessageLoopProxy; |
| namespace content { |
| class CONTENT_EXPORT VideoCaptureImpl |
| - : public media::VideoCapture, public VideoCaptureMessageFilter::Delegate { |
| + : public media::VideoCapture, |
| + public VideoCaptureMessageFilter::Delegate, |
| + public media::EncodedVideoSource { |
| public: |
| // media::VideoCapture interface. |
| virtual void StartCapture( |
| @@ -56,6 +59,30 @@ class CONTENT_EXPORT VideoCaptureImpl |
| virtual void OnDeviceInfoReceived( |
| const media::VideoCaptureParams& device_info) OVERRIDE; |
| virtual void OnDelegateAdded(int32 device_id) OVERRIDE; |
| + virtual void OnCapabilitiesAvailable( |
| + const media::VideoEncodingCapabilities& capabilities) OVERRIDE; |
| + virtual void OnBitstreamOpened( |
| + const media::VideoEncodingParameters& params, |
| + const std::map<int, base::SharedMemoryHandle>& handles) OVERRIDE; |
| + virtual void OnBitstreamClosed() OVERRIDE; |
| + virtual void OnBitstreamConfigChanged( |
| + const media::RuntimeVideoEncodingParameters& params) OVERRIDE; |
| + virtual void OnBitstreamReady( |
| + int buffer_id, |
| + size_t size, |
| + const media::BufferEncodingMetadata& metadata) OVERRIDE; |
| + |
| + // media::EncoderVideoSource interface. |
|
Ami GONE FROM CHROMIUM
2013/06/12 01:44:06
s/er/ed/
hshi1
2013/06/12 17:52:39
Done.
|
| + virtual void RequestCapabilities( |
| + const RequestCapabilitiesCallback& callback) OVERRIDE; |
| + virtual void OpenBitstream( |
| + media::EncodedVideoSource::Client* client, |
| + const media::VideoEncodingParameters& params) OVERRIDE; |
| + virtual void CloseBitstream() OVERRIDE; |
| + virtual void ReturnBitstreamBuffer( |
| + scoped_refptr<const media::EncodedBitstreamBuffer> buffer) OVERRIDE; |
| + void TrySetBitstreamConfig( |
| + const media::RuntimeVideoEncodingParameters& params) OVERRIDE; |
| // Stop/resume delivering video frames to clients, based on flag |suspend|. |
| virtual void SuspendCapture(bool suspend); |
| @@ -90,6 +117,24 @@ class CONTENT_EXPORT VideoCaptureImpl |
| void DoSuspendCaptureOnCaptureThread(bool suspend); |
| + void StartFetchCapabilities(); |
| + void DoStartFetchCapabilitiesOnCaptureThread(); |
| + void DoOpenBitstreamOnCaptureThread( |
| + const media::VideoEncodingParameters& params); |
| + void DoCloseBitstreamOnCaptureThread(); |
| + void DoReturnBitstreamBufferOnCaptureThread(int buffer_id); |
| + void DoTrySetBitstreamConfigOnCaptureThread( |
| + const media::RuntimeVideoEncodingParameters& params); |
| + void DoNotifyBitstreamOpenedOnCaptureThread( |
| + const media::VideoEncodingParameters& params, |
| + const std::map<int, base::SharedMemoryHandle>& buffers); |
| + void DoNotifyBitstreamClosedOnCaptureThread(); |
| + void DoNotifyBitstreamConfigChangedOnCaptureThread( |
| + const media::RuntimeVideoEncodingParameters& params); |
| + void DoNotifyBitstreamBufferReadyOnCaptureThread( |
| + int buffer_id, size_t size, |
| + const media::BufferEncodingMetadata& metadata); |
| + |
| void Init(); |
| void DeInit(base::Closure task); |
| void DoDeInitOnCaptureThread(base::Closure task); |
| @@ -132,6 +177,15 @@ class CONTENT_EXPORT VideoCaptureImpl |
| bool suspended_; |
| VideoCaptureState state_; |
| + // Video encoding capabilities as reported by the device. |
| + media::VideoEncodingCapabilities capabilities_; |
| + // Callback for RequestCapabilities(). |
| + RequestCapabilitiesCallback callback_; |
| + // Pointer to the EVS client. |
| + media::EncodedVideoSource::Client* client_; |
| + // Bitstream buffers returned by the video capture device. |
|
Ami GONE FROM CHROMIUM
2013/06/12 01:44:06
s/$/ Unowned./
hshi1
2013/06/12 17:52:39
Done.
|
| + std::map<int, base::SharedMemory*> buffers_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(VideoCaptureImpl); |
| }; |