| 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  255  |  255  | 
|  256   if (!allocator) { |  256   if (!allocator) { | 
|  257     allocator.reset(new cricket::BasicPortAllocator( |  257     allocator.reset(new cricket::BasicPortAllocator( | 
|  258         default_network_manager_.get(), default_socket_factory_.get())); |  258         default_network_manager_.get(), default_socket_factory_.get())); | 
|  259   } |  259   } | 
|  260   network_thread_->Invoke<void>( |  260   network_thread_->Invoke<void>( | 
|  261       RTC_FROM_HERE, rtc::Bind(&cricket::PortAllocator::SetNetworkIgnoreMask, |  261       RTC_FROM_HERE, rtc::Bind(&cricket::PortAllocator::SetNetworkIgnoreMask, | 
|  262                                allocator.get(), options_.network_ignore_mask)); |  262                                allocator.get(), options_.network_ignore_mask)); | 
|  263  |  263  | 
|  264   std::unique_ptr<RtcEventLog> event_log = |  264   std::unique_ptr<RtcEventLog> event_log = | 
|  265       worker_thread_->Invoke<std::unique_ptr<RtcEventLog>>( |  265       event_log_factory_ ? event_log_factory_->CreateRtcEventLog() | 
|  266           RTC_FROM_HERE, |  266                          : rtc::MakeUnique<RtcEventLogNullImpl>(); | 
|  267           rtc::Bind(&PeerConnectionFactory::CreateRtcEventLog_w, this)); |  | 
|  268  |  267  | 
|  269   std::unique_ptr<Call> call = worker_thread_->Invoke<std::unique_ptr<Call>>( |  268   std::unique_ptr<Call> call = worker_thread_->Invoke<std::unique_ptr<Call>>( | 
|  270       RTC_FROM_HERE, |  269       RTC_FROM_HERE, | 
|  271       rtc::Bind(&PeerConnectionFactory::CreateCall_w, this, event_log.get())); |  270       rtc::Bind(&PeerConnectionFactory::CreateCall_w, this, event_log.get())); | 
|  272  |  271  | 
|  273   rtc::scoped_refptr<PeerConnection> pc( |  272   rtc::scoped_refptr<PeerConnection> pc( | 
|  274       new rtc::RefCountedObject<PeerConnection>(this, std::move(event_log), |  273       new rtc::RefCountedObject<PeerConnection>(this, std::move(event_log), | 
|  275                                                 std::move(call))); |  274                                                 std::move(call))); | 
|  276  |  275  | 
|  277   if (!pc->Initialize(configuration, std::move(allocator), |  276   if (!pc->Initialize(configuration, std::move(allocator), | 
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  325 } |  324 } | 
|  326  |  325  | 
|  327 rtc::Thread* PeerConnectionFactory::worker_thread() { |  326 rtc::Thread* PeerConnectionFactory::worker_thread() { | 
|  328   return worker_thread_; |  327   return worker_thread_; | 
|  329 } |  328 } | 
|  330  |  329  | 
|  331 rtc::Thread* PeerConnectionFactory::network_thread() { |  330 rtc::Thread* PeerConnectionFactory::network_thread() { | 
|  332   return network_thread_; |  331   return network_thread_; | 
|  333 } |  332 } | 
|  334  |  333  | 
|  335 std::unique_ptr<RtcEventLog> PeerConnectionFactory::CreateRtcEventLog_w() { |  | 
|  336   return event_log_factory_ ? event_log_factory_->CreateRtcEventLog() |  | 
|  337                             : rtc::MakeUnique<RtcEventLogNullImpl>(); |  | 
|  338 } |  | 
|  339  |  | 
|  340 std::unique_ptr<Call> PeerConnectionFactory::CreateCall_w( |  334 std::unique_ptr<Call> PeerConnectionFactory::CreateCall_w( | 
|  341     RtcEventLog* event_log) { |  335     RtcEventLog* event_log) { | 
|  342   const int kMinBandwidthBps = 30000; |  336   const int kMinBandwidthBps = 30000; | 
|  343   const int kStartBandwidthBps = 300000; |  337   const int kStartBandwidthBps = 300000; | 
|  344   const int kMaxBandwidthBps = 2000000; |  338   const int kMaxBandwidthBps = 2000000; | 
|  345  |  339  | 
|  346   webrtc::Call::Config call_config(event_log); |  340   webrtc::Call::Config call_config(event_log); | 
|  347   if (!channel_manager_->media_engine() || !call_factory_) { |  341   if (!channel_manager_->media_engine() || !call_factory_) { | 
|  348     return nullptr; |  342     return nullptr; | 
|  349   } |  343   } | 
|  350   call_config.audio_state = channel_manager_->media_engine()->GetAudioState(); |  344   call_config.audio_state = channel_manager_->media_engine()->GetAudioState(); | 
|  351   call_config.bitrate_config.min_bitrate_bps = kMinBandwidthBps; |  345   call_config.bitrate_config.min_bitrate_bps = kMinBandwidthBps; | 
|  352   call_config.bitrate_config.start_bitrate_bps = kStartBandwidthBps; |  346   call_config.bitrate_config.start_bitrate_bps = kStartBandwidthBps; | 
|  353   call_config.bitrate_config.max_bitrate_bps = kMaxBandwidthBps; |  347   call_config.bitrate_config.max_bitrate_bps = kMaxBandwidthBps; | 
|  354  |  348  | 
|  355   return std::unique_ptr<Call>(call_factory_->CreateCall(call_config)); |  349   return std::unique_ptr<Call>(call_factory_->CreateCall(call_config)); | 
|  356 } |  350 } | 
|  357  |  351  | 
|  358 }  // namespace webrtc |  352 }  // namespace webrtc | 
| OLD | NEW |