Add ability to set max probing bitrate in SendSideCongestionController.

While this class is deprecated, it's needed as a stop-gap solution.
Other methods to configure the max probe rate all effect the current
estimate and/or trigger new probes to be sent, and we need a way to
configure the max without affecting other behavior.

Bug: webrtc:10070
Change-Id: I2b0ba2fef42d0bab6e5ea7f7c921681557802b4b
Reviewed-on: https://webrtc-review.googlesource.com/c/114880
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26162}
This commit is contained in:
Erik Språng 2019-01-08 15:46:06 +01:00 committed by Commit Bot
parent 8905d04109
commit 791d43c4b1
4 changed files with 15 additions and 0 deletions

View File

@ -280,6 +280,10 @@ std::vector<ProbeClusterConfig> ProbeController::InitiateCapacityProbing(
return std::vector<ProbeClusterConfig>();
}
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;

View File

@ -63,6 +63,9 @@ class ProbeController {
RTC_WARN_UNUSED_RESULT std::vector<ProbeClusterConfig>
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);

View File

@ -121,6 +121,8 @@ class DEPRECATED_SendSideCongestionController
void SetAlrLimitedBackoffExperiment(bool enable);
void SetMaxProbingBitrate(int64_t max_probing_bitrate_bps);
private:
void MaybeTriggerOnNetworkChanged();

View File

@ -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);