Commit graph

6956 commits

Author SHA1 Message Date
Jianjun Zhu
a2655449ee Add HEVC support for h264_packet_buffer.
Renamed to h26x_packet_buffer as it also supports HEVC now. For HEVC,
start code is added by depacktizer, and remote endpoint must send
sequence and picture information in-band.

Co-authored-by: Qiujiao Wu <qiujiao.wu@intel.com>

Bug: webrtc:13485
Change-Id: I321cb223357d8d15da95cec80ec0c3a43c26734e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333863
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41739}
2024-02-15 09:54:06 +00:00
Dor Hen
4efc830e53 Provide test output path with OutputPathWithRandomDirectory 1/n
First commit in a series of commits to wire up the test output path utility that adds a random directory in the path, for problematic tests that run in concurrent execution environments.

Bug: webrtc:15833
Change-Id: I5e5b3940007be773d77dbbfc953efa810e4e3ea9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339522
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41738}
2024-02-15 07:35:00 +00:00
Jim Gustafson
c37ca3fc86 Merge branch m122 2024-02-14 22:44:28 -08:00
henrika
414c94290a Reland "Extends WebRTC logs for software encoder fallback"
This is a reland of commit 050ffefd85

Original change's description:
> Extends WebRTC logs for software encoder fallback
>
> This CL extends logging related to HW->SW fallbacks on the encoder
> side in WebRTC. The goal is to make it easier to track down the
> different steps taken when setting up the video encoder and why/when
> HW encoding fails.
>
> Current logs are added on several lines which makes regexp searching
> difficult. This CL adds all related information on one line instead.
>
> Three new search tags are also added VSE (VideoStreamEncoder), VESFW
> (VideoEncoderSoftwareFallbackWrapper) and SEA (SimulcastEncoderAdapter). The idea is to allow searching for the tags to see correlated logs.
>
> It has been verified that these added logs also show up in WebRTC
> logs in Meet.
>
> Logs from the GPU process are not included due to the sandboxed
> nature which makes it much more complex to add to the native
> WebRTC log. I think that these simple logs will provide value as is.
>
> Example: https://gist.github.com/henrik-and/41946f7f0b10774241bd14d7687f770b
>
> Bug: b/322132132
> Change-Id: Iec58c9741a9dd6bab3236a88e9a6e45440f5d980
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339260
> Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41733}

NOTRY=true

Bug: b/322132132
Change-Id: I25dd34b9ba59ea8502e47b4c89cd111430636e08
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339680
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41736}
2024-02-14 17:15:29 +00:00
Mirko Bonadei
23c32da48a Revert "Extends WebRTC logs for software encoder fallback"
This reverts commit 050ffefd85.

Reason for revert: Breaks downstream project.

Original change's description:
> Extends WebRTC logs for software encoder fallback
>
> This CL extends logging related to HW->SW fallbacks on the encoder
> side in WebRTC. The goal is to make it easier to track down the
> different steps taken when setting up the video encoder and why/when
> HW encoding fails.
>
> Current logs are added on several lines which makes regexp searching
> difficult. This CL adds all related information on one line instead.
>
> Three new search tags are also added VSE (VideoStreamEncoder), VESFW
> (VideoEncoderSoftwareFallbackWrapper) and SEA (SimulcastEncoderAdapter). The idea is to allow searching for the tags to see correlated logs.
>
> It has been verified that these added logs also show up in WebRTC
> logs in Meet.
>
> Logs from the GPU process are not included due to the sandboxed
> nature which makes it much more complex to add to the native
> WebRTC log. I think that these simple logs will provide value as is.
>
> Example: https://gist.github.com/henrik-and/41946f7f0b10774241bd14d7687f770b
>
> Bug: b/322132132
> Change-Id: Iec58c9741a9dd6bab3236a88e9a6e45440f5d980
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339260
> Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41733}

Bug: b/322132132
Change-Id: I24d0a4e71a43ac192485f1af208563a51d919865
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339661
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41735}
2024-02-14 13:45:39 +00:00
henrika
050ffefd85 Extends WebRTC logs for software encoder fallback
This CL extends logging related to HW->SW fallbacks on the encoder
side in WebRTC. The goal is to make it easier to track down the
different steps taken when setting up the video encoder and why/when
HW encoding fails.

Current logs are added on several lines which makes regexp searching
difficult. This CL adds all related information on one line instead.

Three new search tags are also added VSE (VideoStreamEncoder), VESFW
(VideoEncoderSoftwareFallbackWrapper) and SEA (SimulcastEncoderAdapter). The idea is to allow searching for the tags to see correlated logs.

It has been verified that these added logs also show up in WebRTC
logs in Meet.

Logs from the GPU process are not included due to the sandboxed
nature which makes it much more complex to add to the native
WebRTC log. I think that these simple logs will provide value as is.

Example: https://gist.github.com/henrik-and/41946f7f0b10774241bd14d7687f770b

Bug: b/322132132
Change-Id: Iec58c9741a9dd6bab3236a88e9a6e45440f5d980
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339260
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41733}
2024-02-14 12:29:55 +00:00
Sergey Silkin
2bd4129e91 Set scoped field trials in encode/decode test
Since not all codecs read field trials from the environment yet.

Bug: webrtc:14852
Change-Id: Ia2477c41d09dabf91f47c59eb3139d6d6a711548
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339380
Auto-Submit: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41731}
2024-02-14 09:13:58 +00:00
Diep Bui
14d7d2d845 Add an option to allow pacing at loss based estimate when network bandwidth is loss limited.
Add a small clean up in LossBasedBandwidthEstimatorV2ReadyForUse since IsReady() includes IsEnabled().

Bug: webrtc:12707
Change-Id: I20dfeb2ab31e7724041f89af9f312211a3ae3d23
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339521
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41727}
2024-02-13 11:54:06 +00:00
Hanna Silen
24ad911210 Use num_output_channels() in GainController2
Replace num_proc_channels() with num_output_channels() in
GainController2. The number of channels is only used in
InputVolumeController.

Bug: webrtc:7494
Change-Id: I6b3f66980a518401fefab304e18c9910eee28d4e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338922
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Hanna Silen <silen@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41717}
2024-02-12 11:29:20 +00:00
Sergey Silkin
1b5f47f2d3 Set field trials via command line
Also fix an issue with accessing an unset optional.

Bug: webrtc:14852
Change-Id: I45da8c6add87ac562c3c3f3d11c0021244927f8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337580
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41716}
2024-02-12 10:43:47 +00:00
Jan Grulich
52fec7d3e9 Video capture V4L2: fix wrong usage of capture race checker
This RaceChecker is intended to be used on API thread only when we are
not capturing, however, since StartCapture() can be called while already
capturing, we have to avoid using it to guard members that do not meet
this expectations. Use API checker for _captureStarted instead and move
the capture race checker down where we can be sure that capturing is not
happening.

Bug: webrtc:15181
Change-Id: I52f74b893f2c36c3ce0facd053b003fa497101b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338040
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#41714}
2024-02-11 10:53:29 +00:00
Jan Grulich
541f202354 Video capture PipeWire: simplify thread and lock annotations
Use only one RaceChecker as intended with the original change. This gets
rid of specific RaceChecker for PipeWire members. Make PipeWireSession
guarded by API checker instead, since this member is accessed only in
[Start/Stop]Capture and move the race checker within PipeWire thread
loop lock. Also remove race check from OnStreamStateChanged where we
only modify one property guarded by API mutex.

Partially reverts a9d497b52d reviewed
on https://webrtc-review.googlesource.com/c/src/+/326781.

Bug: webrtc:15181
Change-Id: I46449fce86611124688a65d5337771c75853f2ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338021
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#41713}
2024-02-11 10:47:14 +00:00
Hanna Silen
d49058e702 AGC2: Enable clipping predictor by default
Bug: webrtc:7494
Change-Id: I36a98ac06230f9bd54055e8177ac28fb9cd11442
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331540
Commit-Queue: Hanna Silen <silen@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41709}
2024-02-09 14:08:27 +00:00
Danil Chapovalov
61b1f53a4c Extend test::FunctionVideoDecoderFactory to propagate Environment
To reduce number calls to the CreateVideoDecoder

Bug: webrtc:15791
Change-Id: I5d6ecc2e5e68165d4e012b3ad7edb6eaa40e1913
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336420
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41706}
2024-02-09 10:14:05 +00:00
Dor Hen
5ba4f2ab58 Make file/directory related tests safe for concurrent execution
Providing unique identifiers for files and directories created as part
of unit tests.

Bug: webrtc:15833
Change-Id: If2835c362c47a111aa99b0e3c6ad6a33be061978
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338260
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41704}
2024-02-09 08:13:38 +00: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
Danil Chapovalov
5b90b963de Provide Environment for VideoDecoder in video_coding/ tests
Bug: webrtc:15791
Change-Id: I6345f88f895ee6ff89f4c8224c8d2dc495422152
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337980
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41668}
2024-02-05 14:25:26 +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
f19c7caeb5 Fix crash when rolling libaom.
The crash is caused by https://aomedia.googlesource.com/aom.git/+/77cf417565ad2c527d5c351927f11db3764fd93c%5E%21

Example of the test failure:
https://ci.chromium.org/ui/p/webrtc/builders/try/linux_rel/72442/overview

Bug: None
Change-Id: I088bf7e45452cdaa71802802e431119e755eca24
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337320
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41659}
2024-02-02 09:45:05 +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
Dan Tan
4860148c51 Add WebRTC-LibaomAv1Encoder-MaxConsecFrameDrop parameter to explicitly limit the maximum consecutive frame drop
Bug: webrtc:15821
Change-Id: Ib8be6827ea57e4e54269b94a0fc9ea81945af09f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/337020
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Commit-Queue: Dan Tan <dwtan@google.com>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41648}
2024-01-31 18:35:51 +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
Jan Grulich
958c9ac546 Allow VideoCaptureModulePipeWire to be shared with more consumers
This allows to share an instance of VideoCaptureModulePipeWire which is
what browsers usually do when the same camera is being shared with more
than one consumer. This matches V4L2 implementation.

Bug: webrtc:15211
Change-Id: I2ae466739c2649029e76a29e6f16aad1014e9d42
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306964
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#41639}
2024-01-31 10:07:20 +00:00
qwu16
f43e8ebab9 Add RTP depacketizer for H265
1. Depacketize single nalu packet/AP/FU

2. Insert start code before each nalu

Bug: webrtc:13485
Change-Id: I8346f9c31e61e5d3c2c7e1bf5fdaae4018a1ff78
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325660
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41628}
2024-01-29 12:00:19 +00:00
Ilya Nikolaevskiy
6adf2243b5 Compute scaling factors for not-explicitly configured layers in VP9 encoder
The division by 2 has been accidentally removed in https://webrtc-review.googlesource.com/c/src/+/76921

The code and comment are out of sync now.

Bug: None
Change-Id: If43a40461878ffe58dd9ed0ab8a6244ad79c4f6b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336283
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Auto-Submit: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41627}
2024-01-29 11:23:21 +00:00
Per K
98db63cfb6 Introduce RtpTransportConfig:allow_bandwidht_estimation_probe_without_media
If allow_bandwidht_estimation_probe_without_media is true and a writable
video rtp stream with RTX exist, a probe can be sent immediately without
waiting for a large media packet.

Bug: webrtc:14928
Change-Id: Ie2204734f9fe3e6bff9aed4a1f7f8995956d35cb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336000
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41626}
2024-01-29 07:41:32 +00:00
Tony Herre
9c6874607a Consolidate encoded transform mocks into api/test/
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}
2024-01-26 12:46:34 +00:00
Åsa Persson
1dccfeb395 Set InterLayerPredMode based on scalability mode for VP9.
Bug: webrtc:15673
Change-Id: I7d3cdcda537c85f3be578cb00452e0611759704f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336280
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41621}
2024-01-26 10:40:00 +00:00
Danil Chapovalov
d213dd5517 Pass Environment to VideoDecoders through VideoCodecTester
Bug: webrtc:15791
Change-Id: I002734a17ece1d11b77a261aa8160c4afa1702b5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336241
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41617}
2024-01-26 08:11:19 +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
Erik Språng
6a992129fb Tighten som DCHECKs to CHECKs in VP9 packetization.
Bug: chromium:1518991, chromium:1518994
Change-Id: I47f68ba6aaf4874fd952332bf213e3a1e0389268
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335241
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41580}
2024-01-19 16:58:09 +00:00
Sergey Silkin
37e9b378fd Use default H264 SDP parameters
We lost H264 [1] in https://webrtc-review.googlesource.com/c/src/+/327260 where we started using QueryCodecSupport which is sensetive to SDP parameters.

Use CBP3.1, packetization_mode=1 (singlecast NALU) as defaults.

[1] https://chromeperf.appspot.com/report?sid=1e12d661147889123ddeea4ef88a87bcdd38cf09cb23c13ee130770be695ac83&start_rev=41064&end_rev=41226

Bug: webrtc:14852, webrtc:15779
Change-Id: I69137ac847ae3a79238abcfe2a76dc2ba097a06d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335081
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41576}
2024-01-19 15:01:12 +00:00
Olov Brändström
4c335b70e8 Record audio timestamps from iOS.
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}
2024-01-19 12:35:53 +00:00
Sergey Silkin
3e623ef57d Respect decoder implementation
This allows using different encoder and decoder implementations in a test. For example, to encode with SW encoder and to decode with HW decoder or vice versa.

Bug: webrtc:14852
Change-Id: Ic100cba2158fb6311b84a54a0831f2a0dcff9270
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335300
Auto-Submit: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41571}
2024-01-19 11:16:00 +00:00
Danil Chapovalov
434f4cb44f Cleanup usage of rtc::TaskQueue in TestAudioDevice
Extra rtc::TaskQueue wrapper adds no value here.

Bug: webrtc:14169
Change-Id: I45b3e0e56ffd185641973130f962d69022c74475
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335145
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41570}
2024-01-19 10:20:05 +00:00
Johannes Kron
fb99c6ebb5 Disable the use of CGDisplayStreamCreate() for desktop capture on Sonoma
CGDisplayStreamCreate is an deprecated API. It was believed that the use
of it was disabled on Sonoma through the setting allow_iosurface = false
[1], which causes the thumbnails to be created by the API CGDisplayCreateImage.
This API is not marked as deprecated at the moment.

However, although the thumbnails are created through CGDisplayCreateImage,
CGDisplayStreamCreate() is still called and runs in the background.
This makes the capture chip appear.

No capture chip appears if this CL is landed and the ScreenCaptureKit
thumbnail capturer is enabled,
--enable-features="ScreenCaptureKitMac,ScreenCaptureKitStreamPickerSonoma,ThumbnailCapturerMac:capture_mode/sc_screenshot_manager"

[1] https://chromium-review.googlesource.com/c/chromium/src/+/4892397

Bug: chromium:1486851
Change-Id: I3422efffc57dcb3e8965f19a5eca7f2a95d62da1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334721
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41563}
2024-01-18 15:56:40 +00:00
philipel
7aff4d1a40 Stash and retry packets that are waiting for the dependency descriptor template structure.
Bug: b/317178411
Change-Id: Idf4d0eb9740753ba587ec81c1071cb25fb42c36d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334646
Auto-Submit: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41554}
2024-01-18 09:22:10 +00:00
Jim Gustafson
3d44a9e3b5 Merge branch m120 2024-01-17 12:11:58 -08:00
Danil Chapovalov
02d9eceb3c Remove dependency on rtc::TaskQueue in AudioProcessing module
Bug: webrtc:14169
Change-Id: I703cd01a6fd013ae4d5236bb76686aab4aa89381
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333960
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41551}
2024-01-17 18:12:16 +00:00
philipel
d257cb7333 Remove keyframe tracking from NackRequester.
Tracking keyframe packets is a useless optimization that kicked in when the nack list is full (1000 packets).

Bug: none
Change-Id: I134ecb4d51131718e5bb8775847fbde18f262ef9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334645
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41547}
2024-01-17 14:14:59 +00:00
Danil Chapovalov
18d1d0f793 Fix perfect forwarding in RtpPacket::GetExtension
Thus allow to pass output parameter by reference.

Bug: None
Change-Id: I64821caf72875efee62d6cfc90691070dceba775
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334644
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41542}
2024-01-17 11:16:49 +00:00
Joe Downing
3b500e60e8 Fixing a crash in SendSideBandwidthEstmation
This CL addresses a crash we started seeing in M121 where a
function is being called on loss_based_bandwidth_estimator_v2_
without checking whether it is enabled (it's not) which leads
to absl::optional<> throwing since config_ is not valid.

Bug: chromium:1518852
Change-Id: Iffef1051fe7988046e33a709ce281aebefd2bcd7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334103
Commit-Queue: Joe Downing <joedow@google.com>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41538}
2024-01-16 20:42:51 +00:00
Jeremy Leconte
199fd755bd Run video_codec_perf_tests using the quick mode on Android try bots.
Change-Id: I02678b033815f843e4aee1585ef64c4d9b7e7b14
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334220
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#41535}
2024-01-16 10:07:48 +00:00
Philipp Hancke
5aaa9ed41e Remove custom AssertStartsWith and AssertStringContains matchers
in favor of stock StartsWith and HasSubstr matchers provided by gmock.

BUG=None

Change-Id: Ib7e9a0ac73d506c349b8ec102dd4236767077d61
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334460
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41531}
2024-01-16 08:30:37 +00:00
Danil Chapovalov
e052eee7a3 Deprecate rtc::TaskQueue variant of AudioProcessing::CreateAndAttachAecDump
Bug: webrtc:14169
Change-Id: I63f40ec18b72cba89eb0b9b298f448ce7f7c4634
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334201
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41528}
2024-01-15 13:36:35 +00:00
Philipp Hancke
edd804816c video capture test: use stock EXPECT_TRUE_WAIT
instead of a custom one.

BUG=None

Change-Id: I5c55acef6203a384748534c6c9701dcdd8dec211
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332940
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41526}
2024-01-15 07:42:58 +00:00
Jeremy Leconte
634cb403e6 Revert "Fix 'Image will be cropped if WindowCapturerWinGdi used'"
This reverts commit 844225a76a.

Reason for revert: potential nullptr dereference

Original change's description:
> Fix 'Image will be cropped if WindowCapturerWinGdi used'
>
> Bug: webrtc:15719
> Change-Id: I7daf8ee5b90fbe9f1246f1d99211ffa0d8a19f73
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330780
> Reviewed-by: Alexander Cooper <alcooper@chromium.org>
> Commit-Queue: Alexander Cooper <alcooper@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#41503}

Bug: webrtc:15719
Change-Id: Ib38e1345c4c590b6a71bbea476a9d780a2f5e800
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334200
Owners-Override: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Manashi Sarkar <manashi@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41509}
2024-01-12 10:16:26 +00:00
memetao
844225a76a Fix 'Image will be cropped if WindowCapturerWinGdi used'
Bug: webrtc:15719
Change-Id: I7daf8ee5b90fbe9f1246f1d99211ffa0d8a19f73
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330780
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#41503}
2024-01-10 19:52:44 +00:00
Philipp Hancke
bb0044eb90 add VP8/VP9 packetization fuzzers
and ensure consistent behavior on empty input.

BUG=webrtc:15755

Change-Id: Id70ab5d55251b4dd10eed8ab67ea8e75545a7a8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332740
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41502}
2024-01-10 14:36:46 +00:00
Danil Chapovalov
1ecf29c1ce Change AudioProcessing interface to allow not to require rtc::TaskQueue
rtc::TaskQueue is a wrapper of TaskQueueBase providing no extra functionality in this case

Bug: webrtc:14169
Change-Id: I5eb27a5dbb16f6097a9c71c2633c807808e50c05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333800
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41501}
2024-01-10 13:48:44 +00:00
Per K
187ca72ab7 Fix problem in PrioritizedPacketQueue when last old RTX packet is purged
Ensure top_active_prio_level_ is set to -1 in MaybeUpdateTopPrioLevel if
last packet is purged.

Bug: webrtc:15740
Change-Id: I81df9ee084de89f79b8ab79db8ce52fe1e20738a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333883
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41498}
2024-01-10 10:54:42 +00:00
Danil Chapovalov
dda037db07 Remove unused field trial DisablePacerEmergencyStop
This field trial was added 5 years ago in
https://webrtc-review.googlesource.com/c/src/+/111883
probably as a safe guard, but looks never used.

Bug: webrtc:11503
Change-Id: Ia9544b652b25fad4c614d66fe020f3d994c96505
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333380
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41490}
2024-01-09 15:03:34 +00:00
Philipp Hancke
5d091cec5d Add H264 packetizer fuzzer
BUG=webrtc:15755

Change-Id: I384fbdfa3a2aea8faaf53eb161cecc2c8639401d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332600
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41487}
2024-01-09 13:32:42 +00:00
Danil Chapovalov
1d6bf3156b Use propagated instead of global field trials in FecControllerDefault
Bug: webrtc:10335
Change-Id: Ia559ae2655b39e7093cfdb9ed669f3463ef90054
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333842
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41483}
2024-01-09 12:26:54 +00:00
Danil Chapovalov
b64eef1234 In AecDump take raw pointer to TaskQueueBase instead of legacy rtc::TaskQueue
Bug: webrtc:14169
Change-Id: I1e50a945a7637da07bec00ccd7b6b1847a7481cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333480
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41477}
2024-01-08 12:17:06 +00: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
Danil Chapovalov
8a74636d46 In ReceiveStatistics fix a signed integer overflow undefined behavior
Bug: b/318332290
Change-Id: I279dcaf8c9cb801482f0e29343304c854af78792
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333060
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41463}
2024-01-02 12:20:34 +00:00
Björn Terelius
51563cc36c Ensure that sequence numbers are initialized in DelayBasedBwe unittests
Bug: b/299667054
Change-Id: I6bcc4ec9e3588842e6da7d9265c145680de0c52b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332260
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41431}
2023-12-21 14:51:11 +00:00
Philipp Hancke
f698a39eec OpenH264: report error on unsupported pixel format
BUG=webrtc:15713

Change-Id: I32aa14aced59ed8f1a9a3a9b8f70182d704e3354
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330460
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Natalie Silvanovich <natashenka@google.com>
Cr-Commit-Position: refs/heads/main@{#41420}
2023-12-20 08:24:24 +00:00
Per K
b9ba02c025 Prioritize audio resend before video resend and implement TTL.
Adds separate priorities for audio and video retranmission.
Done by adding an original type to RtpPacketToSend.

Add possiblity to set TTL for audio nack, video nack and video packet separately.
Oldest packet for these types are dropped when a new packet of that type is pushed to the pacer, or when the pacer switch current priority type to that priority.

Effect is that:
   -pacer queue does not grow unlimited for these types if a TTL has been set.
   -an old packet is not sent.

Bug: webrtc:15740
Change-Id: I38718bc570aebca54eacbded69824905f3694f41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331823
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41414}
2023-12-19 13:52:11 +00:00
Tony Herre
3e801c3208 Allow RTP retransmission for cloned encoded Video Frames
Fix the unintended disabling of RTP retransmissions for cloned encoded
frames, caused by passing an infinite "expected_retransmission_time".
Instead use a constant 10ms for now. For frames encoded locally, this is
set from an estimate of the RTT, but we currently don't have access to
that here (TODO added to pipe it through)

If an integration is cloning and then sending frames it received, it's
almost certainly resending received media to other peers on a local
network, so 10ms is a fair upperbound.

Tested locally with Chrome on Mac, configuring packet drops & observing
on chrome://webrtc-internals that retransmission packets are now sent.

Bug: chromium:1512631
Change-Id: I2483415dc7e0079f8a7b66f6607f4907698514c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331900
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#41405}
2023-12-18 17:50:14 +00:00
Danil Chapovalov
ca8353648d Rewrite tmmbr timeout check to avoid using negative Timestamp
Bug: chromium:1511139
Change-Id: I7f65fd07412a6c32c5633f8ef6655ba506fe5407
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331822
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41404}
2023-12-18 16:48:07 +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
Qiu Jianlin
ddf6084096 Apply QpParser for H.265 streams.
Video stream encoder now parses Qp for H.265 streams as well.

Bug: webrtc:13485
Change-Id: I0db4e0e34e70d189f8e99b4b182fd3ea14b8c734
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330883
Commit-Queue: Jianlin Qiu <jianlin.qiu@intel.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41355}
2023-12-11 22:02:26 +00:00
Danil Chapovalov
7b4b39809f Remove DCHECK when transport feedback on request can't be produced
Bug: chromium:1507210
Change-Id: I840b91dd7143ce6a0d3c9a17df6c187e01a145f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330320
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41351}
2023-12-11 11:15:47 +00:00
Mirko Bonadei
a3d2c58e38 Skip LibaomAv1SvcTest.EncodeAndDecodeAllDecodeTargets/S3T3.
This is temporary while AV1 gets fixed.

Bug: webrtc:15715, b/315476578
Change-Id: I4fdadb97788c934b12b4a3a19dfec1f61a95a3a5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330640
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Marco Paniconi <marpan@google.com>
Reviewed-by: Marco Paniconi <marpan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41345}
2023-12-09 12:24:51 +00:00
Tony Herre
5f3ac43551 Ensure cloning and then sending audio encoded frames propagates CSRCs
Bug: chromium:1508337
Change-Id: I9f28fc0958d28bc97f9378a46fbec3e45148736f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330260
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41337}
2023-12-07 15:09:01 +00:00
Diep Bui
5b11df789f Ensure that acked rate is the lower bound of estimate and candidates.
After https://webrtc-review.googlesource.com/c/src/+/329141, best candidate can still be less than acked rate if not_increase_if_inherent_loss_less_than_average_loss, or the selected candidate is 95% of current estimate. This cl/ is ensure the previous cl works as intended. And add unit test.

Bug: webrtc:12707
Change-Id: Ie5683ca8ea51f6d80c4c59cbf08c22e8b24c0cb9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329441
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41298}
2023-12-01 20:04:14 +00:00
Diep Bui
3a530abb0e Use acked rate as lower bound of both HOLD rate and best candidate.
Bug: webrtc:12707
Change-Id: I1a5656aa6a49c53914d625c61cf114cd5897646c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329141
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41293}
2023-11-30 20:10:15 +00:00
Sergey Silkin
ee46340054 Move and extend frame decode failure logging
Move logging of decode failure from VCMGenericDecoder to VideoReceiveStream2 where remote SSRC is always known. Log frame details such as size and resolution which help to identify this frame in bitstream dump.

Bug: b/309132190
Change-Id: Ibe50799e448ffdc19f9857cc1625cfde0d7aa7a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328821
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41276}
2023-11-29 13:50:18 +00:00
Per K
fc60c7836f Add flag to reset LossBased BWE best candidate to instant upper bound
Bug: webrtc:12707
Change-Id: I4583e131ab9c5d81188191b23ebc227b4662bd7c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329121
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41274}
2023-11-29 13:18:03 +00:00
Per K
2e3152654a Allow setting a different rampup factor if BWE < hold rate
Bug: webrtc:12707
Change-Id: Id674246d66d1b7f2a705934350e8a4f93564639f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329120
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41273}
2023-11-29 12:36:24 +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
Diep Bui
69d1d3ec40 Remove unused flags in loss based bwe v2.
These flags were never experimented or launched.

Bug: webrtc:12707
Change-Id: Iefedeade52fdcf7f978894c4bf837261810f41bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329080
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41265}
2023-11-28 22:48:34 +00:00
Per K
b202bc1db2 Per default set PacingController burst interval to 40ms
PacingController per default use a burst interval of 40ms. The behaviour can still be overriden by  using the method SetSendBurstInterval.

Bug: chromium:1354491
Change-Id: Ie3513109e88e9832dff47380c482ed6d943a2f2b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311102
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41254}
2023-11-28 07:53:50 +00:00
Per K
f1df16ceea Per default enable WebRTC-PaddingMode-RecentLargePacket
This means that RtpPacketHistory::PaddingMode::kRecentLargePacket is
used per default.

Bug: webrtc:15201, b/284281602
Change-Id: If8feb66105a9b1e13ae4cb28a44a74c8839b72e1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327602
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41215}
2023-11-22 17:43:43 +00:00
Harald Alvestrand
572502c2ab Deprecate char* functions on ByteBufferReader
Bug: webrtc:15661, webrtc:15665
Change-Id: Ia35b0092c219a89b5eba08d2e1a91be6e47dc746
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328000
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41210}
2023-11-22 11:46:25 +00:00
Michael Olbrich
a9d497b52d Video capture PipeWire: fix thread and lock annotations
There are two threads involved here, the thread that calls the API
functions and the pipwire main loop. Using one race checker for both is
wrong and triggers aborts.

Use a different race checker for all variables that are used by the
pipewire main loop or guarded against concurrent access with the
thread_loop_lock.

In one case, two RTC_CHECK_RUNS_SERIALIZED() checks are needed, so
enhance the macro to generate unique variable names.

Bug: webrtc:15181
Change-Id: Ib41514eb7aa98fe85d830461aa0c71e42ba821bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326781
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41198}
2023-11-20 18:18:04 +00:00
Per K
f124572ec0 Per default enable WebRTC-Bwe-EstimateBoundedIncrease/c_upper:true
This ensure upper link capacity estimate upper limit an increase in
delay based estimate, but the delay based estimate is not decreased if
link capacity estimate decrease.

Bug: webrtc:10498, b/300868877
Change-Id: I87e76e2a869e6f721cc8fe9d422e0194371d4e45
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327801
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41196}
2023-11-20 14:40:15 +00:00
Sergey Silkin
2d86b258e0 Reland "Added an encode/decode test parameterizable via command line"
This is a reland of commit 496893e89e

Original change's description:
> Added an encode/decode test parameterizable via command line
>
> This enables testing different settings without updating code and rebuilding the test binary. Example of command:
>
> video_codec_perf_tests --gtest_also_run_disabled_tests --gtest_filter=*EncodeDecode --encoder=libaom-av1 --decoder=dav1d --scalability_mode=L1T3 --bitrate_kbps=100,200,300 --framerate_fps=30 --write_csv
>
> Also added writing per-frame stats to a CSV. It is more convenient to work with CSV than to parse metrics proto.
>
> Bug: webrtc:14852
> Change-Id: I1b3970f7ffa88c016133197aff585de5bc4e35c6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327600
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41179}

Bug: webrtc:14852
Change-Id: Iccb9af8bf6a6c37704bc58b6e57238b55761b079
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327781
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41194}
2023-11-20 11:51:43 +00:00
Tony Herre
6e956053b7 Support shortcircuiting encoded transforms
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}
2023-11-17 13:03:27 +00:00
Christoffer Jansson
20724ae1b7 Revert "Added an encode/decode test parameterizable via command line"
This reverts commit 496893e89e.

Reason for revert: Breaks https://ci.chromium.org/ui/p/chromium/builders/webrtc.fyi/WebRTC%20Chromium%20FYI%20ios-device/16103/overview

Original change's description:
> Added an encode/decode test parameterizable via command line
>
> This enables testing different settings without updating code and rebuilding the test binary. Example of command:
>
> video_codec_perf_tests --gtest_also_run_disabled_tests --gtest_filter=*EncodeDecode --encoder=libaom-av1 --decoder=dav1d --scalability_mode=L1T3 --bitrate_kbps=100,200,300 --framerate_fps=30 --write_csv
>
> Also added writing per-frame stats to a CSV. It is more convenient to work with CSV than to parse metrics proto.
>
> Bug: webrtc:14852
> Change-Id: I1b3970f7ffa88c016133197aff585de5bc4e35c6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327600
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41179}

Bug: webrtc:14852
Change-Id: Ifdce738058c3e3fc7c76886939add2813405cae7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327722
Owners-Override: Christoffer Jansson <jansson@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41183}
2023-11-17 12:53:00 +00:00
Sergey Silkin
496893e89e Added an encode/decode test parameterizable via command line
This enables testing different settings without updating code and rebuilding the test binary. Example of command:

video_codec_perf_tests --gtest_also_run_disabled_tests --gtest_filter=*EncodeDecode --encoder=libaom-av1 --decoder=dav1d --scalability_mode=L1T3 --bitrate_kbps=100,200,300 --framerate_fps=30 --write_csv

Also added writing per-frame stats to a CSV. It is more convenient to work with CSV than to parse metrics proto.

Bug: webrtc:14852
Change-Id: I1b3970f7ffa88c016133197aff585de5bc4e35c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327600
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41179}
2023-11-17 10:21:51 +00:00
Yosef Twaik
75a3ba216e Reverse the kbits logic according to RFC
The updated Flexfec RFC states that a kbit of "0" means this is the last block of the mask, whereas in the 03 draft, "0" meant there's another block.
Reversing the logic in the updated RFC parser to fix.


Bug: webrtc:15002
Change-Id: I40e4c950b09ddf2db9da6c01908737282161bf1c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327580
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41174}
2023-11-16 18:33:13 +00:00
Jan Grulich
12c502428d Video capture PipeWire: clear notifier after use and upon destruction
Make sure the notifier is reset when tearing down the camera portal and also when we already called it. Destruction of camera portal will be mostly invoked by an object holding it and serving as an implementation of the notifier interface and in such case we have to make sure it will
not get called at this moment.

Bug: webrtc:15407
Change-Id: If0c1fb1493d64d5e1f0228ed71813abbb9280083
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315420
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#41167}
2023-11-15 13:59:24 +00:00
Jan Grulich
8b54e37cac DeviceInfoPipeWire: move include for PipeWireSession out of the header
Moving the header file and definitions for PipeWireSession to the source
file allows DeviceInfoPipeWire to be reimplemented or used in wrappers
without the consumer needing to add PipeWire includes and definitions.

Bug: webrtc:15654
Change-Id: I895059d50bdf9e6ed152eca729c618261701457a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327381
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#41163}
2023-11-15 10:49:56 +00:00
Jan Grulich
eb6106e9d0 DeviceInfoPipeWire: Add RTC_CHECKS for non-initialized PipeWire session
Adds sanity checks for non-initialized PipeWire session in case caller
forgets to initialize VideoCaptureOptions.

Bug: webrtc:15654
Change-Id: Ic7afd2a9f7cd6ffdede612798544ad8826c96f74
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327380
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#41162}
2023-11-15 10:48:53 +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
Sergey Silkin
d431156c0e Move codecs handling from test to tester
* Pass codec factories to the video codec tester instead of creating and wrapping codecs into a tester-specific wrappers in video_codec_test.cc. The motivation for this change is to simplify the tests by moving complexity to the tester.

* Merge codec stats and analysis into the tester and move the tester. The merge fixes circular deps issues. Modularization is not strictly needed for testing framework like the video codec tester. It is still possible to unit test underlaying modules with rather small overhead.

* Move the video codec tester from api/ to test/. test/ is accessible from outside of WebRTC which enables reusing the tester in downstream projects.

Test output ~matches before and after this refactoring. There is a small difference that is caused by changes in qpMax: 63 -> 56 (kDefaultVideoMaxQpVpx). 56 is what WebRTC uses by default for VPx/AV1 encoders.

Bug: webrtc:14852
Change-Id: I762707b7144fcff870119ad741ebe7091ea109ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327260
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41144}
2023-11-13 16:48:49 +00:00
henrika
b0cc68e612 Reduces rate at which TryGetNextFrame returns NULL for WGC
This CL is a follow-up of work done in
https://webrtc-review.googlesource.com/c/src/+/323882 where the goal
was to reduce the amount of FrameDropped error logs in
WebRTC.DesktopCapture.Win.WgcCaptureSessionGetFrameResult.

The previous work avoids FrameDropped logs for a minimized window
being captured with WGC but we still se a large amount of these error
(or rather warning) logs. See [1] which comes from Canary.

This CL does two different things to improve the situation:

1) It adds kFramePoolEmpty to the existing
GetFrameResult::kFrameDropped enum to point out that the warning
comes from the frame pool not being able to return a valid new frame.
It also makes it more clear that it does not cause an outer/final
error as WgcCapturerResult::kFrameDropped. We still keep the inner
GetFrameResult::kFrameDropped but it is only produced when the frame
pool returns NULL and our external queue is empty. Hence, a real
frame-drop error. Note that, it is still easy to provoke
kFramePoolEmpty simply by asking for a high resolution at a high rate.
The example in [2] comes from a 4K screen @30fps. Hence, we have not
fixed anything yet.

2) It also increases the size of the internal frame pool from 1 to 2.
This does lead to an almost zero rate of kFramePoolEmpt
warnings at the expense of a slightly reduced max capture rate. BUT,
with 1 as size, we can "see" a higher max capture rate but it is not
a true rate since it comes with a high rate of kFramePoolEmpty
errors. Hence, we "emulate" a high capture rate by simply feeding
copies of the last frame that we had stored in the external queue.
Using 2 leads to a more "true" rate of what we actually can capture
in terms of *new* frames and also a substantially lower rate of
kFramePoolEmpty.
In addition, with 1 as size, if we ask at a too high rate and provide
a copy of the last frame, our CPU adaptation will not reduce its rate
since we think that things are OK when it is actually not.

Also, the samples in [3] and [4] both use 2 as numberOfBuffers
as well.

Let me also mention that with this small change, I a have not been
able to provoke any kFramePoolEmpty error messages.

Finally, geDisplayMedia can be called called with constraints where
min and max framerate is defined. The mechanism which maintains the
min rate is implemented via the RequestRefreshFrame API and it can
be sent to the source (DesktopCaptureDevice) back to back with a
previous timer interrupt for a capture request. Without this change,
these RRFs were also a source of a large amount of
kFramePoolEmpty error logs. With 2 buffers instead; this is no
longer the case.

[1] https://screenshot.googleplex.com/7sfv6HdGXLwyxdj
[2] https://paste.googleplex.com/4795680001359872
[3] https://github.com/robmikh/Win32CaptureSample/blob/master/Win32CaptureSample/SimpleCapture.cpp
[4] https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/screen-capture#add-the-screen-capture-capability

(cherry picked from commit 4be5927dc7)

Bug: chromium:1314868
Change-Id: I73b823b31a993fd2cd6e007b212826dfe1a80012
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325521
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#41079}
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326960
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/branch-heads/6099@{#1}
Cr-Branched-From: 507f1cc3270d0577f79882acbd78e63e66008f3d-refs/heads/main@{#41042}
2023-11-10 10:06:20 +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
Stephan Hartmann
fa4d7c92b7 libstdc++: replace deprecated std::is_pod<T>
std::is_pod is deprecated since C++20. Replace with std::trivial and
std::is_standard_layout. Avoids a lot of warnings.

Bug: chromium:957519
Change-Id: Idb4bde7401c14c0896a84c357ec668b9916f613e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325484
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41117}
2023-11-09 15:16:00 +00:00
qwu16
bd396fdffa Add rtp packetizer for H265
Bug: webrtc:13485
Change-Id: I4e7e29a7661d51e12bb2ee12e319f6cef49482d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318005
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41107}
2023-11-08 15:49:37 +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
henrika
4be5927dc7 Reduces rate at which TryGetNextFrame returns NULL for WGC
This CL is a follow-up of work done in
https://webrtc-review.googlesource.com/c/src/+/323882 where the goal
was to reduce the amount of FrameDropped error logs in
WebRTC.DesktopCapture.Win.WgcCaptureSessionGetFrameResult.

The previous work avoids FrameDropped logs for a minimized window
being captured with WGC but we still se a large amount of these error
(or rather warning) logs. See [1] which comes from Canary.

This CL does two different things to improve the situation:

1) It adds kFramePoolEmpty to the existing
GetFrameResult::kFrameDropped enum to point out that the warning
comes from the frame pool not being able to return a valid new frame.
It also makes it more clear that it does not cause an outer/final
error as WgcCapturerResult::kFrameDropped. We still keep the inner
GetFrameResult::kFrameDropped but it is only produced when the frame
pool returns NULL and our external queue is empty. Hence, a real
frame-drop error. Note that, it is still easy to provoke
kFramePoolEmpty simply by asking for a high resolution at a high rate.
The example in [2] comes from a 4K screen @30fps. Hence, we have not
fixed anything yet.

2) It also increases the size of the internal frame pool from 1 to 2.
This does lead to an almost zero rate of kFramePoolEmpt
warnings at the expense of a slightly reduced max capture rate. BUT,
with 1 as size, we can "see" a higher max capture rate but it is not
a true rate since it comes with a high rate of kFramePoolEmpty
errors. Hence, we "emulate" a high capture rate by simply feeding
copies of the last frame that we had stored in the external queue.
Using 2 leads to a more "true" rate of what we actually can capture
in terms of *new* frames and also a substantially lower rate of
kFramePoolEmpty.
In addition, with 1 as size, if we ask at a too high rate and provide
a copy of the last frame, our CPU adaptation will not reduce its rate
since we think that things are OK when it is actually not.

Also, the samples in [3] and [4] both use 2 as numberOfBuffers
as well.

Let me also mention that with this small change, I a have not been
able to provoke any kFramePoolEmpty error messages.

Finally, geDisplayMedia can be called called with constraints where
min and max framerate is defined. The mechanism which maintains the
min rate is implemented via the RequestRefreshFrame API and it can
be sent to the source (DesktopCaptureDevice) back to back with a
previous timer interrupt for a capture request. Without this change,
these RRFs were also a source of a large amount of
kFramePoolEmpty error logs. With 2 buffers instead; this is no
longer the case.

[1] https://screenshot.googleplex.com/7sfv6HdGXLwyxdj
[2] https://paste.googleplex.com/4795680001359872
[3] https://github.com/robmikh/Win32CaptureSample/blob/master/Win32CaptureSample/SimpleCapture.cpp
[4] https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/screen-capture#add-the-screen-capture-capability

Bug: chromium:1314868
Change-Id: I73b823b31a993fd2cd6e007b212826dfe1a80012
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325521
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#41079}
2023-11-03 18:05:17 +00:00
Harald Alvestrand
23cecc1d43 Move scoped_refptr from rtc:: to webrtc::
leaving a compatible alias.

Bug: webrtc:15622
Change-Id: Ie25d87fa372cc71eaf52882454f4dd24c7c33789
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325462
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41072}
2023-11-03 07:36:07 +00:00
Harald Alvestrand
78f905e5cc Move some users to use webrtc::RefCountInterface
Bug: webrtc:15622
Change-Id: I2d4c20c726af1a052e161b7689a73d1e5e3eb191
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325526
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41067}
2023-11-02 14:45:57 +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
Diep Bui
7d1693f1c5 Do not allow estimate to increase above the estimate when HOLD started.
To ensure padding, we increase 1 bit instead of 1kbps to avoid that 1kbps adds up over time.
Not have unit test for this, but did manual/hamrit tests many times.

Bug: webrtc:12707
Change-Id: I9b3160ab1808cb3a21ff0609446359a4ec3a4949
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325520
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41056}
2023-11-01 01:30:32 +00:00
Jim Gustafson
62d543d814
Add low bitrate redundancy support 2023-10-31 13:14:36 -07:00
Diep Bui
cf2fe18daa Use acked bitrate as a candidate if padding is sent.
Bug: webrtc:12707
Change-Id: Ie824bdef09e685d0a4810177cbe5af57e699ad84
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325480
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41052}
2023-10-31 16:11:43 +00:00
Diep Bui
9682f4be7d Reset loss based BWE on route change.
The change is under field trial use_in_start_phase.

Bug: webrtc:12707
Change-Id: I2ba8245c5d126b3c8a2e54b826853d98aad6e4f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325184
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41047}
2023-10-31 11:50:07 +00:00
Diep Bui
e920073a68 Ensure that loss based BWE can switch to kIncreasing state when it wants to increase.
Increasing BWE by 1kbps should be safe/no-op in practice, and it ensures that padding in kIncreasing state will be triggered.

Bug: webrtc:12707
Change-Id: I82493d07a80abd60c93d9cff74baf0a55e77f2b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325286
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41046}
2023-10-31 11:46:43 +00:00
Diep Bui
4d7e722e9d Add 1minute as max hold duration to make sure that loss based BWE always tries to increase estimate.
Bug: webrtc:12707
Change-Id: I94689431726a37e2bfec52992046305705c6bb8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324741
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41025}
2023-10-27 13:02:04 +00:00
Danil Chapovalov
6634c91194 Refactor AbsoluteCaptureTimeSender and AbsoluteCaptureTimeInterpolator
Removed thread safety: for a low level helper it adds overhead that users may not need. In particular RtpSenderVideo doesn't need it because calls to SendVideo are already synchronized.

Added a feature to force producing extension as requested by downstream.

Cleanup and document api:
Changed rtp_frequency type to int as it has no reason to use uint32_t per style guide
Changed absolute_capture_time to NtpTime to clarify both units and offset of the time. NtpTime has trivial conversion to/from uint64_t
Documented all the parameters.

Cleanup tests.

Bug: b/307553606
Change-Id: I0922ca4d3c89f124eeb561742dca79ed5c2327fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325022
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Chen Xing <chxg@google.com>
Cr-Commit-Position: refs/heads/main@{#41023}
2023-10-27 12:50:08 +00:00
Diep Bui
e43edec62d Add 1s as padding duration limit in loss based BWE.
If we have been sending padding for 1s and estimate still is unchanged, then stop padding by transitioning to decrease state.

Bug: webrtc:12707
Change-Id: I0dca2e5cd98263fc7fae9882c23c21634413c7a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324740
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41018}
2023-10-27 12:36:05 +00:00
Sam Zackrisson
2e1f16d55c Make AEC3 json parsing code testonly
Reasons:
- the code is no longer used in Chrome
- it is conceptually weird for WebRTC to have JSON parsing in its API
- there are concerns around the reliability of the underlying JSON library

Additionally, this CL removes the rtc_json "poisonous" attribute: the scheme is incompatible and redundant with testonly.

Bug: webrtc:1493351
Change-Id: I0b621b0e3f183df7315919d9c89242fbe387928f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325062
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41014}
2023-10-26 12:03:02 +00:00
Diep Bui
1f2f5dc951 Compute loss rate based on byte count rather than packet count in loss based BWE.
2 main reasons:
1. Packet sizes are much different thus a lost audio packet should not be treated similar to a lost video packet. In low bandwidth/traffic policing scenario, the number of send packet is few, thus the computed loss can be imprecise.

2. Given a candidate bandwidth estimate, the objective function (how good the candidate is) is computed by recomputing loss rate = send rate/estimate bandwith + inherent loss. It means the objective function is byte based rather than packet based.

Potential risk: the current algorithm params are tuned based on packet count, thus it might not work with byte count, which is much higher than packet count.

The change is under field trial and disabled by default.

Bug: webrtc:12707
Change-Id: I8b832e7920d2b4cadcd4a072b3a4d4f26a213a20
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325065
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41013}
2023-10-26 09:32:27 +00:00
Philipp Hancke
0bace22a0b Expose video mimeType for insertable streams
which allows determining what codec (data format) is used.
Chromium CL:
  https://chromium-review.googlesource.com/c/chromium/src/+/4941907

Split from
  https://webrtc-review.googlesource.com/c/src/+/318283
to reduce CL size and avoid audio woes.

BUG=webrtc:15579

Change-Id: I404107af526df3009c16d2a6148784fe87dfa807
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323721
Reviewed-by: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41007}
2023-10-25 16:01:32 +00:00
Guy Hershenbaum
a1714f3e92 Fix usages of RTC_DCHECK to GTEST macros to ensure tests pass in release builds as well
Using RTC_DCHECK for test validation is wrong to begin with (gets
compiled out in non-debug builds, which measn we may miss validations),
but becomes extra problematic when we include code with side-effects
inside the DCHECK, which results in release-build tests having a
different flow than intended

Bug: webrtc:15572
Change-Id: I89d5b55f903b9d93fe4a929548d1b9fcde8941be
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323182
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41005}
2023-10-25 09:32:28 +00:00
henrika
992d708e8e Improves comments for ShouldBeCapturable
Bug: webrtc:1314868
Change-Id: Ia743d17d61d7d8ffc44030b5691efef1c7ed7991
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324305
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40994}
2023-10-23 17:07:49 +00:00
Sergey Silkin
50e2054c5b Move setting single spatial layer bitrates to GetVp9SvcConfig
Before this change bitrate limits for VP9 single spatial layer case were set in VideoCodecInitializer. Move this logic to GetVp9SvcConfig. This simplifies replication of WebRTC behaviour in codec level tests. The similar AV1 logic sits in SetAv1SvcConfig, not VideoCodecInitializer.

Bug: webrtc:14852
Change-Id: Ie7202ec880d0e4b903e7265721eeef9b3920f21a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324286
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40992}
2023-10-23 14:10:21 +00:00
Diep Bui
75a131f39c Introduce hold duration in loss based BWE.
The initial hold duration is 300ms.

Whenever it enters kDecreasing state, it will double the current hold duration. The hold duration will be reset as soon as the delay based estimate works, e.g. the state is kDelayBased to avoid getting stuck at low bitrate.

Bug: webrtc:12707
Change-Id: I3906ff80b071ba3eb6274b012fb31922f4cbc7b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324304
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40991}
2023-10-23 14:09:17 +00:00
Per K
32f6c6e8b9 Use instant upper bound as LossBased candidate in ALR
Addes field trial UpperBoundCandidateInAlr to LossBasedBweV2. If an
instant upper bound exist in ALR that are lower than current estimate,
use it as a candidate.

Bug: webrtc:12707
Change-Id: I55595c7225c4289e1bc4edde9d9576e0443d3dce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324220
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40986}
2023-10-23 08:21:59 +00:00
Per K
adeda8214c Add field trial to LossbasedBwe2 to use padding when increasing BWE
UsePadding - signals to GoogCC that padding should be used to fill up to
BWE while BWE is ramping up.

Bug: webrtc:12707
Change-Id: I7b4922dff3a83da370c50c567050bfa748190b40
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324160
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40979}
2023-10-20 15:29:26 +00:00
Per K
af7b785f02 Ensure LossBased BWE do not decrease due to acked bitrate
Ensure acked bitrate is not used for lower loss based estimate if
estimate improve.

Ensure LossBasedBweV2 is in state DelayBased if reached max rate.

Bug: webrtc:12707
Change-Id: I20230b99e0c2b530570e2f2de8ea88179f795c50
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324140
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40977}
2023-10-20 10:43:10 +00:00
Per K
ef4c71c204 Change expectation of GoogCCNetworkController::OnNetworkAvailability
Expect OnNetworkAvailabability to be invoked when the transport becomes writable.
Before this change, ProbeController in GoogCC was expected to be created when the transport is writable or explicitly  notifed after creation that network is not writable.

Bug: None
Change-Id: I623b1c34e40a82e912f85b92fea49629e7e72d4e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323463
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40975}
2023-10-19 17:34:42 +00:00
Byoungchan Lee
11376fb992 Reset H.264 SVC Controller on key frame
Sometimes OpenH264 returns a key frame even though we have not
requested one. However, SVC controller does not know about this
and will not reset its state. Since we are comparing expected tid
from SVC controller with actual tid from OpenH264, and drop frames
if they do not match, that causes a missing frame.

This CL resets the SVC controller state on key frames, ensuring
that it accurately maintains its state and does not drop frames.
Also, changes the message of the error log to be more descriptive.
Now, it will print the expected tid and actual tid.

Bug: webrtc:14877
Change-Id: I6c9e7532b2478773f03e5707bf7a1ca56e4f7b99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324001
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40972}
2023-10-19 09:51:14 +00:00
henrika
2bf3620e13 Avoids spamming WebRTC.DesktopCapture.Win.WgcCaptureSessionGetFrameResult with FrameDropped
Without this change a FrameDropped sample will be added to
WebRTC.DesktopCapture.Win.WgcCaptureSessionGetFrameResult at the
current capture rate as long as a captured window is minimized.

Bug: webrtc:1314868
Change-Id: I9b68675486642e7ca25674df689c207ac94a206e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323882
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40969}
2023-10-18 17:29:04 +00:00
Diep Bui
fe02681809 Remove unused loss based param.
Bug: webrtc:12707
Change-Id: Ie6f8eac23a4fb2fbd648b2a213319af508c40230
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324045
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40967}
2023-10-18 15:48:33 +00:00
Diep Bui
4f25aa7963 Fix loss based BWE state.
The state should be computed from the actual estimate rather than the best estimate candidate. The fix is NOT under field trial.

And some other cleanup:
1. Loss based result will be computed in UpdateBandwidthEstimate method. Currently it is re-computed in GetLossBasedResult.
2. Rename current_estimate to current_best_estimate to avoid misunderstanding that current_estimate is the `final estimate`. The final estimate is computed by applying lower and upper bound on current_best_estimate
3. Remove current_state_. The state is stored directly in loss_based_result_.


Bug: webrtc:12707
Change-Id: Ie612845f907b9e6333fbd8249ddc9b93ad9f8042
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324022
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40964}
2023-10-18 14:38:25 +00:00
Per K
1a22983098 Allow GoogCC to send padding if BWE is loss limited
This will be used in an experiment to ramp up BWE when BWE is reduced
due to loss.

Bug: webrtc:12707
Change-Id: I3b78f9dd3fe8ef9f94a9616640ffb8b2225e161e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324042
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40961}
2023-10-18 12:21:23 +00:00
Diep Bui
8ef094f66a Use acked bitrate as lower bound of loss based BWE.
This cl/ makes sure that the estimate cannot go lower than a factor of acked bitrate. The current flag LowerBoundByAckedRateFactor is set to 0, means we dont use it.


Bug: webrtc:12707
Change-Id: I75d5881f0b85a374af3f7039b82c71aee97fb7b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323881
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40958}
2023-10-18 09:20:29 +00:00
Per K
8e18e2e085 Default enable WebRTC-Bwe-LimitProbesLowerThanThroughputEstimate
This ensure probe results can not be lower than 85%  percentage of the
acked bitrate.

Bug: webrtc:11498
Change-Id: I501eeb84f7a049140c45c89e7de7e8080c13f94d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324040
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40957}
2023-10-18 09:19:26 +00:00
Diep Bui
f1d417eee5 Clean up loss_based_bwe_v2_unittest and add flag MinNumObservations.
MinNumObservations is set to 3 per default as loss based BWE should not be ready if it has few feedbacks. We use a flag, rather than a const since we want to customize it for our unit tests, which often have 1-2 packet feedbacks only, and customize it later in prod if necessary.

Bug: webrtc:12707
Change-Id: Id1cd21aaf6137996de2e51cb5e33fc2a4bb07d8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323780
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40952}
2023-10-17 14:04:43 +00:00
Danil Chapovalov
c2994790a1 Throttle 'Very high pacing rate' log message
By producing new message only when new max is 10% larger than the previous max.

Bug: b/305042040
Change-Id: Id85784939f944de8115b881471b02214c34b3043
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323841
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40950}
2023-10-17 13:01:18 +00:00
Per K
7c612c3074 Default dont probe when BWE estimators detects a limit
Cleanup field trials for not probing when BWE limited due to high RTT,
loss.

Bug: webrtc:14754, webrtc:12707
Change-Id: Ib664784e321d9284d842ea42a0dd1d8361000f20
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323640
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40949}
2023-10-17 11:48:32 +00:00
Per Kjellander
89fab060e7 Reland "Remove Probe and Trendline integration from LossbasedBwe"
This reverts commit be511490b7.

Reason for revert: Test reland to investigate if this was actually causing AudioMixer tests to fail

Original change's description:
> Revert "Remove Probe and Trendline integration from LossbasedBwe"
>
> This reverts commit 9b3eea8b7c.
>
> Reason for revert: might cause upstream breakages
>
> Original change's description:
> > Remove Probe and Trendline integration from LossbasedBwe
> >
> > These features are not in use.
> >
> > Bug: webrtc:12707
> > Change-Id: Ibe9fcae5e3fd7cb7ca289af80dad8480288c9ba3
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323601
> > Commit-Queue: Per Kjellander <perkj@webrtc.org>
> > Reviewed-by: Diep Bui <diepbp@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#40938}
>
> Bug: webrtc:12707
> Change-Id: I040b25ea8b4e4bf4cbc7cc91c1cd19d6fcfb5ebb
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323680
> Owners-Override: Jeremy Leconte <jleconte@google.com>
> Commit-Queue: Jeremy Leconte <jleconte@google.com>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#40945}

Bug: webrtc:12707
Change-Id: I4f47c141eafc85a519f12f6504cf5b444f9aa6ac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323760
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40948}
2023-10-17 10:45:35 +00:00
Fredrik Hernqvist
5574afc095 Fix AudioMixer histogram test
If the tests are run in a different order, the test might fail.
We fix this by resetting the histogram data at the start of the test.

Change-Id: I6fb349609842b55f416cf2ec8cd93d0b4328960e
Bug: chromium:1430806
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323801
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Auto-Submit: Fredrik Hernqvist <fhernqvist@google.com>
Cr-Commit-Position: refs/heads/main@{#40946}
2023-10-17 10:13:54 +00:00
Jeremy Leconte
be511490b7 Revert "Remove Probe and Trendline integration from LossbasedBwe"
This reverts commit 9b3eea8b7c.

Reason for revert: might cause upstream breakages

Original change's description:
> Remove Probe and Trendline integration from LossbasedBwe
>
> These features are not in use.
>
> Bug: webrtc:12707
> Change-Id: Ibe9fcae5e3fd7cb7ca289af80dad8480288c9ba3
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323601
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Diep Bui <diepbp@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40938}

Bug: webrtc:12707
Change-Id: I040b25ea8b4e4bf4cbc7cc91c1cd19d6fcfb5ebb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323680
Owners-Override: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#40945}
2023-10-17 07:20:43 +00:00
Per K
9b3eea8b7c Remove Probe and Trendline integration from LossbasedBwe
These features are not in use.

Bug: webrtc:12707
Change-Id: Ibe9fcae5e3fd7cb7ca289af80dad8480288c9ba3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323601
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40938}
2023-10-16 13:11:20 +00:00
Diep Bui
9f9b8e0b88 Default enable NotUseAckedBitrateInAlr in loss basd bwe.
Its finch/chrome experiment got approved in May.

Bug: webrtc:12707
Change-Id: I843dece38f32e844285b71575f6a04b63865f1b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323600
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40937}
2023-10-16 11:25:06 +00:00
Dor Hen
6113e199ff Replace RTC_DCHECK with EXPECT_TRUE in time estimator UT code
Replacing RTC_DCHECK code with EXPECT_TRUE in the remote ntp time estimator unittest code.
This to prevent test failures when building and testing in non-debug mode.

Bug: webrtc:15572
Change-Id: I372fcd6ee29a4ddc07d6b27ddd492dcea13d399f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323181
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40936}
2023-10-16 09:42:19 +00:00
henrika
5f78ed6eaf Minor change in comment for use of an IGraphicsCaptureSession3 API
Makes it more clear that a certain API is only supported in Windows 11.

Bug: webrtc:15451
Change-Id: Ic3abfb2cbf0e30f9cb722ac843876f41279bf200
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323161
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40931}
2023-10-14 15:20:11 +00:00
Per K
0b554e7004 Upper limit pacer send bursts to about 63Kbyte
The purpose is to ensure send socket buffers are not overfilled at high
pacing rates.

Bug: chromium:1354491
Change-Id: Ic6f473080292f84a2a099b85fb5817f7e14e7355
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323000
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40911}
2023-10-11 14:22:44 +00:00
Philipp Hancke
dde1cb6212 Add note about two-byte extension to VLA docs
since the extension can be too large to fit the 16 bytes available
to one-byte extensions
  https://www.rfc-editor.org/rfc/rfc8285#section-4.2
when including the width and height fields.
Also document when those fields are sent.

BUG=webrtc:12000

Change-Id: If17f57d40c0bde9b060f223c548e407d6c124b82
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321200
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40910}
2023-10-11 11:20:19 +00:00
Jeremy Leconte
1a8d5292c2 WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 19/inf
Convert most field trials used in PCLF tests.

Change-Id: I26c0c4b1164bb0870aae1a488942cde888cb459d
Bug: webrtc:10335
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322703
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40909}
2023-10-11 11:09:35 +00: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
Jan Grulich
01932ebaec PipeWire capturer: make restore tokens re-usable more than one time
Do not automatically remove all tokens once we attempt to use them. This
mitigates an issue with Google Meet where an additional instance of a
DesktopCapturer is created and destroyed right away, taking away the
token we would use otherwise. Also save the token under same SourceId
once we get a new (but could be same) token from the restored session.

Bug: webrtc:15544
Change-Id: I565b22f5bf6a4d8a3b7d6d757f9c1046c7a0557d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322621
Commit-Queue: Jan Grulich <grulja@gmail.com>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40892}
2023-10-09 19:08:41 +00:00
Sergey Silkin
a4b2b95f99 Restrict ARM-specific VP8/VP9/AV1 settings to mobile platforms
ARM-specific settings were intended to be used on mobile ARM devices which may not be powerful enough. But the settings were also applied to ARM-based Macs. This changes restricts ARM-specific settings to Android and iOS platforms.

Bug: none
Change-Id: I68764b4c0679db07399bba5923f4a6be89c5ad80
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321861
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Jerome Jiang <jianj@google.com>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40884}
2023-10-06 15:10:04 +00:00
Erik Språng
d7703d9505 Reland "Add mitigation for very long frame drop gaps with vp8"
This is a reland of commit 0d4b350006

Patchset 1 is the original CL. Patchset 2 contains a small tweak of the target bitrate in the unit test, in order to make in less susceptible to flakiness on runtime environments running a slightly different libvpx.

Original change's description:
> Add mitigation for very long frame drop gaps with vp8
>
> Bug: webrtc:15530
> Change-Id: I11f5e3f31f71301700dbff3fc9285236160bee45
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322320
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Auto-Submit: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40866}

Bug: webrtc:15530
Change-Id: I096b7d952286f7f53852d1ca70aea398b2747784
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322540
Auto-Submit: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40874}
2023-10-05 13:29:23 +00:00
Erik Språng
bada9dd30c Revert "Add mitigation for very long frame drop gaps with vp8"
This reverts commit 0d4b350006.

Reason for revert: Temporary revert to adjust thresholds for internal test

Original change's description:
> Add mitigation for very long frame drop gaps with vp8
>
> Bug: webrtc:15530
> Change-Id: I11f5e3f31f71301700dbff3fc9285236160bee45
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322320
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Auto-Submit: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40866}

Bug: webrtc:15530
Change-Id: I920661835f0e59c0543794222e42b5643017db24
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322443
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40871}
2023-10-05 11:00:47 +00:00
Erik Språng
0d4b350006 Add mitigation for very long frame drop gaps with vp8
Bug: webrtc:15530
Change-Id: I11f5e3f31f71301700dbff3fc9285236160bee45
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322320
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40866}
2023-10-04 14:22:31 +00:00
Sergey Sukhanov
4b84f01fe2 Change the type of PacedPacketInfo::send_bitrate_bps from int to strongly-typed DataRate.
Bug: webrtc:15532
Change-Id: I84a6b9860d582d68beccdcfde4a12923b2cdbe8b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322181
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Sergey Sukhanov <sergeysu@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40865}
2023-10-04 14:20:22 +00:00
Danil Chapovalov
34ec5c3f20 Clear PacketBuffer on large negative jumps at the start of the video stream
PacketBuffer is not designed to store wide range of the rtp sequence numbers

Bug: webrtc:15508
Change-Id: I62b19ba2896a667d795a41c38a60f55ee3f60566
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321845
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@google.com>
Cr-Commit-Position: refs/heads/main@{#40839}
2023-09-29 08:56:15 +00:00
Björn Terelius
98e71f57ea Subtract an additional 5kbps of the bitrate when backing off.
Traditionally, we'd back off to 85% of the measured throughput in response to an overuse. However, this backoff doesn't appear to be sufficient to drain the queues in some low-bitrate scenarios, and the problem has gotten a bit worse with the RobustThroughputEstimator. (The new estimate looks more stable. The old estimator had more variation, the lowest points were lower, causing backoffs to lower rates.)

With this change, we back off to 0.85*thoughput-5kbps. The difference is negligible except at low bitrates.

Bug: webrtc:13402,b/298636540
Change-Id: I53328953c056b8ad77f6c7561d6017f171b2dfbc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321701
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40827}
2023-09-28 09:36:36 +00:00
Danil Chapovalov
2d508f10d3 Deprecate old names for EncodedImage::RtpTimestamp accessor and setter
Replace remaining webrtc usage of the deprecated names.

Bug: webrtc:9378
Change-Id: Ie5bd2d3eaf68316e7c827fc35c7c7d8e2eadeb9f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321584
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40824}
2023-09-28 07:29:22 +00:00
Rashad Sookram
6504b2a0f9
Add Rust_setIncomingAudioMuted 2023-09-27 12:16:54 -04:00
Ying Wang
78c119cbb3 Remove check on last_packet_received_time_ as it's no longer used.
Bug: webrtc:15377
Change-Id: Ia8181ae5d546e6d6c0e97ef1daf5ab90d1b6a0aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321440
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40807}
2023-09-26 03:21:34 +00:00
Diep Bui
29d4a013bc Reland: use loss based bwe v2 in the start phase.
Original CL: https://webrtc-review.googlesource.com/c/src/+/320840

Bug: webrtc:12707
Change-Id: Iff3a0c76c26aeb7cb0ac24c1f7aab3529c4a1659
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321420
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40799}
2023-09-25 13:26:34 +00:00
Artem Titov
ba97eec127 Add string_view overload for Wrap method
FileWrapper API is WebRTC private, so exposing absl::string_view overload for thrid-party users.

Bug: b/301228802
Change-Id: Id81775c8078e61eafe9bee53a4cba6ac476b11d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321460
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40798}
2023-09-25 10:55:05 +00:00
Björn Terelius
b4d4bbcebd Revert "Clean up last_packet_received_time_ as it's no longer used."
This reverts commit 2f4bc64166.

Reason for revert: Breaks downstream test

Original change's description:
> Clean up last_packet_received_time_ as it's no longer used.
>
> Bug: webrtc:15377
> Change-Id: I5453b9fd572a04dbea3241a2eb1c8ad8bb8b1186
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320560
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Ying Wang <yinwa@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40792}

Bug: webrtc:15377
Change-Id: Ifa57671cc479cdd86f543c4edc236221beb76f90
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321340
Auto-Submit: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Owners-Override: Björn Terelius <terelius@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40797}
2023-09-25 08:49:53 +00:00
Danil Chapovalov
9c58483b5a Rename EncodedImage property Timetamp to RtpTimestamp
To avoid name collision with Timestamp type,
To avoid confusion with capture time represented as Timestamp

Bug: webrtc:9378
Change-Id: I8438a9cf4316e5f81d98c2af9dc9454c21c78e70
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320601
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40796}
2023-09-24 20:06:48 +00:00
Johannes Kron
bbf27e0081 Remove NSApplicationActivateIgnoringOtherApps
NSApplicationActivateIgnoringOtherApps is about to be deprecated.
The default behavior is good enough.

Tested on Chrome using https://wicg.github.io/conditional-focus/demo/

Bug: webrtc:15511
Change-Id: I1f59aea3d4e7c4942d17ee5c4f1b6c2d398016ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321080
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Auto-Submit: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40795}
2023-09-24 13:55:12 +00:00
Ying Wang
2f4bc64166 Clean up last_packet_received_time_ as it's no longer used.
Bug: webrtc:15377
Change-Id: I5453b9fd572a04dbea3241a2eb1c8ad8bb8b1186
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320560
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40792}
2023-09-23 00:03:11 +00:00
Diep Bui
4aa2b40ffe Revert "Use loss based bwe v2 in the start phase."
This reverts commit b6c7ddd6a1.

Reason for revert: broken unit test

Original change's description:
> Use loss based bwe v2 in the start phase.
>
> TESTED=manual before:screen/ANtkMApoYczA2V5; after:screen/9kBoSvYKzKZR4sK
>
> Bug: webrtc:12707
> Change-Id: Ic156e363625c4b7476011059f3cd95641972091c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320840
> Commit-Queue: Diep Bui <diepbp@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40789}

Bug: webrtc:12707
Change-Id: Ibde45436934707b8e0084aa496dc249bc1c78ab2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321180
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#40790}
2023-09-22 22:51:53 +00:00
Diep Bui
b6c7ddd6a1 Use loss based bwe v2 in the start phase.
TESTED=manual before:screen/ANtkMApoYczA2V5; after:screen/9kBoSvYKzKZR4sK

Bug: webrtc:12707
Change-Id: Ic156e363625c4b7476011059f3cd95641972091c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320840
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40789}
2023-09-22 10:53:34 +00:00
Diep Bui
1db39801d3 Remove upper_link_capacity from loss_based_bwe_v2.
Bug: webrtc:12707
Change-Id: I7909c4ef47239978eb26ad5b9644595e4a415a81
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321121
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40787}
2023-09-22 10:33:14 +00:00
Harald Alvestrand
863427e2c3 [Merge to 116] CHECK against overwrites in send_modules_map_
(cherry picked from commit 9d8fb97b3c)

No-try: true
Bug: chromium:1477075
Change-Id: Ia05a868bfab9e99ef66704e8d6bce516a7a43b0a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318440
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Original-Commit-Position: refs/heads/main@{#40673}
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319320
Reviewed-by: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/branch-heads/5845@{#7}
Cr-Branched-From: f80cf814353d11a9f22bef5ce5e8868f2c72f0d0-refs/heads/main@{#40319}
2023-09-21 10:48:34 -04:00
Diep Bui
7ee64bd9dc Remove the upper link capacity usage in the loss based bwe.
A follow up cl/ is to remove passing upper link capacity from goog_cc to loss_based_bwe_v2.

Bug: webrtc:12707
Change-Id: I45af8ca6e8ba185700d0b7eb57004d2b61edeb9e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320780
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40780}
2023-09-21 07:43:49 +00:00
Avi Drissman
46da472f82 Revert "mac: Work around an inccorect availability annotation in the 13.3 SDK"
This reverts commit 0f87b38535.

This is not needed with the macOS 14 SDK, which has the fix, and which
was landed in https://crrev.com/c/4875713.

Bug: chromium:1484363, chromium:1431897
Change-Id: I1e019ce71b90333d5d1333a3cf8bb510a3dbd212
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320820
Reviewed-by: Tomas Gunnarsson <tommi@google.com>
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40777}
2023-09-20 12:50:43 +00:00
qwu16
ae82df718c Add codec name H265 to support H265 in WebRTC
Bug: webrtc:13485
Change-Id: I352b15a65867f0d56fc8e9a9e03081bd3258108e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316283
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40773}
2023-09-20 09:25:32 +00:00
Youfa
f8c70c9c34 fix: Handle out-of-range device index after GetDevicesInfo
When the specified device was not found in GetDevicesInfo,
SetPlayoutDevice/SetRecordingDevice will never return a (-1) error.

Bug: None
Change-Id: I9ac71cf72f7876c1c54ee593f184aa4007dba22f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320500
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40768}
2023-09-19 12:13:39 +00:00
Michael Froman
3e1484e280 Check ConvertToI420 result for all errors in VideoCaptureImpl::IncomingFrame
Bug: webrtc:15415
Change-Id: Ia303e1803d8238c4db68c7dc8d207b0ccfccadba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316343
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40762}
2023-09-18 15:15:34 +00:00
Danil Chapovalov
3aa951a7c6 Delete SendDelayObserver interface
send delay is now measured through  SendPacketObserver interface

Bug: None
Change-Id: I0dc3de1522e2824d9431d7e3a3dc524588687dda
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319500
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40755}
2023-09-15 14:59:23 +00:00
Per K
e0083d4804 lower limit cap of probe to max of current estimate and link capacity
The purpose is to not allow an initial low link capacity estimate to reduce the current estimate.
Only delay overuse detection , low probe results or  a loss event can
reduce the estimate.

Bug: webrtc:14392
Change-Id: Ib1618347f2c7681e3bd65d85ee687dec3cd67c97
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320380
Reviewed-by: Diep Bui <diepbp@google.com>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40751}
2023-09-15 08:20:12 +00:00
Björn Terelius
4f8ccc3c60 Ensure the sequence number is initialized in DelayBasedBweTest
The sequence number is generally not used for the estimation,
but may be used as a tie-breaker when ordering packet feedbacks.

Bug: b/299667054
Change-Id: I52a5145c889c8f6924838667cc267b1cd9565f7b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320240
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40749}
2023-09-14 12:58:58 +00:00
Olov Brändström
0efb8323d5 Method for converting q32 to TimeDelta in capture clock offset updater
In change https://webrtc-review.googlesource.com/c/src/+/319961, I changed a error. Also the same code will be added for video to enable Glass 2 Glass metric for Android. To me it make sense to add this method, and then change the audio code and video code to use it.

Bug: None
Change-Id: Id5d38c3bb8266213a93e67ceb82e88d65f29de53
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320080
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Cr-Commit-Position: refs/heads/main@{#40745}
2023-09-13 18:37:22 +00:00
philipel
31718d7ce2 Reland "Add option to disable quality scaling for AV1."
This reverts commit 83102d3907.

Reason for revert: reland with fix

Original change's description:
> Revert "Add option to disable quality scaling for AV1."
>
> This reverts commit 446dbc66fd.
>
> Reason for revert: downstream break
>
> Original change's description:
> > Add option to disable quality scaling for AV1.
> >
> > The main goal of this change is to disable the quality scaler when multiple spatial layers are used.
> >
> > Bug: b/295129711
> > Change-Id: I25e0b7440a8c2adee3e97720a1e0ee5e0a914334
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319181
> > Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#40709}
>
> Bug: b/295129711
> Change-Id: Iaeb13951d1b839bc0426120436035843bb3ee98f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320081
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Owners-Override: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40742}

Bug: b/295129711
Change-Id: Iab4846c2cd6074f50a3ebe9551432d449243b5d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320120
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40743}
2023-09-13 15:19:36 +00:00
Philip Eliasson
83102d3907 Revert "Add option to disable quality scaling for AV1."
This reverts commit 446dbc66fd.

Reason for revert: downstream break

Original change's description:
> Add option to disable quality scaling for AV1.
>
> The main goal of this change is to disable the quality scaler when multiple spatial layers are used.
>
> Bug: b/295129711
> Change-Id: I25e0b7440a8c2adee3e97720a1e0ee5e0a914334
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319181
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40709}

Bug: b/295129711
Change-Id: Iaeb13951d1b839bc0426120436035843bb3ee98f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320081
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Owners-Override: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40742}
2023-09-13 12:21:31 +00:00
Danil Chapovalov
10e5724fe9 Delete deprecated variants of RTPSenderAudio::SendAudio
Bug: webrtc:13757
Change-Id: I402a31c847ca7ffe0ef20a0046959ec50c60e3ac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319582
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40740}
2023-09-12 15:30:36 +00:00
philipel
19ff1ad237 Reland "Always use AV1 specific bitrate limits when spatial layers are used."
This reverts commit 030c6ff43f.

Reason for revert: reland with fix

Original change's description:
> Revert "Always use AV1 specific bitrate limits when spatial layers are used."
>
> This reverts commit d2d165d47c.
>
> Reason for revert: All the regressions!
>
> Original change's description:
> > Always use AV1 specific bitrate limits when spatial layers are used.
> >
> > Bug: b/295129711
> > Change-Id: I93569027bea34c43e2a3c4de0875e8bbddd5b64e
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319283
> > Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
> > Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> > Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#40719}
>
> Bug: b/295129711
> Change-Id: I5776edbaba33e86eb10414062ef2b29510f40b8d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319880
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#40730}

Bug: b/295129711
Change-Id: I5fe84184d3f3780fdc4e9c1d43c4989d333d44a7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319881
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40739}
2023-09-12 13:00:19 +00:00
Joachim Reiersen
ab9535c098 Use single packet limit when all fragments end up in one H.264 packet
Update RtpPacketizerH264::PacketizeStapA to use
single_packet_reduction_len when all fragments end up in one H.264
packet.

Previous code was using first_packet_reduction_len +
last_packet_reduction_len for this case, which can cause an occasional
RTC_CHECK crash in RtpPacketizerH264::NextAggregatePacket due to
exceeding the available payload capacity of an RTP packet.

Bug: webrtc:15477
Change-Id: Iba1564a6a29618bef22f19d82aba938420994b23
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319645
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40737}
2023-09-12 11:53:34 +00:00
Michael Froman
90fb11e806 Fix improper buffer size in call to rtc::strcpyn
rtc::strcpyn second param should be the size of the destination buffer,
not the size of the source string.  The result is that the final character
(usually a trailing directory path separator) is lost during the copy.
This has been masked because FormFileName helpfully adds a trailing path
separator if one is missing.

BUG=webrtc:15441

Change-Id: I992e69cad86a7e8bc2057ec629063f34c75fe75f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317502
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40736}
2023-09-12 11:40:07 +00:00
Danil Chapovalov
378fb28621 Propagate OnSendPacket even if transport sequence number is not registered
To allow to calculate send delay with that callback

Bug: None
Change-Id: I0fe1ffd42b62c99bd01670e583584511c34277db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319563
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40731}
2023-09-11 13:16:30 +00:00
Philip Eliasson
030c6ff43f Revert "Always use AV1 specific bitrate limits when spatial layers are used."
This reverts commit d2d165d47c.

Reason for revert: All the regressions!

Original change's description:
> Always use AV1 specific bitrate limits when spatial layers are used.
>
> Bug: b/295129711
> Change-Id: I93569027bea34c43e2a3c4de0875e8bbddd5b64e
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319283
> Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40719}

Bug: b/295129711
Change-Id: I5776edbaba33e86eb10414062ef2b29510f40b8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319880
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#40730}
2023-09-11 11:57:39 +00:00
henrika
66b7275561 Disables yellow frame of captured object for WGC.
Only has an effect on Windows versions higher than 2104 (10.0.20348.0).

Bug: webrtc:15451
Change-Id: I3ca48c88a6c2b9b87d43805fcb2ade444cd90480
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318060
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40721}
2023-09-08 10:07:18 +00:00
philipel
d2d165d47c Always use AV1 specific bitrate limits when spatial layers are used.
Bug: b/295129711
Change-Id: I93569027bea34c43e2a3c4de0875e8bbddd5b64e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319283
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40719}
2023-09-08 09:02:11 +00:00
Philipp Hancke
8602f604e0 Reland "rtp sender: don't send BYE on deactivating streams"
This is a reland of commit a22c2a0c58
after systems depending on this have been fixed.

Original change's description:
> rtp sender: don't send BYE on deactivating streams
>
> as this breaks RTCP assumptions about SSRCs being no longer
> active as defined in
>   https://www.rfc-editor.org/rfc/rfc3550#section-6.6
>
> This should not be sent in reaction to temporarily disabling
> a stream via RTCRtpParameters.active as this does not mean that
> the participant is leaving the session as defined in
>   https://www.rfc-editor.org/rfc/rfc3550#section-6.3.7
> and does not indicate end of participation as defined in
>   https://www.rfc-editor.org/rfc/rfc3550#section-6.1
> which stipulates BYE should be the last packet sent from this SSRC.
>
> BUG=webrtc:11082
>
> Change-Id: Ia5144857f85303643146b0759184f0f3f50b66e4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273348
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#38059}

Bug: webrtc:11082
Change-Id: Iad8b503b3101d1e684a4da2d1547b879e77b85dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293861
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@{#40716}
2023-09-07 13:25:25 +00:00
philipel
8fd09016e6 Reduce number of spatial layers depending on input resolution for AV1
Bug: b/295129711
Change-Id: If54562d6e453209da9f358bbdb2909662e4ab873
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319380
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40713}
2023-09-07 10:29:47 +00:00
Johannes Kron
0e4a9bcd6d Export GetWindowList(...)
These two functions contain complicated logic that will be used as
a fallback in Chromium if the new macOS picker code does not work
as intended.

Bug: chromium:1478172
Change-Id: I5f2878c5a8da38d59aa42ec1358398e3c921b65c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319260
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40711}
2023-09-06 21:31:45 +00:00
Björn Terelius
c4a205c7fa Clean up includes in goog_cc/
Bug: None
Change-Id: I5388bc018d7ddd285d154436b5fc52a15469a97d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319220
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40710}
2023-09-06 12:40:36 +00:00
philipel
446dbc66fd Add option to disable quality scaling for AV1.
The main goal of this change is to disable the quality scaler when multiple spatial layers are used.

Bug: b/295129711
Change-Id: I25e0b7440a8c2adee3e97720a1e0ee5e0a914334
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319181
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40709}
2023-09-06 12:37:22 +00:00
Robert Mader
dc4c019c62 Video Capture PipeWire: Implement camera rotation support
Support the Pipewire videotransform meta via the already existing shared
infrastructure. This is needed for mobile devices which often have a 90
degree rotated camera - which is likely the reason there is already
support in the shared code paths.

Bug: webrtc:15464
Change-Id: I15223055d8675502ae326d270ebd2debbcfbfa50
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318641
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40708}
2023-09-06 11:55:58 +00:00
Robert Mader
a717c7ada8 Video Capture PipeWire: Filter out non-camera nodes
This can be helpful in various situations, such as debugging with an
unrestricted Pipewire socket or for downstream projects like
B2G/Capyloon. Additionally it will help once we move from the camera
portal to the more generic device portal.

Original patch by Fabrice Desré <fabrice@desre.org>

Bug: webrtc:15464
Change-Id: Iae6802f242d68244bca85947cb15ef3eee923ab0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318642
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40706}
2023-09-06 10:55:36 +00:00
Danil Chapovalov
85c05a8a17 Update RemoteBitreateEstimatorAbsSendTime to use BitrateTracker
BitrateTracker uses same implementation as RateStatistics, but provides api using Timestamp and DataRate types instead of plain numbers

Bug: webrtc:13756
Change-Id: Ie37fa58ede7590f870ec4376a64e7cf2c94431d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318841
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40697}
2023-09-05 09:50:38 +00:00
Danil Chapovalov
4c556219e5 Cleanup RTPSenderAudio::SendAudio
Combine all parameters into single struct so that it is easier to add and remove optional parameters
Use Timestamp type instad of plain int to represent capture time
Use rtc::ArrayView instead of pointer+size to represent payload
Merge passing audio level into send function.

Bug: webrtc:13757, webrtc:14870
Change-Id: I0386b710eb99b864334d61235add9abcde9bc69d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317442
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40688}
2023-09-04 11:27:42 +00:00
Danil Chapovalov
4c420f96dd Cleanup RemoteBitreateEstimatorSingleStream to use unit types
Use Timestamp,TimeDelta, and DataRate types instead of plain integer types.

Bug: webrtc:13756
Change-Id: I2a12f4abeeaa653dbd9534c297dbb72db63b012b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314502
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40684}
2023-09-04 00:40:20 +00:00
Mirko Bonadei
aa48369679 Remove excessive logs from ADM's GetPlayoutUnderrunCount.
Bug: b/298579155
Change-Id: If98a27934feba58c32dfa9a965f99fe27a11361e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318621
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40680}
2023-09-01 14:34:05 +00:00
Harald Alvestrand
9d8fb97b3c CHECK against overwrites in send_modules_map_
No-try: true
Bug: chromium:1477075
Change-Id: Ia05a868bfab9e99ef66704e8d6bce516a7a43b0a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318440
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40673}
2023-08-31 14:00:04 +00: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