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

Unified Diff: webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc

Issue 1615873002: Fix probing breakage with send-side BWE introduced by r11322. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix test. Created 4 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/bitrate_controller/send_side_bandwidth_estimation_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc
diff --git a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc
index 68912907e6f6faa0a081597eb53c5fd8da444a8e..1fb4e5682560c3eabae45e07907e22424f814665 100644
--- a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc
+++ b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc
@@ -181,14 +181,19 @@ void SendSideBandwidthEstimation::UpdateUmaStats(int64_t now_ms,
}
void SendSideBandwidthEstimation::UpdateEstimate(int64_t now_ms) {
- // We trust the REMB during the first 2 seconds if we haven't had any
- // packet loss reported, to allow startup bitrate probing.
- if (last_fraction_loss_ == 0 && IsInStartPhase(now_ms) &&
- bwe_incoming_ > bitrate_) {
- bitrate_ = CapBitrateToThresholds(now_ms, bwe_incoming_);
- min_bitrate_history_.clear();
- min_bitrate_history_.push_back(std::make_pair(now_ms, bitrate_));
- return;
+ // We trust the REMB and/or delay-based estimate during the first 2 seconds if
+ // we haven't had any packet loss reported, to allow startup bitrate probing.
+ if (last_fraction_loss_ == 0 && IsInStartPhase(now_ms)) {
+ uint32_t prev_bitrate = bitrate_;
+ if (bwe_incoming_ > bitrate_)
+ bitrate_ = CapBitrateToThresholds(now_ms, bwe_incoming_);
+ if (delay_based_bitrate_bps_ > bitrate_)
+ bitrate_ = CapBitrateToThresholds(now_ms, delay_based_bitrate_bps_);
+ if (bitrate_ != prev_bitrate) {
+ min_bitrate_history_.clear();
+ min_bitrate_history_.push_back(std::make_pair(now_ms, bitrate_));
+ return;
+ }
}
UpdateMinHistory(now_ms);
// Only start updating bitrate when receiving receiver blocks.
« no previous file with comments | « no previous file | webrtc/modules/bitrate_controller/send_side_bandwidth_estimation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698