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