Switching some interfaces to use std::unique_ptr<>.
This helps show where ownership is transfered between objects.
Specifically, this CL wraps cricket::VideoCapturer, MediaEngineInterface
and DataEngineInterface in unique_ptr.
BUG=None
TBR=magjed@webrtc.org
Review-Url: https://codereview.webrtc.org/2685093002
Cr-Commit-Position: refs/heads/master@{#16548}
diff --git a/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm b/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm
index 96c5c36..b004191 100644
--- a/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm
+++ b/webrtc/sdk/objc/Framework/Classes/RTCAVFoundationVideoSource.mm
@@ -27,7 +27,8 @@
_capturer = new webrtc::AVFoundationVideoCapturer();
rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> source =
factory.nativeFactory->CreateVideoSource(
- _capturer, constraints.nativeConstraints.get());
+ std::unique_ptr<cricket::VideoCapturer>(_capturer),
+ constraints.nativeConstraints.get());
return [super initWithNativeVideoSource:source];
}