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

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

Issue 1581113006: Support REMB in combination with send-side BWE. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added comment. 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
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 258c4d94def99192a572d614a9350e5115299f7a..68912907e6f6faa0a081597eb53c5fd8da444a8e 100644
--- a/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc
+++ b/webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc
@@ -55,6 +55,7 @@ SendSideBandwidthEstimation::SendSideBandwidthEstimation()
last_fraction_loss_(0),
last_round_trip_time_ms_(0),
bwe_incoming_(0),
+ delay_based_bitrate_bps_(0),
time_last_decrease_ms_(0),
first_report_time_ms_(-1),
initially_lost_packets_(0),
@@ -104,6 +105,13 @@ void SendSideBandwidthEstimation::UpdateReceiverEstimate(
bitrate_ = CapBitrateToThresholds(now_ms, bitrate_);
}
+void SendSideBandwidthEstimation::UpdateDelayBasedEstimate(
+ int64_t now_ms,
+ uint32_t bitrate_bps) {
+ delay_based_bitrate_bps_ = bitrate_bps;
+ bitrate_ = CapBitrateToThresholds(now_ms, bitrate_);
+}
+
void SendSideBandwidthEstimation::UpdateReceiverBlock(uint8_t fraction_loss,
int64_t rtt,
int number_of_packets,
@@ -268,6 +276,9 @@ uint32_t SendSideBandwidthEstimation::CapBitrateToThresholds(
if (bwe_incoming_ > 0 && bitrate > bwe_incoming_) {
bitrate = bwe_incoming_;
}
+ if (delay_based_bitrate_bps_ > 0 && bitrate > delay_based_bitrate_bps_) {
+ bitrate = delay_based_bitrate_bps_;
+ }
if (bitrate > max_bitrate_configured_) {
bitrate = max_bitrate_configured_;
}

Powered by Google App Engine
This is Rietveld 408576698