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

Unified Diff: webrtc/modules/congestion_controller/congestion_controller.cc

Issue 2269873002: Avoid cluster set up at max bitrate at start (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@cleanup
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/congestion_controller/include/congestion_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/congestion_controller/congestion_controller.cc
diff --git a/webrtc/modules/congestion_controller/congestion_controller.cc b/webrtc/modules/congestion_controller/congestion_controller.cc
index 5def7154e1bacfaa05d20eea9484e405e20d779d..f2722b487a6d690fd364f452fa3ecc93d42b5042 100644
--- a/webrtc/modules/congestion_controller/congestion_controller.cc
+++ b/webrtc/modules/congestion_controller/congestion_controller.cc
@@ -170,6 +170,7 @@ CongestionController::CongestionController(
new RateLimiter(clock, kRetransmitWindowSizeMs)),
remote_estimator_proxy_(clock_, packet_router_.get()),
transport_feedback_adapter_(bitrate_controller_.get(), clock_),
+ start_bitrate_bps_(0),
min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps),
max_bitrate_bps_(0),
last_reported_bitrate_bps_(0),
@@ -228,14 +229,18 @@ void CongestionController::SetBweBitrates(int min_bitrate_bps,
min_bitrate_bps,
max_bitrate_bps);
+ if (start_bitrate_bps > 0)
+ start_bitrate_bps_ = start_bitrate_bps;
{
// Only do probing if:
// - we are mid-call, which we consider to be if
philipel 2016/08/23 10:55:28 Nit: remove the last '-' since this is no longer a
- // |last_reported_bitrate_bps_| != 0, and
- // - the current bitrate is lower than the new |max_bitrate_bps|, and
- // - we actually want to increase the |max_bitrate_bps_|.
+ // |last_reported_bitrate_bps_| is valid (> 0) and
+ // |last_reported_bitrate_bps_| != |start_bitrate_bps_|, and
+ // the current bitrate is lower than the new |max_bitrate_bps|, and
+ // we actually want to increase the |max_bitrate_bps_|.
rtc::CritScope cs(&critsect_);
- if (last_reported_bitrate_bps_ != 0 &&
+ if (last_reported_bitrate_bps_ &&
+ last_reported_bitrate_bps_ != start_bitrate_bps_ &&
last_reported_bitrate_bps_ < max_bitrate_bps &&
max_bitrate_bps > max_bitrate_bps_) {
pacer_->CreateProbeCluster(max_bitrate_bps, 5);
« no previous file with comments | « no previous file | webrtc/modules/congestion_controller/include/congestion_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698