Header metadata such as audio level and capture time doesn't make sense
for redundant payloads (i.e. RED and inband-FEC).
It is assumed that one of the parsed payload timestamps will correspond
to the RTP header timestamp.
This fixes a bug where capture time and CSRCs were not set after
parsing RED packets.
CreateRedPayload test function is adapted from red_payload_splitter_unittest.cc
Bug: webrtc:15185
Change-Id: Iba58772499b6d760f516854999b60511896b053c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305700
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40240}
The original code assumed that one packet contains one frame, which is not
true anymore since multi-frame packets and DTX are now supported.
Includes an updated reference to signalapp/opus so that DTX frames are not
padded.
Can be used to calculate the average delayed packet outage duration and
number of packet loss events by subtracting from concealment events.
Only used in simulations currently.
Bug: None
Change-Id: I03740a2bcb781af09e28a4d13d9e41c0f84bc506
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303600
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39957}
This should not be relevant anymore and is causing some issues due to
SetMinimumDelay events early in the log.
Bug: None
Change-Id: Ib7e3c624608c9bceaed31bd6669db59887d24659
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303580
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39956}
More or less bit-exact, only difference is that we don't seek in the
input file before returning silence for DTX packets.
Bug: webrtc:13322
Change-Id: I147b70d4a0f2c78719c9673b55df6617e064bd61
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301104
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39851}
Removes the only remaining dependency on sequence number in NetEq
except for the NackTracker (which arguably doesn't belong in NetEq).
This fixes a potential issue where FEC is not perfectly aligned with
the original packet boundaries, causing both the FEC and the original
packet to be decoded.
Bug: webrtc:13322
Change-Id: I3abec9ebfc194976fca42d5f4f4ed4ee136f44ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300560
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39815}
NetEq packet source input doesn't have any other uses than rtp dump,
so remove that layer.
Bug: None
Change-Id: I667bb4aead9f0f2fe8a1c0d6d911a4670ded67e7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300542
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39810}
Remove duplicate implementions and complex inheritance.
Slight change to the event log visualizer NetEq simulations to only
include time after the first packet has been received.
Bug: None
Change-Id: I8a7bd3d4d2b601fc134292554476020f9b3eee92
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300300
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39773}
The goal is to reduce the amount of time stretching done in response
to network jitter. Specifically, we should be able to “ride” over delay
spikes if the current delay is sufficient, without decelerating
playout. We should also avoid accelerating immediately after a buffer
underrun, until we are reasonably sure that the jitter has passed.
This is achieved by increasing the deadband where we choose to do
normal playout, based on the maximum delay in the short term packet
arrival history.
The buffer level filter is still used to report the average delay for
A/V sync purposes.
The new behavior is behind a flag and will be experimented with before
it is made default.
Bug: webrtc:13322
Change-Id: I5fba0c9d46d835dbe5401669598fa031512ccced
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299500
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39730}
This is to avoid counting concealed samples after comfort noise as
speech.
Bug: webrtc:13322
Change-Id: I12cf18d720c697d81376c6f6cdc02d7c6bfa49a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299300
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39717}
UpdateLastDecodedPacket is anyway only called when a new packet is
decoded.
Bug: webrtc:10178
Change-Id: I8cfcc5791e71079034a2d0806c44b3b071ac2ffb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299180
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39703}
This is to be more robust to packet loss during DTX and paused streams.
Without it, we can wait to decode an available packet when in CNG or
PLC mode until more packets arrive, which for DTX and paused streams
can take a long time.
We already include the waiting time if the last packet in the buffer
is a DTX packet.
Bug: webrtc:13322
Change-Id: Iaf5b3894500140d6f83377ba2cd65b44e0cdac05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299009
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39667}
Decisions should be the same (almost) regardless of PLC or CNG mode.
The new logic is submitted behind a flag to avoid changing the default
behavior. This results in messy code, but can be simplified once the
flag is removed.
Bug: webrtc:13322
Change-Id: I959d63e069ad7970b75205c4c4173d774b0e4cac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298625
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39657}
It seems like this is legacy and not useful. A comment mentions
transitioning between CNG and DTMF modes, but there is no way this can
happen currently.
Bug: webrtc:13322
Change-Id: I9e4706cb6ee145ee37a9e11e7cab6ea4ff697dc4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297980
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39590}
This is in preparation of merging the PLC and CNG decision logic.
Bug: webrtc:13322
Change-Id: Ica782440b0d5c43c92ad5c33631b0cb708b51b0e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297861
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39580}
payload type frequency is not communicated inside an RTP packet and
thus do not belong to the RTPHeader
Bug: None
Change-Id: Ic3e48f1b0507a96ddc697503145f7c8785962926
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296763
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39515}
This is a pure noop refactor that removes duplicated state.
It also correctly keeps track of generated samples when transitioning from CNG to expand mode when CNG timeout is used.
Bug: webrtc:12790
Change-Id: Ieca559bd771c42566e5d4f8837235cb25b1420bf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293862
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39334}
This is still a behavior that we want, but a more careful rollout is needed.
Bug: webrtc:12790
Change-Id: Ic74c7b4945c0cdeda2b17f52301069424ad91162
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293860
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39333}
The method and config are no longer used. This concludes the work to
break apart AcmReceiver and AudioCodingModule.
Bug: webrtc:14867
Change-Id: I87219749a1ea72a01b95e960d1f32292f7352c9b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291801
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Tomas Lundqvist <tomasl@google.com>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39250}
This change makes AudioCodingModule a pure sender and AcmReceiver a pure
receiver.
The Config struct is in practice no longer used by AudioCodingModule,
so a new definition is included in AcmReceiver. The old definition
remains in AudioCodingModule while downstream clients are being
updated.
Bug: webrtc:14867
Change-Id: If0d0b4214c5aa278cf6c85c5b62c6da644de20e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291533
Reviewed-by: Tomas Lundqvist <tomasl@google.com>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39244}
This is a prerequisite step to break apart AudioCodingModule and AcmReceiver.
Bug: webrtc:14867
Change-Id: Iba589c7a31b6346ff4acb727793d84077162c8c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291534
Auto-Submit: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Tomas Lundqvist <tomasl@google.com>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39235}
After having generated one second of comfort noise and not received any packets, switch to expand mode which will fade out to silence and enter the efficient muted mode.
The behavior is enabled by default but can be disabled through a field trial.
Bug: webrtc:12790
Change-Id: I1e2c1acced3e4a2c1c1595824f1303a0c339aeb5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290578
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39043}
Keeping the headers to allow compatibility with current users
that expect the headers to be in that target before they are
also updated.
Bug: webrtc:9838
Change-Id: I8b1e88850958e92c043686587a37791f01860220
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290569
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39031}
This was done in crbug.com/webrtc/4559 since "CELT-only mode does not have DTX", but that should not be the case anymore (support was added in Opus v1.2.1).
One exception where DTX does not work is with OPUS_APPLICATION_AUDIO (used with stereo) and low complexity settings. This should not be a common config.
Bug: None
Change-Id: I1476083b836bcabeb73df83d5bf06c3878146d28
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288420
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38923}
The problem occurs when more than one call is made to the method RunToNextGetAudio. Except for the first call to that method, the clock was not properly updated on the first iteration of the inner loop in RunToNextGetAudio.
Pair: lionelk@webrtc.org
Bug: webrtc:14735
Change-Id: If6fb5c2c700b0f715f626fedf95672a56b04ab12
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285942
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38843}
Add a legend when on the python plots generated with neteq_rtpplay.
Bug: None
Change-Id: I4299858bb9e8e59564c824c99272e4fabc610162
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/286840
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38838}
A follow up cl will be created to better handle nullopt frame length range in AudioSendStream.
Note that maxptime is still not used for setting the frame length (only ptime is).
Bug: chromium:1109337
Change-Id: Id21fd8c76a6c4a0c85719a955116f8d16001a3d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284501
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38702}
This is a reland of commit b46c4bf27b
Original change's description:
> [ACM] iSAC audio codec removed
>
> Note: this CL has to leave behind one part of iSAC, which is its VAD
> currently used by AGC1 in APM. The target visibility has been
> restricted and the VAD will be removed together with AGC1 when the
> time comes.
>
> Tested: see https://chromium-review.googlesource.com/c/chromium/src/+/4013319
>
> Bug: webrtc:14450
> Change-Id: I69cc518b16280eae62a1f1977cdbfa24c08cf5f9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282421
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38652}
Bug: webrtc:14450
Change-Id: Ia22c4d7724b6022238235fede93e36e570a49376
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283843
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38665}
This reverts commit b46c4bf27b.
Reason for revert: breaks a downstream project
Original change's description:
> [ACM] iSAC audio codec removed
>
> Note: this CL has to leave behind one part of iSAC, which is its VAD
> currently used by AGC1 in APM. The target visibility has been
> restricted and the VAD will be removed together with AGC1 when the
> time comes.
>
> Tested: see https://chromium-review.googlesource.com/c/chromium/src/+/4013319
>
> Bug: webrtc:14450
> Change-Id: I69cc518b16280eae62a1f1977cdbfa24c08cf5f9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282421
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38652}
Bug: webrtc:14450
Change-Id: Ice138004e84e8c5f896684e8d01133d4b2a77bb7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283800
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#38655}
Note: this CL has to leave behind one part of iSAC, which is its VAD
currently used by AGC1 in APM. The target visibility has been
restricted and the VAD will be removed together with AGC1 when the
time comes.
Tested: see https://chromium-review.googlesource.com/c/chromium/src/+/4013319
Bug: webrtc:14450
Change-Id: I69cc518b16280eae62a1f1977cdbfa24c08cf5f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282421
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38652}