Matlab files extension is the same as ObjC, which is .m
This makes clang-format think that those files are ObjC and then it
wrongly formats them, leading to output that doesn't compile at all.
It's a known issue and the solution is to disable it in Matlab files.
I don't want to disable ObjC in whole folders, because of 2 reasons:
1) I want ObjC to be properly formatted if new files are added in the
future
2) C++ header files are interpreted as ObjC and it will disable their
formatting
According to clang documentation
(https://clang.llvm.org/docs/ClangFormatStyleOptions.html#disabling-formatting-on-a-piece-of-code), we can disable formatting inline.
However, comments in Matlab are prefixed with `%` and not `//`, so I
thought of a kinda hacky solution, which is `% // clang-format off`, and
it works perfectly.
No-Iwyu: Includes didn't change and it isn't related to formatting
Bug: webrtc:42225392
Change-Id: I281462fd1aecd3ff0428e6ee974514ebabc696ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/374060
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43700}
This is to fix build error when we set use_libcxx_modules=true in
chromium build.
Bug: chromium:40440396
Change-Id: Iad165a78a6920ccb858567d31fbe5e48d8a7b629
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/371620
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Auto-Submit: Takuto Ikuta <tikuta@google.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43574}
This is to fix build error when we set use_libcxx_modules=true in
chromium build.
Bug: chromium:40440396
Change-Id: I5ab1cfcc0d060021892aae0e5ff3f0b647ae4266
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370860
Commit-Queue: Takuto Ikuta <tikuta@google.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Takuto Ikuta <tikuta@google.com>
Cr-Commit-Position: refs/heads/main@{#43541}
Set use_default_launcher=false in rtc_test on android
Bug: webrtc:42223878
Change-Id: If05da40b420d5da8f9e0f39560eb07380ebada14
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368921
Owners-Override: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43505}
This is a reland of commit 38ddea5ee3320bf3441aeb3654e099b3695c9789
Original change's description:
> Add InsertPacket method that takes RtpPacketInfo.
>
> The version which only passes receive_time will be removed (once migrated).
> Keeping the version that only passes header and payload for convenience.
>
> This will allow us to attach more metadata on the worker thread before InsertPacket, instead of on the playout thread after GetAudio. Eventually, the plan is to split the RTP handling on the worker thread into a separate class.
>
> Bug: webrtc:42223109
> Change-Id: I5399b53b9fc5c2f1c996e109054b1b0877ecca05
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369000
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43445}
Bug: webrtc:42223109
Change-Id: I97d1d3d390e6d3de8bf9355b895ec336339d079f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369260
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43454}
This reverts commit 38ddea5ee3320bf3441aeb3654e099b3695c9789.
Reason for revert: not backwards compatible
Original change's description:
> Add InsertPacket method that takes RtpPacketInfo.
>
> The version which only passes receive_time will be removed (once migrated).
> Keeping the version that only passes header and payload for convenience.
>
> This will allow us to attach more metadata on the worker thread before InsertPacket, instead of on the playout thread after GetAudio. Eventually, the plan is to split the RTP handling on the worker thread into a separate class.
>
> Bug: webrtc:42223109
> Change-Id: I5399b53b9fc5c2f1c996e109054b1b0877ecca05
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369000
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#43445}
Bug: webrtc:42223109
Change-Id: Ie7cf397cfbe5dedca009f16e5e9e3af40adbe99b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369200
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43450}
The version which only passes receive_time will be removed (once migrated).
Keeping the version that only passes header and payload for convenience.
This will allow us to attach more metadata on the worker thread before InsertPacket, instead of on the playout thread after GetAudio. Eventually, the plan is to split the RTP handling on the worker thread into a separate class.
Bug: webrtc:42223109
Change-Id: I5399b53b9fc5c2f1c996e109054b1b0877ecca05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369000
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43445}
- Add `WebRTC-Audio-OpusDecodeStereoByDefault` field trial
- Behind that field trial, `AudioDecoderOpus::SdpToConfig` uses 2
instead of 1 as default number of channels when the `stereo` codec
param is unspecified
- Instead of wiring up `FieldTrialsView` to `SdpToConfig`, which
requires API changes that break downstream projects, a change in
`AudioDecoderOpus::Config` is made to signal when the number of
channels is forced via SDP config
Bug: webrtc:379996136
Change-Id: If70eb19bc7e3bc74dd0423610cb04ae33ea602fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368860
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43440}
The workaround in https://webrtc-review.googlesource.com/c/src/+/367740
is incomplete because it does not fix the issue for the first decoded
mono packet after CN/PLC. This CL extends the workaround to such a case
and adds a unit test for it.
Note: it was verified that the 2nd packet after CN/PLC is trivial
stereo.
Credits: jakobi@webrtc.org for raising the concern
Bug: webrtc:376493209
Change-Id: Ide27e411781693f14629cf9db8b6c0c0fc762a17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368160
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43393}
Adding a temporary workaround in the WebRTC Opus decoder wrapper to fix
https://issues.webrtc.org/376493209. Once the issue is fixed in libopus,
the workaround must be removed (TODO added in the code).
The workaround keeps track of the number of channels for the last
decoded packet and, if the decoder operates in stereo mode and the last
packet was a mono one, the left channel is copied into the right one
when comfort noise / PLC audio is generated.
Bug: webrtc:376493209
Change-Id: Iad3bfb1b393bd68833decf51b69b5238cb0ec4b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/367740
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43371}
- With mono encoding and stereo decoding check that the decoded
signal is trivial stereo
- DTX tests
- With mono encoding and stereo decoding check that the comfort
noise generated by Opus is NOT(*) trivially stereo
- With stereo encoding and stereo decoding check that the comfort
noise generated by Opus is not trivially stereo
*: the test shows the behavior described in [1] and that needs to
be fixed.
[1] https://issues.webrtc.org/376493209
Bug: webrtc:376493209
Change-Id: I34aacd4bd7c79be9df05c242e912c9981896a73d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/367206
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43363}
- WebRTC does use the libopus DTX implementation
- The removed detail is anyways irrelevant in a docstring
Bug: webrtc:376493209
Change-Id: I3dfe1521259e596dbfa0db97f91ffb75deeb16b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/367200
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43344}
Indirect input deps for imported proto is now handled by deps in
proto_library template, so we don't need to use proto_data_sources
anymore after https://crrev.com/c/5919027.
To remove proto_data_sources from proto_library template, let me clean
up proto_data_sources usages from this repository.
Bug: chromium:366137880
Change-Id: I288a30004f7d622be502477a0567b00d19432e89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366060
Auto-Submit: Takuto Ikuta <tikuta@google.com>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43261}
This makes the delay manager interface significantly simpler and easier to expose.
Bug: None
Change-Id: Ie3d37c3b869eb17ca421a76e9d1af8f0a1a36ee5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364781
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43186}
A slight behavior change is that we only increment total samples received when GetAudio is successful.
Bug: webrtc:370424996
Change-Id: I8607418c179ca3bc22963b98792a9e8b9af2d451
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364220
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43139}
The code now uses NetEq directly instead of AcmReceiver.
Bug: webrtc:14867
Change-Id: I11c7e2ca00060ab15bba5ec67dfd92ec413196f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364140
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43108}
We need to have imported proto as proto_data_sources in BUILD.gn to
run the action remotely without workaround config in siso.
Bug: b/366137880
Change-Id: I053774f00b761520a8a85154e386da3edb8f39b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362680
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Auto-Submit: Takuto Ikuta <tikuta@google.com>
Commit-Queue: Takuto Ikuta <tikuta@google.com>
Cr-Commit-Position: refs/heads/main@{#43040}
Use the DTX state from inside the Opus encoder instead of trying to
mimic the logic outside.
Bug: None
Change-Id: I852044fee261a5b7f9255c557a27adfd0b1701bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362640
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43034}
The class itself and its unit test remains, for now, but will be removed
later.
Bug: webrtc:14867
Change-Id: I36cec8fca7913663f63c53622ed2760e5e048c2f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362580
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43023}
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}
We can avoid using the global now that field trials from Environment are
used in NetEq. This allows running multiple instances in parallel with
different settings.
Bug: webrtc:42220378
Change-Id: Icff8539e3ae9b61c86bb393d9a313e786e032b93
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359720
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42894}
This replaces the payload type tracking in AcmReceiver with the one in
NetEq and should be a noop.
Bug: None
Change-Id: Iaf124b5e56a646f994b5c2af65d349ede550b7fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360840
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Tomas Lundqvist <tomasl@google.com>
Cr-Commit-Position: refs/heads/main@{#42875}
This fixes an edge case where the frame size changes for a DTX packet.
We should avoid having the frame size larger than the timestamp gap.
Bug: None
Change-Id: I0a384cfb06f5aebc1654c1e3d127541fd24e05c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360722
Reviewed-by: Tomas Lundqvist <tomasl@google.com>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42873}
This is currenly tracked in both AcmReceiver and NetEq. Adding this API
enables us to have it in just one place.
Bug: None
Change-Id: Ia537f87f36b0aedf19c00a57bd6cec4425a49df1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360743
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Tomas Lundqvist <tomasl@google.com>
Cr-Commit-Position: refs/heads/main@{#42872}
Mark old overload deprecated.
This allows to migrate both calls through AudioDecoderFactory and direct calls to AudioDecpderOpus trait.
Bug: webrtc:356878416
Change-Id: I1502aee5b18aac43a8258e77b770c8e73a056f92
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359741
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42793}