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}
This commit is contained in:
deadbeef
2017-02-10 20:13:37 -08:00
committed by Commit bot
parent 2c87d9991b
commit 112b2e99d8
25 changed files with 169 additions and 114 deletions

View File

@ -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];
}