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

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

Issue 2949203002: Only use 95% of the link capacity if the true link capacity is found by probing. (Closed)
Patch Set: Nit Created 3 years, 6 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 ad977313a809ee818a3c39a733295f2f4ac37967..685b6c290a49e4e0a7fe28665c79e26c5a25eca5 100644
--- a/webrtc/modules/congestion_controller/delay_based_bwe.cc
+++ b/webrtc/modules/congestion_controller/delay_based_bwe.cc
@@ -204,11 +204,14 @@ DelayBasedBwe::Result DelayBasedBwe::MaybeUpdateEstimate(
}
} else {
if (probe_bitrate_bps) {
- rate_control_.SetEstimate(*probe_bitrate_bps, now_ms);
result.probe = true;
+ result.updated = true;
+ result.target_bitrate_bps = *probe_bitrate_bps;
+ rate_control_.SetEstimate(*probe_bitrate_bps, now_ms);
+ } else {
+ result.updated = UpdateEstimate(now_ms, acked_bitrate_bps, overusing,
+ &result.target_bitrate_bps);
}
- result.updated = UpdateEstimate(now_ms, acked_bitrate_bps, overusing,
- &result.target_bitrate_bps);
}
if (result.updated) {
BWE_TEST_LOGGING_PLOT(1, "target_bitrate_bps", now_ms,
@@ -233,8 +236,10 @@ bool DelayBasedBwe::UpdateEstimate(int64_t now_ms,
const RateControlInput input(
overusing ? BandwidthUsage::kBwOverusing : detector_.State(),
acked_bitrate_bps, 0);
+ uint32_t prev_target_bitrate_bps = rate_control_.LatestEstimate();
*target_bitrate_bps = rate_control_.Update(&input, now_ms);
- return rate_control_.ValidEstimate();
+ return rate_control_.ValidEstimate() &&
+ prev_target_bitrate_bps != *target_bitrate_bps;
}
void DelayBasedBwe::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) {
« 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