Introduces common AudioAllocationSettings class.

This class collects the field trial based configuration of audio
allocation and bandwidth in one place. This makes it easier
overview and prepares for future cleanup of the trials.

Bug: webrtc:9718
Change-Id: I34a441c0165b423f1e2ee63894337484684146ac
Reviewed-on: https://webrtc-review.googlesource.com/c/118282
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26370}
This commit is contained in:
Sebastian Jansson
2019-01-23 12:37:49 +01:00
committed by Commit Bot
parent 33b716f7dd
commit 470a5eae93
15 changed files with 294 additions and 125 deletions

View File

@ -51,7 +51,7 @@ PacedSender::PacedSender(const Clock* clock,
drain_large_queues_(!field_trial::IsDisabled("WebRTC-Pacer-DrainQueue")),
send_padding_if_silent_(
field_trial::IsEnabled("WebRTC-Pacer-PadInSilence")),
video_blocks_audio_(!field_trial::IsDisabled("WebRTC-Pacer-BlockAudio")),
pace_audio_(!field_trial::IsDisabled("WebRTC-Pacer-BlockAudio")),
min_packet_limit_ms_("", kDefaultMinPacketLimitMs),
last_timestamp_ms_(clock_->TimeInMilliseconds()),
paused_(false),
@ -408,8 +408,7 @@ const RoundRobinPacketQueue::Packet* PacedSender::GetPendingPacket(
// reinsert it if send fails.
const RoundRobinPacketQueue::Packet* packet = &packets_.BeginPop();
bool audio_packet = packet->priority == kHighPriority;
bool apply_pacing =
!audio_packet || account_for_audio_ || video_blocks_audio_;
bool apply_pacing = !audio_packet || pace_audio_;
if (apply_pacing && (Congested() || (media_budget_.bytes_remaining() == 0 &&
pacing_info.probe_cluster_id ==
PacedPacketInfo::kNotAProbe))) {