| 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 245     std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator, | 245     std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator, | 
| 246     PeerConnectionObserver* observer) { | 246     PeerConnectionObserver* observer) { | 
| 247   RTC_DCHECK(signaling_thread_->IsCurrent()); | 247   RTC_DCHECK(signaling_thread_->IsCurrent()); | 
| 248 | 248 | 
| 249   if (!cert_generator.get()) { | 249   if (!cert_generator.get()) { | 
| 250     // No certificate generator specified, use the default one. | 250     // No certificate generator specified, use the default one. | 
| 251     cert_generator.reset( | 251     cert_generator.reset( | 
| 252         new rtc::RTCCertificateGenerator(signaling_thread_, network_thread_)); | 252         new rtc::RTCCertificateGenerator(signaling_thread_, network_thread_)); | 
| 253   } | 253   } | 
| 254 | 254 | 
| 255   if (!allocator) { |  | 
| 256     allocator.reset(new cricket::BasicPortAllocator( |  | 
| 257         default_network_manager_.get(), default_socket_factory_.get())); |  | 
| 258   } |  | 
| 259   network_thread_->Invoke<void>( |  | 
| 260       RTC_FROM_HERE, rtc::Bind(&cricket::PortAllocator::SetNetworkIgnoreMask, |  | 
| 261                                allocator.get(), options_.network_ignore_mask)); |  | 
| 262 |  | 
| 263   std::unique_ptr<RtcEventLog> event_log(new RtcEventLogNullImpl()); | 255   std::unique_ptr<RtcEventLog> event_log(new RtcEventLogNullImpl()); | 
| 264   if (event_log_factory_) { | 256   if (event_log_factory_) { | 
| 265     event_log = event_log_factory_->CreateRtcEventLog(); | 257     event_log = event_log_factory_->CreateRtcEventLog(); | 
| 266   } | 258   } | 
| 267 | 259 | 
|  | 260   if (!allocator) { | 
|  | 261     allocator.reset(new cricket::BasicPortAllocator( | 
|  | 262         default_network_manager_.get(), default_socket_factory_.get(), | 
|  | 263         event_log.get())); | 
|  | 264   } | 
|  | 265   network_thread_->Invoke<void>( | 
|  | 266       RTC_FROM_HERE, rtc::Bind(&cricket::PortAllocator::SetNetworkIgnoreMask, | 
|  | 267                                allocator.get(), options_.network_ignore_mask)); | 
|  | 268 | 
| 268   std::unique_ptr<Call> call = worker_thread_->Invoke<std::unique_ptr<Call>>( | 269   std::unique_ptr<Call> call = worker_thread_->Invoke<std::unique_ptr<Call>>( | 
| 269       RTC_FROM_HERE, | 270       RTC_FROM_HERE, | 
| 270       rtc::Bind(&PeerConnectionFactory::CreateCall_w, this, event_log.get())); | 271       rtc::Bind(&PeerConnectionFactory::CreateCall_w, this, event_log.get())); | 
| 271 | 272 | 
| 272   rtc::scoped_refptr<PeerConnection> pc( | 273   rtc::scoped_refptr<PeerConnection> pc( | 
| 273       new rtc::RefCountedObject<PeerConnection>(this, std::move(event_log), | 274       new rtc::RefCountedObject<PeerConnection>(this, std::move(event_log), | 
| 274                                                 std::move(call))); | 275                                                 std::move(call))); | 
| 275 | 276 | 
| 276   if (!pc->Initialize(configuration, std::move(allocator), | 277   if (!pc->Initialize(configuration, std::move(allocator), | 
| 277                       std::move(cert_generator), observer)) { | 278                       std::move(cert_generator), observer)) { | 
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 343   } | 344   } | 
| 344   call_config.audio_state = channel_manager_->media_engine()->GetAudioState(); | 345   call_config.audio_state = channel_manager_->media_engine()->GetAudioState(); | 
| 345   call_config.bitrate_config.min_bitrate_bps = kMinBandwidthBps; | 346   call_config.bitrate_config.min_bitrate_bps = kMinBandwidthBps; | 
| 346   call_config.bitrate_config.start_bitrate_bps = kStartBandwidthBps; | 347   call_config.bitrate_config.start_bitrate_bps = kStartBandwidthBps; | 
| 347   call_config.bitrate_config.max_bitrate_bps = kMaxBandwidthBps; | 348   call_config.bitrate_config.max_bitrate_bps = kMaxBandwidthBps; | 
| 348 | 349 | 
| 349   return std::unique_ptr<Call>(call_factory_->CreateCall(call_config)); | 350   return std::unique_ptr<Call>(call_factory_->CreateCall(call_config)); | 
| 350 } | 351 } | 
| 351 | 352 | 
| 352 }  // namespace webrtc | 353 }  // namespace webrtc | 
| OLD | NEW | 
|---|