diff --git a/modules/congestion_controller/goog_cc/probe_controller.cc b/modules/congestion_controller/goog_cc/probe_controller.cc index 1f4a9d7b57..94a98e03fe 100644 --- a/modules/congestion_controller/goog_cc/probe_controller.cc +++ b/modules/congestion_controller/goog_cc/probe_controller.cc @@ -280,6 +280,10 @@ std::vector ProbeController::InitiateCapacityProbing( return std::vector(); } +void ProbeController::SetMaxBitrate(int64_t max_bitrate_bps) { + max_bitrate_bps_ = max_bitrate_bps; +} + void ProbeController::Reset(int64_t at_time_ms) { network_available_ = true; state_ = State::kInit; diff --git a/modules/congestion_controller/goog_cc/probe_controller.h b/modules/congestion_controller/goog_cc/probe_controller.h index 0b1e685bab..75f3ee778b 100644 --- a/modules/congestion_controller/goog_cc/probe_controller.h +++ b/modules/congestion_controller/goog_cc/probe_controller.h @@ -63,6 +63,9 @@ class ProbeController { RTC_WARN_UNUSED_RESULT std::vector InitiateCapacityProbing(int64_t bitrate_bps, int64_t at_time_ms); + // Sets a new maximum probing bitrate, without generating a new probe cluster. + void SetMaxBitrate(int64_t max_bitrate_bps); + // Resets the ProbeController to a state equivalent to as if it was just // created EXCEPT for |enable_periodic_alr_probing_|. void Reset(int64_t at_time_ms); diff --git a/modules/congestion_controller/include/send_side_congestion_controller.h b/modules/congestion_controller/include/send_side_congestion_controller.h index 41c10173c2..7f22ed2594 100644 --- a/modules/congestion_controller/include/send_side_congestion_controller.h +++ b/modules/congestion_controller/include/send_side_congestion_controller.h @@ -121,6 +121,8 @@ class DEPRECATED_SendSideCongestionController void SetAlrLimitedBackoffExperiment(bool enable); + void SetMaxProbingBitrate(int64_t max_probing_bitrate_bps); + private: void MaybeTriggerOnNetworkChanged(); diff --git a/modules/congestion_controller/send_side_congestion_controller.cc b/modules/congestion_controller/send_side_congestion_controller.cc index cf2bba4273..3c8f72f385 100644 --- a/modules/congestion_controller/send_side_congestion_controller.cc +++ b/modules/congestion_controller/send_side_congestion_controller.cc @@ -192,6 +192,12 @@ void DEPRECATED_SendSideCongestionController::SetAlrLimitedBackoffExperiment( delay_based_bwe_->SetAlrLimitedBackoffExperiment(enable); } +void DEPRECATED_SendSideCongestionController::SetMaxProbingBitrate( + int64_t max_probing_bitrate_bps) { + rtc::CritScope cs(&probe_lock_); + probe_controller_->SetMaxBitrate(max_probing_bitrate_bps); +} + void DEPRECATED_SendSideCongestionController::RegisterPacketFeedbackObserver( PacketFeedbackObserver* observer) { transport_feedback_adapter_.RegisterPacketFeedbackObserver(observer);