Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(855)

Side by Side Diff: webrtc/api/webrtcsession.cc

Issue 1968393002: Propogate network-worker thread split to api (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 old_transport_desc->ice_ufrag, old_transport_desc->ice_pwd, 463 old_transport_desc->ice_ufrag, old_transport_desc->ice_pwd,
464 new_transport_desc->ice_ufrag, new_transport_desc->ice_pwd)) { 464 new_transport_desc->ice_ufrag, new_transport_desc->ice_pwd)) {
465 LOG(LS_INFO) << "Remote peer requests ICE restart for " << content_name 465 LOG(LS_INFO) << "Remote peer requests ICE restart for " << content_name
466 << "."; 466 << ".";
467 return true; 467 return true;
468 } 468 }
469 return false; 469 return false;
470 } 470 }
471 471
472 WebRtcSession::WebRtcSession(webrtc::MediaControllerInterface* media_controller, 472 WebRtcSession::WebRtcSession(webrtc::MediaControllerInterface* media_controller,
473 rtc::Thread* network_thread,
474 rtc::Thread* worker_thread,
473 rtc::Thread* signaling_thread, 475 rtc::Thread* signaling_thread,
474 rtc::Thread* worker_thread,
475 cricket::PortAllocator* port_allocator) 476 cricket::PortAllocator* port_allocator)
476 : signaling_thread_(signaling_thread), 477 : worker_thread_(worker_thread),
477 worker_thread_(worker_thread), 478 signaling_thread_(signaling_thread),
478 port_allocator_(port_allocator), 479 port_allocator_(port_allocator),
479 // RFC 3264: The numeric value of the session id and version in the 480 // RFC 3264: The numeric value of the session id and version in the
480 // o line MUST be representable with a "64 bit signed integer". 481 // o line MUST be representable with a "64 bit signed integer".
481 // Due to this constraint session id |sid_| is max limited to LLONG_MAX. 482 // Due to this constraint session id |sid_| is max limited to LLONG_MAX.
482 sid_(rtc::ToString(rtc::CreateRandomId64() & LLONG_MAX)), 483 sid_(rtc::ToString(rtc::CreateRandomId64() & LLONG_MAX)),
483 transport_controller_(new cricket::TransportController(signaling_thread, 484 transport_controller_(new cricket::TransportController(signaling_thread,
484 worker_thread, 485 network_thread,
485 port_allocator)), 486 port_allocator)),
486 media_controller_(media_controller), 487 media_controller_(media_controller),
487 channel_manager_(media_controller_->channel_manager()), 488 channel_manager_(media_controller_->channel_manager()),
488 ice_observer_(NULL), 489 ice_observer_(NULL),
489 ice_connection_state_(PeerConnectionInterface::kIceConnectionNew), 490 ice_connection_state_(PeerConnectionInterface::kIceConnectionNew),
490 ice_connection_receiving_(true), 491 ice_connection_receiving_(true),
491 older_version_remote_peer_(false), 492 older_version_remote_peer_(false),
492 dtls_enabled_(false), 493 dtls_enabled_(false),
493 data_channel_type_(cricket::DCT_NONE), 494 data_channel_type_(cricket::DCT_NONE),
494 metrics_observer_(NULL) { 495 metrics_observer_(NULL) {
(...skipping 1658 matching lines...) Expand 10 before | Expand all | Expand 10 after
2153 ssl_cipher_suite); 2154 ssl_cipher_suite);
2154 } 2155 }
2155 } 2156 }
2156 2157
2157 void WebRtcSession::OnSentPacket_w(const rtc::SentPacket& sent_packet) { 2158 void WebRtcSession::OnSentPacket_w(const rtc::SentPacket& sent_packet) {
2158 RTC_DCHECK(worker_thread()->IsCurrent()); 2159 RTC_DCHECK(worker_thread()->IsCurrent());
2159 media_controller_->call_w()->OnSentPacket(sent_packet); 2160 media_controller_->call_w()->OnSentPacket(sent_packet);
2160 } 2161 }
2161 2162
2162 } // namespace webrtc 2163 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698