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

Side by Side Diff: talk/app/webrtc/peerconnectionfactory.cc

Issue 1346153002: Remove use of DeviceManager from ChannelManager. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2004--2011 Google Inc. 3 * Copyright 2004--2011 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 20 matching lines...) Expand all
31 #include "talk/app/webrtc/localaudiosource.h" 31 #include "talk/app/webrtc/localaudiosource.h"
32 #include "talk/app/webrtc/mediastreamproxy.h" 32 #include "talk/app/webrtc/mediastreamproxy.h"
33 #include "talk/app/webrtc/mediastreamtrackproxy.h" 33 #include "talk/app/webrtc/mediastreamtrackproxy.h"
34 #include "talk/app/webrtc/peerconnection.h" 34 #include "talk/app/webrtc/peerconnection.h"
35 #include "talk/app/webrtc/peerconnectionfactoryproxy.h" 35 #include "talk/app/webrtc/peerconnectionfactoryproxy.h"
36 #include "talk/app/webrtc/peerconnectionproxy.h" 36 #include "talk/app/webrtc/peerconnectionproxy.h"
37 #include "talk/app/webrtc/portallocatorfactory.h" 37 #include "talk/app/webrtc/portallocatorfactory.h"
38 #include "talk/app/webrtc/videosource.h" 38 #include "talk/app/webrtc/videosource.h"
39 #include "talk/app/webrtc/videosourceproxy.h" 39 #include "talk/app/webrtc/videosourceproxy.h"
40 #include "talk/app/webrtc/videotrack.h" 40 #include "talk/app/webrtc/videotrack.h"
41 #include "talk/media/devices/dummydevicemanager.h"
42 #include "talk/media/webrtc/webrtcmediaengine.h" 41 #include "talk/media/webrtc/webrtcmediaengine.h"
43 #include "talk/media/webrtc/webrtcvideodecoderfactory.h" 42 #include "talk/media/webrtc/webrtcvideodecoderfactory.h"
44 #include "talk/media/webrtc/webrtcvideoencoderfactory.h" 43 #include "talk/media/webrtc/webrtcvideoencoderfactory.h"
45 #include "webrtc/base/bind.h" 44 #include "webrtc/base/bind.h"
46 #include "webrtc/modules/audio_device/include/audio_device.h" 45 #include "webrtc/modules/audio_device/include/audio_device.h"
47 46
48 namespace webrtc { 47 namespace webrtc {
49 48
50 namespace { 49 namespace {
51 50
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 166 }
168 167
169 bool PeerConnectionFactory::Initialize() { 168 bool PeerConnectionFactory::Initialize() {
170 RTC_DCHECK(signaling_thread_->IsCurrent()); 169 RTC_DCHECK(signaling_thread_->IsCurrent());
171 rtc::InitRandom(rtc::Time()); 170 rtc::InitRandom(rtc::Time());
172 171
173 default_allocator_factory_ = PortAllocatorFactory::Create(worker_thread_); 172 default_allocator_factory_ = PortAllocatorFactory::Create(worker_thread_);
174 if (!default_allocator_factory_) 173 if (!default_allocator_factory_)
175 return false; 174 return false;
176 175
177 cricket::DummyDeviceManager* device_manager(
178 new cricket::DummyDeviceManager());
179
180 // TODO: Need to make sure only one VoE is created inside 176 // TODO: Need to make sure only one VoE is created inside
181 // WebRtcMediaEngine. 177 // WebRtcMediaEngine.
182 cricket::MediaEngineInterface* media_engine = 178 cricket::MediaEngineInterface* media_engine =
183 worker_thread_->Invoke<cricket::MediaEngineInterface*>(rtc::Bind( 179 worker_thread_->Invoke<cricket::MediaEngineInterface*>(rtc::Bind(
184 &PeerConnectionFactory::CreateMediaEngine_w, this)); 180 &PeerConnectionFactory::CreateMediaEngine_w, this));
185 181
186 channel_manager_.reset(new cricket::ChannelManager( 182 channel_manager_.reset(
187 media_engine, device_manager, worker_thread_)); 183 new cricket::ChannelManager(media_engine, worker_thread_));
188 184
189 channel_manager_->SetVideoRtxEnabled(true); 185 channel_manager_->SetVideoRtxEnabled(true);
190 if (!channel_manager_->Init()) { 186 if (!channel_manager_->Init()) {
191 return false; 187 return false;
192 } 188 }
193 189
194 dtls_identity_store_ = new RefCountedDtlsIdentityStore( 190 dtls_identity_store_ = new RefCountedDtlsIdentityStore(
195 signaling_thread_, worker_thread_); 191 signaling_thread_, worker_thread_);
196 192
197 return true; 193 return true;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 } 295 }
300 296
301 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() { 297 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() {
302 ASSERT(worker_thread_ == rtc::Thread::Current()); 298 ASSERT(worker_thread_ == rtc::Thread::Current());
303 return cricket::WebRtcMediaEngineFactory::Create( 299 return cricket::WebRtcMediaEngineFactory::Create(
304 default_adm_.get(), video_encoder_factory_.get(), 300 default_adm_.get(), video_encoder_factory_.get(),
305 video_decoder_factory_.get()); 301 video_decoder_factory_.get());
306 } 302 }
307 303
308 } // namespace webrtc 304 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698