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

Side by Side Diff: webrtc/modules/congestion_controller/congestion_controller.cc

Issue 2381833003: Change TWCC send interval to reduce overhead on low BW situations. (Closed)
Patch Set: fix nit's Created 4 years, 1 month 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 | « no previous file | webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h » ('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 (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 if (estimate_changed) { 340 if (estimate_changed) {
341 pacer_->SetEstimatedBitrate(bitrate_bps); 341 pacer_->SetEstimatedBitrate(bitrate_bps);
342 probe_controller_->SetEstimatedBitrate(bitrate_bps); 342 probe_controller_->SetEstimatedBitrate(bitrate_bps);
343 retransmission_rate_limiter_->SetMaxRate(bitrate_bps); 343 retransmission_rate_limiter_->SetMaxRate(bitrate_bps);
344 } 344 }
345 345
346 bitrate_bps = IsNetworkDown() || IsSendQueueFull() ? 0 : bitrate_bps; 346 bitrate_bps = IsNetworkDown() || IsSendQueueFull() ? 0 : bitrate_bps;
347 347
348 if (HasNetworkParametersToReportChanged(bitrate_bps, fraction_loss, rtt)) { 348 if (HasNetworkParametersToReportChanged(bitrate_bps, fraction_loss, rtt)) {
349 observer_->OnNetworkChanged(bitrate_bps, fraction_loss, rtt); 349 observer_->OnNetworkChanged(bitrate_bps, fraction_loss, rtt);
350 remote_estimator_proxy_.OnBitrateChanged(bitrate_bps);
350 } 351 }
351 } 352 }
352 353
353 bool CongestionController::HasNetworkParametersToReportChanged( 354 bool CongestionController::HasNetworkParametersToReportChanged(
354 uint32_t bitrate_bps, 355 uint32_t bitrate_bps,
355 uint8_t fraction_loss, 356 uint8_t fraction_loss,
356 int64_t rtt) { 357 int64_t rtt) {
357 rtc::CritScope cs(&critsect_); 358 rtc::CritScope cs(&critsect_);
358 bool changed = 359 bool changed =
359 last_reported_bitrate_bps_ != bitrate_bps || 360 last_reported_bitrate_bps_ != bitrate_bps ||
(...skipping 12 matching lines...) Expand all
372 bool CongestionController::IsSendQueueFull() const { 373 bool CongestionController::IsSendQueueFull() const {
373 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; 374 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs;
374 } 375 }
375 376
376 bool CongestionController::IsNetworkDown() const { 377 bool CongestionController::IsNetworkDown() const {
377 rtc::CritScope cs(&critsect_); 378 rtc::CritScope cs(&critsect_);
378 return network_state_ == kNetworkDown; 379 return network_state_ == kNetworkDown;
379 } 380 }
380 381
381 } // namespace webrtc 382 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/remote_bitrate_estimator/remote_estimator_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698