Add a config flag to disable the audio ALR probing request.
Bug: webrtc:10200
Change-Id: Ifc5ea100cd66a7ccd6b777259d6531c93118eeb1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138064
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28035}
diff --git a/audio/audio_send_stream.cc b/audio/audio_send_stream.cc
index 942551b..5c88e01 100644
--- a/audio/audio_send_stream.cc
+++ b/audio/audio_send_stream.cc
@@ -284,7 +284,11 @@
// send side congestion control, wich depends on feedback packets which
// requires transport sequence numbers to be enabled.
if (stream->rtp_transport_) {
- stream->rtp_transport_->EnablePeriodicAlrProbing(true);
+ // Optionally request ALR probing but do not override any existing
+ // request from other streams.
+ if (stream->allocation_settings_.RequestAlrProbing()) {
+ stream->rtp_transport_->EnablePeriodicAlrProbing(true);
+ }
bandwidth_observer = stream->rtp_transport_->GetBandwidthObserver();
}
}
diff --git a/rtc_base/experiments/audio_allocation_settings.cc b/rtc_base/experiments/audio_allocation_settings.cc
index 66d9d47..62f0c8c 100644
--- a/rtc_base/experiments/audio_allocation_settings.cc
+++ b/rtc_base/experiments/audio_allocation_settings.cc
@@ -17,10 +17,11 @@
constexpr int kOverheadPerPacket = 20 + 8 + 10 + 12;
} // namespace
AudioAllocationSettings::AudioAllocationSettings()
- : audio_send_side_bwe_("Enabled"),
- allocate_audio_without_feedback_("Enabled"),
- force_no_audio_feedback_("Enabled"),
- send_side_bwe_with_overhead_("Enabled"),
+ : audio_send_side_bwe_(/*Flag key*/ "Enabled"),
+ allocate_audio_without_feedback_(/*Flag key*/ "Enabled"),
+ force_no_audio_feedback_(/*Flag key*/ "Enabled"),
+ disable_audio_alr_request_(/*Flag key*/ "Disabled"),
+ send_side_bwe_with_overhead_(/*Flag key*/ "Enabled"),
min_bitrate_("min"),
max_bitrate_("max"),
priority_bitrate_("prio_rate", DataRate::Zero()),
@@ -31,6 +32,8 @@
field_trial::FindFullName("WebRTC-Audio-ABWENoTWCC"));
ParseFieldTrial({&force_no_audio_feedback_},
field_trial::FindFullName("WebRTC-Audio-ForceNoTWCC"));
+ ParseFieldTrial({&disable_audio_alr_request_},
+ field_trial::FindFullName("WebRTC-Audio-AlrProbing"));
ParseFieldTrial({&send_side_bwe_with_overhead_},
field_trial::FindFullName("WebRTC-SendSideBwe-WithOverhead"));
@@ -68,6 +71,10 @@
transport_seq_num_extension_header_id != 0;
}
+bool AudioAllocationSettings::RequestAlrProbing() const {
+ return !disable_audio_alr_request_;
+}
+
bool AudioAllocationSettings::IncludeAudioInAllocationOnStart(
int min_bitrate_bps,
int max_bitrate_bps,
diff --git a/rtc_base/experiments/audio_allocation_settings.h b/rtc_base/experiments/audio_allocation_settings.h
index d85b007..c908a57 100644
--- a/rtc_base/experiments/audio_allocation_settings.h
+++ b/rtc_base/experiments/audio_allocation_settings.h
@@ -34,6 +34,8 @@
// configured.
bool ShouldSendTransportSequenceNumber(
int transport_seq_num_extension_header_id) const;
+ // Returns true if audio should request ALR probing from network controller.
+ bool RequestAlrProbing() const;
// Returns true if audio should be added to rate allocation when the audio
// stream is started.
// |min_bitrate_bps| the configured min bitrate, set to -1 if unset.
@@ -80,6 +82,7 @@
FieldTrialFlag audio_send_side_bwe_;
FieldTrialFlag allocate_audio_without_feedback_;
FieldTrialFlag force_no_audio_feedback_;
+ FieldTrialFlag disable_audio_alr_request_;
FieldTrialFlag send_side_bwe_with_overhead_;
int min_overhead_bps_ = 0;
// Field Trial configured bitrates to use as overrides over default/user