Change default parameters for the low-latency video pipeline

min_pacing:8ms, to avoid the situation where bursts of frames are sent
to the decoder at once due to network jitter. The bursts of frames
caused the queues further down in the processing to be full and
therefore drop all frames.

max_decode_queue_size:8, in the event that too many frames have piled
up, do as before and send all frames to the decoder to avoid building
up any latency.

These setting only affect the low-latency video pipeline that is enabled
by setting the playout RTP header extension to min=0ms, max>0ms.

Bug: chromium:1138888
Change-Id: I8154bf3efe7450b770da8387f8fb6b23f6be26bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/233220
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35119}
This commit is contained in:
Johannes Kron
2021-09-28 21:31:46 +02:00
committed by WebRTC LUCI CQ
parent aa373166f7
commit 23bfff3383
4 changed files with 21 additions and 6 deletions

View File

@ -38,6 +38,10 @@ namespace {
// Max number of frames the buffer will hold.
constexpr size_t kMaxFramesBuffered = 800;
// Default value for the maximum decode queue size that is used when the
// low-latency renderer is used.
constexpr size_t kZeroPlayoutDelayDefaultMaxDecodeQueueSize = 8;
// Max number of decoded frame info that will be saved.
constexpr int kMaxFramesHistory = 1 << 13;
@ -64,8 +68,9 @@ FrameBuffer::FrameBuffer(Clock* clock,
add_rtt_to_playout_delay_(
webrtc::field_trial::IsEnabled("WebRTC-AddRttToPlayoutDelay")),
rtt_mult_settings_(RttMultExperiment::GetRttMultValue()),
zero_playout_delay_max_decode_queue_size_("max_decode_queue_size",
kMaxFramesBuffered) {
zero_playout_delay_max_decode_queue_size_(
"max_decode_queue_size",
kZeroPlayoutDelayDefaultMaxDecodeQueueSize) {
ParseFieldTrial({&zero_playout_delay_max_decode_queue_size_},
field_trial::FindFullName("WebRTC-ZeroPlayoutDelay"));
callback_checker_.Detach();