Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(747)

Unified Diff: content/renderer/media/video_capture_module_impl.h

Issue 7887002: Update the Chromium version of webrtc::VideoCaptureModule to be reference counted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/video_capture_module_impl.h
===================================================================
--- content/renderer/media/video_capture_module_impl.h (revision 101731)
+++ content/renderer/media/video_capture_module_impl.h (working copy)
@@ -22,7 +22,10 @@
public:
VideoCaptureModuleImpl(const media::VideoCaptureSessionId id,
VideoCaptureImplManager* vc_manager);
- virtual ~VideoCaptureModuleImpl();
+ // Implement reference counting. This make it possible to reference the
+ // object from both Chromium and WebRtc.
+ virtual int32_t AddRef() OVERRIDE;
+ virtual int32_t Release() OVERRIDE;
// Override webrtc::videocapturemodule::VideoCaptureImpl implementation.
virtual WebRtc_Word32 StartCapture(
@@ -45,6 +48,7 @@
const media::VideoCaptureParams& device_info);
private:
+ virtual ~VideoCaptureModuleImpl();
void Init();
void StartCaptureOnCaptureThread(
@@ -76,6 +80,7 @@
media::VideoCapture* capture_engine_;
bool pending_start_;
webrtc::VideoCaptureCapability pending_cap_;
+ int ref_count_;
DISALLOW_COPY_AND_ASSIGN(VideoCaptureModuleImpl);
};

Powered by Google App Engine
This is Rietveld 408576698