Propagating total_bitrate_bps from BitrateAllocator to ProbeController, part 3.

Trigger on total bitrate change.

Bug: webrtc:8955
Change-Id: I2373a1b7f139c7ea748a9641593e714d6895c8f6
Reviewed-on: https://webrtc-review.googlesource.com/59323
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22323}
This commit is contained in:
philipel
2018-03-06 18:29:22 +01:00
committed by Commit Bot
parent 7dbb701076
commit db4fa4b944
15 changed files with 85 additions and 4 deletions

View File

@ -125,6 +125,19 @@ void ProbeController::SetBitrates(int64_t min_bitrate_bps,
}
}
void ProbeController::OnMaxTotalAllocatedBitrate(
int64_t max_total_allocated_bitrate) {
rtc::CritScope cs(&critsect_);
// TODO(philipel): Should |max_total_allocated_bitrate| be used as a limit for
// ALR probing?
if (estimated_bitrate_bps_ != 0 &&
estimated_bitrate_bps_ < max_bitrate_bps_ &&
estimated_bitrate_bps_ < max_total_allocated_bitrate) {
InitiateProbing(clock_->TimeInMilliseconds(), {max_total_allocated_bitrate},
false);
}
}
void ProbeController::OnNetworkStateChanged(NetworkState network_state) {
rtc::CritScope cs(&critsect_);
network_state_ = network_state;