| 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 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 if (cricket::IceCredentialsChanged( | 446 if (cricket::IceCredentialsChanged( |
| 447 old_transport_desc->ice_ufrag, old_transport_desc->ice_pwd, | 447 old_transport_desc->ice_ufrag, old_transport_desc->ice_pwd, |
| 448 new_transport_desc->ice_ufrag, new_transport_desc->ice_pwd)) { | 448 new_transport_desc->ice_ufrag, new_transport_desc->ice_pwd)) { |
| 449 LOG(LS_INFO) << "Remote peer requests ICE restart for " << content_name | 449 LOG(LS_INFO) << "Remote peer requests ICE restart for " << content_name |
| 450 << "."; | 450 << "."; |
| 451 return true; | 451 return true; |
| 452 } | 452 } |
| 453 return false; | 453 return false; |
| 454 } | 454 } |
| 455 | 455 |
| 456 WebRtcSession::WebRtcSession(webrtc::MediaControllerInterface* media_controller, | 456 WebRtcSession::WebRtcSession( |
| 457 rtc::Thread* network_thread, | 457 webrtc::MediaControllerInterface* media_controller, |
| 458 rtc::Thread* worker_thread, | 458 rtc::Thread* network_thread, |
| 459 rtc::Thread* signaling_thread, | 459 rtc::Thread* worker_thread, |
| 460 cricket::PortAllocator* port_allocator) | 460 rtc::Thread* signaling_thread, |
| 461 cricket::PortAllocator* port_allocator, |
| 462 std::unique_ptr<cricket::TransportController> transport_controller) |
| 461 : worker_thread_(worker_thread), | 463 : worker_thread_(worker_thread), |
| 462 signaling_thread_(signaling_thread), | 464 signaling_thread_(signaling_thread), |
| 463 // RFC 3264: The numeric value of the session id and version in the | 465 // RFC 3264: The numeric value of the session id and version in the |
| 464 // o line MUST be representable with a "64 bit signed integer". | 466 // o line MUST be representable with a "64 bit signed integer". |
| 465 // Due to this constraint session id |sid_| is max limited to LLONG_MAX. | 467 // Due to this constraint session id |sid_| is max limited to LLONG_MAX. |
| 466 sid_(rtc::ToString(rtc::CreateRandomId64() & LLONG_MAX)), | 468 sid_(rtc::ToString(rtc::CreateRandomId64() & LLONG_MAX)), |
| 467 transport_controller_(new cricket::TransportController(signaling_thread, | 469 transport_controller_(std::move(transport_controller)), |
| 468 network_thread, | |
| 469 port_allocator)), | |
| 470 media_controller_(media_controller), | 470 media_controller_(media_controller), |
| 471 channel_manager_(media_controller_->channel_manager()), | 471 channel_manager_(media_controller_->channel_manager()), |
| 472 ice_observer_(NULL), | 472 ice_observer_(NULL), |
| 473 ice_connection_state_(PeerConnectionInterface::kIceConnectionNew), | 473 ice_connection_state_(PeerConnectionInterface::kIceConnectionNew), |
| 474 ice_connection_receiving_(true), | 474 ice_connection_receiving_(true), |
| 475 older_version_remote_peer_(false), | 475 older_version_remote_peer_(false), |
| 476 dtls_enabled_(false), | 476 dtls_enabled_(false), |
| 477 data_channel_type_(cricket::DCT_NONE), | 477 data_channel_type_(cricket::DCT_NONE), |
| 478 metrics_observer_(NULL) { | 478 metrics_observer_(NULL) { |
| 479 transport_controller_->SetIceRole(cricket::ICEROLE_CONTROLLED); | 479 transport_controller_->SetIceRole(cricket::ICEROLE_CONTROLLED); |
| (...skipping 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2161 ssl_cipher_suite); | 2161 ssl_cipher_suite); |
| 2162 } | 2162 } |
| 2163 } | 2163 } |
| 2164 | 2164 |
| 2165 void WebRtcSession::OnSentPacket_w(const rtc::SentPacket& sent_packet) { | 2165 void WebRtcSession::OnSentPacket_w(const rtc::SentPacket& sent_packet) { |
| 2166 RTC_DCHECK(worker_thread()->IsCurrent()); | 2166 RTC_DCHECK(worker_thread()->IsCurrent()); |
| 2167 media_controller_->call_w()->OnSentPacket(sent_packet); | 2167 media_controller_->call_w()->OnSentPacket(sent_packet); |
| 2168 } | 2168 } |
| 2169 | 2169 |
| 2170 } // namespace webrtc | 2170 } // namespace webrtc |
| OLD | NEW |