OLD | NEW |
---|---|
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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
282 } | 282 } |
283 | 283 |
284 if (!allocator) { | 284 if (!allocator) { |
285 allocator.reset(new cricket::BasicPortAllocator( | 285 allocator.reset(new cricket::BasicPortAllocator( |
286 default_network_manager_.get(), default_socket_factory_.get())); | 286 default_network_manager_.get(), default_socket_factory_.get())); |
287 } | 287 } |
288 allocator->SetNetworkIgnoreMask(options_.network_ignore_mask); | 288 allocator->SetNetworkIgnoreMask(options_.network_ignore_mask); |
289 | 289 |
290 rtc::scoped_refptr<PeerConnection> pc( | 290 rtc::scoped_refptr<PeerConnection> pc( |
291 new rtc::RefCountedObject<PeerConnection>(this)); | 291 new rtc::RefCountedObject<PeerConnection>(this)); |
292 // We rely on default values when constraints aren't found. | |
293 cricket::MediaConfig media_config; | |
294 | 292 |
295 media_config.video.disable_prerenderer_smoothing = | 293 if (!pc->Initialize(configuration, std::move(allocator), |
296 configuration.disable_prerenderer_smoothing; | |
297 if (configuration.enable_dscp) { | |
298 media_config.enable_dscp = *(configuration.enable_dscp); | |
299 } | |
300 if (configuration.cpu_overuse_detection) { | |
301 media_config.video.enable_cpu_overuse_detection = | |
302 *(configuration.cpu_overuse_detection); | |
303 } | |
304 if (configuration.suspend_below_min_bitrate) { | |
305 media_config.video.suspend_below_min_bitrate = | |
306 *(configuration.suspend_below_min_bitrate); | |
307 } | |
308 | |
309 if (!pc->Initialize(media_config, configuration, std::move(allocator), | |
310 std::move(dtls_identity_store), observer)) { | 294 std::move(dtls_identity_store), observer)) { |
hta-webrtc
2016/03/21 14:38:21
Nit: Please run git cl format before submitting.
nisse-webrtc
2016/03/22 08:33:20
Done. But no changes at this location.
| |
311 return nullptr; | 295 return nullptr; |
312 } | 296 } |
313 return PeerConnectionProxy::Create(signaling_thread(), pc); | 297 return PeerConnectionProxy::Create(signaling_thread(), pc); |
314 } | 298 } |
315 | 299 |
316 rtc::scoped_refptr<MediaStreamInterface> | 300 rtc::scoped_refptr<MediaStreamInterface> |
317 PeerConnectionFactory::CreateLocalMediaStream(const std::string& label) { | 301 PeerConnectionFactory::CreateLocalMediaStream(const std::string& label) { |
318 RTC_DCHECK(signaling_thread_->IsCurrent()); | 302 RTC_DCHECK(signaling_thread_->IsCurrent()); |
319 return MediaStreamProxy::Create(signaling_thread_, | 303 return MediaStreamProxy::Create(signaling_thread_, |
320 MediaStream::Create(label)); | 304 MediaStream::Create(label)); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
356 } | 340 } |
357 | 341 |
358 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() { | 342 cricket::MediaEngineInterface* PeerConnectionFactory::CreateMediaEngine_w() { |
359 ASSERT(worker_thread_ == rtc::Thread::Current()); | 343 ASSERT(worker_thread_ == rtc::Thread::Current()); |
360 return cricket::WebRtcMediaEngineFactory::Create( | 344 return cricket::WebRtcMediaEngineFactory::Create( |
361 default_adm_.get(), video_encoder_factory_.get(), | 345 default_adm_.get(), video_encoder_factory_.get(), |
362 video_decoder_factory_.get()); | 346 video_decoder_factory_.get()); |
363 } | 347 } |
364 | 348 |
365 } // namespace webrtc | 349 } // namespace webrtc |
OLD | NEW |