Commit graph

13 commits

Author SHA1 Message Date
Ruslan Burakov
b35baccd6f Fix NetEq minimum and maximum delay always reset on acm creation.
Bug: webrtc:10305
Change-Id: Iecc55c3b4bb8416e2fd0cf26532b43dcd70a7cca
Reviewed-on: https://webrtc-review.googlesource.com/c/122280
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Cr-Commit-Position: refs/heads/master@{#26771}
2019-02-20 14:04:51 +00:00
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
Jakob Ivarsson
e98954c35e Prevent updating state in the delay manager if the packet was reordered.
Currently, if the last packet was reordered (e.g. due to retransmission) then the next packet's inter-arrival time will be estimated incorrectly due to the jump in sequence numbers. This change prevents that by not resetting the stopwatch on reordered packets.

This will also better estimate inter-arrival times when we have multiple reordered packets in a burst. Currently we would only measure the iat of the first reordered packet correctly and not the ones coming after it.

There is a slight risk introducing this: If we would receive an out of order packet far into the future (in sequence numbers) and then continue getting packets in the normal order, then we would not update the current sequence number for these and incorrectly estimate their inter-arrival times since they would all be considered reordered.

Change-Id: Ic938a37cbddf1cb9c30b610218f56794568d3d01
Bug: webrtc:10178
Reviewed-on: https://webrtc-review.googlesource.com/c/119949
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26572}
2019-02-06 15:30:54 +00:00
Ruslan Burakov
edbea46295 Allow to change base minimum delay on NetEq.
This is first step to allow to set latency
from client code in Chromium.
Existing minimum latency hasn't been used because it can clash
with video syncronization code.

Bug: webrtc:10287
Change-Id: Ia38906506069a1abfa01698dc62df283fc15cfbc
Reviewed-on: https://webrtc-review.googlesource.com/c/121423
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Ruslan Burakov <kuddai@google.com>
Cr-Commit-Position: refs/heads/master@{#26536}
2019-02-04 17:19:55 +00:00
Jakob Ivarsson
39b934ba2e Add NetEq config flag that enables RTX handling.
When enabled, the delay manager is updated with reordered packets. It also makes the peak detector ignore the reordered packets.

Change-Id: I2bdc99764cc76b15e613ed3dc75f83aaf66eee4e
Bug: webrtc:10178
Reviewed-on: https://webrtc-review.googlesource.com/c/116481
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26187}
2019-01-10 10:04:34 +00:00
Jakob Ivarsson
10403ae87c Add PeerConnection option to configure minimum audio jitter buffer delay.
Note that this value will override the minimum delay that is used for audio/video sync.

Bug: webrtc:10053
Change-Id: Ia129f6c9ee9da5d00a3d955afaaa6e8f0c2bee33
Reviewed-on: https://webrtc-review.googlesource.com/c/112121
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25805}
2018-11-27 19:49:48 +00:00
Minyue Li
002fbb8c7d Adding field trial to force target level percentile in NetEQ.
Bug: webrtc:9822
Change-Id: I636f75de10851729825311ee5783e836f3b583cd
Reviewed-on: https://webrtc-review.googlesource.com/c/101220
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24975}
2018-10-04 10:00:54 +00:00
Niels Möller
18f1adc0da Delete AudioCodingModule::LeastRequiredDelayMs and related NetEq code.
Bug: None
Change-Id: I2f68502d19415899b3694f7bf5da523da831b223
Reviewed-on: https://webrtc-review.googlesource.com/95640
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24439}
2018-08-27 09:58:19 +00:00
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
2018-06-19 14:00:39 +00:00
Ivo Creusen
d95a7ddbff Fix for overflow bug in histogram scaling function in NetEq.
The experimental function that scales the histogram of inter-arrival times in NetEq suffered from an overflow bug. This caused unexpected increases in the calculated target level.

Bug: webrtc:8381
Change-Id: I2af4d22119fdc684b3cac838c9b317959af17a1f
Reviewed-on: https://webrtc-review.googlesource.com/30261
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21213}
2017-12-11 17:01:36 +00:00
Ivo Creusen
385b10bbaa Added experiment to improve handling of frame length changes in NetEq.
The field trial effects two things: after a frame length change the IAT
histogram is scaled to prevent an immediate change in target buffer
level. Also, the peak history in the delay peak detector is cleared, 
because the size of the peaks is stored in number of packets (which
will be incorrect after a frame length change).

Bug: webrtc:8381
Change-Id: I214b990f6e5959b655b6542884a7f75da181a0d8
Reviewed-on: https://webrtc-review.googlesource.com/8101
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20284}
2017-10-13 13:26:57 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/modules/audio_coding/neteq/delay_manager_unittest.cc (Browse further)