ChannelReceive is now owning and interfacing with NetEq directly.
A new ResamplerHelper is added to acm_resampler.cc/.h, to do the
audio resampling that was previously done inside AcmReceiver.
AcmReceiver still remains, since it is used in other places for now.
Bug: webrtc:14867
Change-Id: If3eb6415e06b9b5e729d393713f3fccb31b0570f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361820
Auto-Submit: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42974}
This makes it simpler to use in more contexts.
Bug: b/364184684
Change-Id: I1b08ebd24e51ba1b3f85261eed503a78cd006fd8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361480
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42956}
Passing Environment would allow to propage field trials with it further to NetEq and AudioDecoders
Bug: webrtc:356878416
Change-Id: Ic68420df3b157ed341146207a2c45cb49e59a931
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358501
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42728}
To make Environment available for creating AudioDecoders to use propagated field trials
Bug: webrtc:356878416
Change-Id: I5dc4a3514d1182db6a7a5aa770b87daba529a5c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357442
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42719}
reduced-size RTCP, i.e. not prefixing RTCP packets with either a sender report or receiver report has been implemented for a long time but only for video.
This CL adds it for audio as well. This reduces the size of audio NACKs (16 bytes, typically one NACK per packet) sent by not prefixing it with a receiver report (32 bytes).
Other packets are not affected as e.g. transport-cc feedback does not add a RR even though that is technically required.
The effect on NACK can be tested by running Chromium with
--disable-webrtc-encryption --force-fieldtrials=WebRTC-FakeNetworkReceiveConfig/loss_percent:5/
against this fiddle negotiating audio nack:
https://jsfiddle.net/fippo/8ubtLnfx/1/
BUG=webrtc:340041654
Change-Id: I06fb94742ff1b6f9a464c404bfc53913f23498d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350269
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42330}
It is not necessary for the caller to use it and the mute info can be
found on AudioFrame.muted().
Bug: None
Change-Id: I458f1f2e8489c1d8f8a9078b21f889b2540bdab9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349940
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42236}
These function calls break RAII and are redundant since NetEq and voe::AudioLevel have just been constructed. Remove them to fix an issue where NetEq ignores the min/max delay passed to its constructor.
This will not change default behavior since the defaults in NetEq::Config for max_delay_ms and min_delay_ms are both 0.
Bug: webrtc:15835
Change-Id: I27d4745ac85d6c6948796fe1d6286a0b79429474
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338209
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41694}
Failing a DCHECK on a ChannelReceiver having its encoded transform set
more than once contradicts the comment above - this can happen when
reconfiguring a channel, eg as in the web platform test
webrtc/recvonly-transceiver-can-become-sendrecv.https.html.
It was added after the original code by a different author, and indeed
the video side doesn't have such a check.
Bug: chromium:1502781
Change-Id: Id36e52601da34ebc194ff058e4672046379f576e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328560
Commit-Queue: Tony Herre <herre@google.com>
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41246}
Split from
https://webrtc-review.googlesource.com/c/src/+/318283
to reduce CL size. Takes a different and (hopefully) simpler
approach.
BUG=webrtc:15579
Change-Id: I8517ffbeb0f0a76db80e3e367de727fb6976211d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325023
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#41073}
Use the new Converts function added in webrtc-review.googlesource.com/c/src/+/320080. Later this will also be added to video.
This change is part of an effort to get Glass 2 Glass metrics. This particular change is not needed, but I intend to add this code to video, and thinks it's nice if the code for video and audio looks the same.
Bug: None
Change-Id: I04caff0dbef1cd4f391bbaa4f8bdee0e66043888
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320281
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Cr-Commit-Position: refs/heads/main@{#40753}
RtpRtcpInterface::RTT follows discouraged style of using return values,
uses raw integers to represent time delta,
and returns values that no code uses (min, max, average RTT)
added LastRtt function addresses all these stylistic issues.
Bug: webrtc:13757
Change-Id: Iaf947dd1b7139026f2beb991e69634c606c6b608
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304520
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40028}
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}
The lowest level and some of the highest levels of this function are
already using ArrayView. Make this consistent throughout.
Use deprecation for the old API rather than deleting it, since upstream
may be using it.
Bug: webrtc:14870
Change-Id: If5e1a6e9802ecf7e8e3ec27befb5167ca9985517
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291706
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39241}
To be able to simulate offline some scenario in which the javascript
layer set the minimum base buffer size of neteq, it is required to
record those API calls. This change introduces this.
Bug: webrtc:14763
Change-Id: Ic817913eda60978d6fca3f8e12229aeec505ca25
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/287122
Auto-Submit: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39104}
- Propagating `RtpPacketInfo::local_capture_clock_offset`, an
existing field that is related to the abs-capture-timestamp
header extension field `estimated_capture_clock_offset`
- Propagated through `SourceTracker::SourceEntry`
Bug: webrtc:10739, b/246753278
Change-Id: I21d9841e4f3a35da5f8d7b31582898309421d524
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275241
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38129}
This change increases the number of scenarios where the RTT would be
available to `ChannelReceive`. That's the case since
`ModuleRtpRtcpImpl2::RTT()` falls back on the DLRR-based method when
the report blocks based method is unavailable - i.e., when there is
no audio sender.
Bug: webrtc:10739
Change-Id: Ie2451c739ab5bcfbe7844ee852bb12a97dab2ca4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274581
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38048}
instead of using Lock/Unlock attributes, use Assert attribute to annotate code is running on certain task queue or thread.
Such check better matches what is checked, in particular allows to
recheck (and thus better document) currently used task queue
Bug: None
Change-Id: I5bc1c397efbc8342cf7915093b578bb015c85651
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269381
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37619}
It defined RTC_PRIuS, which was needed for compatibility with MSVC
prior to version 2015.
Bug: webrtc:6424
Change-Id: I5668d473376201cad3e8da65927c967fc397804b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261314
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36814}
This uses the local NTP clock for RTCP report block stats.
This code exists in the version that Mozilla is shipping, with a review
here https://phabricator.services.mozilla.com/D127709 .
Bug: webrtc:13484
Change-Id: I2f46ec02acab0bbb09040778b05b248c2d815bd1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/240142
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35787}