Add minimum overhead to configured priorty bitrate instead of maximum.

This makes an assumption that if we have variable frame length then we
will increase payload bitrate up to priority bitrate before adapting the
frame length.

Bug: webrtc:11001
Change-Id: Iec51d5ccce053d55ccd30a9e4712765227e10852
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169852
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30713}
This commit is contained in:
Jakob Ivarsson
2020-03-06 09:59:56 +01:00
committed by Commit Bot
parent c0bdf1e361
commit 01ab084f47

View File

@ -828,8 +828,8 @@ void AudioSendStream::ConfigureBitrateObserver() {
RTC_DCHECK(frame_length_range_);
const DataSize kOverheadPerPacket =
DataSize::Bytes(total_packet_overhead_bytes_);
DataRate max_overhead = kOverheadPerPacket / frame_length_range_->first;
priority_bitrate += max_overhead;
DataRate min_overhead = kOverheadPerPacket / frame_length_range_->second;
priority_bitrate += min_overhead;
}
}
if (allocation_settings_.priority_bitrate_raw)