Propagating total_bitrate_bps from BitrateAllocator to ProbeController, part 1.

Added total_bitrate_bps to LimitObserver::OnAllocationLimitsChanged.

Bug: webrtc:8955
Change-Id: Ied9b2d24ab97cff21518ce70d5d35dfd8230ed08
Reviewed-on: https://webrtc-review.googlesource.com/58801
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22233}
This commit is contained in:
philipel
2018-02-28 13:06:28 +01:00
committed by Philip Eliasson
parent 27e8a3e223
commit f69e768032
5 changed files with 61 additions and 36 deletions

View File

@ -179,6 +179,7 @@ void BitrateAllocator::UpdateAllocationLimits() {
RTC_DCHECK_CALLED_SEQUENTIALLY(&sequenced_checker_);
uint32_t total_requested_padding_bitrate = 0;
uint32_t total_requested_min_bitrate = 0;
uint32_t total_requested_bitrate = 0;
for (const auto& config : bitrate_observer_configs_) {
uint32_t stream_padding = config.pad_up_bitrate_bps;
@ -189,6 +190,7 @@ void BitrateAllocator::UpdateAllocationLimits() {
std::max(config.MinBitrateWithHysteresis(), stream_padding);
}
total_requested_padding_bitrate += stream_padding;
total_requested_bitrate += config.max_bitrate_bps;
}
if (total_requested_padding_bitrate == total_requested_padding_bitrate_ &&
@ -204,7 +206,8 @@ void BitrateAllocator::UpdateAllocationLimits() {
<< "bps, total_requested_padding_bitrate: "
<< total_requested_padding_bitrate << "bps";
limit_observer_->OnAllocationLimitsChanged(total_requested_min_bitrate,
total_requested_padding_bitrate);
total_requested_padding_bitrate,
total_requested_bitrate);
}
void BitrateAllocator::RemoveObserver(BitrateAllocatorObserver* observer) {