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 methods are unused.
Bug: none
Change-Id: If1499c7c0bc925c2504b7a1318b2d7c4fc4240b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349500
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42214}
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}
Calculate the RMS audio level of audio packets being sent before
invoking an encoded frame transform, and pass them with the encode frame
object.
Before this, the audio level was calculated at send time by having rms_levels_ look at all audio samples encoded since the last send. This
is fine without a transform, as this is done synchronously after
encoding, but with an async transform which might take arbitrarily long,
we could end up marking older audio packets with newer audio levels, or
not at all.
This also makes things work correctly if external encoded frames are
injected from elsewhere to be sent, and exposes the AudioLevel on the
TransformableFrame interface.
Bug: chromium:337193823, webrtc:42226202
Change-Id: If55d2c1d30dc03408ca9fb0193d791db44428316
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349263
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#42193}
Old target and call/simulated.h exist but refer to new target in test/network.
Bug: webrtc:14525
Change-Id: Ida04cef17913f2f829d7e925ae454dc40d5e8240
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349264
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42191}
With this cl
RtpTransportControllerSend::OnAddPacket is instead directly invoked from PacketRouter::SendPacket instead of going via RTP module.
Transport sequence numbers are instead of directly written to header
extension, added to RtpPacketToSendMetaData and written to the extenion
by RTP module.
This is to allow transport sequence numbers without actually sending
them in an extension.
Bug: webrtc:15368
Change-Id: Idd03e02a4257dfc4d0f1898b2803345975d7dad2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344720
Reviewed-by: Erik Språng <sprang@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41974}
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}
Also remove all dependencies on rtc_media_base except for a few
that are suspected of being linker directives.
Bug: webrtc:14775
Change-Id: Ic0daf88b5422047d3ed7079ee6af9e689853310c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341461
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41886}
To prepare for a new AudioLevel struct to be added to the public WebRTC API, rename the internal RTP extension reader/writer class to AudioLevelExtension. A temporary alias is provided to avoid breaking downstream projects.
Bug: webrtc:15788
Change-Id: Ie231668f25932fd9b539229114128b1d0b949a6e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339887
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@{#41787}
As described in the issue. This won't compile under most compilers,
at least that what godbolt indicated.
So instead, using const vector<T> to prevent the compilation errors. Keep in mind this is a bit more restrictive as it also implies constness on the vector itself and not only its members, meaning we cannot push/pop.
Bug: webrtc:15829
Change-Id: I19c1223f0a3c56082da75b39c2afe152ae43a3a7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337960
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41695}
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}
Includes removing the duplicate MockTransformableAudioFrame definition
in test/ in favour of the existing one in api/test/
Bug: webrtc:15802
Change-Id: Ib5f86b8b2095dd4e580cd9ff0038134f8a43cd93
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336340
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41622}
These are no longer needed since the RTP transport runs on the worker
thread now.
Some tests that were too strict on ordering needed change.
Bug: none
Change-Id: I4265cb1a4fd3355208f19aefdbb7abeb45b6cadf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335700
Reviewed-by: Tomas Lundqvist <tomasl@google.com>
Commit-Queue: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41599}
This is a step towards sending audio timestamps from Meet in iOS.
Next step is to enable sending the audio timestamps (in harmony).
After enable absolute-capture-time header extension in harmony, the receiving participants will be able to store E2E audio latency and A/V sync metrics.
Bug: webrtc:13609
Change-Id: I797c1ed0035625ed065307314ac34c932c5abe7e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334720
Commit-Queue: Olov Brändström <brandstrom@google.com>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41574}
RtpTransportControllerSend uses all 4 utilities of the environment and
thus cleaner to propagate them as single parameter instead of 4 separate
Bug: None
Change-Id: I38932c21a73ea41d4bdf2fa04bf3961a2adb25a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331821
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41422}
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}
Add a StartShortCircuiting() callback to allow clients which have
configured Encoded Transforms when creating a PeerConnection to have
all frames skip the transform. This offers a zero cost path for streams
which don't need transforms.
This is preferable to uninstalling/not installing the transform to allow
implementing the behaviour in
https://w3c.github.io/webrtc-encoded-transform/#stream-creation -
giving web apps a chance to configure transforms within a short window
(before the next JS event loop run, so usually sub-millisecond) after stream creation, without any untransformed frames passing.
Usage in Chromium: crrev.com/c/5040731
Bug: chromium:1502781
Change-Id: I803477db1df51e80bdedf6c84d2d3695b088de83
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327601
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#41184}
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}
Checking in sending classes avoids using global field trial string in favor of the injected one.
In addition to that RateLimiter looks wrong layer for check that field trial:
checking inside RateLimiter class might be surprising if it is used for limiting something else than RTX bitrate.
evaluating field trial for each retransmitting packet might be expensive
Bug: webrtc:15184, webrtc:10335
Change-Id: I87bae3522bbd9692629d4f9b6caa119be03f2bd6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322720
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40908}
This change replaces type of absolute_capture_timestamp_ms_ in
TransformableOutgoingAudioFrame from int to optional uint and makes
the function AbsoluteCaptureTimestamp() inside
TransformableAudioFrameInterface pure virtual.
Bug: webrtc:14949
Change-Id: Id3bdbcba63a5f91105ab198208e4f2b11eb3c7db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319000
Commit-Queue: Palak Agarwal <agpalak@google.com>
Reviewed-by: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40814}
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}