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

@ -25,6 +25,11 @@ namespace webrtc {
// are called on is an implementation detail.
BEGIN_SIGNALING_PROXY_MAP(PeerConnectionFactory)
PROXY_SIGNALING_THREAD_DESTRUCTOR()
// Use the overloads of CreateVideoSource that take raw VideoCapturer
// pointers from PeerConnectionFactoryInterface.
// TODO(deadbeef): Remove this using statement once those overloads are
// removed.
using PeerConnectionFactoryInterface::CreateVideoSource;
PROXY_METHOD1(void, SetOptions, const Options&)
PROXY_METHOD5(rtc::scoped_refptr<PeerConnectionInterface>,
CreatePeerConnection,
@ -48,11 +53,11 @@ BEGIN_SIGNALING_PROXY_MAP(PeerConnectionFactory)
const cricket::AudioOptions&)
PROXY_METHOD2(rtc::scoped_refptr<VideoTrackSourceInterface>,
CreateVideoSource,
cricket::VideoCapturer*,
std::unique_ptr<cricket::VideoCapturer>,
const MediaConstraintsInterface*)
PROXY_METHOD1(rtc::scoped_refptr<VideoTrackSourceInterface>,
CreateVideoSource,
cricket::VideoCapturer*)
std::unique_ptr<cricket::VideoCapturer>)
PROXY_METHOD2(rtc::scoped_refptr<VideoTrackInterface>,
CreateVideoTrack,
const std::string&,