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..6eed12a8f052e8e5a6b23c7435d40452b7ba6a0d 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 VideoCaptureBufferPoolInterface; |
| +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<VideoCaptureBufferPoolInterface>& 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_; |
|
mcasas
2016/09/07 22:43:40
maybe const?
Also, there's a subtle change here i
chfremer
2016/09/08 17:28:51
Not sure if my understanding of the threading issu
mcasas
2016/09/08 20:25:45
Notwithstanding any offline discussions, I see thi
chfremer
2016/09/09 00:55:37
Discussed offline. mcasas@ found out that after co
|
| - // Hardware JPEG decoder. |
| - std::unique_ptr<VideoCaptureGpuJpegDecoder> external_jpeg_decoder_; |
| + std::unique_ptr<VideoCaptureJpegDecoderFactory> jpeg_decoder_factory_; |
|
mcasas
2016/09/07 22:43:40
const
chfremer
2016/09/08 17:28:51
Done.
|
| + 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<VideoCaptureBufferPoolInterface> buffer_pool_; |
| #if DCHECK_IS_ON() |
| // Counter used to track the number of times consecutive capture buffers are |