| Index: webrtc/call/bitrate_allocator.cc
|
| diff --git a/webrtc/call/bitrate_allocator.cc b/webrtc/call/bitrate_allocator.cc
|
| index 2c5ba6d76cf0e3da055daa629c0357b833bf244a..70763f3e8d059711fb03296889f8baebc3c64e9c 100644
|
| --- a/webrtc/call/bitrate_allocator.cc
|
| +++ b/webrtc/call/bitrate_allocator.cc
|
| @@ -65,13 +65,15 @@ BitrateAllocator::~BitrateAllocator() {
|
|
|
| void BitrateAllocator::OnNetworkChanged(uint32_t target_bitrate_bps,
|
| uint8_t fraction_loss,
|
| - int64_t rtt) {
|
| + int64_t rtt,
|
| + int64_t probing_interval_ms) {
|
| RTC_DCHECK_CALLED_SEQUENTIALLY(&sequenced_checker_);
|
| last_bitrate_bps_ = target_bitrate_bps;
|
| last_non_zero_bitrate_bps_ =
|
| target_bitrate_bps > 0 ? target_bitrate_bps : last_non_zero_bitrate_bps_;
|
| last_fraction_loss_ = fraction_loss;
|
| last_rtt_ = rtt;
|
| + last_probing_interval_ms_ = probing_interval_ms;
|
|
|
| // Periodically log the incoming BWE.
|
| int64_t now = clock_->TimeInMilliseconds();
|
| @@ -85,7 +87,8 @@ void BitrateAllocator::OnNetworkChanged(uint32_t target_bitrate_bps,
|
| for (auto& config : bitrate_observer_configs_) {
|
| uint32_t allocated_bitrate = allocation[config.observer];
|
| uint32_t protection_bitrate = config.observer->OnBitrateUpdated(
|
| - allocated_bitrate, last_fraction_loss_, last_rtt_);
|
| + allocated_bitrate, last_fraction_loss_, last_rtt_,
|
| + last_probing_interval_ms_);
|
|
|
| if (allocated_bitrate == 0 && config.allocated_bitrate_bps > 0) {
|
| if (target_bitrate_bps > 0)
|
| @@ -141,7 +144,8 @@ void BitrateAllocator::AddObserver(BitrateAllocatorObserver* observer,
|
| for (auto& config : bitrate_observer_configs_) {
|
| uint32_t allocated_bitrate = allocation[config.observer];
|
| uint32_t protection_bitrate = config.observer->OnBitrateUpdated(
|
| - allocated_bitrate, last_fraction_loss_, last_rtt_);
|
| + allocated_bitrate, last_fraction_loss_, last_rtt_,
|
| + last_probing_interval_ms_);
|
| config.allocated_bitrate_bps = allocated_bitrate;
|
| if (allocated_bitrate > 0)
|
| config.media_ratio = MediaRatio(allocated_bitrate, protection_bitrate);
|
| @@ -151,7 +155,8 @@ void BitrateAllocator::AddObserver(BitrateAllocatorObserver* observer,
|
| // But we still have to return the initial config bitrate + let the
|
| // observer know that it can not produce frames.
|
| allocation = AllocateBitrates(last_non_zero_bitrate_bps_);
|
| - observer->OnBitrateUpdated(0, last_fraction_loss_, last_rtt_);
|
| + observer->OnBitrateUpdated(0, last_fraction_loss_, last_rtt_,
|
| + last_probing_interval_ms_);
|
| }
|
| UpdateAllocationLimits();
|
| }
|
|
|