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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(webrtc::MediaControllerInterface* media_controller, |
| 457 rtc::Thread* network_thread, |
| 458 rtc::Thread* worker_thread, |
457 rtc::Thread* signaling_thread, | 459 rtc::Thread* signaling_thread, |
458 rtc::Thread* worker_thread, | |
459 cricket::PortAllocator* port_allocator) | 460 cricket::PortAllocator* port_allocator) |
460 : signaling_thread_(signaling_thread), | 461 : worker_thread_(worker_thread), |
461 worker_thread_(worker_thread), | 462 signaling_thread_(signaling_thread), |
462 // RFC 3264: The numeric value of the session id and version in the | 463 // RFC 3264: The numeric value of the session id and version in the |
463 // o line MUST be representable with a "64 bit signed integer". | 464 // o line MUST be representable with a "64 bit signed integer". |
464 // Due to this constraint session id |sid_| is max limited to LLONG_MAX. | 465 // Due to this constraint session id |sid_| is max limited to LLONG_MAX. |
465 sid_(rtc::ToString(rtc::CreateRandomId64() & LLONG_MAX)), | 466 sid_(rtc::ToString(rtc::CreateRandomId64() & LLONG_MAX)), |
466 transport_controller_(new cricket::TransportController(signaling_thread, | 467 transport_controller_(new cricket::TransportController(signaling_thread, |
467 worker_thread, | 468 network_thread, |
468 port_allocator)), | 469 port_allocator)), |
469 media_controller_(media_controller), | 470 media_controller_(media_controller), |
470 channel_manager_(media_controller_->channel_manager()), | 471 channel_manager_(media_controller_->channel_manager()), |
471 ice_observer_(NULL), | 472 ice_observer_(NULL), |
472 ice_connection_state_(PeerConnectionInterface::kIceConnectionNew), | 473 ice_connection_state_(PeerConnectionInterface::kIceConnectionNew), |
473 ice_connection_receiving_(true), | 474 ice_connection_receiving_(true), |
474 older_version_remote_peer_(false), | 475 older_version_remote_peer_(false), |
475 dtls_enabled_(false), | 476 dtls_enabled_(false), |
476 data_channel_type_(cricket::DCT_NONE), | 477 data_channel_type_(cricket::DCT_NONE), |
477 metrics_observer_(NULL) { | 478 metrics_observer_(NULL) { |
(...skipping 1650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2128 ssl_cipher_suite); | 2129 ssl_cipher_suite); |
2129 } | 2130 } |
2130 } | 2131 } |
2131 | 2132 |
2132 void WebRtcSession::OnSentPacket_w(const rtc::SentPacket& sent_packet) { | 2133 void WebRtcSession::OnSentPacket_w(const rtc::SentPacket& sent_packet) { |
2133 RTC_DCHECK(worker_thread()->IsCurrent()); | 2134 RTC_DCHECK(worker_thread()->IsCurrent()); |
2134 media_controller_->call_w()->OnSentPacket(sent_packet); | 2135 media_controller_->call_w()->OnSentPacket(sent_packet); |
2135 } | 2136 } |
2136 | 2137 |
2137 } // namespace webrtc | 2138 } // namespace webrtc |
OLD | NEW |