Chromium Code Reviews| Index: content/browser/renderer_host/media/video_capture_device_client.h |
| diff --git a/content/browser/renderer_host/media/video_capture_device_client.h b/content/browser/renderer_host/media/video_capture_device_client.h |
| index c5447ca18e74eed9969270fb657a72e2aefd87f6..8bc493110f57e63cf3cc8c5f4d16413c8974b8b5 100644 |
| --- a/content/browser/renderer_host/media/video_capture_device_client.h |
| +++ b/content/browser/renderer_host/media/video_capture_device_client.h |
| @@ -17,13 +17,14 @@ |
| #include "media/capture/video/video_capture_device.h" |
| namespace content { |
| -class VideoCaptureBufferPool; |
| -class VideoCaptureController; |
| -class VideoCaptureGpuJpegDecoder; |
| +class ProducerVideoCaptureBufferPool; |
| +class VideoFrameReceiver; |
| +class VideoCaptureJpegDecoderFactory; |
| +class VideoCaptureJpegDecoder; |
| -// Receives events from the VideoCaptureDevice and posts them to a |controller_| |
| +// Receives events from the VideoCaptureDevice and posts them to a |receiver_| |
| // on the IO thread. An instance of this class may safely outlive its target |
| -// VideoCaptureController. This is a shallow class meant to convert incoming |
| +// VideoFrameReceiver. This is a shallow class meant to convert incoming |
| // frames and holds no significant state. |
| // |
| // Methods of this class may be called from any thread, and in practice will |
| @@ -40,8 +41,10 @@ class CONTENT_EXPORT VideoCaptureDeviceClient |
| public base::SupportsWeakPtr<VideoCaptureDeviceClient> { |
| public: |
| VideoCaptureDeviceClient( |
| - const base::WeakPtr<VideoCaptureController>& controller, |
| - const scoped_refptr<VideoCaptureBufferPool>& buffer_pool); |
| + std::unique_ptr<VideoFrameReceiver> receiver, |
| + const scoped_refptr<ProducerVideoCaptureBufferPool>& buffer_pool, |
| + std::unique_ptr<VideoCaptureJpegDecoderFactory> jpeg_decoder_factory, |
| + const base::Closure& check_thread_closure); |
| ~VideoCaptureDeviceClient() override; |
| // VideoCaptureDevice::Client implementation. |
| @@ -91,17 +94,17 @@ class CONTENT_EXPORT VideoCaptureDeviceClient |
| uint8_t** u_plane_data, |
| uint8_t** v_plane_data); |
| - // The controller to which we post events. |
| - const base::WeakPtr<VideoCaptureController> controller_; |
| + // The receiver to which we post events. |
| + std::unique_ptr<VideoFrameReceiver> receiver_; |
|
emircan
2016/09/08 19:57:56
const
chfremer
2016/09/09 00:55:38
Done.
|
| - // Hardware JPEG decoder. |
| - std::unique_ptr<VideoCaptureGpuJpegDecoder> external_jpeg_decoder_; |
| + const std::unique_ptr<VideoCaptureJpegDecoderFactory> jpeg_decoder_factory_; |
| + std::unique_ptr<VideoCaptureJpegDecoder> external_jpeg_decoder_; |
| // Whether |external_jpeg_decoder_| has been initialized. |
| bool external_jpeg_decoder_initialized_; |
| // The pool of shared-memory buffers used for capturing. |
| - const scoped_refptr<VideoCaptureBufferPool> buffer_pool_; |
| + const scoped_refptr<ProducerVideoCaptureBufferPool> buffer_pool_; |
| #if DCHECK_IS_ON() |
| // Counter used to track the number of times consecutive capture buffers are |