From 8169db6df2689d4f13c63462ce906b4ea317ca44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= Date: Mon, 10 Jun 2019 10:09:54 +0200 Subject: [PATCH] Expose target bandwidth fraction for transport feedback for field trial MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: None Change-Id: I5b3db8ff18460ac0bfd5e3db994642a21ba90d9a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/140944 Reviewed-by: Björn Terelius Commit-Queue: Niels Moller Cr-Commit-Position: refs/heads/master@{#28210} --- .../remote_bitrate_estimator/remote_estimator_proxy.cc | 3 ++- .../remote_bitrate_estimator/remote_estimator_proxy.h | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/remote_bitrate_estimator/remote_estimator_proxy.cc b/modules/remote_bitrate_estimator/remote_estimator_proxy.cc index 50a724b89a..274da0b8a4 100644 --- a/modules/remote_bitrate_estimator/remote_estimator_proxy.cc +++ b/modules/remote_bitrate_estimator/remote_estimator_proxy.cc @@ -107,7 +107,8 @@ void RemoteEstimatorProxy::OnBitrateChanged(int bitrate_bps) { rtc::CritScope cs(&lock_); send_interval_ms_ = static_cast( 0.5 + kTwccReportSize * 8.0 * 1000.0 / - rtc::SafeClamp(0.05 * bitrate_bps, kMinTwccRate, kMaxTwccRate)); + rtc::SafeClamp(send_config_.bandwidth_fraction * bitrate_bps, + kMinTwccRate, kMaxTwccRate)); } void RemoteEstimatorProxy::SetSendPeriodicFeedback( diff --git a/modules/remote_bitrate_estimator/remote_estimator_proxy.h b/modules/remote_bitrate_estimator/remote_estimator_proxy.h index 52107cfc39..439f123059 100644 --- a/modules/remote_bitrate_estimator/remote_estimator_proxy.h +++ b/modules/remote_bitrate_estimator/remote_estimator_proxy.h @@ -58,12 +58,13 @@ class RemoteEstimatorProxy : public RemoteBitrateEstimator { FieldTrialParameter min_interval{"min", TimeDelta::ms(50)}; FieldTrialParameter max_interval{"max", TimeDelta::ms(250)}; FieldTrialParameter default_interval{"def", TimeDelta::ms(100)}; + FieldTrialParameter bandwidth_fraction{"frac", 0.05}; explicit TransportWideFeedbackConfig( const WebRtcKeyValueConfig* key_value_config) { - ParseFieldTrial( - {&back_window, &min_interval, &max_interval, &default_interval}, - key_value_config->Lookup( - "WebRTC-Bwe-TransportWideFeedbackIntervals")); + ParseFieldTrial({&back_window, &min_interval, &max_interval, + &default_interval, &bandwidth_fraction}, + key_value_config->Lookup( + "WebRTC-Bwe-TransportWideFeedbackIntervals")); } };