Commit graph

1011 commits

Author SHA1 Message Date
Lionel Koenig
0a23279e33 Propagate arrival time inside NetEq
Bug: webrtc:341266986
Change-Id: I1532ba2329272d6ca1602924f4e9ee61b19ad890
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352201
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42405}
2024-05-29 15:36:12 +00:00
Tommi
19c51ea537 Use std::array<> consistently for reusable audio buffers.
This is a minor change for places where we use
AudioFrame::kMaxDataSizeSamples sized intermediary buffers. The change
uses `std::array<>` instead of C style arrays which allows for use
of utility templates that incorporate type based buffer size checking.
Also adding `ClearSamples()` method, which complements CopySamples.

Bug: chromium:335805780
Change-Id: I813feb32937e020ceb9ca4b00632dc90907c93fb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351681
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42400}
2024-05-29 09:20:36 +00:00
Manashi Sarkar
0121ff40da Revert "Propagate arrival time inside NetEq"
This reverts commit 5237cbbe68.

Reason for revert: Breaks build.

Original change's description:
> Propagate arrival time inside NetEq
>
> Bug: webrtc:341266986
> Change-Id: I313ded76b884e9ee0f00f43541c8e9aebc406001
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351340
> Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
> Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42381}

Bug: webrtc:341266986
Change-Id: I3c067b95055a8b3e7208cc6e45a5b581f8d65be6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351541
Commit-Queue: Manashi Sarkar <manashi@google.com>
Reviewed-by: Lionel Koenig <lionelk@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Lionel Koenig Gélas <lionelk@google.com>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42387}
2024-05-27 17:17:04 +00:00
Lionel Koenig
5237cbbe68 Propagate arrival time inside NetEq
Bug: webrtc:341266986
Change-Id: I313ded76b884e9ee0f00f43541c8e9aebc406001
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351340
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42381}
2024-05-27 12:48:00 +00:00
Tommi
5d3e6805f2 Add audio view classes
From the new header file:
* MonoView<>: A single channel contiguous buffer of samples.
* InterleavedView<>: Channel samples are interleaved (side-by-side) in
  the buffer. A single channel InterleavedView<> is the same thing as a
  MonoView<>
* DeinterleavedView<>: Each channel's samples are contiguous within the
  buffer. Channels can be enumerated and accessing the
  individual channel data is done via MonoView<>.

There are also a few utility functions that offer a unified way to check
the properties regardless of what view type is in use.

Bug: chromium:335805780
Change-Id: I28196f8f4ded4fadc72ee32b62af304c62f4fc47
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349300
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42377}
2024-05-24 18:08:37 +00:00
Florent Castelli
99c519b3fd Mass removal of absl_deps in all BUILD.gn files
Bug: webrtc:341803749
Change-Id: Id73844ba8d63b9f2f2c9391d8d8116ad0864c36d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351540
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42372}
2024-05-23 15:09:46 +00:00
Philipp Hancke
3643acbd77 neteq test: add opus/red with default payload type
BUG=webrtc:42221750

Change-Id: I272bcb84ce8deb73497e93d3ffe6549019040d02
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350868
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42351}
2024-05-20 15:39:11 +00:00
Philipp Hancke
57dbb1e53e Reland "Split digest methods from ssl target into digest target"
This is a reland of commit 47bfe39ecf

Original change's description:
> Split digest methods from ssl target into digest target
>
> 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}

Bug: webrtc:339300437
Change-Id: I31bb79bbc6cc55a2634176f95ec67de195974e1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350260
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42304}
2024-05-15 06:40:16 +00:00
Jakob Ivarsson
28a4ec36a0 Fix use of uninitialized value in NetEq test.
Bug: chromium:339308502
Change-Id: Iee2a6ca190fdd2dee498afa6e36fa0eb1f7dd9b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350304
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42283}
2024-05-13 09:32:31 +00:00
Lionel Koenig
a656b9d781 Use absolute capture timestamp from the beginning of payload
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}
2024-05-13 08:10:56 +00:00
Mirko Bonadei
fc57037462 Revert "Split digest methods from ssl target into digest target"
This reverts commit 47bfe39ecf.

Reason for revert: Breaks downstream project.

Original change's description:
> Split digest methods from ssl target into digest target
>
> 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}

Bug: None
Change-Id: Ice6f901cd8c2aecf4cf44d3728ec76568b19a7ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350180
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42255}
2024-05-08 06:42:32 +00:00
Philipp Hancke
47bfe39ecf Split digest methods from ssl target into digest target
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}
2024-05-07 16:52:48 +00:00
Jakob Ivarsson
1e5f88c5be Make muted param in GetAudio optional.
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}
2024-05-06 18:07:34 +00:00
Tommi
1f3679884c Start using ArrayView in AudioFrame, update PushResampler
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}
2024-04-30 15:33:08 +00:00
Emil Lundmark
50c1b66df6 Remove expired field trial UseTwccPlrForAna
Bug: webrtc:7058
Change-Id: I432d0df9cdf53d2de4e4b33a59807787c5a55772
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345480
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42064}
2024-04-15 14:26:33 +00:00
Emil Lundmark
4d598037a8 Remove expired WebRTC-Audio-NetEqFecDelayAdaptation
Bug: webrtc:13322
Change-Id: I50d2ffb16656bd485658cd6c379fa7e834ca1cf8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345702
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42009}
2024-04-06 08:57:52 +00:00
Jim Gustafson
a170a82bb0
Update to use Opus 1.5 2024-04-05 14:07:50 -07:00
Jakob Ivarsson
e0f08a325a Add SSRC filter and NetEq accessor to NetEq simulator.
Bug: None
Change-Id: I6b3f9c564199d75adf5830a7d0f58aeb50674c39
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345440
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42002}
2024-04-05 10:02:38 +00:00
Emil Lundmark
6932042050 Remove expired WebRTC-Audio-OpusSetSignalVoiceWithDtx
Bug: webrtc:4559
Change-Id: I060ee6a6d4bbb3329dfdf7d6819a3d346da6a8b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345720
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42000}
2024-04-05 07:49:33 +00:00
Joachim Reiersen
5075cb4a60 Expose AudioLevel as an absl::optional struct in api/rtp_headers.h
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}
2024-03-22 10:07:47 +00:00
Jim Gustafson
5b1a8a189a m122 merge fixes 2024-02-16 15:27:14 -08:00
Jim Gustafson
c37ca3fc86 Merge branch m122 2024-02-14 22:44:28 -08:00
Tomas Lundqvist
aaa123debb Reland "Remove post-decode VAD"
This is a reland of commit 89cf26f1e0

Original change's description:
> Remove post-decode VAD
>
> Bug: webrtc:15806
> Change-Id: I6acf8734a70703085cfc1ccf82a79ee0931f59a4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336460
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Commit-Queue: Tomas Lundqvist <tomasl@google.com>
> Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41653}

Bug: webrtc:15806
Change-Id: I1c2c0ce568c3c1817ff5c65bee91b9f961d46559
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337442
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Tomas Lundqvist <tomasl@google.com>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41688}
2024-02-07 16:33:51 +00:00
Jakob Ivarsson
5ff04d1b60 Avoid zero duration packets in NetEq test with replacement audio.
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}
2024-02-05 14:48:25 +00:00
Jakob Ivarsson
f6ae657b07 Adapt NetEq delay to received FEC (both RED and codec inband).
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}
2024-02-05 12:33:27 +00:00
Jeremy Leconte
687ef0a136 Revert "Remove post-decode VAD"
This reverts commit 89cf26f1e0.

Reason for revert: breaking upstream projects

Original change's description:
> Remove post-decode VAD
>
> Bug: webrtc:15806
> Change-Id: I6acf8734a70703085cfc1ccf82a79ee0931f59a4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336460
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Commit-Queue: Tomas Lundqvist <tomasl@google.com>
> Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41653}

Bug: webrtc:15806
Change-Id: I20e383a6b6d625d86830ecec1be01b42b22e86a2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337420
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41657}
2024-02-01 15:16:26 +00:00
Jakob Ivarsson
53e41a2bc6 Ignore old, duplicate and overlapping packets in packet arrival history.
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}
2024-02-01 15:05:19 +00:00
Tomas Lundqvist
89cf26f1e0 Remove post-decode VAD
Bug: webrtc:15806
Change-Id: I6acf8734a70703085cfc1ccf82a79ee0931f59a4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336460
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Tomas Lundqvist <tomasl@google.com>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41653}
2024-02-01 12:37:23 +00:00
Henrik Lundin
1d3e286c7f Fix a fuzzer-found issue in G.722 decoder
Bug: chromium:1521407
Change-Id: I913108232f195856a9e2693dc1350ec0937fa923
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337182
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Auto-Submit: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41647}
2024-01-31 17:38:30 +00:00
Henrik Lundin
26ad5b82ce Fix a fuzzer-found issue in PCM/G.711 decoder
Bug: chromium:1521415
Change-Id: Ia955b59ee40c57bdbbb2a32fa1bf80475df8c743
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337201
Auto-Submit: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41646}
2024-01-31 17:02:47 +00:00
Henrik Lundin
9b7f3649af Fix a fuzzer-found issue in PCM16 decoder
Bug: chromium:1521761
Change-Id: Id5292e80fd6ecae2c39a446dec010b0383bd805e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337200
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41645}
2024-01-31 17:00:04 +00:00
Jakob Ivarsson
c3624d02d0 Add field trial that enables Opus PLC.
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}
2024-01-25 12:01:57 +00:00
Jim Gustafson
6e5158df93 m120 merge fixes
- 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
2024-01-24 09:14:46 -08:00
Jim Gustafson
3d44a9e3b5 Merge branch m120 2024-01-17 12:11:58 -08:00
Philipp Hancke
de17252e8e Reland "Unify access to SDP codec parameters"
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}
2024-01-03 12:03:11 +00:00
Mirko Bonadei
6c9c958c69 Revert "Unify access to SDP codec parameters"
This reverts commit 63d03f586b.

Reason for revert: Breaks downstream project (not backwards compatible API change)

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: I841735d98533d3b66850b9cfcf7ee0a99ddde078
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331400
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41377}
2023-12-13 16:28:44 +00:00
Philipp Hancke
63d03f586b 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}
2023-12-13 14:22:15 +00:00
Jakob Ivarsson
526187708d Refactor NetEq insert packet list.
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}
2023-11-29 09:53:21 +00:00
Jakob Ivarsson
9305b108bd Fix integer overflow.
Bug: chromium:1501500
Change-Id: Ie13edbc90926c70cd37059a99cd539b15d0fb3a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327320
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41146}
2023-11-13 17:10:55 +00:00
Jakob Ivarsson
7d62fe5702 Default enable NetEq experiments.
- 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}
2023-11-10 09:09:22 +00:00
inaqui-signal
fa4fd71354 Merge branch 'm118' 2023-11-07 15:00:28 -06:00
Jakob Ivarsson
e925db88c1 Make stats member of packet buffer.
Bug: none
Change-Id: Ide88e895ea27fdfe5c68aa45295df45bf72bc292
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325532
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41095}
2023-11-07 10:19:25 +00:00
Jakob Ivarsson
0873faae00 Remove smart flushing experiment.
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}
2023-11-06 15:38:04 +00:00
Björn Terelius
efeeba0864 Try removing RTC_PUSH_IGNORING_WUNDEF() around proto includes
Bug: webrtc:15623
Change-Id: Ia184993769f74d51e68a5a536d5fdde26890bcfd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325481
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41058}
2023-11-01 08:21:05 +00:00
Jim Gustafson
62d543d814
Add low bitrate redundancy support 2023-10-31 13:14:36 -07:00
Danil Chapovalov
f2443a7971 Replace WebRTC-QuickPerfTest field trial with a flag
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}
2023-10-10 08:59:10 +00:00
Rashad Sookram
6504b2a0f9
Add Rust_setIncomingAudioMuted 2023-09-27 12:16:54 -04:00
Michael Klingbeil
9a9b462e16 Add Opus FEC options to rtp_encode tool
Bug: None
Change-Id: I7be70951c20069207963b0fa43564c4008eda870
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318220
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40668}
2023-08-31 06:11:46 +00:00
Jim Gustafson
7da0a87124
Add more audio control and safe defaults 2023-08-23 10:42:30 -07:00
Arthur Sonzogni
47faf32287 Add rtc_common_public_deps
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}
2023-08-22 11:32:06 +00:00
inaqui-signal
c570368abc Merge branch 'm116' into 5845 2023-08-09 14:40:20 -05:00
Philipp Hancke
240e783d7f Stop using invalid payload type 200 in audio/red unit test
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}
2023-08-09 08:13:52 +00:00
Philipp Hancke
82e5f91a2b audio: fix handling of RED packets where the primary encoding is too large
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}
2023-08-08 13:40:26 +00:00
Rashad Sookram
db3d421794
Add setting for jitter buffer max packets
Co-authored-by: Jim Gustafson <jim@signal.org>
2023-06-08 10:11:53 -04:00
Jakob Ivarsson
89f64b994f Make packet info optional and only set for primary packets in NetEq.
Header metadata such as audio level and capture time doesn't make sense
for redundant payloads (i.e. RED and inband-FEC).

It is assumed that one of the parsed payload timestamps will correspond
to the RTP header timestamp.

This fixes a bug where capture time and CSRCs were not set after
parsing RED packets.

CreateRedPayload test function is adapted from red_payload_splitter_unittest.cc

Bug: webrtc:15185
Change-Id: Iba58772499b6d760f516854999b60511896b053c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305700
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40240}
2023-06-07 18:17:03 +00:00
Jim Gustafson
281e582847 Add function to check if packet represents speech
The original code assumed that one packet contains one frame, which is not
true anymore since multi-frame packets and DTX are now supported.

Includes an updated reference to signalapp/opus so that DTX frames are not
padded.
2023-05-12 09:01:29 -07:00
Jim Gustafson
2419be832c Use opus fork from signalapp/opus@webrtc 2023-05-12 08:49:19 -07:00
Rashad Sookram
147fdb9f46 Merge branch 'm112' into 5615 2023-04-27 12:45:13 -04:00
Jakob Ivarsson
2bd878180a Add delayed packet outage event metric.
Can be used to calculate the average delayed packet outage duration and
number of packet loss events by subtracting from concealment events.

Only used in simulations currently.

Bug: None
Change-Id: I03740a2bcb781af09e28a4d13d9e41c0f84bc506
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303600
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39957}
2023-04-26 13:40:17 +00:00
Jakob Ivarsson
ecdedac3da Remove NetEq simulation step size restriction.
This should not be relevant anymore and is causing some issues due to
SetMinimumDelay events early in the log.

Bug: None
Change-Id: Ib7e3c624608c9bceaed31bd6669db59887d24659
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303580
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39956}
2023-04-26 13:07:12 +00:00
Jared Siskin
c018bae807 Format /modules
git ls-files | grep -e  "\(\.h\|\.cc\)$" | grep -e  "^modules/" | xargs clang-format -i ; git cl format
after landing: add to .git-blame-ignore-revs

Bug: webrtc:15082
Change-Id: I2c3cd28740062794f8c10e39d8406aadb9e9a35a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301620
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Jared Siskin <jtsiskin@meta.com>
Cr-Commit-Position: refs/heads/main@{#39901}
2023-04-20 02:02:45 +00:00
Jakob Ivarsson
51cd709d11 Refactor NetEq fake decode from file.
More or less bit-exact, only difference is that we don't seek in the
input file before returning silence for DTX packets.

Bug: webrtc:13322
Change-Id: I147b70d4a0f2c78719c9673b55df6617e064bd61
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301104
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39851}
2023-04-13 14:48:41 +00:00
Jakob Ivarsson
b70a36e770 Require exact timestamp to be available when extracting multiple packets for decoding.
Removes the only remaining dependency on sequence number in NetEq
except for the NackTracker (which arguably doesn't belong in NetEq).

This fixes a potential issue where FEC is not perfectly aligned with
the original packet boundaries, causing both the FEC and the original
packet to be decoded.

Bug: webrtc:13322
Change-Id: I3abec9ebfc194976fca42d5f4f4ed4ee136f44ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300560
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39815}
2023-04-11 16:41:30 +00:00
Jakob Ivarsson
d5ebc33562 Refactor NetEq rtp dump input.
NetEq packet source input doesn't have any other uses than rtp dump,
so remove that layer.

Bug: None
Change-Id: I667bb4aead9f0f2fe8a1c0d6d911a4670ded67e7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300542
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39810}
2023-04-11 14:32:35 +00:00
Rashad Sookram
d759393945
Log more info when audio jitter buffer is flushed 2023-04-10 11:05:29 -04:00
Jakob Ivarsson
27d70f3133 Refactor NetEq test event log input.
Remove duplicate implementions and complex inheritance.

Slight change to the event log visualizer NetEq simulations to only
include time after the first packet has been received.

Bug: None
Change-Id: I8a7bd3d4d2b601fc134292554476020f9b3eee92
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300300
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39773}
2023-04-05 23:22:36 +00:00
Jakob Ivarsson
adfc1601c1 Rewrite NetEq stable delay mode.
The goal is to reduce the amount of time stretching done in response
to network jitter. Specifically, we should be able to “ride” over delay
spikes if the current delay is sufficient, without decelerating
playout. We should also avoid accelerating immediately after a buffer
underrun, until we are reasonably sure that the jitter has passed.
This is achieved by increasing the deadband where we choose to do
normal playout, based on the maximum delay in the short term packet
arrival history.

The buffer level filter is still used to report the average delay for
A/V sync purposes.

The new behavior is behind a flag and will be experimented with before
it is made default.

Bug: webrtc:13322
Change-Id: I5fba0c9d46d835dbe5401669598fa031512ccced
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299500
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39730}
2023-03-31 14:47:55 +00:00
Jakob Ivarsson
d116350b48 Count type of concealment based on last decoded type.
This is to avoid counting concealed samples after comfort noise as
speech.

Bug: webrtc:13322
Change-Id: I12cf18d720c697d81376c6f6cdc02d7c6bfa49a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299300
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39717}
2023-03-29 14:34:57 +00:00
Björn Terelius
2b742f7eaa Revert "Unifying the handling of the events in NetEqInput."
This reverts commit d93b7b91e0.

Reason for revert: Breaks downstream tests

Original change's description:
> Unifying the handling of the events in NetEqInput.
>
> Bug: webrtc:14763
> Change-Id: I9615a9ce41c9b577c4ebd4cdcc9885bfbc5dac48
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293040
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39706}

Bug: webrtc:14763
Change-Id: If076c8fc59a38f011dfa20829f2dd91dd2f914b2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299420
Owners-Override: Björn Terelius <terelius@webrtc.org>
Auto-Submit: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#39711}
2023-03-29 08:01:46 +00:00
Jesús de Vicente Peña
d93b7b91e0 Unifying the handling of the events in NetEqInput.
Bug: webrtc:14763
Change-Id: I9615a9ce41c9b577c4ebd4cdcc9885bfbc5dac48
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293040
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39706}
2023-03-28 15:53:09 +00:00
Jakob Ivarsson
d6c4b1641d Remove decoded timestamp extrapolation from NackTracker.
UpdateLastDecodedPacket is anyway only called when a new packet is
decoded.

Bug: webrtc:10178
Change-Id: I8cfcc5791e71079034a2d0806c44b3b071ac2ffb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299180
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39703}
2023-03-28 12:33:42 +00:00
Jakob Ivarsson
94b51210f8 Include packet waiting time in concealment decision.
This is to be more robust to packet loss during DTX and paused streams.

Without it, we can wait to decode an available packet when in CNG or
PLC mode until more packets arrive, which for DTX and paused streams
can take a long time.

We already include the waiting time if the last packet in the buffer
is a DTX packet.

Bug: webrtc:13322
Change-Id: Iaf5b3894500140d6f83377ba2cd65b44e0cdac05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299009
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39667}
2023-03-24 13:18:58 +00:00
Jakob Ivarsson
096563e9d2 Combine concealment decision logic in NetEq.
Decisions should be the same (almost) regardless of PLC or CNG mode.

The new logic is submitted behind a flag to avoid changing the default
behavior. This results in messy code, but can be simplified once the
flag is removed.

Bug: webrtc:13322
Change-Id: I959d63e069ad7970b75205c4c4173d774b0e4cac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298625
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39657}
2023-03-23 15:02:53 +00:00
Jakob Ivarsson
63643357b4 Remove CNG state tracking from NetEq decision logic.
It seems like this is legacy and not useful. A comment mentions
transitioning between CNG and DTMF modes, but there is no way this can
happen currently.

Bug: webrtc:13322
Change-Id: I9e4706cb6ee145ee37a9e11e7cab6ea4ff697dc4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297980
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39590}
2023-03-17 15:00:17 +00:00
Jakob Ivarsson
766adcdeb8 Simplify NetEq CNG decision logic.
This is in preparation of merging the PLC and CNG decision logic.

Bug: webrtc:13322
Change-Id: Ica782440b0d5c43c92ad5c33631b0cb708b51b0e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297861
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39580}
2023-03-16 15:35:01 +00:00
Danil Chapovalov
b40aedf911 Delete RTPHeader::payload_type_frequency as unused
payload type frequency is not communicated inside an RTP packet and
thus do not belong to the RTPHeader

Bug: None
Change-Id: Ic3e48f1b0507a96ddc697503145f7c8785962926
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296763
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39515}
2023-03-09 16:32:22 +00:00
Emil Lundmark
4e86aa0870 Remove mentions of already deleted field trials
- WebRTC-Audio-Agc2ForceExtraSaturationMargin
- WebRTC-Audio-Agc2ForceInitialSaturationMargin
- WebRTC-Audio-BitrateAdaptation
- WebRTC-Audio-TransientSuppressorVadMode
- WebRTC-FrameBuffer3
- WebRTC-IntelVP8
- WebRTC-UseActiveIceController

Bug: None
Change-Id: I3545727c09f761867f2f4c2bb5c400012ce146d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295723
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39444}
2023-03-01 15:53:37 +00:00
Rashad Sookram
03ddb5df82 Merge branch 'm110' into 5481 2023-02-17 11:35:29 -05:00
Jakob Ivarsson
91e6cd2fb3 Use generated_noise_samples to count consecutive expands.
This is a pure noop refactor that removes duplicated state.

It also correctly keeps track of generated samples when transitioning from CNG to expand mode when CNG timeout is used.

Bug: webrtc:12790
Change-Id: Ieca559bd771c42566e5d4f8837235cb25b1420bf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293862
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39334}
2023-02-17 16:27:53 +00:00
Jakob Ivarsson
48d7842259 Disable stop CNG after a timeout.
This is still a behavior that we want, but a more careful rollout is needed.

Bug: webrtc:12790
Change-Id: Ic74c7b4945c0cdeda2b17f52301069424ad91162
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293860
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39333}
2023-02-17 16:09:04 +00:00
Jesús de Vicente Peña
d234cef304 Handling NetEqSetMinimumDelay events in neteq_rtpplay.
Bug: webrtc:14763
Change-Id: I81a832209249468f8cec682b13bd025a1cec47b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291322
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39280}
2023-02-09 09:39:29 +00:00
Henrik Lundin
fad9a6dae7 Delete deprecated Create method and config from AudioCodingModule
The method and config are no longer used. This concludes the work to
break apart AcmReceiver and AudioCodingModule.

Bug: webrtc:14867
Change-Id: I87219749a1ea72a01b95e960d1f32292f7352c9b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291801
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Tomas Lundqvist <tomasl@google.com>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39250}
2023-02-02 17:06:29 +00:00
Henrik Lundin
84f75699c6 Break apart AudioCodingModule and AcmReceiver
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}
2023-02-01 16:09:26 +00:00
Henrik Lundin
3541732527 Add a Config struct to AcmReceiver, and a ctor using it
This is a prerequisite step to break apart AudioCodingModule and AcmReceiver.

Bug: webrtc:14867
Change-Id: Iba589c7a31b6346ff4acb727793d84077162c8c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291534
Auto-Submit: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Tomas Lundqvist <tomasl@google.com>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39235}
2023-01-31 10:28:31 +00:00
Artem Titov
a617867a45 Reland "Migrate WebRTC documentation to new renderer"
This reverts commit 0f2ce5cc1c.

Reason for revert: Downstream infrastructure should be ready now

Original change's description:
> Revert "Migrate WebRTC documentation to new renderer"
>
> This reverts commit 3eceaf4669.
>
> Reason for revert:
>
> Original change's description:
> > Migrate WebRTC documentation to new renderer
> >
> > Bug: b/258408932
> > Change-Id: Ib96f39fe0c3912f9746bcc09d079097a145d6115
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290987
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Artem Titov <titovartem@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#39205}
>
> Bug: b/258408932
> Change-Id: I16cb4088bee3fc15c2bb88bd692c592b3a7db9fe
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291560
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Artem Titov <titovartem@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39209}

Bug: b/258408932
Change-Id: Ia172e4a6ad1cc7953b48eed08776e9d1e44eb074
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291660
Owners-Override: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39231}
2023-01-31 09:30:04 +00:00
Artem Titov
0f2ce5cc1c Revert "Migrate WebRTC documentation to new renderer"
This reverts commit 3eceaf4669.

Reason for revert: 

Original change's description:
> Migrate WebRTC documentation to new renderer
>
> Bug: b/258408932
> Change-Id: Ib96f39fe0c3912f9746bcc09d079097a145d6115
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290987
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39205}

Bug: b/258408932
Change-Id: I16cb4088bee3fc15c2bb88bd692c592b3a7db9fe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291560
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39209}
2023-01-26 20:19:12 +00:00
Artem Titov
3eceaf4669 Migrate WebRTC documentation to new renderer
Bug: b/258408932
Change-Id: Ib96f39fe0c3912f9746bcc09d079097a145d6115
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290987
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39205}
2023-01-26 14:58:00 +00:00
Florent Castelli
a6b9924988 Remove all usage of //rtc_base target
Bug: webrtc:9838
Change-Id: If813dbb426b4dc848185b64c0349d03fa9c059f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290986
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39116}
2023-01-16 14:36:06 +00:00
Evan Shrubsole
c3891e3a4e [Unwrap] Migrate NetEqDelayAnalyzer to use RtpTimestampUnwrapper
Bug: webrtc:13982
Change-Id: I35c08921c8c1be31f0de4bd81f918250bee25313
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288961
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39052}
2023-01-10 09:53:17 +00:00
Jakob Ivarsson
1d6a5087d2 Stop CNG after a timeout.
After having generated one second of comfort noise and not received any packets, switch to expand mode which will fade out to silence and enter the efficient muted mode.

The behavior is enabled by default but can be disabled through a field trial.

Bug: webrtc:12790
Change-Id: I1e2c1acced3e4a2c1c1595824f1303a0c339aeb5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290578
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39043}
2023-01-09 19:02:05 +00:00
Evan Shrubsole
224e390988 [Unwrap] Migrate PacketArrivalHistory to RtpTimestampUnwrapper
Bug: webrtc:13982
Change-Id: Idd4905c1930d51efd0b9a5a1df1ad6001f9bc37c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288941
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39037}
2023-01-09 16:34:29 +00:00
Florent Castelli
a138c6c8a5 Split rtc_base into multiple targets
Keeping the headers to allow compatibility with current users
that expect the headers to be in that target before they are
also updated.

Bug: webrtc:9838
Change-Id: I8b1e88850958e92c043686587a37791f01860220
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290569
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39031}
2023-01-09 12:21:25 +00:00
Jakob Ivarsson
757da3cf70 Stop setting OPUS_SIGNAL_VOICE when DTX is enabled.
This was done in crbug.com/webrtc/4559 since "CELT-only mode does not have DTX", but that should not be the case anymore (support was added in Opus v1.2.1).

One exception where DTX does not work is with OPUS_APPLICATION_AUDIO (used with stereo) and low complexity settings. This should not be a common config.

Bug: None
Change-Id: I1476083b836bcabeb73df83d5bf06c3878146d28
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288420
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38923}
2022-12-20 11:06:48 +00:00
Jesús de Vicente Peña
01cac31d58 Fixes for the neteq_test clock.
The problem occurs when more than one call is made to the method RunToNextGetAudio. Except for the first call to that method, the clock was not properly updated on the first iteration of the inner loop in RunToNextGetAudio.

Pair: lionelk@webrtc.org

Bug: webrtc:14735
Change-Id: If6fb5c2c700b0f715f626fedf95672a56b04ab12
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285942
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38843}
2022-12-08 10:13:00 +00:00
Lionel Koenig
a8c300e36f neteq: Add legend in test plot tools
Add a legend when on the python plots generated with neteq_rtpplay.


Bug: None
Change-Id: I4299858bb9e8e59564c824c99272e4fabc610162
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/286840
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38838}
2022-12-07 15:28:00 +00:00
Per Kjellander
e0b4cab69c Remove default enabled field trial WebRTC-SendSideBwe-WithOverhead
Bug: webrtc:6762
Change-Id: I520188a13ee5f50c441226574ccb3df54f842835
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285300
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
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@{#38783}
2022-11-30 20:19:36 +00:00
Alessio Bazzica
0c56aef5d5 Remove iSAC from NetEQ tests
Bug: webrtc:14450, chromium:1387892
Change-Id: I44e1ff1a5dd717072a0e8f6afa6e53e96920ea2a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284460
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38708}
2022-11-22 11:41:00 +00:00
Jakob Ivarsson
918eb19303 Fix crash when Opus maxptime < 20ms.
A follow up cl will be created to better handle nullopt frame length range in AudioSendStream.

Note that maxptime is still not used for setting the frame length (only ptime is).

Bug: chromium:1109337
Change-Id: Id21fd8c76a6c4a0c85719a955116f8d16001a3d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284501
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38702}
2022-11-22 01:21:24 +00:00
Rashad Sookram
4deb88c596 Clean up diff 2022-11-18 15:39:11 -05:00
Alessio Bazzica
17887eb04a Reland "[ACM] iSAC audio codec removed"
This is a reland of commit b46c4bf27b

Original change's description:
> [ACM] iSAC audio codec removed
>
> Note: this CL has to leave behind one part of iSAC, which is its VAD
> currently used by AGC1 in APM. The target visibility has been
> restricted and the VAD will be removed together with AGC1 when the
> time comes.
>
> Tested: see https://chromium-review.googlesource.com/c/chromium/src/+/4013319
>
> Bug: webrtc:14450
> Change-Id: I69cc518b16280eae62a1f1977cdbfa24c08cf5f9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282421
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38652}

Bug: webrtc:14450
Change-Id: Ia22c4d7724b6022238235fede93e36e570a49376
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283843
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38665}
2022-11-17 12:52:35 +00:00