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

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

Issue 2954923003: Reduce send rate to 50% if overusing before we have an acknowledged bitrate. (Closed)
Patch Set: Verify overuse detected in test. Created 3 years, 5 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/delay_based_bwe_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/congestion_controller/delay_based_bwe.cc
diff --git a/webrtc/modules/congestion_controller/delay_based_bwe.cc b/webrtc/modules/congestion_controller/delay_based_bwe.cc
index 685b6c290a49e4e0a7fe28665c79e26c5a25eca5..4b9dcca79c2cf52c46984fa9efcd9d217a6c03e4 100644
--- a/webrtc/modules/congestion_controller/delay_based_bwe.cc
+++ b/webrtc/modules/congestion_controller/delay_based_bwe.cc
@@ -201,6 +201,18 @@ DelayBasedBwe::Result DelayBasedBwe::MaybeUpdateEstimate(
rate_control_.TimeToReduceFurther(now_ms, *acked_bitrate_bps)) {
result.updated = UpdateEstimate(now_ms, acked_bitrate_bps, overusing,
&result.target_bitrate_bps);
+ } else if (!acked_bitrate_bps && rate_control_.ValidEstimate() &&
+ rate_control_.TimeToReduceFurther(
+ now_ms, rate_control_.LatestEstimate() / 2 - 1)) {
+ // Overusing before we have a measured acknowledged bitrate. We check
+ // TimeToReduceFurther (with a fake acknowledged bitrate) to avoid
+ // reducing too often.
+ // TODO(tschumim): Improve this and/or the acknowledged bitrate estimator
+ // so that we (almost) always have a bitrate estimate.
+ rate_control_.SetEstimate(rate_control_.LatestEstimate() / 2, now_ms);
+ result.updated = true;
+ result.probe = false;
+ result.target_bitrate_bps = rate_control_.LatestEstimate();
}
} else {
if (probe_bitrate_bps) {
« no previous file with comments | « no previous file | webrtc/modules/congestion_controller/delay_based_bwe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698