From 16189c64291556aa495ee77ac479354e4e6bee1e Mon Sep 17 00:00:00 2001 From: Sebastian Jansson Date: Thu, 5 Dec 2019 17:03:41 +0100 Subject: [PATCH] Apply network estimate by default. Bug: webrtc:10498 Change-Id: I49e5a3dd989152abfa0abdf90356b37cab912a91 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161382 Commit-Queue: Sebastian Jansson Reviewed-by: Sebastian Jansson Reviewed-by: Per Kjellander Cr-Commit-Position: refs/heads/master@{#30021} --- .../goog_cc/goog_cc_network_control.cc | 10 ++++------ modules/remote_bitrate_estimator/aimd_rate_control.cc | 11 +++++++++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control.cc b/modules/congestion_controller/goog_cc/goog_cc_network_control.cc index 04bbd2656b..adb143375c 100644 --- a/modules/congestion_controller/goog_cc/goog_cc_network_control.cc +++ b/modules/congestion_controller/goog_cc/goog_cc_network_control.cc @@ -51,9 +51,7 @@ int64_t GetBpsOrDefault(const absl::optional& rate, return fallback_bps; } } -bool IsEnabled(const WebRtcKeyValueConfig* config, absl::string_view key) { - return config->Lookup(key).find("Enabled") == 0; -} + bool IsNotDisabled(const WebRtcKeyValueConfig* config, absl::string_view key) { return config->Lookup(key).find("Disabled") != 0; } @@ -69,9 +67,9 @@ GoogCcNetworkController::GoogCcNetworkController(NetworkControllerConfig config, safe_reset_acknowledged_rate_("ack"), use_min_allocatable_as_lower_bound_( IsNotDisabled(key_value_config_, "WebRTC-Bwe-MinAllocAsLowerBound")), - ignore_probes_lower_than_network_estimate_( - IsEnabled(key_value_config_, - "WebRTC-Bwe-IgnoreProbesLowerThanNetworkStateEstimate")), + ignore_probes_lower_than_network_estimate_(IsNotDisabled( + key_value_config_, + "WebRTC-Bwe-IgnoreProbesLowerThanNetworkStateEstimate")), rate_control_settings_( RateControlSettings::ParseFromKeyValueConfig(key_value_config_)), probe_controller_( diff --git a/modules/remote_bitrate_estimator/aimd_rate_control.cc b/modules/remote_bitrate_estimator/aimd_rate_control.cc index c3b4101976..560edfec0c 100644 --- a/modules/remote_bitrate_estimator/aimd_rate_control.cc +++ b/modules/remote_bitrate_estimator/aimd_rate_control.cc @@ -40,6 +40,11 @@ bool IsEnabled(const WebRtcKeyValueConfig& field_trials, return field_trials.Lookup(key).find("Enabled") == 0; } +bool IsNotDisabled(const WebRtcKeyValueConfig& field_trials, + absl::string_view key) { + return field_trials.Lookup(key).find("Disabled") != 0; +} + double ReadBackoffFactor(const WebRtcKeyValueConfig& key_value_config) { std::string experiment_string = key_value_config.Lookup(kBweBackOffFactorExperiment); @@ -90,9 +95,11 @@ AimdRateControl::AimdRateControl(const WebRtcKeyValueConfig* key_value_config, smoothing_experiment_( IsEnabled(*key_value_config, "WebRTC-Audio-BandwidthSmoothing")), estimate_bounded_backoff_( - IsEnabled(*key_value_config, "WebRTC-Bwe-EstimateBoundedBackoff")), + IsNotDisabled(*key_value_config, + "WebRTC-Bwe-EstimateBoundedBackoff")), estimate_bounded_increase_( - IsEnabled(*key_value_config, "WebRTC-Bwe-EstimateBoundedIncrease")), + IsNotDisabled(*key_value_config, + "WebRTC-Bwe-EstimateBoundedIncrease")), initial_backoff_interval_("initial_backoff_interval"), low_throughput_threshold_("low_throughput", DataRate::Zero()) { // E.g