webrtc/audio
Tony Herre 64437e8cc0 Calculate the audio level of audio packets before encoded transforms
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}
2024-04-29 15:14:25 +00:00
..
test Move call/simulated_network to test/network 2024-04-29 09:55:06 +00:00
utility Remove a couple of deprecated and unused AudioFrameOperations methods 2024-04-22 08:27:53 +00:00
voip Move webrtc::AudioDeviceModule include to api/ folder 2024-04-22 08:56:31 +00:00
audio_level.cc Migrate audio/ to use webrtc::Mutex 2020-07-06 14:21:38 +00:00
audio_level.h Migrate audio/ to use webrtc::Mutex 2020-07-06 14:21:38 +00:00
audio_receive_stream.cc Log audio stream start/stop. 2023-12-12 10:43:47 +00:00
audio_receive_stream.h Use SequenceChecker(SequenceChecker::kDetached) in a few places. 2023-03-24 07:44:18 +00:00
audio_receive_stream_unittest.cc [SourceTracker] Move state to the worker thread, remove mutex. 2023-04-25 08:18:42 +00:00
audio_send_stream.cc Move webrtc::AudioProcessing include to api/ folder 2024-04-20 07:02:50 +00:00
audio_send_stream.h Add option for the audio encoder to allocate a bitrate range. 2024-02-07 09:47:16 +00:00
audio_send_stream_tests.cc Expose AudioLevel as an absl::optional struct in api/rtp_headers.h 2024-03-22 10:07:47 +00:00
audio_send_stream_unittest.cc Move webrtc::AudioProcessing include to api/ folder 2024-04-20 07:02:50 +00:00
audio_state.cc Move webrtc::AudioDeviceModule include to api/ folder 2024-04-22 08:56:31 +00:00
audio_state.h Use SequenceChecker(SequenceChecker::kDetached) in a few places. 2023-03-24 07:44:18 +00:00
audio_state_unittest.cc Implement support for Chrome task origin tracing. #3.5/4 2023-03-01 11:11:37 +00:00
audio_transport_impl.cc Make capture timestamp optional in ADM. 2023-01-23 17:29:06 +00:00
audio_transport_impl.h Move webrtc::AudioDeviceModule include to api/ folder 2024-04-22 08:56:31 +00:00
BUILD.gn Move call/simulated_network to test/network 2024-04-29 09:55:06 +00:00
channel_receive.cc Move webrtc::AudioDeviceModule include to api/ folder 2024-04-22 08:56:31 +00:00
channel_receive.h Propagate time of the last received packet with Timestamp type 2023-06-02 14:29:19 +00:00
channel_receive_frame_transformer_delegate.cc Calculate the audio level of audio packets before encoded transforms 2024-04-29 15:14:25 +00:00
channel_receive_frame_transformer_delegate.h Cleanup usage of the rtc::TaskQueue in audio/ 2024-01-18 12:24:14 +00:00
channel_receive_frame_transformer_delegate_unittest.cc Calculate the audio level of audio packets before encoded transforms 2024-04-29 15:14:25 +00:00
channel_receive_unittest.cc Move webrtc::AudioDeviceModule include to api/ folder 2024-04-22 08:56:31 +00:00
channel_send.cc Calculate the audio level of audio packets before encoded transforms 2024-04-29 15:14:25 +00:00
channel_send.h Expose audio mimeType for insertable streams 2023-11-03 09:49:12 +00:00
channel_send_frame_transformer_delegate.cc Calculate the audio level of audio packets before encoded transforms 2024-04-29 15:14:25 +00:00
channel_send_frame_transformer_delegate.h Calculate the audio level of audio packets before encoded transforms 2024-04-29 15:14:25 +00:00
channel_send_frame_transformer_delegate_unittest.cc Calculate the audio level of audio packets before encoded transforms 2024-04-29 15:14:25 +00:00
channel_send_unittest.cc Calculate the audio level of audio packets before encoded transforms 2024-04-29 15:14:25 +00:00
conversion.h Make header files self contained. 2022-10-08 08:38:36 +00:00
DEPS pc: Add asynchronous RtpSender::SetParameters() call 2022-11-15 15:31:40 +00:00
mock_voe_channel_proxy.h Expose audio mimeType for insertable streams 2023-11-03 09:49:12 +00:00
OWNERS Add alessiob@webrtc.org in audio/OWNERS 2022-09-09 07:33:11 +00:00
remix_resample.cc Reland "Rename FATAL() into RTC_FATAL()." 2020-11-18 20:49:08 +00:00
remix_resample.h Use backticks not vertical bars to denote variables in comments for /audio 2021-07-27 15:36:40 +00:00
remix_resample_unittest.cc Clarify and extend test support for certain sample rates in audio processing 2022-08-03 14:26:36 +00:00