This ensure the absolute capture timestamp from the first audio sample
encoded in the payload is used for the corresponding rtp header.
Bug: webrtc:42226041
Change-Id: Ib8f2e3a5df5c82c5806171bd5b36a26d92fbea72
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349265
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42281}
in an attempt to break up the monolithic ssl target.
BUG=None
Change-Id: I38f5b3e2828742d5d918460db1af0a5797d6a5c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349764
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42249}
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}
Start introducing ArrayView to AudioFrame and code that flows down
from there. In this first step:
* Add `data_view()` that returns a read-only ArrayView for the
audio buffer. When AudioFrame is not initialized however, data_view()
will return a nullptr whereas the current data() method never returns
nullptr.
* Add `mutable_data()` that requires two arguments for properly setting
the samples per channel and number of channels that's required for
accurately reserving the returned mutable ArrayView.
A notable behavior change is that if the requested number of channels
is larger than supported or the calculated buffer size is too large,
the function will trigger a check.
* Add TODOs for following work.
Bug: chromium:335805780
Change-Id: I2937de800422589ebe6a3840b3caadf3d9ff8b00
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347982
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42202}
Start migrating away from `hasAudioLevel`, `voiceActivity`, `audioLevel` fields in RTPHeaderExtension and switch usages to a more modern absl::optional<AudioLevel> accessor instead.
The old fields are preserved for compatibility with downstream projects, but will be removed in the future.
Bug: webrtc:15788
Change-Id: I76599124fd68dd4d449f850df3b9814d6a002f5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336303
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41947}
Fixes a crash when the timestamp difference between two packets is zero,
which can happen due to probing for example.
Bug: none
Change-Id: If04dfaed0b10aecd7b1a1e5487161c2d82ad9e44
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338020
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <hlundin@google.com>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41669}
This is achieved by notifing NetEq controller of all received packets
after splitting, which then does deduping so that only useful packets
are counted.
The goal is to reduce underruns when FEC is used.
The behavior is default enabled with a field trial kill-switch.
Bug: webrtc:13322
Change-Id: I2a1a78ead1a58940ef92da0d43413eda5ba1caf3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337440
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41665}
This should mostly be a noop, but in a follow up cl we will insert all
packets after splitting, which will allow for adapting the delay to FEC
(both RED and codec inband) that is useful for decoding (i.e. not
already covered by primary packets).
A slight behavior change is that reordered packets are no longer
included in max delay calculation.
Implementation details:
- A map ordered by RTP timestamp is used to store the arrivals.
- When inserting new packets, we check if the timestamp is too old, already exists or if the packet is fully covered by another packet (based on timestamp and packet duration).
- Separate deques are used to keep track of "min" and "max" arrivals (as defined by ordering operators). The queues maintain a strictly increasing/decreasing order so that min/max is always at begin().
Bug: webrtc:13322
Change-Id: I8b6cf5afff77b4adc3c29745b95627e955715b5a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337184
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41656}
Low-Coverage-Reason: EXPERIMENTAL_CODE Code is behind field trial that will only be used for testing.
Bug: webrtc:13322
Change-Id: Ie306be808381b3a20b4e0d58349927bf3524018a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335840
Reviewed-by: Tomas Lundqvist <tomasl@google.com>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41608}
- Use worker_thread TaskQueue for channel operations
- Fix use of deprecated DNS resolver
- Restore quantization of audio levels
- Simplify crypto options change
- Move channel blocking operations to pc
- Sync opus for merge
This is a reland of commit 63d03f586b
Original change's description:
> Unify access to SDP codec parameters
>
> which come from the a=fmtp:<pt> lines in the SDP and were used as either
> std::map<std::string, std:string>
> with three aliases,
> cricket::CodecParameterMap
> SdpAudioFormat::Parameters
> SdpVideoFormat::Parameters
>
> Use webrtc::CodecParameterMap in all places.
>
> BUG=None
>
> Change-Id: If47692bde7347834c349c6539b43309d8770e67b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
> Reviewed-by: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#41375}
Bug: None
Change-Id: I5f8f45688df232eb37b12fa3e56a893a1c754e17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331402
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41467}
which come from the a=fmtp:<pt> lines in the SDP and were used as either
std::map<std::string, std:string>
with three aliases,
cricket::CodecParameterMap
SdpAudioFormat::Parameters
SdpVideoFormat::Parameters
Use webrtc::CodecParameterMap in all places.
BUG=None
Change-Id: If47692bde7347834c349c6539b43309d8770e67b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41375}
Move some logic from PacketBuffer to NetEqImpl.
Bug: webrtc:13322
Change-Id: I88b1e55c0cd69700730d9ed41be04fcf1effa03f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328861
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41270}
- Stable delay mode: this results in a very large reduction in the amount of time stretching and fewer underruns.
- More closely align PLC and CNG logic.
- Stop playing comfort noise after a timeout when no packets are received.
Several tests needed to be updated to match the new behavior.
Note that I should also refactor GetDecision to be easier to test in the future (remove internal state).
Bug: webrtc:13322
Change-Id: I1724a74b3b583d05a4bb8feb4f9a8c4a8b2b7c5e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326780
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41125}
It did not result in big quality improvements.
Bug: webrtc:12201
Change-Id: I9728469a388ee179d6069af8521bfc5571870bd7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325533
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41087}
This field trial is configured via command line flag, so may use flag system directly, reducing dependency on global field trial string.
Bug: webrtc:7101, webrtc:10335
Change-Id: I1e48e0e3fdc251b73a375c6d7f1a46fa4f8a179b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322624
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40897}
When built for chromium, some webrtc implementations are overridden and
are implemented by chrome's "//base". For instance webrtc::Location is
implemented by base::Location. So far so good, the affected targets are
correctly defined in GN to depend on base.
The problem: Most targets in webrtc do not declare correctly their
public_deps. When a public header of a target includes one from its
dependency, the dependency must be a public_deps. The public_deps
instruct GN to forward the capability to use code from the dependency
toward the dependent.
Unfortunately, it is not possible to fix the `public_deps` in webrtc,
because its is disallowed via a presubmit. See:
https://webrtc-review.googlesource.com/c/src/+/30262
WebRTC developers decided not to use `public_deps`, because GN config
are "translated" toward different kind of downstream build system who do
not really support the `public` dependencies concept. Instead WebRTC is
using some "common" configuration applied to all of its targets.
This patch add `rtc_common_public_deps` argument, to let embedders
add the dependencies WebRTC depends on.
Bug: chromium:1467773
Change-Id: I7de43372414a09886fcb07905451e6339c8ecc64
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316660
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40595}
and fix the follow-up mistake in the test
BUG=None
Change-Id: Id7a20769cc1d03dd8154564f948e8138ff8c4e74
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315220
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40528}
by falling back to the primary encoding. This can happen with
opus stereo packets at the maximum bitrate which results in
1276 encoded bytes.
BUG=chromium:1470261
Change-Id: I3fd9bb30773963a519bbb5da44fe71db5dec2bd7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315141
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40524}