Don't pace audio by default

After experimentation, not pacing audio is better. This is controlled
by the field trial WebRTC-Pacer-BlockAudio. This change keeps the flag,
but changes the behaviour such that it defaults to Disabled. However,
audio can still be paced if one chooses by enabling the field trial.

Bug: webrtc:11257
Change-Id: I5b23a82bb6708c007cf8dfb40065c821eefdc4e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/165381
Commit-Queue: Evan Shrubsole <eshr@google.com>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30262}
This commit is contained in:
Evan Shrubsole 2020-01-08 16:45:08 +01:00 committed by Commit Bot
parent 6dc06c8146
commit 6ef59d1ced
2 changed files with 8 additions and 8 deletions

View File

@ -96,7 +96,7 @@ PacingController::PacingController(Clock* clock,
!IsDisabled(*field_trials_, "WebRTC-Pacer-DrainQueue")),
send_padding_if_silent_(
IsEnabled(*field_trials_, "WebRTC-Pacer-PadInSilence")),
pace_audio_(!IsDisabled(*field_trials_, "WebRTC-Pacer-BlockAudio")),
pace_audio_(IsEnabled(*field_trials_, "WebRTC-Pacer-BlockAudio")),
small_first_probe_packet_(
IsEnabled(*field_trials_, "WebRTC-Pacer-SmallFirstProbePacket")),
send_side_bwe_with_overhead_(
@ -600,7 +600,7 @@ std::unique_ptr<RtpPacketToSend> PacingController::GetPendingPacket(
bool is_probe = pacing_info.probe_cluster_id != PacedPacketInfo::kNotAProbe;
if (!unpaced_audio_packet && !is_probe) {
if (Congested()) {
// Don't send anyting if congested.
// Don't send anything if congested.
return nullptr;
}

View File

@ -367,7 +367,8 @@ TEST_P(PacingControllerFieldTrialTest, PaddingInSilenceWithTrial) {
pacer.ProcessPackets();
}
TEST_P(PacingControllerFieldTrialTest, DefaultCongestionWindowAffectsAudio) {
TEST_P(PacingControllerFieldTrialTest, CongestionWindowAffectsAudioInTrial) {
ScopedFieldTrials trial("WebRTC-Pacer-BlockAudio/Enabled/");
EXPECT_CALL(callback_, SendPadding).Times(0);
PacingController pacer(&clock_, &callback_, nullptr, nullptr, GetParam());
pacer.SetPacingRates(DataRate::kbps(10000), DataRate::Zero());
@ -394,8 +395,7 @@ TEST_P(PacingControllerFieldTrialTest, DefaultCongestionWindowAffectsAudio) {
}
TEST_P(PacingControllerFieldTrialTest,
CongestionWindowDoesNotAffectAudioInTrial) {
ScopedFieldTrials trial("WebRTC-Pacer-BlockAudio/Disabled/");
DefaultCongestionWindowDoesNotAffectAudio) {
EXPECT_CALL(callback_, SendPadding).Times(0);
PacingController pacer(&clock_, &callback_, nullptr, nullptr, GetParam());
pacer.SetPacingRates(DataRate::bps(10000000), DataRate::Zero());
@ -411,7 +411,8 @@ TEST_P(PacingControllerFieldTrialTest,
ProcessNext(&pacer);
}
TEST_P(PacingControllerFieldTrialTest, DefaultBudgetAffectsAudio) {
TEST_P(PacingControllerFieldTrialTest, BudgetAffectsAudioInTrial) {
ScopedFieldTrials trial("WebRTC-Pacer-BlockAudio/Enabled/");
PacingController pacer(&clock_, &callback_, nullptr, nullptr, GetParam());
DataRate pacing_rate =
DataRate::bps(video.packet_size / 3 * 8 * kProcessIntervalsPerSecond);
@ -440,8 +441,7 @@ TEST_P(PacingControllerFieldTrialTest, DefaultBudgetAffectsAudio) {
: PacingController::kMinSleepTime);
}
TEST_P(PacingControllerFieldTrialTest, BudgetDoesNotAffectAudioInTrial) {
ScopedFieldTrials trial("WebRTC-Pacer-BlockAudio/Disabled/");
TEST_P(PacingControllerFieldTrialTest, DefaultBudgetDoesNotAffectAudio) {
EXPECT_CALL(callback_, SendPadding).Times(0);
PacingController pacer(&clock_, &callback_, nullptr, nullptr, GetParam());
pacer.SetPacingRates(