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

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

Issue 2634883003: Initiate mid-call probing even if estimated bitrate is at max configured bitrate. (Closed)
Patch Set: Rebase Created 3 years, 11 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/probe_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/congestion_controller/probe_controller.cc
diff --git a/webrtc/modules/congestion_controller/probe_controller.cc b/webrtc/modules/congestion_controller/probe_controller.cc
index e66f0cec3dd377aaeab743bc2d31c6df0944f1a6..373b268d2cdf591cae0a5d368f648dee88cc8033 100644
--- a/webrtc/modules/congestion_controller/probe_controller.cc
+++ b/webrtc/modules/congestion_controller/probe_controller.cc
@@ -72,6 +72,8 @@ void ProbeController::SetBitrates(int64_t min_bitrate_bps,
start_bitrate_bps_ = min_bitrate_bps;
}
+ // The reason we use the variable |old_max_bitrate_pbs| is because we
+ // need to set |max_bitrate_bps_| before we call InitiateProbing.
int64_t old_max_bitrate_bps = max_bitrate_bps_;
max_bitrate_bps_ = max_bitrate_bps;
@@ -85,10 +87,11 @@ void ProbeController::SetBitrates(int64_t min_bitrate_bps,
break;
case State::kProbingComplete:
- // Initiate probing when |max_bitrate_| was increased mid-call.
- if (estimated_bitrate_bps_ != kExponentialProbingDisabled &&
- estimated_bitrate_bps_ < old_max_bitrate_bps &&
- max_bitrate_bps_ > old_max_bitrate_bps) {
+ // If the new max bitrate is higher than the old max bitrate and the
+ // estimate is lower than the new max bitrate then initiate probing.
+ if (estimated_bitrate_bps_ != 0 &&
+ old_max_bitrate_bps < max_bitrate_bps_ &&
+ estimated_bitrate_bps_ < max_bitrate_bps_) {
// The assumption is that if we jump more than 20% in the bandwidth
// estimate or if the bandwidth estimate is within 90% of the new
// max bitrate then the probing attempt was successful.
« no previous file with comments | « no previous file | webrtc/modules/congestion_controller/probe_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698