42898 Commits

Author SHA1 Message Date
Philipp Hancke
518de1673e Reland "Disable TLS session ticket for DTLS"
This is a reland of commit e77d75193f4f61cf90991569c5470ba5d1b78f2b.

No changes were required to the CL, downstream tests have been fixed.

Original change's description:
> Disable TLS session ticket for DTLS
>
> since it makes no sense for the WebRTC usage of DTLS and increases
> the size of the last handshake flight considerably
> Guarded by killswitch
>   WebRTC-DisableTlsSessionTicketKillswitch
>
> BUG=webrtc:367181089
>
> Co-authored-by: Jody Ho <jodyho@meta.com>
> Change-Id: I4bb17bba8a17c65c8e0fefe2d8962974703feee7
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362526
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: David Benjamin <davidben@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@meta.com>
> Cr-Commit-Position: refs/heads/main@{#43046}

Bug: webrtc:367181089
Change-Id: I4b3f813e4a0dd4d0458ee14c15c51ee6f9b84461
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363220
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43066}
2024-09-23 11:35:24 +00:00
Mirko Bonadei
a8829eb5f3 macro cleanup: "(const override)" -> "(const, override)"
Bug: None
Change-Id: Iffd5db39b1a5ae70b403193b40054df04cf5600b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362800
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43065}
2024-09-22 18:30:29 +00:00
webrtc-version-updater
d44ecfe7b4 Update WebRTC code version (2024-09-22T04:04:45).
Bug: None
Change-Id: If41fb62f49f6f5822b0af7546c9f1af0220e010e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363156
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Bot-Commit: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43064}
2024-09-22 05:39:17 +00:00
webrtc-version-updater
76821c85eb Update WebRTC code version (2024-09-21T04:04:38).
Bug: None
Change-Id: I1e95097573d6cafbcebd099b56b8be3403344075
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363145
Bot-Commit: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43063}
2024-09-21 06:05:48 +00:00
Gao Chun
bdc669347c Revert "h264: fix first_packet_in_frame logic for multislice in a single rtp packet"
This reverts commit 3753c8190e3f0aca6758a5521e33f8b5d4f09ab4.

Reason for revert: Break assembling of hardware encoded h264 P frame on
weak network condition.

Original change's description:
> h264: fix first_packet_in_frame logic for multislice in a single rtp packet
>
> a frame must be (or should be) first when it contains either SPS (but not just PPS),
> is an IDR or is a slice with first_mb_in_slice == 0.
>
> Fixes an edge case where a STAP-A with SPS, PPS and multiple slices of an IDR fit
> into a single RTP packet which can happen with small 320x196 frames
>
> BUG=webrtc:352379280,webrtc:346608838
>
> Change-Id: Ic6dea6c81db759d0d7ddd4054407103fd791f6c5
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357121
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42652}

Bug: webrtc:368335257
Change-Id: I07725c78be628bff71b79b8b9369677e39f5f5ac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363080
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43062}
2024-09-20 14:32:01 +00:00
Henrik Boström
b6ee51b7a5 Don't restrict max simulcast layers when requested_resolution is used.
The code that restricts the maximum number of simulcast layers based on
resolution is a spec-compliance bug and doesn't make much sense: if the
app asks for 3 layers it should get 3 layers. Since the app knows the
size of the track, it could very easily ask for 1 layer when resolution
is small if that is the behavior it wanted. If the app doesn't ask to
disable layers, WebRTC shouldn't disable layers on its behalf.

This behavior makes even less sense with this "new" API since the app
is explicitly controlling the send resolution in absolute terms.

Removing this behavior in the general case is out of scope since it
would break backwards compatibility, but since `requested_resolution`
has not been exposed to the web yet and existing usage is small, this
is an opportunity to fix the compliance bug for this API.

This CL makes the last web platform test for "scaleResolutionDownTo"
pass.

Bug: chromium:363544347
Change-Id: Ic6fadf3cad69d3beec4ae03d3d031e8062382ad9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363100
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43061}
2024-09-20 11:22:18 +00:00
Fanny Linderborg
2f106d683a Add FrameInstrumentationGenerator to VideoStreamEncoder
The FrameInstrumentationGenerator is responsible for generating the
instrumentation data that will be used to detect corruption. The data is
then passed to the encoder in the CodecSpecificInfo.

Bug: webrtc:358039777
Change-Id: I79d0534920b4c7fa001e1138371dfd36c13424fb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362584
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Fanny Linderborg <linderborg@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43060}
2024-09-20 11:12:21 +00:00
Tomas Lundqvist
64e8e64e80 Revert "Reland "Return audio stats regarless if we have a codec.""
This reverts commit 4334cdfc5c0619a5f06125ea1f039cb123ccf21e.

Reason for revert: Breaks downstream project.

Original change's description:
> Reland "Return audio stats regarless if we have a codec."
>
> This is a reland of commit 7fff587a096c6ef40f5601f47ef50b221b3a4abf
>
> Original change's description:
> > Return audio stats regarless if we have a codec.
> >
> > Bug: b/331602608
> > Change-Id: I2d12a3ed83645fe1e7cbd8950fd86d5ba2d7c94d
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361743
> > Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> > Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#42964}
>
> Bug: b/331602608
> Change-Id: I95c89e7059005bc8dd8569ef41bfe9e863b4082f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361762
> Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42969}

Bug: b/331602608
Change-Id: Ifbe332a8749d024f603b75b6e787551dd6762dd6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363001
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43059}
2024-09-20 10:38:19 +00:00
Henrik Boström
f566dee902 Make requested_resolution throw on invalid dimensions.
As mandated by the scaleResolutionDownTo spec.

Bug: chromium:363544347
Change-Id: Ic78cad708a271bbd6a1980c08430dbb8ae07663a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362980
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43058}
2024-09-20 08:03:33 +00:00
Jan Grulich
3aa47cfd30 PipeWire camera: get max FPS for each format when specified as list
In many cases, the framerate can be specified as list of possible values
and in that case, we would end up with max FPS to be set to 0 as this
case was not handled.

Bug: webrtc:42225999
Change-Id: I036af6db1da3309b1310b754504369e8fe392d09
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362961
Commit-Queue: Jan Grulich <grulja@gmail.com>
Reviewed-by: Andreas Pehrson <apehrson@mozilla.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43057}
2024-09-20 06:35:22 +00:00
webrtc-version-updater
1b8a7b2b7f Update WebRTC code version (2024-09-20T04:04:47).
Bug: None
Change-Id: I8b3536cd00a19d5381505b9835a2e9e04b2055c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362929
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Bot-Commit: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43056}
2024-09-20 05:39:44 +00:00
Philipp Hancke
9a6533932f srtp: spanify key setters
BUG=webrtc:357776213

Change-Id: I307085690588e324409bb32a3db5ec9cfa99df52
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362126
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43055}
2024-09-19 21:41:02 +00:00
Jeremy Leconte
36f153e6d1 Apply include-cleaner to api direct files (2/2).
This is a follow up for https://webrtc-review.googlesource.com/c/src/+/360680.

* Adding some missing <optional> include.
* Adding a IWYU pragma to force keeping an include.

Note that I've added the CQ bot 'iwyu_verifier' to ensure the repo stays clean. It is still work in progress and it currently needs to be triggered manually.
FYI I used these command line to run iwyu:
> for i in api/*.cc; do ./tools_webrtc/iwyu/apply-include-cleaner $i; done
> for i in api/*.h; do ./tools_webrtc/iwyu/apply-include-cleaner $i; done

Change-Id: Ie7036d08edbb6884f2b35eb9d69646757d662390
Bug: webrtc:42226242
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362440
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#43054}
2024-09-19 19:28:49 +00:00
Philipp Hancke
c1dc8abeeb Remove non-span NAL unit splitter and SPS parser
after cleaning up the Chromium dependency

BUG=webrtc:42225170

Change-Id: Icd3934ca51f829c55e061fc1943500435c845a8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362569
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43053}
2024-09-19 17:49:37 +00:00
Mirko Bonadei
4595711bf5 Revert "Disable TLS session ticket for DTLS"
This reverts commit e77d75193f4f61cf90991569c5470ba5d1b78f2b.

Reason for revert: Speculative rollback (breaks downstream test).

Original change's description:
> Disable TLS session ticket for DTLS
>
> since it makes no sense for the WebRTC usage of DTLS and increases
> the size of the last handshake flight considerably
> Guarded by killswitch
>   WebRTC-DisableTlsSessionTicketKillswitch
>
> BUG=webrtc:367181089
>
> Co-authored-by: Jody Ho <jodyho@meta.com>
> Change-Id: I4bb17bba8a17c65c8e0fefe2d8962974703feee7
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362526
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: David Benjamin <davidben@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@meta.com>
> Cr-Commit-Position: refs/heads/main@{#43046}

Bug: webrtc:367181089
Change-Id: I02b59232fae9f729341811042a02f7cf346d4bbe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362982
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43052}
2024-09-19 14:40:50 +00:00
Harald Alvestrand
e2952a058e Eliminate a pointless IsEnabled helper
Makes code easier to read.

Bug: None
Change-Id: I736f1a152101264184c3d7b1c7a72d1a3b022147
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362962
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43051}
2024-09-19 13:38:35 +00:00
Markus Handell
2548d224dc WebRTC-TaskQueue-ReplaceLibeventWithStdlib: Launch stdlib task queue.
Bug: b/42224654
Change-Id: Ib55420fca40a993790eff3e554ed02d6b3731a6b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362780
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43050}
2024-09-19 10:33:24 +00:00
Shigemasa Watanabe
d2123d9a38 Associate payload_type with rid
When a value is set in RtpEncodingParameters::codec, the corresponding
payload_type will be set in the SDP a=rid: line.

a=rtpmap:96 VP8/90000
...
a=rtpmap:97 VP9/90000
...
a=rid:r0 send pt=96
a=rid:r1 send pt=97

Bug: webrtc:362277533
Change-Id: Ia9688a5fc83c53cf46621d97e87f8dd363a4d7f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361240
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43049}
2024-09-19 10:18:13 +00:00
Joachim Reiersen
bba1a2e476 Propagate Environment to RtpPacketHistory
Passing Environment instead of Clock into this class simplifies some plumbing for downstream consumers that need to read field trials within this class.

Bug: webrtc:362762208
Change-Id: Ia501e9f7f1d91a8115a2f71fb005dd35146db172
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362535
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43048}
2024-09-19 09:39:07 +00:00
webrtc-version-updater
5cf1285330 Update WebRTC code version (2024-09-19T04:07:15).
Bug: None
Change-Id: I8eb657edf5c74ceffd527d5f7085d15eba5bd224
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362922
Bot-Commit: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43047}
2024-09-19 05:42:18 +00:00
Philipp Hancke
e77d75193f Disable TLS session ticket for DTLS
since it makes no sense for the WebRTC usage of DTLS and increases
the size of the last handshake flight considerably
Guarded by killswitch
  WebRTC-DisableTlsSessionTicketKillswitch

BUG=webrtc:367181089

Co-authored-by: Jody Ho <jodyho@meta.com>
Change-Id: I4bb17bba8a17c65c8e0fefe2d8962974703feee7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362526
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: David Benjamin <davidben@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43046}
2024-09-18 18:59:56 +00:00
Hanna Silen
54903b407f Delete transient suppression code
Transient suppression is no longer used in audio processing after
https://webrtc-review.googlesource.com/c/src/+/355880.

Bug: webrtc:357281131
Change-Id: Iec5e9ddc300dfdda2dbb82066d12e1129e3cb1df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362840
Commit-Queue: Hanna Silen <silen@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43045}
2024-09-18 16:52:10 +00:00
Philipp Hancke
0fe3a61e5d Remove clang 3.7 and fuchsia specific flags
since clang 3.7 dates to 2015 and is obsolete.
Fuchsia has been fixed: https://issues.fuchsia.dev/issues/42051468

BUG=None

Change-Id: Id0966c3f4acfb1756eab4e2e6f0dbe52d70ecd76
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362571
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43044}
2024-09-18 15:58:32 +00:00
Emil Vardar
4a201de10d Add support for corruption classification.
This class calculates the corruption score based on the given samples from two frames.

Bug: webrtc:358039777
Change-Id: Ib036f91ec16609e827137cc35d342a2c49764737
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362801
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Fanny Linderborg <linderborg@webrtc.org>
Commit-Queue: Emil Vardar (xWF) <vardar@google.com>
Cr-Commit-Position: refs/heads/main@{#43043}
2024-09-18 13:38:41 +00:00
Fanny Linderborg
f045dbd67c Modify sequence index on key frames
For key frames: increase the sequence index until the last 7 bits are
all zeroes. If this results in an overflow, wraparound to 0.

Also:
* Allow setting and getting the sequence index
* Allow getting LayerId

Bug: webrtc:358039777
Change-Id: Ibe16689a3d1eb5706d4fce5c9220770046f26896
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362540
Reviewed-by: Erik Språng <sprang@webrtc.org>
Auto-Submit: Fanny Linderborg <linderborg@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43042}
2024-09-18 09:29:47 +00:00
webrtc-version-updater
1c4c165aae Update WebRTC code version (2024-09-18T04:05:33).
Bug: None
Change-Id: Ia87f6ae37b8ed4ab2bf7fcf3b9d2209256b0874a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362537
Bot-Commit: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43041}
2024-09-18 05:46:01 +00:00
Takuto Ikuta
b08a045e92 fix missing deps for proto compile actions
We need to have imported proto as proto_data_sources in BUILD.gn to
run the action remotely without workaround config in siso.

Bug: b/366137880
Change-Id: I053774f00b761520a8a85154e386da3edb8f39b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362680
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Auto-Submit: Takuto Ikuta <tikuta@google.com>
Commit-Queue: Takuto Ikuta <tikuta@google.com>
Cr-Commit-Position: refs/heads/main@{#43040}
2024-09-18 05:38:30 +00:00
Taylor Brandstetter
bbea923c9f Removed unused absl::InlinedVector.
Bug: None
Change-Id: I4db7391b70297272cd107a1090e87d5328bced4d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362528
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43039}
2024-09-17 17:49:50 +00:00
Philipp Hancke
17ffd365a2 Remove IntKeyTypeFamilyToKeyType
which is no longer used. Also the blink::WebRTCKeyType it refers
to no longer exists either

BUG=None

Change-Id: I8236ed906b5712d11173dfcf181f556b1ff597f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362387
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43038}
2024-09-17 15:14:56 +00:00
Henrik Boström
825e4f19ce VideoAdapter: Interpret requested resolution as max restriction.
The `requested_resolution` API must not change aspect ratio, example:
- Frame is 60x30
- Requested is 30x30
- We expect 30x15 (not 30x30!) as to maintain aspect ratio.

This bug was previously fixed by making VideoAdapter unaware of the
requested resolution behind a flag: this seemed OK since the
VideoStreamEncoder ultimately decides the resolution, whether or not
the incoming frame is adapted.

But this is not desired for some non-Chrome use cases. This CL attempts
to make both Chrome and non-Chrome use cases happy by implementing the
aspect ratio preserving restriction inside VideoAdapter too.

This allows us to get rid of the "use_standard_requested_resolution"
flag and change the "VideoStreamEncoderResolutionTest" TEST_P to
TEST_F.

Bug: webrtc:366067962, webrtc:366284861
Change-Id: I1dfd10963274c5fdfd18d0f4443b2f209d2e9a4b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362720
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43037}
2024-09-17 14:33:26 +00:00
Danil Chapovalov
52ea2c3d2a Propagate FieldTrialsView to query WebRTC-StableTargetRate field trial
Bug: webrtc:42220378
Change-Id: Ie2a2c3eccc36c98f09176eb6f4c5f06ded9f516f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362701
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43036}
2024-09-17 14:24:41 +00:00
Sergey Silkin
e81ba30897 Increase AV1 QP threshold for quality convergence from 40 to 60.
Bug: chromium:328598314
Change-Id: I132b4c30f132ace2bbef6359edd994c1ad75c9ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362620
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43035}
2024-09-17 14:12:44 +00:00
Lionel Koenig
098c128a15 Explicitly use the Opus DTX encoder state.
Use the DTX state from inside the Opus encoder instead of trying to
mimic the logic outside.

Bug: None
Change-Id: I852044fee261a5b7f9255c557a27adfd0b1701bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362640
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43034}
2024-09-17 13:28:45 +00:00
Harald Alvestrand
d153de6d33 Add payload type assignment to offer/answer generation.
This adds payload types to the codecs at the time when offer
is being generated, if they are unassigned at that point.

Bug: webrtc:360058654
Change-Id: I231ed057ebaf7fb0fffaf6ff5d600b064ba21f5b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362282
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43033}
2024-09-17 12:31:25 +00:00
Danil Chapovalov
a1ed306293 Cleanup unused members in RtpRtcp::Configuration
They are now passed as part of the Environment

Bug: webrtc:362762208
Change-Id: I02868e9f41533a546f62fe30fdc6f3a7708eb346
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362084
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43032}
2024-09-17 12:02:19 +00:00
Qiu Jianlin
295758848c Export scalability mode helper APIs.
This will help to reduce redundant ScalabilityMode to temporal layer
count mapping in blink.

Bug: chromium:40763991
Change-Id: Ida3e6abb91383e27465eb1b697ad9431935cf9ff
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362486
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Jianlin Qiu <jianlin.qiu@intel.com>
Cr-Commit-Position: refs/heads/main@{#43031}
2024-09-17 11:58:08 +00:00
Henrik Boström
4b51217ef6 Make purple bots happy: Shorten TEST_P names.
The recently added tests resulted in some .log file on some bots being
too long:

video_engine_tests_exe-VideoStreamEncoderStandardOrLegacyRequestedResolutionTest_VideoStreamEncoderStandardOrLegacyRequestedResolutionTest_RequestedResolutionInWrongAspectRatioAndSourceIsAdapting_0-1.log

This CL makes the test names significantly shorter.

# Trivial and believed to fix purple bots, let's land ASAP
NOTRY=True

Bug: webrtc:367066321
Change-Id: I831911947af9d5639d1edb559470f1c9ae702d6e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362721
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43030}
2024-09-17 11:15:18 +00:00
Dor Hen
59d592ebac Replace list usage with set for files accumulation in PRESUBMIT to
prevent duplication

Wherever we don't include any extra information about the issue (e.g
file *and line number*), there's no need to return a presubmit result
with the file duplicated (it spams the console for no reason...)

bug: none
Change-Id: I11968f97f7c927b01f5cda6e56ea03e3ff47dfca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362621
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Cr-Commit-Position: refs/heads/main@{#43029}
2024-09-17 08:46:56 +00:00
Dor Hen
f3a33c0162 Prepend all RTCMacros.h includes/imports with the relative path from repo
root

Bug: webrtc:365299881
Change-Id: Id3adf3b4913da1e04534da232d03455a46c30e4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362582
Commit-Queue: Dor Hen <dorhen@meta.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43028}
2024-09-17 08:45:53 +00:00
Raman Budny
de6225b2e2 Don't crash on failed EGL makeCurrent attempts
EglRenderer.renderFrameOnRenderThread:
suppress GLException thrown by failed EglBase14Impl::makeCurrent invocation.

Bug: webrtc:365957543
Change-Id: I947ad7d39ce01e3bbe9bc767d6427e4271f0c0cd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361020
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43027}
2024-09-17 08:21:38 +00:00
Mirko Bonadei
ce69c73ef4 Clobber caches on Windows
Bug: webrtc:367066321
Change-Id: Ied4f004255b46921d6c62a73930edb28fd5a5ced
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362700
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43026}
2024-09-17 08:19:07 +00:00
Harald Alvestrand
18486c5574 Make GetSourcesVideo test wait for two frames
When it waits for only one frame, the test is flaky.
When it waits for two frames, it is not.

# Relying on triviality for confidence due to purple bots atm,
# see b/367211396
NOTRY=True
NOPRESUBMIT=True

Bug: webrtc:367205682, webrtc:42220900
Change-Id: I14963b7a86961f438fd511aba8f29525e1f19750
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362583
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43025}
2024-09-16 13:22:38 +00:00
Henrik Boström
cbf5122333 Avoid signaling requested_resolution back to the adapting source.
When requested_resolution uses a different aspect ratio than the source
the encoder will restrict the frame without changing its aspect ratio,
e.g. a 60x30 input frame that is restricted to 30x30 results in 30x15,
not 30x30.

While this logic works correctly in isolation, if the source also adapts
the frame size based on the sink_wants.requested_resolution that is
signaled back to the source, then the source will produce stretched
30x30 prior to the encoder which happily sends 30x30 not knowing any
wiser.

This is incompatible with the spec[1] and makes this WPT[2] fail. The
correct behavior is to NOT signal the requested_resolution back to the
source, the encoder already configures the correct resolution so this
isn't actually needed and the source shouldn't need to know this API.

In order not to break downstream projects, the new behavior is landed
behind a flag and both behaviors are tested with TEST_P.

This unblocks launching scaleResolutionDownTo API on Web. Migrating
from old to new code path and deleting the flag is a follow-up AI:
webrtc:366284861.

[1] https://w3c.github.io/webrtc-extensions/#dom-rtcrtpencodingparameters-scaleresolutiondownto
[2] https://chromium-review.googlesource.com/c/chromium/src/+/5853944

# Relying on previous green runs for confidence due to purple bots atm,
# see b/367211396
NOTRY=True
NOPRESUBMIT=True

Bug: webrtc:366067962, webrtc:366284861
Change-Id: I7fd1016e9cc6f0b0b9b8c23b0708e521f8e12642
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362541
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43024}
2024-09-16 11:00:13 +00:00
Henrik Lundin
8487d3248b Remove all use of AcmReceiver from WebRTC
The class itself and its unit test remains, for now, but will be removed
later.

Bug: webrtc:14867
Change-Id: I36cec8fca7913663f63c53622ed2760e5e048c2f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362580
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43023}
2024-09-16 08:49:25 +00:00
Philipp Hancke
6e312e51d7 install libsrtp log handler
which may show useful debug logging.

Also document that we need to forward-declare the internal srtp_ctx_
struct instead of srtp_t.

BUG=webrtc:361372443

Change-Id: I76b1a4fb385af0fc1532f0ce6d0692b804f003dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360182
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#43022}
2024-09-13 16:11:40 +00:00
Philipp Hancke
1320982f5e Remove SrtpTransport MaybeSetKeyParams and ParseKeyParams
which seem unused.

BUG=webrtc:357776213

Change-Id: I346dfecd291474b29a26d20e5bc88a910a38343a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362361
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43021}
2024-09-13 15:07:33 +00:00
Henrik Boström
2b5f7cb4b3 Adjust requested_resolution to match frame's aspect ratio.
This API should not modify the aspect ratio of the frame, e.g. if the
frame is 1280x720 and requested_resolution is 1280x360, the result
should be 640x360, not a streched out 1280x360 frame. The spec version
of this API calls this "maxWidth" and "maxHeight" which is the right
way to think about it rather than a forced width and height.

VideoAdapter continues to be used to apply adaptation restrictions, but
we now make sure to calculate the correct frame size BEFORE applying
restrictions. Prior to this CL, the VideoAdapter was also used to apply
requested_resolution restrictions. This is actually wrong and would
cause strange scaling factors in some cases, e.g. f=1280x720 + r=720x405
would result in 640x360 instead of 720x405. Now we make f=720x405 first
and only adjust further if restrictions or alignments require us to.

Since this is a change in behavior a WebRtcVideoChannelTest is updated.
Encodings integration test is also added, both for aspect ratio (new
behavior) and orientation agnosticism (old behavior still passing).

Bug: webrtc:366067962
Change-Id: I4e8dc27da5a84d73238b8ab74ef197eb5ee8072a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362101
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43020}
2024-09-13 10:26:34 +00:00
webrtc-version-updater
13e377b804 Update WebRTC code version (2024-09-13T04:07:27).
Bug: None
Change-Id: I85fcbe41881f3f6076a08b5120135538b64f025b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362484
Bot-Commit: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com <webrtc-version-updater@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43019}
2024-09-13 06:00:55 +00:00
chromium-webrtc-autoroll
08ec4447bc Roll chromium_revision 3b552b31ee..3b70d6f26c (1354345:1354985)
Change log: 3b552b31ee..3b70d6f26c
Full diff: 3b552b31ee..3b70d6f26c

Changed dependencies
* src/base: 99dc460971..7f2a56694b
* src/build: 154f06e2b2..8e0612cd2c
* src/buildtools: 34a8595e75..e4f992c066
* src/ios: 774e1938da..8e01efd2a9
* src/testing: 43f298a862..3f4138fcb1
* src/third_party: b434c2e410..27c9b4efc2
* src/third_party/android_build_tools/manifest_merger/cipd: sa8Vo-ZxAsdWEoHTyymObnW4P7_yyEc7_fIpOF0A8VYC..JnUHT3SsYpv4WBlOV5VrBkuj2Q9SJ3cXlNHZ-u78L5IC
* src/third_party/android_deps/cipd/libs/org_jetbrains_kotlinx_kotlinx_coroutines_android: version:2@1.6.4.cr1..version:2@1.8.1.cr1
* src/third_party/android_deps/cipd/libs/org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm: version:2@1.6.4.cr1..version:2@1.8.1.cr1
* src/third_party/android_deps/cipd/libs/org_jetbrains_kotlinx_kotlinx_coroutines_guava: version:2@1.6.4.cr1..version:2@1.8.1.cr1
* src/third_party/androidx/cipd: yP6G6XfDr70cKK951AWtO3Ebf1-Hd7HDWq9tISJOn8UC..-HPg6kSZtheePVbklOqBtMGHIYS9d0uoR7S-NfR5kGoC
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/c46e0e5bd6..296226a4a0
* src/third_party/depot_tools: 17226d7965..d43a3eb748
* src/third_party/ffmpeg: 6711fb8465..91903c28af
* src/third_party/libc++/src: 6ae6f38d10..887f732df0
* src/third_party/libc++abi/src: 11b62edaf2..29b2e9a0f4
* src/third_party/perfetto: 40477ffb51..97a5d7ed4d
* src/third_party/r8/cipd: SfTjETaHqxbqyJ2oM5I95Iff9NJRgm9LHaDH03COwT0C..mqzE1g-dbf23PQ04w-4TpmupGkMOnZljVa993-MkzhIC
* src/tools: 31966b2a47..453f7ad001
Added dependency
* src/third_party/android_deps/cipd/libs/org_jetbrains_kotlinx_kotlinx_serialization_core_jvm
DEPS diff: 3b552b31ee..3b70d6f26c/DEPS

No update to Clang.

BUG=None

Change-Id: If2e819e7fa7c9bd0769ced73081f5e71710c4e10
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362485
Commit-Queue: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Bot-Commit: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#43018}
2024-09-13 05:34:54 +00:00
Lionel Koenig
ec38238af7 Ensure the AudioCodingModule is reset when sending is stopped.
Bug: webrtc:42226041
Change-Id: Ife3548bda3042a7447b7c50f48f023a2bc0bc443
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362103
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43017}
2024-09-12 22:47:11 +00:00