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

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: 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 bf81517b7044d33be4ecd3fcf38896df8ff560b6..f7f42aa9b988d86f6c811cf144929ada4f0795ea 100644
--- a/webrtc/modules/congestion_controller/probe_controller.cc
+++ b/webrtc/modules/congestion_controller/probe_controller.cc
@@ -71,6 +71,8 @@ void ProbeController::SetBitrates(int64_t min_bitrate_bps,
start_bitrate_bps_ = min_bitrate_bps;
}
+ // The reason we set use the variable |old_max_bitrate_pbs| is because we
stefan-webrtc 2017/01/16 13:23:59 -set
philipel 2017/01/16 13:59:28 Done.
+ // 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;
@@ -84,10 +86,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 &&
stefan-webrtc 2017/01/16 13:23:59 Should probably still compare with kExponentialPro
philipel 2017/01/16 13:59:28 This logic is not related to exponential probing,
+ old_max_bitrate_bps < max_bitrate_bps_ &&
+ estimated_bitrate_bps_ < max_bitrate_bps_) {
InitiateProbing(clock_->TimeInMilliseconds(), {max_bitrate_bps}, false);
}
break;
« 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