webrtc/modules/audio_coding/neteq
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
..
include Add get/set base min delay to neteq and acm_receiver. 2019-02-05 13:27:59 +00:00
mock Prevent updating state in the delay manager if the packet was reordered. 2019-02-06 15:30:54 +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
tools Prevent updating state in the delay manager if the packet was reordered. 2019-02-06 15:30:54 +00:00
accelerate.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
accelerate.h (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_decoder_unittest.cc (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_multi_vector.cc Let NetEq use the PLC output from a decoder 2018-09-14 07:05:20 +00:00
audio_multi_vector.h (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_multi_vector_unittest.cc Stop using Googletest legacy APIs. 2019-01-31 13:23:33 +00:00
audio_vector.cc Delete root header file typedef.h. 2018-07-25 14:59:26 +00:00
audio_vector.h (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_vector_unittest.cc Delete unused includes of assert.h 2018-10-04 14:01:44 +00:00
background_noise.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
background_noise.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
background_noise_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
buffer_level_filter.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
buffer_level_filter.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
buffer_level_filter_unittest.cc Remove simple stringstream usages. 2018-09-06 12:53:19 +00:00
comfort_noise.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
comfort_noise.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
comfort_noise_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
cross_correlation.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
cross_correlation.h [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
decision_logic.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
decision_logic.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
decision_logic_unittest.cc Prevent updating state in the delay manager if the packet was reordered. 2019-02-06 15:30:54 +00:00
decoder_database.cc Delete enum NetEqDecoder. 2019-01-11 13:52:25 +00:00
decoder_database.h Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
decoder_database_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
defines.h Let NetEq use the PLC output from a decoder 2018-09-14 07:05:20 +00:00
delay_manager.cc Separate base minimum delay and minimum delay. 2019-02-13 15:54:43 +00:00
delay_manager.h Separate base minimum delay and minimum delay. 2019-02-13 15:54:43 +00:00
delay_manager_unittest.cc Separate base minimum delay and minimum delay. 2019-02-13 15:54:43 +00:00
delay_peak_detector.cc Add NetEq config flag that enables RTX handling. 2019-01-10 10:04:34 +00:00
delay_peak_detector.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
delay_peak_detector_unittest.cc Add NetEq config flag that enables RTX handling. 2019-01-10 10:04:34 +00:00
dsp_helper.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
dsp_helper.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
dsp_helper_unittest.cc Delete root header file typedef.h. 2018-07-25 14:59:26 +00:00
dtmf_buffer.cc Delete unused includes of assert.h 2018-10-04 14:01:44 +00:00
dtmf_buffer.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
dtmf_buffer_unittest.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
dtmf_tone_generator.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
dtmf_tone_generator.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
dtmf_tone_generator_unittest.cc Remove simple stringstream usages. 2018-09-06 12:53:19 +00:00
expand.cc Expose delayed packet outage as a cumulative metric of samples in the new getStats API. 2018-11-27 15:10:09 +00:00
expand.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
expand_uma_logger.cc Replace rtc::Optional with absl::optional in modules/audio_coding 2018-06-19 12:46:20 +00:00
expand_uma_logger.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
expand_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
merge.cc Let NetEq use the PLC output from a decoder 2018-09-14 07:05:20 +00:00
merge.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
merge_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
nack_tracker.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
nack_tracker.h [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
nack_tracker_unittest.cc Delete root header file typedef.h. 2018-07-25 14:59:26 +00:00
neteq.cc Add NetEq config flag that enables RTX handling. 2019-01-10 10:04:34 +00:00
neteq_decoder_plc_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
neteq_external_decoder_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
neteq_impl.cc Prevent updating state in the delay manager if the packet was reordered. 2019-02-06 15:30:54 +00:00
neteq_impl.h Add get/set base min delay to neteq and acm_receiver. 2019-02-05 13:27:59 +00:00
neteq_impl_unittest.cc Prevent updating state in the delay manager if the packet was reordered. 2019-02-06 15:30:54 +00:00
neteq_network_stats_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
neteq_stereo_unittest.cc Stop using Googletest legacy APIs. 2019-01-31 13:23:33 +00:00
neteq_unittest.cc Expose jitterBufferEmittedCount in addition to the existing jitterBufferDelay for getStats(). 2019-01-16 11:44:10 +00:00
neteq_unittest.proto Moving src/webrtc into src/. 2017-09-15 04:25:06 +00:00
normal.cc Let NetEq use the PLC output from a decoder 2018-09-14 07:05:20 +00:00
normal.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
normal_unittest.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
packet.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
packet.h [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
packet_buffer.cc Delete unused method NetEq::PacketBufferStatistics 2018-11-23 09:39:32 +00:00
packet_buffer.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
packet_buffer_unittest.cc Delete enum NetEqDecoder. 2019-01-11 13:52:25 +00:00
post_decode_vad.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
post_decode_vad.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
post_decode_vad_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
preemptive_expand.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
preemptive_expand.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
random_vector.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
random_vector.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
random_vector_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
red_payload_splitter.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
red_payload_splitter.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
red_payload_splitter_unittest.cc Delete method DecoderDatabase::RegisterPayload(...NetEqDecoder...) 2019-01-11 07:39:45 +00:00
statistics_calculator.cc Expose jitterBufferEmittedCount in addition to the existing jitterBufferDelay for getStats(). 2019-01-16 11:44:10 +00:00
statistics_calculator.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
statistics_calculator_unittest.cc NetEq: Simplify the dependencies of GetNetworkStatistics 2017-09-25 20:32:12 +00:00
sync_buffer.cc Let NetEq use the PLC output from a decoder 2018-09-14 07:05:20 +00:00
sync_buffer.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
sync_buffer_unittest.cc Move some numeric utility code from rtc_base/ to rtc_base/numerics/ 2017-11-22 11:21:47 +00:00
tick_timer.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
tick_timer.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
tick_timer_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
time_stretch.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
time_stretch.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
time_stretch_unittest.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
timestamp_scaler.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
timestamp_scaler.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
timestamp_scaler_unittest.cc Delete enum NetEqDecoder. 2019-01-11 13:52:25 +00:00