Support REMB in combination with send-side BWE.

BUG=webrtc:4173

Review URL: https://codereview.webrtc.org/1581113006

Cr-Commit-Position: refs/heads/master@{#11322}
This commit is contained in:
stefan
2016-01-20 07:13:58 -08:00
committed by Commit bot
parent a5dec16b42
commit 32f81542c2
12 changed files with 206 additions and 24 deletions

View File

@ -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_;
}