| Index: content/renderer/media/rtc_video_capture_delegate.h
|
| diff --git a/content/renderer/media/rtc_video_capture_delegate.h b/content/renderer/media/rtc_video_capture_delegate.h
|
| index f081c3731b06ed1f73752a215bbdfef75981fa6f..1d3fe8486de351d9a91f10ac0a76a00b1f335b29 100644
|
| --- a/content/renderer/media/rtc_video_capture_delegate.h
|
| +++ b/content/renderer/media/rtc_video_capture_delegate.h
|
| @@ -8,11 +8,12 @@
|
| #include "base/callback.h"
|
| #include "base/message_loop/message_loop_proxy.h"
|
| #include "content/common/media/video_capture.h"
|
| -#include "content/renderer/media/video_capture_impl_manager.h"
|
| #include "media/video/capture/video_capture.h"
|
|
|
| namespace content {
|
|
|
| +class VideoCaptureHandle;
|
| +
|
| // Implements a simple reference counted video capturer that guarantees that
|
| // methods in RtcVideoCaptureDelegateEventHandler is only called from when
|
| // StartCapture have been called until after StopCapture have been called.
|
| @@ -33,8 +34,7 @@ class RtcVideoCaptureDelegate
|
| FrameCapturedCallback;
|
| typedef base::Callback<void(CaptureState)> StateChangeCallback;
|
|
|
| - RtcVideoCaptureDelegate(const media::VideoCaptureSessionId id,
|
| - VideoCaptureImplManager* vc_manager);
|
| + RtcVideoCaptureDelegate(const media::VideoCaptureSessionId id);
|
|
|
| void StartCapture(const media::VideoCaptureParams& params,
|
| const FrameCapturedCallback& captured_callback,
|
| @@ -42,7 +42,7 @@ class RtcVideoCaptureDelegate
|
| void StopCapture();
|
|
|
| // media::VideoCapture::EventHandler implementation.
|
| - // These functions are called from a thread owned by |vc_manager_|.
|
| + // These functions are called from a thread that |capture_engine_| runs on.
|
| virtual void OnStarted(media::VideoCapture* capture) OVERRIDE;
|
| virtual void OnStopped(media::VideoCapture* capture) OVERRIDE;
|
| virtual void OnPaused(media::VideoCapture* capture) OVERRIDE;
|
| @@ -66,9 +66,7 @@ class RtcVideoCaptureDelegate
|
| // The id identifies which video capture device is used for this video
|
| // capture session.
|
| media::VideoCaptureSessionId session_id_;
|
| - // The video capture manager handles open/close of video capture devices.
|
| - scoped_refptr<VideoCaptureImplManager> vc_manager_;
|
| - media::VideoCapture* capture_engine_;
|
| + scoped_ptr<VideoCaptureHandle> capture_engine_;
|
|
|
| // Accessed on the thread where StartCapture is called.
|
| bool got_first_frame_;
|
|
|