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

Unified Diff: webrtc/media/engine/fakewebrtcvcmfactory.h

Issue 1817953005: Use rtc::scoped_refptr for WebRtcVideoCapturer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: remove incorrect early return Created 4 years, 9 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
« no previous file with comments | « no previous file | webrtc/media/engine/fakewebrtcvideocapturemodule.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/fakewebrtcvcmfactory.h
diff --git a/webrtc/media/engine/fakewebrtcvcmfactory.h b/webrtc/media/engine/fakewebrtcvcmfactory.h
index 38052d0b03dbf84fbb54128c0988867a52a1a491..daa2f774f5f34c1148202f2403e3f3b020ee85d6 100644
--- a/webrtc/media/engine/fakewebrtcvcmfactory.h
+++ b/webrtc/media/engine/fakewebrtcvcmfactory.h
@@ -21,11 +21,13 @@
// WebRtcVideoCapturer.
class FakeWebRtcVcmFactory : public cricket::WebRtcVcmFactoryInterface {
public:
- virtual webrtc::VideoCaptureModule* Create(int module_id,
- const char* device_id) {
+ virtual rtc::scoped_refptr<webrtc::VideoCaptureModule> Create(
+ int module_id,
+ const char* device_id) {
if (!device_info.GetDeviceById(device_id)) return NULL;
- FakeWebRtcVideoCaptureModule* module =
- new FakeWebRtcVideoCaptureModule(this, module_id);
+ rtc::scoped_refptr<FakeWebRtcVideoCaptureModule> module(
+ new rtc::RefCountedObject<FakeWebRtcVideoCaptureModule>(this,
+ module_id));
modules.push_back(module);
return module;
}
@@ -38,7 +40,7 @@ class FakeWebRtcVcmFactory : public cricket::WebRtcVcmFactoryInterface {
std::remove(modules.begin(), modules.end(), module);
}
FakeWebRtcDeviceInfo device_info;
- std::vector<FakeWebRtcVideoCaptureModule*> modules;
+ std::vector<rtc::scoped_refptr<FakeWebRtcVideoCaptureModule>> modules;
};
FakeWebRtcVideoCaptureModule::~FakeWebRtcVideoCaptureModule() {
« no previous file with comments | « no previous file | webrtc/media/engine/fakewebrtcvideocapturemodule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698