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

Side by Side Diff: webrtc/p2p/base/p2ptransportchannel.cc

Issue 1369773003: Add a continual_gathering_policy in PeerConnection RTCConfiguration (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Rebase to master Created 5 years, 2 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
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel.h ('k') | webrtc/p2p/base/p2ptransportchannel_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 // We need to keep track of the remote ice restart so newer 348 // We need to keep track of the remote ice restart so newer
349 // connections are prioritized over the older. 349 // connections are prioritized over the older.
350 ++remote_candidate_generation_; 350 ++remote_candidate_generation_;
351 } 351 }
352 } 352 }
353 353
354 void P2PTransportChannel::SetRemoteIceMode(IceMode mode) { 354 void P2PTransportChannel::SetRemoteIceMode(IceMode mode) {
355 remote_ice_mode_ = mode; 355 remote_ice_mode_ = mode;
356 } 356 }
357 357
358 void P2PTransportChannel::SetReceivingTimeout(int receiving_timeout_ms) { 358 void P2PTransportChannel::SetIceConfig(const IceConfig& config) {
359 if (receiving_timeout_ms < 0) { 359 gather_continually_ = config.gather_continually;
360 LOG(LS_INFO) << "Set gather_continually to " << gather_continually_;
361
362 if (config.receiving_timeout_ms < 0) {
360 return; 363 return;
361 } 364 }
362 receiving_timeout_ = receiving_timeout_ms; 365 receiving_timeout_ = config.receiving_timeout_ms;
363 check_receiving_delay_ = 366 check_receiving_delay_ =
364 std::max(MIN_CHECK_RECEIVING_DELAY, receiving_timeout_ / 10); 367 std::max(MIN_CHECK_RECEIVING_DELAY, receiving_timeout_ / 10);
365 368
366 for (Connection* connection : connections_) { 369 for (Connection* connection : connections_) {
367 connection->set_receiving_timeout(receiving_timeout_); 370 connection->set_receiving_timeout(receiving_timeout_);
368 } 371 }
369 LOG(LS_VERBOSE) << "Set ICE receiving timeout to " << receiving_timeout_ 372 LOG(LS_INFO) << "Set ICE receiving timeout to " << receiving_timeout_
370 << " milliseconds"; 373 << " milliseconds";
371 } 374 }
372 375
373 // Go into the state of processing candidates, and running in general 376 // Go into the state of processing candidates, and running in general
374 void P2PTransportChannel::Connect() { 377 void P2PTransportChannel::Connect() {
375 ASSERT(worker_thread_ == rtc::Thread::Current()); 378 ASSERT(worker_thread_ == rtc::Thread::Current());
376 if (ice_ufrag_.empty() || ice_pwd_.empty()) { 379 if (ice_ufrag_.empty() || ice_pwd_.empty()) {
377 ASSERT(false); 380 ASSERT(false);
378 LOG(LS_ERROR) << "P2PTransportChannel::Connect: The ice_ufrag_ and the " 381 LOG(LS_ERROR) << "P2PTransportChannel::Connect: The ice_ufrag_ and the "
379 << "ice_pwd_ are not set."; 382 << "ice_pwd_ are not set.";
380 return; 383 return;
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
1342 } 1345 }
1343 } 1346 }
1344 1347
1345 void P2PTransportChannel::OnReadyToSend(Connection* connection) { 1348 void P2PTransportChannel::OnReadyToSend(Connection* connection) {
1346 if (connection == best_connection_ && writable()) { 1349 if (connection == best_connection_ && writable()) {
1347 SignalReadyToSend(this); 1350 SignalReadyToSend(this);
1348 } 1351 }
1349 } 1352 }
1350 1353
1351 } // namespace cricket 1354 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel.h ('k') | webrtc/p2p/base/p2ptransportchannel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698