webrtc/modules/audio_coding
Ruslan Burakov 4a68fb9ab4 Separate base minimum delay and minimum delay.
On NetEq level latency corresponds to delay and two terms can be used interchangeably here.

In order to implement latency constraint we need to provide a range of possible values which should be constant. See getCapabilities() here:
https://www.w3.org/TR/mediacapture-streams/#dfn-applyconstraints-algorithm

Lowest possible value accepted value is constant and equals 0. But because |packet_len_ms_| and |maximum_delay_ms_| may be updated during live of DelayManager upper bound is not constant. Moreover, due to change in |packet_len_ms_| the |minimum_delay_ms_| which was valid when its was set may be considered invalid later on.

To circumvent that and provide constant range for capabilities we separate base minimum delay and minimum delay. ApplyConstraints algorithm will set base minimum delay. Base minimum delay will act as recommendation for lower bound of minimum delay and will be used to limit target delay. If user sets base minimum delay through ApplyConstraints which is bigger than currently
possible maximum (e.g. bigger than NetEq maximum buffer size in milliseconds) then base minimum delay will be clamped to currently possible maximum to match user's intentions as best as possible.

Note, that we keep original behavior when minimum_delay_ms_ (effective_minimum_delay_ms after this CL) in LimitTargetLevel method may be above upper bound due to changing packet audio length.

Bug: webrtc:10287
Change-Id: I06b8f5cd3fd1bc36800af0447f91f7c4dc21a766
Reviewed-on: https://webrtc-review.googlesource.com/c/121700
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26666}
2019-02-13 15:54:43 +00:00
..
acm2 Propagate base minimum delay to audio_receiver_stream 2019-02-06 11:07:42 +00:00
audio_network_adaptor [clang-tidy] Apply performance-for-range-copy fixes. 2019-01-28 09:53:50 +00:00
codecs [clang-tidy] Apply performance-move-const-arg fixes. 2019-02-01 15:02:36 +00:00
include Propagate base minimum delay to audio_receiver_stream 2019-02-06 11:07:42 +00:00
neteq Separate base minimum delay and minimum delay. 2019-02-13 15:54:43 +00:00
test (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
audio_coding.gni Don't select audio codecs depending on GN vars build_with_{chromium|mozilla} 2017-11-01 18:59:27 +00:00
BUILD.gn Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
DEPS Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
OWNERS Make ivoc owner of audio_coding. 2018-10-15 15:08:28 +00:00