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

Side by Side Diff: webrtc/api/peerconnectionfactory.cc

Issue 2019423006: Adding more detail to MessageQueue::Dispatch logging. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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 * Copyright 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 signaling_thread, 86 signaling_thread,
87 default_adm, 87 default_adm,
88 encoder_factory, 88 encoder_factory,
89 decoder_factory)); 89 decoder_factory));
90 90
91 // Call Initialize synchronously but make sure its executed on 91 // Call Initialize synchronously but make sure its executed on
92 // |signaling_thread|. 92 // |signaling_thread|.
93 MethodCall0<PeerConnectionFactory, bool> call( 93 MethodCall0<PeerConnectionFactory, bool> call(
94 pc_factory.get(), 94 pc_factory.get(),
95 &PeerConnectionFactory::Initialize); 95 &PeerConnectionFactory::Initialize);
96 bool result = call.Marshal(signaling_thread); 96 bool result = call.Marshal(FROM_HERE, signaling_thread);
97 97
98 if (!result) { 98 if (!result) {
99 return nullptr; 99 return nullptr;
100 } 100 }
101 return PeerConnectionFactoryProxy::Create(signaling_thread, pc_factory); 101 return PeerConnectionFactoryProxy::Create(signaling_thread, pc_factory);
102 } 102 }
103 103
104 PeerConnectionFactory::PeerConnectionFactory() 104 PeerConnectionFactory::PeerConnectionFactory()
105 : owns_ptrs_(true), 105 : owns_ptrs_(true),
106 wraps_current_thread_(false), 106 wraps_current_thread_(false),
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 162
163 default_socket_factory_.reset( 163 default_socket_factory_.reset(
164 new rtc::BasicPacketSocketFactory(worker_thread_)); 164 new rtc::BasicPacketSocketFactory(worker_thread_));
165 if (!default_socket_factory_) { 165 if (!default_socket_factory_) {
166 return false; 166 return false;
167 } 167 }
168 168
169 // TODO: Need to make sure only one VoE is created inside 169 // TODO: Need to make sure only one VoE is created inside
170 // WebRtcMediaEngine. 170 // WebRtcMediaEngine.
171 cricket::MediaEngineInterface* media_engine = 171 cricket::MediaEngineInterface* media_engine =
172 worker_thread_->Invoke<cricket::MediaEngineInterface*>(rtc::Bind( 172 worker_thread_->Invoke<cricket::MediaEngineInterface*>(
173 &PeerConnectionFactory::CreateMediaEngine_w, this)); 173 FROM_HERE,
174 rtc::Bind(&PeerConnectionFactory::CreateMediaEngine_w, this));
174 175
175 rtc::Thread* const network_thread = worker_thread_; 176 rtc::Thread* const network_thread = worker_thread_;
176 channel_manager_.reset(new cricket::ChannelManager( 177 channel_manager_.reset(new cricket::ChannelManager(
177 media_engine, worker_thread_, network_thread)); 178 media_engine, worker_thread_, network_thread));
178 179
179 channel_manager_->SetVideoRtxEnabled(true); 180 channel_manager_->SetVideoRtxEnabled(true);
180 if (!channel_manager_->Init()) { 181 if (!channel_manager_->Init()) {
181 return false; 182 return false;
182 } 183 }
183 184
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 // |dtls_identity_store_|, protecting it from being deleted multiple times. 278 // |dtls_identity_store_|, protecting it from being deleted multiple times.
278 dtls_identity_store.reset( 279 dtls_identity_store.reset(
279 new DtlsIdentityStoreWrapper(dtls_identity_store_)); 280 new DtlsIdentityStoreWrapper(dtls_identity_store_));
280 } 281 }
281 282
282 if (!allocator) { 283 if (!allocator) {
283 allocator.reset(new cricket::BasicPortAllocator( 284 allocator.reset(new cricket::BasicPortAllocator(
284 default_network_manager_.get(), default_socket_factory_.get())); 285 default_network_manager_.get(), default_socket_factory_.get()));
285 } 286 }
286 worker_thread_->Invoke<void>( 287 worker_thread_->Invoke<void>(
287 rtc::Bind(&cricket::PortAllocator::SetNetworkIgnoreMask, allocator.get(), 288 FROM_HERE, rtc::Bind(&cricket::PortAllocator::SetNetworkIgnoreMask,
288 options_.network_ignore_mask)); 289 allocator.get(), options_.network_ignore_mask));
289 290
290 rtc::scoped_refptr<PeerConnection> pc( 291 rtc::scoped_refptr<PeerConnection> pc(
291 new rtc::RefCountedObject<PeerConnection>(this)); 292 new rtc::RefCountedObject<PeerConnection>(this));
292 293
293 if (!pc->Initialize(configuration, std::move(allocator), 294 if (!pc->Initialize(configuration, std::move(allocator),
294 std::move(dtls_identity_store), observer)) { 295 std::move(dtls_identity_store), observer)) {
295 return nullptr; 296 return nullptr;
296 } 297 }
297 return PeerConnectionProxy::Create(signaling_thread(), pc); 298 return PeerConnectionProxy::Create(signaling_thread(), pc);
298 } 299 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 } 341 }
341 342
342 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() { 343 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() {
343 ASSERT(worker_thread_ == rtc::Thread::Current()); 344 ASSERT(worker_thread_ == rtc::Thread::Current());
344 return cricket::WebRtcMediaEngineFactory::Create( 345 return cricket::WebRtcMediaEngineFactory::Create(
345 default_adm_.get(), video_encoder_factory_.get(), 346 default_adm_.get(), video_encoder_factory_.get(),
346 video_decoder_factory_.get()); 347 video_decoder_factory_.get());
347 } 348 }
348 349
349 } // namespace webrtc 350 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698