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

Unified Diff: talk/app/webrtc/objc/RTCVideoCapturer.mm

Issue 1785353003: Replace scoped_ptr with unique_ptr in talk/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 | « talk/app/webrtc/objc/RTCPeerConnectionInterface.mm ('k') | talk/app/webrtc/objc/RTCVideoRendererAdapter.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/objc/RTCVideoCapturer.mm
diff --git a/talk/app/webrtc/objc/RTCVideoCapturer.mm b/talk/app/webrtc/objc/RTCVideoCapturer.mm
index 2ce01f53a360e913f41a198c0a297768f2a9cb70..50e1cef4a0044f002fcca7ee1a636451e8d56652 100644
--- a/talk/app/webrtc/objc/RTCVideoCapturer.mm
+++ b/talk/app/webrtc/objc/RTCVideoCapturer.mm
@@ -31,16 +31,18 @@
#import "RTCVideoCapturer+Internal.h"
+#include <memory>
+
#include "webrtc/media/base/videocapturer.h"
#include "webrtc/media/devices/devicemanager.h"
@implementation RTCVideoCapturer {
- rtc::scoped_ptr<cricket::VideoCapturer> _capturer;
+ std::unique_ptr<cricket::VideoCapturer> _capturer;
}
+ (RTCVideoCapturer*)capturerWithDeviceName:(NSString*)deviceName {
const std::string& device_name = std::string([deviceName UTF8String]);
- rtc::scoped_ptr<cricket::DeviceManagerInterface> device_manager(
+ std::unique_ptr<cricket::DeviceManagerInterface> device_manager(
cricket::DeviceManagerFactory::Create());
bool initialized = device_manager->Init();
NSAssert(initialized, @"DeviceManager::Init() failed");
@@ -49,7 +51,7 @@
LOG(LS_ERROR) << "GetVideoCaptureDevice failed";
return 0;
}
- rtc::scoped_ptr<cricket::VideoCapturer> capturer(
+ std::unique_ptr<cricket::VideoCapturer> capturer(
device_manager->CreateVideoCapturer(device));
RTCVideoCapturer* rtcCapturer =
[[RTCVideoCapturer alloc] initWithCapturer:capturer.release()];
« no previous file with comments | « talk/app/webrtc/objc/RTCPeerConnectionInterface.mm ('k') | talk/app/webrtc/objc/RTCVideoRendererAdapter.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698