| Index: webrtc/pc/peerconnectionfactory.cc
|
| diff --git a/webrtc/pc/peerconnectionfactory.cc b/webrtc/pc/peerconnectionfactory.cc
|
| index 99a1daaa2e2ed9400771f98e2765abb890cb5890..7050c1ce80b09713f94cb0949fee2b4e44d53a84 100644
|
| --- a/webrtc/pc/peerconnectionfactory.cc
|
| +++ b/webrtc/pc/peerconnectionfactory.cc
|
| @@ -167,13 +167,13 @@ bool PeerConnectionFactory::Initialize() {
|
|
|
| // TODO: Need to make sure only one VoE is created inside
|
| // WebRtcMediaEngine.
|
| - cricket::MediaEngineInterface* media_engine =
|
| - worker_thread_->Invoke<cricket::MediaEngineInterface*>(
|
| + std::unique_ptr<cricket::MediaEngineInterface> media_engine =
|
| + worker_thread_->Invoke<std::unique_ptr<cricket::MediaEngineInterface>>(
|
| RTC_FROM_HERE,
|
| rtc::Bind(&PeerConnectionFactory::CreateMediaEngine_w, this));
|
|
|
| channel_manager_.reset(new cricket::ChannelManager(
|
| - media_engine, worker_thread_, network_thread_));
|
| + std::move(media_engine), worker_thread_, network_thread_));
|
|
|
| channel_manager_->SetVideoRtxEnabled(true);
|
| channel_manager_->SetCryptoOptions(options_.crypto_options);
|
| @@ -196,7 +196,7 @@ PeerConnectionFactory::CreateAudioSource(
|
| const MediaConstraintsInterface* constraints) {
|
| RTC_DCHECK(signaling_thread_->IsCurrent());
|
| rtc::scoped_refptr<LocalAudioSource> source(
|
| - LocalAudioSource::Create(options_, constraints));
|
| + LocalAudioSource::Create(constraints));
|
| return source;
|
| }
|
|
|
| @@ -204,7 +204,7 @@ rtc::scoped_refptr<AudioSourceInterface>
|
| PeerConnectionFactory::CreateAudioSource(const cricket::AudioOptions& options) {
|
| RTC_DCHECK(signaling_thread_->IsCurrent());
|
| rtc::scoped_refptr<LocalAudioSource> source(
|
| - LocalAudioSource::Create(options_, &options));
|
| + LocalAudioSource::Create(&options));
|
| return source;
|
| }
|
|
|
| @@ -214,8 +214,9 @@ PeerConnectionFactory::CreateVideoSource(
|
| const MediaConstraintsInterface* constraints) {
|
| RTC_DCHECK(signaling_thread_->IsCurrent());
|
| rtc::scoped_refptr<VideoTrackSourceInterface> source(
|
| - VideoCapturerTrackSource::Create(worker_thread_, capturer, constraints,
|
| - false));
|
| + VideoCapturerTrackSource::Create(
|
| + worker_thread_, std::unique_ptr<cricket::VideoCapturer>(capturer),
|
| + constraints, false));
|
| return VideoTrackSourceProxy::Create(signaling_thread_, worker_thread_,
|
| source);
|
| }
|
| @@ -224,7 +225,9 @@ rtc::scoped_refptr<VideoTrackSourceInterface>
|
| PeerConnectionFactory::CreateVideoSource(cricket::VideoCapturer* capturer) {
|
| RTC_DCHECK(signaling_thread_->IsCurrent());
|
| rtc::scoped_refptr<VideoTrackSourceInterface> source(
|
| - VideoCapturerTrackSource::Create(worker_thread_, capturer, false));
|
| + VideoCapturerTrackSource::Create(
|
| + worker_thread_, std::unique_ptr<cricket::VideoCapturer>(capturer),
|
| + false));
|
| return VideoTrackSourceProxy::Create(signaling_thread_, worker_thread_,
|
| source);
|
| }
|
| @@ -345,7 +348,8 @@ rtc::Thread* PeerConnectionFactory::network_thread() {
|
| return network_thread_;
|
| }
|
|
|
| -cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() {
|
| +std::unique_ptr<cricket::MediaEngineInterface>
|
| +PeerConnectionFactory::CreateMediaEngine_w() {
|
| RTC_DCHECK(worker_thread_ == rtc::Thread::Current());
|
| return cricket::WebRtcMediaEngineFactory::Create(
|
| default_adm_.get(), audio_decoder_factory_, video_encoder_factory_.get(),
|
|
|