Index: webrtc/media/engine/webrtcvideocapturer.h |
diff --git a/webrtc/media/engine/webrtcvideocapturer.h b/webrtc/media/engine/webrtcvideocapturer.h |
index a76f9dc8fcd9d17fdfa11b8cf179addec39501b7..b6b39386c1b6c5cade252753b626a5393ab23cdd 100644 |
--- a/webrtc/media/engine/webrtcvideocapturer.h |
+++ b/webrtc/media/engine/webrtcvideocapturer.h |
@@ -17,6 +17,7 @@ |
#include "webrtc/base/asyncinvoker.h" |
#include "webrtc/base/messagehandler.h" |
+#include "webrtc/base/scoped_ref_ptr.h" |
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
#include "webrtc/media/base/device.h" |
#include "webrtc/media/base/videocapturer.h" |
@@ -30,8 +31,9 @@ namespace cricket { |
class WebRtcVcmFactoryInterface { |
public: |
virtual ~WebRtcVcmFactoryInterface() {} |
- virtual webrtc::VideoCaptureModule* Create( |
- int id, const char* device) = 0; |
+ virtual rtc::scoped_refptr<webrtc::VideoCaptureModule> Create( |
+ int id, |
+ const char* device) = 0; |
virtual webrtc::VideoCaptureModule::DeviceInfo* CreateDeviceInfo(int id) = 0; |
virtual void DestroyDeviceInfo( |
webrtc::VideoCaptureModule::DeviceInfo* info) = 0; |
@@ -46,7 +48,7 @@ class WebRtcVideoCapturer : public VideoCapturer, |
virtual ~WebRtcVideoCapturer(); |
bool Init(const Device& device); |
- bool Init(webrtc::VideoCaptureModule* module); |
+ bool Init(const rtc::scoped_refptr<webrtc::VideoCaptureModule>& module); |
// Override virtual methods of the parent class VideoCapturer. |
bool GetBestCaptureFormat(const VideoFormat& desired, |
@@ -77,7 +79,7 @@ class WebRtcVideoCapturer : public VideoCapturer, |
void SignalFrameCapturedOnStartThread(const webrtc::VideoFrame& frame); |
std::unique_ptr<WebRtcVcmFactoryInterface> factory_; |
- webrtc::VideoCaptureModule* module_; |
+ rtc::scoped_refptr<webrtc::VideoCaptureModule> module_; |
int captured_frames_; |
std::vector<uint8_t> capture_buffer_; |
rtc::Thread* start_thread_; // Set in Start(), unset in Stop(); |