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

@ -133,6 +133,18 @@ void ProbeController::SetBitrates(int64_t min_bitrate_bps,
}
}
void ProbeController::OnMaxTotalAllocatedBitrate(
int64_t max_total_allocated_bitrate,
int64_t at_time_ms) {
// 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(at_time_ms, {max_total_allocated_bitrate}, false);
}
}
void ProbeController::OnNetworkAvailability(NetworkAvailability msg) {
network_available_ = msg.network_available;
if (network_available_ && state_ == State::kInit && start_bitrate_bps_ > 0)