diff --git a/modules/congestion_controller/goog_cc/delay_based_bwe.h b/modules/congestion_controller/goog_cc/delay_based_bwe.h index 2cf8eb54b6..a2331b6223 100644 --- a/modules/congestion_controller/goog_cc/delay_based_bwe.h +++ b/modules/congestion_controller/goog_cc/delay_based_bwe.h @@ -62,9 +62,9 @@ class DelayBasedBwe { void SetMinBitrate(DataRate min_bitrate); TimeDelta GetExpectedBwePeriod() const; void SetAlrLimitedBackoffExperiment(bool enabled); - DataRate TriggerOveruse(Timestamp at_time, absl::optional link_capacity); + DataRate last_estimate() const { return prev_bitrate_; } private: friend class GoogCcStatePrinter; 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 6b94bf30dd..52ea5cecc1 100644 --- a/modules/congestion_controller/goog_cc/goog_cc_network_control.cc +++ b/modules/congestion_controller/goog_cc/goog_cc_network_control.cc @@ -72,6 +72,9 @@ GoogCcNetworkController::GoogCcNetworkController(NetworkControllerConfig config, "WebRTC-Bwe-CongestionWindowDownlinkDelay")), 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")), rate_control_settings_( RateControlSettings::ParseFromKeyValueConfig(key_value_config_)), probe_controller_( @@ -489,8 +492,6 @@ NetworkControlUpdate GoogCcNetworkController::OnTransportPacketsFeedback( } } - absl::optional probe_bitrate = - probe_bitrate_estimator_->FetchAndResetLastEstimatedBitrate(); if (network_estimator_) { network_estimator_->OnTransportPacketsFeedback(report); auto prev_estimate = estimate_; @@ -503,6 +504,13 @@ NetworkControlUpdate GoogCcNetworkController::OnTransportPacketsFeedback( estimate_->link_capacity_lower, estimate_->link_capacity_upper)); } } + absl::optional probe_bitrate = + probe_bitrate_estimator_->FetchAndResetLastEstimatedBitrate(); + if (ignore_probes_lower_than_network_estimate_ && probe_bitrate && + estimate_ && *probe_bitrate < delay_based_bwe_->last_estimate() && + *probe_bitrate < estimate_->link_capacity_lower) { + probe_bitrate.reset(); + } NetworkControlUpdate update; bool recovered_from_overuse = false; diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control.h b/modules/congestion_controller/goog_cc/goog_cc_network_control.h index 6710d89383..02ac49de5d 100644 --- a/modules/congestion_controller/goog_cc/goog_cc_network_control.h +++ b/modules/congestion_controller/goog_cc/goog_cc_network_control.h @@ -87,6 +87,7 @@ class GoogCcNetworkController : public NetworkControllerInterface { FieldTrialFlag safe_reset_acknowledged_rate_; const bool use_downlink_delay_for_congestion_window_; const bool use_min_allocatable_as_lower_bound_; + const bool ignore_probes_lower_than_network_estimate_; const RateControlSettings rate_control_settings_; const std::unique_ptr probe_controller_;