Chromium Code Reviews| Index: content/renderer/media/media_stream_video_capturer_source.h |
| diff --git a/content/renderer/media/media_stream_video_capturer_source.h b/content/renderer/media/media_stream_video_capturer_source.h |
| index 6fff76c0205d5f6caeb2ffcbbf8353c94df60918..55bbe199a4dca4453eaf3c8f0c3a2ae735832550 100644 |
| --- a/content/renderer/media/media_stream_video_capturer_source.h |
| +++ b/content/renderer/media/media_stream_video_capturer_source.h |
| @@ -9,18 +9,14 @@ |
| #include "base/message_loop/message_loop_proxy.h" |
| #include "content/common/media/video_capture.h" |
| #include "content/renderer/media/media_stream_video_source.h" |
| -#include "media/video/capture/video_capture.h" |
| namespace content { |
| -class VideoCaptureHandle; |
| - |
| // VideoCapturerDelegate is a delegate used by MediaStreamVideoCapturerSource |
| // for local video capturer. It uses VideoCaptureImplManager to start / stop |
| // and receive I420 frames from Chrome's video capture implementation. |
|
Ami GONE FROM CHROMIUM
2014/04/21 23:42:53
please doco lifecycle/threading.
Alpha Left Google
2014/04/23 18:48:33
Done. It is simple right now: it's render thread o
|
| class CONTENT_EXPORT VideoCapturerDelegate |
| - : public media::VideoCapture::EventHandler, |
| - public base::RefCountedThreadSafe<VideoCapturerDelegate> { |
| + : public base::RefCountedThreadSafe<VideoCapturerDelegate> { |
| public: |
| typedef base::Callback<void(const scoped_refptr<media::VideoFrame>&)> |
| NewFrameCallback; |
| @@ -53,19 +49,6 @@ class CONTENT_EXPORT VideoCapturerDelegate |
| // SupportedFormatsCallback callback. |
| virtual void StopDeliver(); |
| - protected: |
| - // media::VideoCapture::EventHandler implementation. |
| - // These functions are called on the IO thread (same as where |
| - // |capture_engine_| runs). |
| - virtual void OnStarted(media::VideoCapture* capture) OVERRIDE; |
| - virtual void OnStopped(media::VideoCapture* capture) OVERRIDE; |
| - virtual void OnPaused(media::VideoCapture* capture) OVERRIDE; |
| - virtual void OnError(media::VideoCapture* capture, int error_code) OVERRIDE; |
| - virtual void OnRemoved(media::VideoCapture* capture) OVERRIDE; |
| - virtual void OnFrameReady( |
| - media::VideoCapture* capture, |
| - const scoped_refptr<media::VideoFrame>& frame) OVERRIDE; |
| - |
| private: |
| friend class base::RefCountedThreadSafe<VideoCapturerDelegate>; |
| friend class MockVideoCapturerDelegate; |
| @@ -73,9 +56,10 @@ class CONTENT_EXPORT VideoCapturerDelegate |
| virtual ~VideoCapturerDelegate(); |
| void OnFrameReadyOnRenderThread( |
| - media::VideoCapture* capture, |
| - const scoped_refptr<media::VideoFrame>& frame); |
| - void OnErrorOnRenderThread(media::VideoCapture* capture); |
| + const scoped_refptr<media::VideoFrame>& frame, |
| + const media::VideoCaptureFormat& format, |
| + const base::TimeTicks& timestamp); |
| + void OnStateUpdateOnRenderThread(VideoCaptureState state); |
| void OnDeviceFormatsInUseReceived(const media::VideoCaptureFormats& formats); |
| void OnDeviceSupportedFormatsEnumerated( |
| const media::VideoCaptureFormats& formats); |
| @@ -83,7 +67,8 @@ class CONTENT_EXPORT VideoCapturerDelegate |
| // The id identifies which video capture device is used for this video |
| // capture session. |
| media::VideoCaptureSessionId session_id_; |
| - scoped_ptr<VideoCaptureHandle> capture_engine_; |
| + base::Closure release_device_cb_; |
| + base::Closure stop_capture_cb_; |
| bool is_screen_cast_; |