41917 Commits

Author SHA1 Message Date
Jeremy Leconte
c81f07b95d Add doc on how to handle python presubmit failures.
Change-Id: I346b622e6b9934090c0a6b5fd9d81596e957a14e
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357882
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42685}
2024-07-29 14:17:35 +00:00
Artem Titov
e02a200f5e [numpy] Fix users of NumPy APIs that are removed in NumPy 2.0.
This change migrates users of APIs removed in NumPy 2.0 to their
recommended replacements
(https://numpy.org/devdocs/numpy_2_0_migration_guide.html).

Bug: None
Change-Id: I5c275ed3f39863d42b5c34df0723933f7a8b94a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358020
Reviewed-by: Lionel Koenig <lionelk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42684}
2024-07-29 12:46:53 +00:00
Jeremy Leconte
2a8cca6a5d Run tests on Mac-14 machines.
All the builder machines have been upgraded to Mac-14.

Change-Id: Ia6fe055e21bcf483d08debc85109b36dedf18c5b
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357864
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42683}
2024-07-29 12:13:13 +00:00
Jeremy Leconte
d04efa32d6 Update builder xcode from 14 to 15.
Change-Id: If958fa2bf7e9fc1ecc7fbacf2316f11d3fefe9d1
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357881
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#42682}
2024-07-29 11:42:43 +00:00
Florent Castelli
5b9d4adfc8 Move rtp_packet_sender.h to api/
Old copy of the header and some previous usage is kept around
for compatibility with downstream projects for now.

Bug: chromium:345101934
Change-Id: Icbe42fb8450d3a4115799438d209da4eda127bab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357441
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42681}
2024-07-29 11:40:45 +00:00
Jeremy Leconte
9b81d2c954 Increase iOS deployment target from 12 to 14.
Change-Id: I9e2eccc245ff7f168152fc628ac12f3517b16501
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357741
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42680}
2024-07-29 09:14:42 +00:00
Tony Herre
5079e8a30a Allow supplying a custom NetworkControllerInterfaceFactory per-Call in PeerConnectionDependencies
This requires making CallConfig move-only so it can hold a unique_ptr to
the factory, but as discussed with Danil, that seems fine.

Bug: chromium:355610792
Change-Id: Ie52e33faaa4a2af748daeb25f5327b7a532936e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357862
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42679}
2024-07-29 07:17:14 +00:00
webrtc-version-updater
d74d085dc5 Update WebRTC code version (2024-07-27T04:04:57).
Bug: None
Change-Id: I98a58f2ca209fd153dc0ee3b09d7952ba232f2fb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358000
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@{#42678}
2024-07-27 05:54:56 +00:00
Gavin Mak
be6bda7f64 Flush NewContents cache in CheckPatchFormatted
Prior to https://crrev.com/c/5740609, NewContents never flushed cache
so the second NewContents() would always produce the same contents
post-yapf as as pre-yapf. Flush cache on second NewContents() call to
get updated file contents. Also fix the formatting a bit.

Bug: b/333744051
Change-Id: Ic627dd72675d7d3694b1978635ae047b38f06596
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357960
Auto-Submit: Gavin Mak <gavinmak@google.com>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42677}
2024-07-26 20:41:42 +00:00
Philipp Hancke
76430c0bf1 TLS: enable TLS client hello permutation by default
this is flipping
  WebRTC-PermuteTlsClientHello
to a killswitch in the SSLStreamAdapter used for DTLS.

BUG=webrtc:42225803

Change-Id: I942851c474ec5e723c5b6c9f6206e7eafbe80ea4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357901
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42676}
2024-07-26 17:19:40 +00:00
Sergey Silkin
12f9d5ce60 Revert "Update support for missing HIGH profiles and 1080p"
This reverts commit 46b43e007296737751aea10685f92ddf4df63e0d.

Reason for revert: chromium:354143228

Original change's description:
> Update support for missing HIGH profiles and 1080p
>
> The High and ConstrainedHigh profiles are missing from the decoder capabilities. Also level 3.1 doesn't allow 1080p
>
> Bug: webrtc:347724928
> Change-Id: I3f33468327d2aaf352fc80f69d2ee31481bafcb5
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355001
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Åsa Persson <asapersson@webrtc.org>
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42528}

Bug: webrtc:347724928
Change-Id: I4d55b2982aca2e94ec983473336c4fa2a72d842f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357861
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42675}
2024-07-26 09:32:40 +00:00
Gavin Mak
d7d21337d1 Support infra/specs/PRESUBMIT.py on cog
cog workspaces don't have a git directory and can't run "git diff".
Replace it with python's difflib instead.

Bug: b/333744051
Change-Id: I5bd8ccd873a0db55f0bbadf165180b3f2aa42903
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357900
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42674}
2024-07-26 08:48:02 +00:00
webrtc-version-updater
e9d066d3b7 Update WebRTC code version (2024-07-26T04:03:34).
Bug: None
Change-Id: Ic9535697379751a522a125a131340e97c90fdbfb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357841
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@{#42673}
2024-07-26 06:05:27 +00:00
Jeremy Leconte
6ed136c6ae Fix TestExtendedReportsCanSignalZeroTargetBitrate flakiness on Mac.
The test is flaky on Mac on it seems related to a timeout.
https://luci-analysis.appspot.com/p/webrtc/clusters/testname-v4/82d0b764552f0811b37cc651c0962399?tab=recent-failures

../../video/end_to_end_tests/extended_reports_tests.cc:196: Failure
Value of: Wait()
  Actual: false
Expected: true
Timed out while waiting for RTCP SR/RR packets to be sent.

Change-Id: I9b19d3952a761415ab65d15f188ae3336e43e97e
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357820
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42672}
2024-07-25 09:16:44 +00:00
Danil Chapovalov
161956b89d Cleanup deprecated accessors in VideoFrame
Bug: None
Change-Id: I3f8f428f04e86c38d5cf6d481709b7bcdfbd495c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357781
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42671}
2024-07-24 13:49:19 +00:00
Jeremy Leconte
f9ddf7fed6 Replace test frame capturer wanted_fps_ by target_capture_fps_.
wanted_fps_ seems redundant with target_capture_fps_.
The problem with wanted_fps_ is that it lowers the capture fps but does not decimate frames so that a 30 fps stream played at 5 fps is played slowly instead of played at the normal speed with dropped frames.

Change-Id: I1440953f9909ad1d4a102a0671fe933d95498a1f
Bug: b/355120692
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357780
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#42670}
2024-07-24 09:30:22 +00:00
Björn Terelius
8089959877 Remove private SRTP include
Bug: chromium:40272799
Change-Id: I42a63497aa8321475bd3e2604376c1514ecd623e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357543
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42669}
2024-07-23 17:23:45 +00:00
Danil Chapovalov
f065ff85e2 Cleanup expired field trial WebRTC-VoIPChannelRemixingAdjustmentKillSwitch
Bug: chromium:40108588
Change-Id: Ifc334819dd486ac791b5d04faa6d6bd77a481dd7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349644
Reviewed-by: Per Åhgren <peah@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42668}
2024-07-23 13:23:26 +00:00
Abby Yeh
35f10a083d Add listener to detect mute speech event, and callback function to handle the event
Bug: webrtc:343347289
Change-Id: I56b1433b0dd8220f95d7d72fb04b4f92fe4a905e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355761
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Abby Yeh <abbyyeh@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42667}
2024-07-23 13:01:39 +00:00
memetao
7fe62f25d1 Reland "Fix 'Image will be cropped if WindowCapturerWinGdi used'"
This is a reland of commit 844225a76a98aa3be5aca09c19ab72a5e7b6c38a

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: Idbb2f4dcc8811d3b2b763a49adc7a57535b3d1b2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334380
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42666}
2024-07-23 10:28:10 +00:00
Danil Chapovalov
f90a3ad3b3 Reenable disabled passing tests
Libvpx was adjusted to support scenarios test verifies, but WebRTC tests were forgotten.

Bug: webrtc:42223649
Change-Id: I19a10c939d844d00dd564bc0a16fe21844cc7cfb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357680
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42665}
2024-07-23 07:14:13 +00:00
Jeremy Leconte
1ac162ee20 Revert "Remove iOS Debug (simulator) from LKGR bots."
This reverts commit 4bded9601bfb38f2ef67574554c12370dca4708f.

Reason for revert: Fixed with https://webrtc-review.googlesource.com/c/src/+/357640

Original change's description:
> Remove iOS Debug (simulator) from LKGR bots.
>
> Temporarily skip while the bot gets fixed.
>
> Bug: chromium:353975341
> Change-Id: Ib42c18e929547c7abc58f2878c79f00f87001cae
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357540
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42656}

Bug: chromium:353975341
Change-Id: I184c9e597a28fff3ae052a07d8e6f17cc2251188
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357661
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42664}
2024-07-22 21:41:02 +00:00
Philipp Hancke
7b61b84ab1 Cleanup SSLStreamAdapter unit tests
BUG=None

Change-Id: I71fa442f6f9b95bad63a3d7d797433d95bf5c298
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354780
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42663}
2024-07-22 17:21:33 +00:00
Danil Chapovalov
ac15a137ac In RtpVideoStreamReceiver do not rely on RTP sequence number unwrap to be stable
Currently this class assumed that if the same RTP sequence number is unwrapped again result would be the same.
That might not be true when several packets were inserted in between these two calls and unwrapper changed its state

This CL propose instead to unwrap once, and save the result in the intermediate struct.
To minimize the change and the risk, only redundant unwrapping is replaced to use unwrapped sequence number

Bug: webrtc:353565743
Change-Id: I8a18c8c206a0e16010951cabcf81dd9cb1588eda
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357660
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42662}
2024-07-22 15:42:12 +00:00
Jeremy Leconte
36b548b31a Revert "Upgrade iOS buildbot xcode to 15f31d."
This reverts commit 74c761384fdeb6b4acbef2d06cf610c0a1b6482e.

Reason for revert: breaks iOS compilation

Original change's description:
> Upgrade iOS buildbot xcode to 15f31d.
>
> Change-Id: I42a4b07668fe03191d9528fed73eed6500568890
> Bug: None
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357542
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Jeremy Leconte <jleconte@google.com>
> Cr-Commit-Position: refs/heads/main@{#42660}

Bug: None
Change-Id: I2616433602f7bb5d3e9febc33f2008ffbeeb2065
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357544
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#42661}
2024-07-22 11:36:00 +00:00
Jeremy Leconte
74c761384f Upgrade iOS buildbot xcode to 15f31d.
Change-Id: I42a4b07668fe03191d9528fed73eed6500568890
Bug: None
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357542
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#42660}
2024-07-22 09:51:39 +00:00
Jeremy Leconte
175e0c95e3 iOS simulator upgrade iOS version to run the tests.
iOS 15.5 is not tested anymore and we start to test on iOS 18.0.

Change-Id: Ia7340d25f6cf8480763ea689db267c0c9a843319
Bug: b/353975341
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357640
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#42659}
2024-07-22 08:54:06 +00:00
Jeremy Leconte
69720eda3d Build bot for iOS simulator don't need a xcode version.
Skip CQ because it is currently broken and changes to config.star are not picked up by CQ anyway.

Bug: None
Change-Id: I3fb6c1fd8db6466b6f058f10d1232cc1624e0472
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357541
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#42658}
2024-07-22 08:21:54 +00:00
Sergio Garcia Murillo
02f375da42 Check arrayview is not empty before accessing it
Bug: webrtc:353764813
No-Try: True
Change-Id: I873f115c13e23d827f3967bc505da4b9d1a70753
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357580
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42657}
2024-07-22 07:58:22 +00:00
Mirko Bonadei
4bded9601b Remove iOS Debug (simulator) from LKGR bots.
Temporarily skip while the bot gets fixed.

Bug: chromium:353975341
Change-Id: Ib42c18e929547c7abc58f2878c79f00f87001cae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357540
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42656}
2024-07-19 17:01:11 +00:00
Sergey Silkin
1a33aa4a8e Override stream settings in a separate function
Bug: webrtc:351644568, b/352504711
Change-Id: I706d5a85b83603613693f63c5d3faa9946e90afc
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357440
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42655}
2024-07-19 13:59:27 +00:00
Sergey Silkin
5fe85d23a2 Reland "Pass true stream resolutions to GetSimulcastConfig()"
This is a reland of commit 09f03be54804e81f626c26e8fde8c86cc952545f

Use max_num_layers instead of encoder_config.number_of_streams when calculation stream resolutions in EncoderStreamFactory::GetStreamResolutions().

Original change's description:
> Pass true stream resolutions to GetSimulcastConfig()
>
> Before this change GetSimulcastConfig() received only maximum resolution as an input parameter and derived resolutions for low quality simulcast streams assuming 1/2 scaling factor [1]. These days applications can configure resolution scaling factors via RtpEncodingParameters. If the configured resolution scaling factors were different from 1/2 then we got wrong bitrate limits from GetSimulcastConfig(). Now resolutions are calculated using scaling factor from RtpEncodingParameters (or default 1/2) for all streams in EncoderStreamFactory::CreateEncoderStreams() and then passed to GetSimulcastConfig().
>
> Moved tests from simulcast_unittest.cc to encoder_stream_factory_unittest.cc. Mapping of old to new tests:
> * GetConfigWithLimitedMaxLayersForResolution -> ReducesStreamCountWhenResolutionIsLow
> * GetConfigWithLowResolutionScreenshare -> ReducesLegacyScreencastStreamCountWhenResolutionIsLow
> * GetConfigWithNotLimitedMaxLayersForResolution -> KeepsStreamCountUnchangedWhenLegacyLimitIsDisabled
> * GetConfigWithNormalizedResolution -> AdjustsResolutionWhenUnaligned
> * GetConfigWithNormalizedResolutionDivisibleBy4 -> MakesResolutionDivisibleBy4
> * GetConfigWithNormalizedResolutionDivisibleBy8 -> not needed (MakesResolutionDivisibleBy4 should be enough).
> * GetConfigForLegacyLayerLimit -> KeepsStreamCountUnchangedWhenResolutionIsHigh and ReducesStreamCountWhenResolutionIsLow
> * GetConfigForLegacyLayerLimitWithRequiredHD -> KeepsStreamCountUnchangedWhenLegacyLimitIsDisabled
>
> [1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/video/config/simulcast.cc;l=297-298;drc=1b78a7eb3f418460da03672b1d1af1d9488bb544
>
> Bug: webrtc:351644568, b/352504711
> Change-Id: I0028904ab0bb1e27b9c1b7cd3fb9a8ccf447fa35
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357280
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42651}

Bug: webrtc:351644568, b/352504711
Change-Id: Ib3fd859257b61c2a5d695b8b8f45c95495117c0e
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357520
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42654}
2024-07-19 13:12:59 +00:00
Sergey Silkin
ede05c35e4 Revert "Pass true stream resolutions to GetSimulcastConfig()"
This reverts commit 09f03be54804e81f626c26e8fde8c86cc952545f.

Reason for revert: breaks downstream projects

Original change's description:
> Pass true stream resolutions to GetSimulcastConfig()
>
> Before this change GetSimulcastConfig() received only maximum resolution as an input parameter and derived resolutions for low quality simulcast streams assuming 1/2 scaling factor [1]. These days applications can configure resolution scaling factors via RtpEncodingParameters. If the configured resolution scaling factors were different from 1/2 then we got wrong bitrate limits from GetSimulcastConfig(). Now resolutions are calculated using scaling factor from RtpEncodingParameters (or default 1/2) for all streams in EncoderStreamFactory::CreateEncoderStreams() and then passed to GetSimulcastConfig().
>
> Moved tests from simulcast_unittest.cc to encoder_stream_factory_unittest.cc. Mapping of old to new tests:
> * GetConfigWithLimitedMaxLayersForResolution -> ReducesStreamCountWhenResolutionIsLow
> * GetConfigWithLowResolutionScreenshare -> ReducesLegacyScreencastStreamCountWhenResolutionIsLow
> * GetConfigWithNotLimitedMaxLayersForResolution -> KeepsStreamCountUnchangedWhenLegacyLimitIsDisabled
> * GetConfigWithNormalizedResolution -> AdjustsResolutionWhenUnaligned
> * GetConfigWithNormalizedResolutionDivisibleBy4 -> MakesResolutionDivisibleBy4
> * GetConfigWithNormalizedResolutionDivisibleBy8 -> not needed (MakesResolutionDivisibleBy4 should be enough).
> * GetConfigForLegacyLayerLimit -> KeepsStreamCountUnchangedWhenResolutionIsHigh and ReducesStreamCountWhenResolutionIsLow
> * GetConfigForLegacyLayerLimitWithRequiredHD -> KeepsStreamCountUnchangedWhenLegacyLimitIsDisabled
>
> [1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/video/config/simulcast.cc;l=297-298;drc=1b78a7eb3f418460da03672b1d1af1d9488bb544
>
> Bug: webrtc:351644568, b/352504711
> Change-Id: I0028904ab0bb1e27b9c1b7cd3fb9a8ccf447fa35
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357280
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42651}

Bug: webrtc:351644568, b/352504711
Change-Id: I7aadbe49419b7ac610db4db99284fdcdce9deff5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357500
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42653}
2024-07-19 09:46:34 +00:00
Philipp Hancke
3753c8190e 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}
2024-07-19 08:49:24 +00:00
Sergey Silkin
09f03be548 Pass true stream resolutions to GetSimulcastConfig()
Before this change GetSimulcastConfig() received only maximum resolution as an input parameter and derived resolutions for low quality simulcast streams assuming 1/2 scaling factor [1]. These days applications can configure resolution scaling factors via RtpEncodingParameters. If the configured resolution scaling factors were different from 1/2 then we got wrong bitrate limits from GetSimulcastConfig(). Now resolutions are calculated using scaling factor from RtpEncodingParameters (or default 1/2) for all streams in EncoderStreamFactory::CreateEncoderStreams() and then passed to GetSimulcastConfig().

Moved tests from simulcast_unittest.cc to encoder_stream_factory_unittest.cc. Mapping of old to new tests:
* GetConfigWithLimitedMaxLayersForResolution -> ReducesStreamCountWhenResolutionIsLow
* GetConfigWithLowResolutionScreenshare -> ReducesLegacyScreencastStreamCountWhenResolutionIsLow
* GetConfigWithNotLimitedMaxLayersForResolution -> KeepsStreamCountUnchangedWhenLegacyLimitIsDisabled
* GetConfigWithNormalizedResolution -> AdjustsResolutionWhenUnaligned
* GetConfigWithNormalizedResolutionDivisibleBy4 -> MakesResolutionDivisibleBy4
* GetConfigWithNormalizedResolutionDivisibleBy8 -> not needed (MakesResolutionDivisibleBy4 should be enough).
* GetConfigForLegacyLayerLimit -> KeepsStreamCountUnchangedWhenResolutionIsHigh and ReducesStreamCountWhenResolutionIsLow
* GetConfigForLegacyLayerLimitWithRequiredHD -> KeepsStreamCountUnchangedWhenLegacyLimitIsDisabled

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/video/config/simulcast.cc;l=297-298;drc=1b78a7eb3f418460da03672b1d1af1d9488bb544

Bug: webrtc:351644568, b/352504711
Change-Id: I0028904ab0bb1e27b9c1b7cd3fb9a8ccf447fa35
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357280
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42651}
2024-07-19 08:47:09 +00:00
Sergio Garcia Murillo
45e5e385f3 Use ArrayView on H264 bitstream parsing
No-Try: true
Bug: webrtc:42225170
Change-Id: I4682f400054fee5c86ea24bebf6d703fb90074da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354722
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42650}
2024-07-19 08:16:11 +00:00
Sergey Silkin
b27ac6bc83 Set min bitrate equal to kDefaultMinVideoBitrateBps
If experimental min bitrate value is not configured, set the min bitrate for the first simulcast stream equal to kDefaultMinVideoBitrateBps (=30kbps).

Min bitrate depends on resolution. At absence of the experimental min bitrate override, we got high min bitrate values for high resolutions (600kbps for VP8 720p, for example) before. That led to encode pauses [1] which is an undesired behavior.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/video_coding/utility/simulcast_rate_allocator.cc;l=173;drc=f317f7106a7a15a04da7cd30c2e2ddb1b3025bc6

Bug: webrtc:351644568, b/352504711
Change-Id: Ifc93cc230fb194d2c9a739368d415f24385939fd
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357420
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42649}
2024-07-19 06:54:36 +00:00
Sergey Silkin
4dedf5efae Use EncoderStreamFactory::CreateEncoderStreams() instead of GetSimulcastConfig()
In preparation for upcoming changes in GetSimulcastConfig(), which will require a vector of stream resolutions instead of just the max resolution as an input, switch tests to use CreateEncoderStreams() instead of calling GetSimulcastConfig() directly.

Bug: webrtc:351644568, b/352504711
Change-Id: I541dd54a21a8b75028cff07a250f858a47898223
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357400
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42648}
2024-07-18 16:35:10 +00:00
Mirko Bonadei
83671efdb9 Revert "Add a dependancy on //third_party/jni_zero:jni_zero_java"
This reverts commit 5ccec98826adc84bdb4c8177580a6f23074d8058.

Reason for revert: Breaks downstream project.

Original change's description:
> Add a dependancy on //third_party/jni_zero:jni_zero_java
>
> JniZero's native side expects JniZero's java side to exist, add a
> dependancy on //third_party/jni_zero:jni_zero_java from
> sdk/android:base_java.
>
> Bug: webrtc:353174456
> Change-Id: I9240eab3da78efd394e4ee581cf71fd41976eb48
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357200
> Commit-Queue: Mohamed Heikal <mheikal@google.com>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Auto-Submit: Mohamed Heikal <mheikal@google.com>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42639}

Bug: webrtc:353174456
Change-Id: I58bdb9e1797f6d2f716225abc5c337cd90290159
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357460
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mohamed Heikal <mheikal@google.com>
Cr-Commit-Position: refs/heads/main@{#42647}
2024-07-18 15:27:33 +00:00
Sergey Silkin
9e1460f9a3 Parameterize "scale resolution down by" tests
Merge GetAndSetRtpSendParametersScaleResolutionDownByVP8, GetAndSetRtpSendParametersScaleResolutionDownByVP8WithOddResolution, GetAndSetRtpSendParametersScaleResolutionDownByH264 and GetAndSetRtpSendParametersScaleResolutionDownByH264WithOddResolution into one parameterized test.

PS. Not sure why we need separate tests for VP8 and H264. Underlaying code paths are codec agnostic as I can see.

Bug: webrtc:351644568, b/352504711
Change-Id: Ic95c59c1bfacdba8a42de8ecca9cab42014842e9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357360
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42646}
2024-07-17 12:33:01 +00:00
Danil Chapovalov
faf5b0308c Delete forwarding rtp_rtcp/time_util.h as unused
All known users are updated to use ntp_time_util.h directly

Bug: webrtc:343076000
Change-Id: I7229b9e5dd72d83bfd98ba4050ae7583d792575b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357300
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42645}
2024-07-17 08:53:00 +00:00
Sergey Silkin
1b78a7eb3f Remove dependency on WebRTC-LowresSimulcastBitrateInterpolation
Dependency on WebRTC-LowresSimulcastBitrateInterpolation field trial in LimitSimulcastLayerCount() is unnecessary.

Bug: webrtc:351644568, b/352504711
Change-Id: I9daf9cbfb5b6a582cd9f03ce1a86e5bbd2b2bfd4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357260
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42644}
2024-07-17 07:51:33 +00:00
Philipp Hancke
bdfe6ae801 video_replay: ignore non-rtp packets
which cause log spam otherwise, in particular RTCP packets

BUG=None

Change-Id: I73c2b17afb4f69102e25eb360699ea7d93bb8175
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356100
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42643}
2024-07-16 16:24:04 +00:00
Johannes Kron
f6a804826c Add QualityConvergenceController to VideoStreamEncoder
QualityConvergenceController is a layer between VideoStreamEncoder
and QualityConvergenceMonitor that takes care of the simulcast
logic.

Bug: chromium:328598314
Change-Id: Iad8a9d9138e69a60fd508a7ef038220947888f0a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356420
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42642}
2024-07-16 10:20:27 +00:00
Bjorn Terelius
1766a3dbce Treat negative SCTP message size limit as maximal (only bounded by buffer size)
Bug: webrtc:350362794
Change-Id: Ie80e89a1359fbe7229452e59715b66e951a2592b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357240
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42641}
2024-07-16 09:21:06 +00:00
webrtc-version-updater
1869616223 Update WebRTC code version (2024-07-16T04:07:40).
Bug: None
Change-Id: Ida79ed1533dcd696d10ba4624603140a6c02d20e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357220
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@{#42640}
2024-07-16 06:18:54 +00:00
Mohamed
5ccec98826 Add a dependancy on //third_party/jni_zero:jni_zero_java
JniZero's native side expects JniZero's java side to exist, add a
dependancy on //third_party/jni_zero:jni_zero_java from
sdk/android:base_java.

Bug: webrtc:353174456
Change-Id: I9240eab3da78efd394e4ee581cf71fd41976eb48
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357200
Commit-Queue: Mohamed Heikal <mheikal@google.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Mohamed Heikal <mheikal@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42639}
2024-07-15 20:08:47 +00:00
Danil Chapovalov
1bb68532dd Remove legacy implementation of AudioEncoderFactory::MakeAudioEncoder in a pc test
All calls in code under test were migrated to AudioEncoderFactory::Create and thus there is no longer need to propagate older function.

Bug: webrtc:343086059
Change-Id: I9e0ea4024759deb22c0d284e0e4bac7322a08f62
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357181
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42638}
2024-07-15 11:31:18 +00:00
Sergey Silkin
ea615affcc Remove WebRTC-VP8ConferenceTemporalLayers field trial
WebRTC-VP8ConferenceTemporalLayers experiment is restricted to <= M126. Number of temporal layers is controlled via scalaiblity mode now.

Bug: webrtc:351644568, b/352504711,  chromium:40097057, b/140159553
Change-Id: I025f8f64e8d5144cf54fe8bf26e8b99daae6e079
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357104
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42637}
2024-07-15 10:26:18 +00:00
Sergey Silkin
c14e2cc4ca Set is_highest_layer_max_bitrate_configured outside of loop
Bug: webrtc:351644568, b/352504711
Change-Id: Ia1798e35adf8b34357103ae3aba8ab16499a458f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357081
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42636}
2024-07-15 10:25:14 +00:00