Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: webrtc/call/bitrate_allocator.cc

Issue 2536753002: Relanding "Pass time constant to bwe smoothing filter." (Closed)
Patch Set: rebasing Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/call/bitrate_allocator.h ('k') | webrtc/call/bitrate_allocator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/call/bitrate_allocator.cc
diff --git a/webrtc/call/bitrate_allocator.cc b/webrtc/call/bitrate_allocator.cc
index 6e9be731d5b3e7654f5c122035e3026e620d80a9..5bd1a2c93edf6902da3e5002405e8a7bc47675aa 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();
}
« no previous file with comments | « webrtc/call/bitrate_allocator.h ('k') | webrtc/call/bitrate_allocator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698