OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 // there. | 581 // there. |
582 if (!worker_thread()->Invoke<bool>(rtc::Bind( | 582 if (!worker_thread()->Invoke<bool>(rtc::Bind( |
583 &PeerConnection::InitializePortAllocator_w, this, configuration))) { | 583 &PeerConnection::InitializePortAllocator_w, this, configuration))) { |
584 return false; | 584 return false; |
585 } | 585 } |
586 | 586 |
587 media_controller_.reset( | 587 media_controller_.reset( |
588 factory_->CreateMediaController(configuration.media_config)); | 588 factory_->CreateMediaController(configuration.media_config)); |
589 | 589 |
590 session_.reset( | 590 session_.reset( |
591 new WebRtcSession(media_controller_.get(), factory_->signaling_thread(), | 591 new WebRtcSession(media_controller_.get(), factory_->network_thread(), |
592 factory_->worker_thread(), port_allocator_.get())); | 592 factory_->worker_thread(), factory_->signaling_thread(), |
| 593 port_allocator_.get())); |
593 stats_.reset(new StatsCollector(this)); | 594 stats_.reset(new StatsCollector(this)); |
594 | 595 |
595 // Initialize the WebRtcSession. It creates transport channels etc. | 596 // Initialize the WebRtcSession. It creates transport channels etc. |
596 if (!session_->Initialize(factory_->options(), std::move(dtls_identity_store), | 597 if (!session_->Initialize(factory_->options(), std::move(dtls_identity_store), |
597 configuration)) { | 598 configuration)) { |
598 return false; | 599 return false; |
599 } | 600 } |
600 | 601 |
601 // Register PeerConnection as receiver of local ice candidates. | 602 // Register PeerConnection as receiver of local ice candidates. |
602 // All the callbacks will be posted to the application from PeerConnection. | 603 // All the callbacks will be posted to the application from PeerConnection. |
(...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2137 port_allocator_->set_candidate_filter( | 2138 port_allocator_->set_candidate_filter( |
2138 ConvertIceTransportTypeToCandidateFilter(configuration.type)); | 2139 ConvertIceTransportTypeToCandidateFilter(configuration.type)); |
2139 // Call this last since it may create pooled allocator sessions using the | 2140 // Call this last since it may create pooled allocator sessions using the |
2140 // candidate filter set above. | 2141 // candidate filter set above. |
2141 port_allocator_->SetConfiguration(stun_servers, turn_servers, | 2142 port_allocator_->SetConfiguration(stun_servers, turn_servers, |
2142 configuration.ice_candidate_pool_size); | 2143 configuration.ice_candidate_pool_size); |
2143 return true; | 2144 return true; |
2144 } | 2145 } |
2145 | 2146 |
2146 } // namespace webrtc | 2147 } // namespace webrtc |
OLD | NEW |