39000 Commits

Author SHA1 Message Date
Henrik Boström
727014a5f1 Close PC before test ends to reduce risk of flake.
From the logs I can't tell if close is happening or not on the bots.
Let's make it explicit just in case.

Bug: webrtc:15018
Change-Id: Icfa7fe8587d1516a9ef31e86ade920a6023e619b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300364
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#39768}
2023-04-05 15:28:37 +00:00
philipel
40cb0091a1 Unnest VideoEncoderFactoryTemplate in webrtc_video_engine_unittest.cc
Bug: webrtc:13573
Change-Id: I43517b6b7a130704803ff149b8a738ed4713d88a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300361
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39767}
2023-04-05 15:13:36 +00:00
philipel
7ceb49c7b8 Fuzzy match the SdpVideoFormat in VideoEncoderFactoryTemplate::CreateVideoEncoder.
Bug: webrtc:13573
Change-Id: I1223f5f989d5298d3a6f7f6d06fd752e650adfd9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300342
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39766}
2023-04-05 11:48:26 +00:00
chromium-webrtc-autoroll
65f5160195 Roll chromium_revision 290ea5adca..289bd8077e (1123621:1126466)
Change log: 290ea5adca..289bd8077e
Full diff: 290ea5adca..289bd8077e

Changed dependencies
* fuchsia_vesion: version:12.20230329.1.1..version:12.20230330.3.1
* reclient_vesion: re_client_version:0.99.0.3f95625-gomaip..re_client_version:0.100.2.1c70bb9-gomaip
* src/base: ee62571dd4..2d7d6f873a
* src/build: 27be8e38ec..6cd5122674
* src/buildtools: d2c292117b..3ee69a5c6b
* src/buildtools/reclient: re_client_version:0.99.0.3f95625-gomaip..re_client_version:0.100.2.1c70bb9-gomaip
* src/buildtools/third_party/libc++/trunk: e0dca93272..ab37483b42
* src/buildtools/third_party/libc++abi/trunk: 9643f2cf13..4a9d0560b4
* src/buildtools/third_party/libunwind/trunk: 29a6dda8c6..f3464caa6a
* src/ios: 7c17b6c8d5..2b65b27911
* src/testing: c76f4b0531..3ae4ef5aad
* src/third_party: 98f1652864..cfe34887de
* src/third_party/android_build_tools/aapt2: 36NqCian2RIwuM6SFfizdUgKoXyZhy3q6pFfsws0szYC..fFfHyo80O9opPFsbOisSHF4d3tV4GGxLgxXWzGRuY2IC
* src/third_party/android_build_tools/manifest_merger: _aoHU11YhUwqKZXVXsn5otnhI-ZVGFT7h1Z9eCcAZM0C..zrC8AzHP0aIX3PNRmyIUO6hidQryUwSv65YE8KQEZa0C
* src/third_party/androidx: eE7d5XGfu5AjGS4uRnnWWv13VdNc9Txc3DOhXN8lFPEC..fu51N_Sm0ZHkNdj7nyq4KgmGSU5RdSHivUs__whZyqUC
* src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/74646566e9..58472cc752
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/6a9e2c402d..561451ff1d
* src/third_party/depot_tools: 4a7343007c..61ebd177ab
* src/third_party/ffmpeg: a51c75b09b..8d21d41d8b
* src/third_party/freetype/src: 4d8db130ea..b0a4f99278
* src/third_party/icu: 1e49ac26dd..d8daa943f6
* src/third_party/kotlin_stdlib: XON2v801ZWS7FjApXO8Ev7Me7cOsIAnmqzyCXJuMwJ0C..gizyEP29NQpAimwviO2pgSrqvx0YgAvSUNc5V6hvfroC
* src/third_party/kotlinc/current: bCZedwoM-hb1pP1QKzA3P5aR4zjZltqLj4JQpmQsHuUC..Ly0WLNcc5HwMFsqSGLX4OrQ8nivZ9w8nSJyU7BsPIRkC
* src/third_party/libaom/source/libaom: https://aomedia.googlesource.com/aom.git/+log/16e2483139..61fa302827
* src/third_party/libvpx/source/libvpx: 394de691a0..e47676c11c
* src/third_party/perfetto: ad418a3f70..7aa553c67e
* src/third_party/r8: 0AAkHl3ztCss8QvTqGZbCU0Wy2W-0CIoWwCYZnYg7j0C..GcQ-oelMmVQMKFpvjCNroGxPCOnapQAHbIqjjSymmCAC
* src/tools: 425baa4226..c617061e91
DEPS diff: 290ea5adca..289bd8077e/DEPS

No update to Clang.

BUG=None

Change-Id: I85627988b0b9512991a5f94b8477a388c54daabc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300321
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@{#39765}
2023-04-05 11:09:28 +00:00
Andrey Logvin
7f16fcda0f Revert "[DataChannel] Send and receive packets on the network thread."
This reverts commit fe53fec24e02d2d644220f913c3f9ae596bbb2d9.

Reason for revert: Speculative revert, may be breaking downstream project

Original change's description:
> [DataChannel] Send and receive packets on the network thread.
>
> This updates sctp channels, including work that happens between the
> data channel controller and the transport, to run on the network
> thread. Previously all network traffic related to data channels was
> routed through the signaling thread before going to either the network
> thread or the caller's thread (e.g. js thread in chrome). Now the
> calls can go straight from the network thread to the JS thread with
> enabling a special flag on the observer (see below) and similarly
> calls to send data, involve 2 threads instead of 3.
>
> * Custom data channel observer adapter implementation that
>   maintains compatibility with existing observer implementations in
>   that notifications are delivered on the signaling thread.
>   The adapter can be explicitly disabled for implementations that
>   want to optimize the callback path and promise to not block the
>   network thread.
> * Remove the signaling thread copy of data channels in the controller.
> * Remove several PostTask operations that were needed to keep things
>   in sync (but the need has gone away).
> * Update tests for the controller to consistently call
>   TeardownDataChannelTransport_n to match with production.
> * Update stats collectors (current and legacy) to fetch the data
>   channel stats on the network thread where they're maintained.
> * Remove the AsyncChannelCloseTeardown test since the async teardown
>   step has gone away.
> * Remove `sid_s` in the channel code since we only need the network
>   state now.
> * For the custom observer support (with and without data adapter) and
>   maintain compatibility with existing implementations, added a new
>   proxy macro that allows an implementation to selectively provide
>   its own implementation without being proxied. This is used for
>   registering/unregistering a data channel observer.
> * Update the data channel proxy to map most methods to the network
>   thread, avoiding the interim jump to the signaling thread.
> * Update a plethora of thread checkers from signaling to network.
>
> Bug: webrtc:11547
> Change-Id: Ib4cff1482e31c46008e187189a79e967389bc518
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299142
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39760}

Bug: webrtc:11547
Change-Id: Id0d65594bf727ccea5c49093c942b09714d101ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300341
Auto-Submit: Andrey Logvin <landrey@webrtc.org>
Owners-Override: Andrey Logvin <landrey@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39764}
2023-04-05 09:34:23 +00:00
landrey
a3ff334cf1 Remove dependency to android_support_test_runner in webrtc
Make WebRTC compatible with changes introduced in https://crbug.com/1428304

Bug: chromium:1428304
Change-Id: I464a09545dc3a158ea4108bb63c7b8c4a05adc6b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300263
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39763}
2023-04-05 08:40:19 +00:00
Tomas Gunnarsson
d09103718e Revert "Handle corner case in SctpDataChannel::ObserverAdapter"
This reverts commit 1b3c89878ef1f7a0562914496965f5da8bf7df4e.

Reason for revert: The issue wasn't solved by this.

Original change's description:
> Handle corner case in SctpDataChannel::ObserverAdapter
>
> This handles a corner case whereby an OnStateChange implementation
> synchronously calls UnregisterObserver, which would (before this CL)
> delete the observer adapter.
>
> (Using No-Try since an import bot won't pass until this CL lands)
>
> No-Try: True
> Bug: webrtc:11547
> Change-Id: I33a13495aad6151fdd76becfa9a2c8672d80d825
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300280
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39761}

Bug: webrtc:11547
Change-Id: I6af67a367631b9d853a848811a98b0f1cc576f71
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300340
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39762}
2023-04-05 06:40:52 +00:00
Tommi
1b3c89878e Handle corner case in SctpDataChannel::ObserverAdapter
This handles a corner case whereby an OnStateChange implementation
synchronously calls UnregisterObserver, which would (before this CL)
delete the observer adapter.

(Using No-Try since an import bot won't pass until this CL lands)

No-Try: True
Bug: webrtc:11547
Change-Id: I33a13495aad6151fdd76becfa9a2c8672d80d825
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300280
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39761}
2023-04-04 19:20:46 +00:00
Tommi
fe53fec24e [DataChannel] Send and receive packets on the network thread.
This updates sctp channels, including work that happens between the
data channel controller and the transport, to run on the network
thread. Previously all network traffic related to data channels was
routed through the signaling thread before going to either the network
thread or the caller's thread (e.g. js thread in chrome). Now the
calls can go straight from the network thread to the JS thread with
enabling a special flag on the observer (see below) and similarly
calls to send data, involve 2 threads instead of 3.

* Custom data channel observer adapter implementation that
  maintains compatibility with existing observer implementations in
  that notifications are delivered on the signaling thread.
  The adapter can be explicitly disabled for implementations that
  want to optimize the callback path and promise to not block the
  network thread.
* Remove the signaling thread copy of data channels in the controller.
* Remove several PostTask operations that were needed to keep things
  in sync (but the need has gone away).
* Update tests for the controller to consistently call
  TeardownDataChannelTransport_n to match with production.
* Update stats collectors (current and legacy) to fetch the data
  channel stats on the network thread where they're maintained.
* Remove the AsyncChannelCloseTeardown test since the async teardown
  step has gone away.
* Remove `sid_s` in the channel code since we only need the network
  state now.
* For the custom observer support (with and without data adapter) and
  maintain compatibility with existing implementations, added a new
  proxy macro that allows an implementation to selectively provide
  its own implementation without being proxied. This is used for
  registering/unregistering a data channel observer.
* Update the data channel proxy to map most methods to the network
  thread, avoiding the interim jump to the signaling thread.
* Update a plethora of thread checkers from signaling to network.

Bug: webrtc:11547
Change-Id: Ib4cff1482e31c46008e187189a79e967389bc518
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299142
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39760}
2023-04-04 16:49:17 +00:00
Henrik Boström
8481f6358e Remove IsSinglecastOrAllNonFirstLayersInactive() helper.
As of recent changes, we can simply look at numberOfSimulcastStreams
because in the {active,inactive,inactive} case we get a single
webrtc::VideoStream here[1] which results in numberOfSimulcastStreams
being 1 here[2].

Looking at numberOfSimulcastStreams instead of using a helper is
preferred because it is more descriptive and in the future, when
{inactive,active,inactive} or {inactive,inactive,active} cases of VP9
simulcast is also supported (webrtc:15046) then this gating will work
even when the first layer is not the active one.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/video/config/encoder_stream_factory.cc;l=146;drc=c99753ac8f051e379ae68e281aaef04b0a5ca8f2

[2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/video_coding/video_codec_initializer.cc;l=77;drc=4baea5b07f2fd309892845cf2d1c0f4ca77862d3

# No need to wait for win chrome bot, everything else green
NOTRY=True

Bug: webrtc:15046
Change-Id: I8aaea2e8cc350bd01fb00cc7fd85032b7fdfe24d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299942
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39759}
2023-04-04 13:59:07 +00:00
Henrik Boström
0a3ad1a561 Deflake simulcast flow tests: stop fake source for reals.
The FakePeriodicVideoSource was not actually stopping its repeated
handle, which takes a raw pointer to the task queue. There could be a
race here where a repeated task was being posted at the same time as
the task queue was being destroyed due to the scoped safety flag being
tied to the repeated task rather than the task queue.

I'm still unable to repro locally, so this is a speculative fix.

# No need to wait for ios/android bots, all other bots green
NOTRY=True

Bug: webrtc:15018
Change-Id: Id6f9bda5f4fc641abc11068f5cf8aa0f1cf36d27
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300264
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39758}
2023-04-04 13:58:05 +00:00
philipel
31af34ba8c Update Dav1dDecoderTemplateAdapater to include AV1 profile1 support.
Bug: webrtc:13573
Change-Id: Ibc81b6400eb8e22ce28ae434c83a22013ef96c79
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299946
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39757}
2023-04-04 12:40:17 +00:00
Tommi
527196508c Update DataChannelControllerTests to exercise teardown path.
This updates DataChannelControllerTests to shut down the DCC in the
same way it's shut down by the owning PeerConnection instance:

* Call TeardownDataChannelTransport_n()
* Call PrepareForShutdown()

Also calling PrepareForShutdown() from PC's dtor to be consistent with
how `sdp_handler_->PrepareForShutdown()` is called since it appears
that many tests do not call PC::Close() before destruction.

Bug: b/276434297
Change-Id: I0379baa0df0e764bc255b83ae0667032acfe3db0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300220
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39756}
2023-04-04 11:21:06 +00:00
Danil Chapovalov
4b61f3a0c6 In rtc event log visualizer use modern api of the ReceiveSideCongestionController
Bug: webrtc:14859
Change-Id: I121905a892aaafb54c1fff62f818bfd767b92da0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296823
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39755}
2023-04-04 10:30:44 +00:00
Jeremy Leconte
40a0e3191a Remove AudioConfig::Mode.
The Mode is currently redundant with the optional input_file_name.

Change-Id: Ib4f0a363e86d925107d61867a7f743d6663e7071
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298743
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#39754}
2023-04-04 08:44:23 +00:00
Mirko Bonadei
0b148e91a4 Revert "Migrate away from builtin video encoder/decoder factories in pc tests"
This reverts commit 8be11b0d05012fbc7577693f896c2d70a8867b19.

Reason for revert: Breaks downstream project (speculative rollback)

Original change's description:
> Migrate away from builtin video encoder/decoder factories in pc tests
>
> Bug: webrtc:13573
> Change-Id: I076535d57568b653813da7b550689ce171589bce
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299662
> Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39736}

Bug: webrtc:13573
Change-Id: Ibe4cc19cffe9b780244c44fb8d16ba66fc0a9542
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300221
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@{#39753}
2023-04-04 08:21:25 +00:00
Henrik Boström
89f095cb07 Deflake PeerConnectionSimulcastMediaFlowTests due to unstopped sources.
Only in testing environments are the task queues shut down while sources
still have media flowing. It's still not clear why heap-use-after-free
happens, since it should be enough to close the PC, but it is clear that
the crash is happening due to frames flowing while the test is shutting
down, which is not something happening outside of testing.

In an attempt to deflake, this CL makes sure to manually stop the
test-only sources before closing the peer connection.

Bug: webrtc:15018
Change-Id: I48ee131a8994c9c4caee1bb4875580d255b97da1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299944
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#39752}
2023-04-03 16:33:01 +00:00
Per K
755ffa7e8a Remove unused field trial parameters from AimdRateControl.
ratio and ignore_acked where added here https://webrtc-review.googlesource.com/c/src/+/252442
ignore_decr  https://webrtc-review.googlesource.com/c/src/+/253901

Bug: none
Change-Id: I85008dfa70bf57bfefb453f9f1d1929510c7b825
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298045
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39751}
2023-04-03 14:36:23 +00:00
philipel
2cafacfe86 Replace BuiltinVideo{Encoder,Decoder}Factory with Video{Encoder,Decoder}FactoryTemplate.
Bug: webrtc:13573
Change-Id: Ie10bdd78dc4c39def83a4dc7806fda3556eb5c2e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299707
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39750}
2023-04-03 14:16:47 +00:00
Per K
7d9cf9a537 Add PeerScenario test RampUpWithUndemuxableRtpPackets
Tests that caller BWE can rampup even if callee can not demux incoming RTP packets.

Bug: webrtc:14928
Change-Id: I3c89a14e67c6d781a26439980b5a99570a430dc7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299482
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39749}
2023-04-03 13:29:47 +00:00
Åsa Persson
13fffbbe40 Replace BuiltinVideoDecoderFactory with VideoDecoderFactoryTemplate.
Bug: webrtc:13573
Change-Id: Ie933b7902d6b7a548159885178161ed5cb752e22
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299602
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39748}
2023-04-03 12:35:26 +00:00
philipel
098cfbdc82 Replace BuiltinVideo{Encoder,Decoder}Factory with Video{Encoder,Decoder}FactoryTemplate.
Bug: webrtc:13573
Change-Id: I36abdd0f23055c6cbd4edb2c00af7abf7f7a1b58
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299704
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39747}
2023-04-03 12:04:27 +00:00
Danil Chapovalov
f3bdce9a99 Update PeerConnectionFactory unittests to use newer video factory api
Bug: webrtc:13573
Change-Id: I8891fb788298890685c7b8c25efd19157c856631
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299705
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39746}
2023-04-03 11:52:19 +00:00
Åsa Persson
e0727118f1 QualityScalingTest.AdaptsDownAndThenUpWithBalanced: fix for flaky test
Bug: webrtc:14922
Change-Id: Ide460e78f00fcf59c8a5da66b431592f10512d94
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299461
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39745}
2023-04-03 11:30:57 +00:00
Åsa Persson
0587aaea1a Replace BuiltinVideo{Encoder,Decoder}Factory with Video{Encoder,Decoder}FactoryTemplate.
Bug: webrtc:13573
Change-Id: I69e500f2a18b735396cd00e1ab925243f1a807a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299702
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39744}
2023-04-03 10:44:34 +00:00
philipel
44437d35cd Replace BuiltinVideo{Encoder,Decoder}Factory with Video{Encoder,Decoder}FactoryTemplate.
Bug: webrtc:13573
Change-Id: I4eb5bb99bfde9c38c1d4072b933ef11a9ca32f53
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299703
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39743}
2023-04-03 09:39:08 +00:00
henrika
d549e4b6ce DXGI now consumes may_contain_cursor
Before:

No attempt was made to figure out of the cursor was embedded into the
captured video frame when using DXGI on Windows as screen capturer.
Instead the cursor is superimposed on the frame by an external mouse
and cursor composer.

After:

We now check if the display adapter supports embedding the mouse
cursor and if so use it as is and thereby avoid adding it independently.

Bug: chromium:1421656
Change-Id: Ie07fe13e1c8f9583769961328bb41fbc689cd8e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299241
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39742}
2023-04-03 08:30:59 +00:00
Mirko Bonadei
a0e4ce0e81 Add missing frameworks deps.
Bug: None
Change-Id: Ib3883b2977cc6c989ad2c9c1e3fab6f90a78e147
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299941
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#39741}
2023-04-03 07:12:11 +00:00
Åsa Persson
5bb3274f40 Replace BuiltinVideo{Encoder,Decoder}Factory with Video{Encoder,Decoder}FactoryTemplate.
Bug: webrtc:13573
Change-Id: If953f874018904826af361aeb7b4c3b35735b96b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299601
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39740}
2023-04-03 06:55:38 +00:00
webrtc-version-updater
f34aa1e40b Update WebRTC code version (2023-04-03T04:03:14).
Bug: None
Change-Id: I8a5de296de24f167fe77ebca0e907b45fe0527eb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300021
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@{#39739}
2023-04-03 05:23:52 +00:00
Ying Wang
bc959b15e2 Fixit: Migrate uses of BuiltinVideo{Encoder,Decoder}Factory to Video{Encoder,Decoder}FactoryTemplate.
Bug: webrtc:13573
Change-Id: Id1b0d841869d514ba0c609caf82659d5cdc19c0f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299640
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39738}
2023-04-03 04:02:03 +00:00
Victor Boivie
bd46bb7660 dcsctp: Support zero checksum packets
If configured, the packet parser will allow packets with
a set checksum of zero. In that case, the correct checksum
will not even be calculated, avoiding a CPU intensive
calculation.

Also, if specified when building a packet, the checksum can
be opted to be not calculated and written to the packet.
This is to be used when draft-tuexen-tsvwg-sctp-zero-checksum
has been negotiated, except for some packets during association
establishment.

This is mainly a preparation CL and follow-up CL will enable
this feature.

Low-Coverage-Reason: Affects debug logging code not run in tests
Bug: webrtc:14997
Change-Id: I3207ac3a626df039ee2990403c2edd6429f17617
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298481
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39737}
2023-04-02 21:38:00 +00:00
Danil Chapovalov
8be11b0d05 Migrate away from builtin video encoder/decoder factories in pc tests
Bug: webrtc:13573
Change-Id: I076535d57568b653813da7b550689ce171589bce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299662
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39736}
2023-04-01 18:45:20 +00:00
philipel
2b00c4e1af Replace BuiltinVideo{Encoder,Decoder}Factory with Video{Encoder,Decoder}FactoryTemplate.
Bug: webrtc:13573
Change-Id: Ie84498444ad6f56bba90d17e672838a1ea2f6a83
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299706
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39735}
2023-03-31 19:31:50 +00:00
Tommi
1f708ef2ff Cancel pending operations for the DCC during Pc::Close()
(using no-try due to bot infra issue)

No-try: true
Bug: b/276434297
Change-Id: I33f796b501f96731c4ca76cb62c2331f10c795f1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299708
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39734}
2023-03-31 18:13:59 +00:00
Åsa Persson
dc806fd16a Replace BuiltinVideo{Encoder,Decoder}Factory with Video{Encoder,Decoder}FactoryTemplate.
Bug: webrtc:13573
Change-Id: Iac9d0eb56a5cae73b75188b9fb257d6815e04bef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299701
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39733}
2023-03-31 15:49:14 +00:00
Tommi
0fe65102cc Add support for detaching and merging of StatsCollection contents.
This is needed in order to be able to update the legacy stats
collector to fetch data channel stats from the network thread, which
is part of an upcoming change to data channels.

Bug: webrtc:11547
Change-Id: Ic205b0314b9f11a024d36d714c223cbddd0f3df3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299462
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39732}
2023-03-31 15:46:07 +00:00
philipel
30f3d2710d Replace BuiltinVideo{Encoder,Decoder}Factory with Video{Encoder,Decoder}FactoryTemplate.
Bug: webrtc:13573
Change-Id: I1f5e47f783a366b2b691e6eec2685b40c60b8cc3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299661
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39731}
2023-03-31 14:59:04 +00:00
Jakob Ivarsson
adfc1601c1 Rewrite NetEq stable delay mode.
The goal is to reduce the amount of time stretching done in response
to network jitter. Specifically, we should be able to “ride” over delay
spikes if the current delay is sufficient, without decelerating
playout. We should also avoid accelerating immediately after a buffer
underrun, until we are reasonably sure that the jitter has passed.
This is achieved by increasing the deadband where we choose to do
normal playout, based on the maximum delay in the short term packet
arrival history.

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

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

Bug: webrtc:13322
Change-Id: I5fba0c9d46d835dbe5401669598fa031512ccced
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299500
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39730}
2023-03-31 14:47:55 +00:00
Danil Chapovalov
3beacb7a87 Create default video factories directly instead of through legacy public helpers
Bug: webrtc:13573
Change-Id: If8ab26dc45cce2dac17572772bb21806a54ed3e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299660
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39729}
2023-03-31 14:43:44 +00:00
philipel
2bac7ef244 Replace BuiltinVideo{Encoder,Decoder}Factory with Video{Encoder,Decoder}FactoryTemplate.
Bug: webrtc:13573
Change-Id: I96e6b41b99909e5636c0044e820107c30d5f135e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299700
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39728}
2023-03-31 14:09:39 +00:00
Per K
e1e94ad4c8 Ensure Call is notified of un demuxable packets
With this cl, packets that are discarded in RtpTransport now notifies Call, so that
they can be part of BWE even if they are dropped.
These packets have been recevied on the transport, and has bin decrypted
and parsed and thus can be accounted for.

The un demuxable packets are forwarded to Call similarly how RTCP packets are forwarded.

Bug: webrtc:14928
Change-Id: Ia53349c7b316c4442a3c7aac085a85ec4f4ab9ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299262
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39727}
2023-03-31 10:33:09 +00:00
Philipp Hancke
49e5587e64 Integrate RTP Header extension API with SDP munging
in order to not regress existing use-cases while following rules
described by the specification. This change now makes the existing
regression test pass after the spec-compliant modifications.

BUG=chromium:1051821

Change-Id: Ia384adf9a172ed88b5ec6a3cc5c478764a686cb9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299002
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39726}
2023-03-31 10:08:39 +00:00
Tommi
80558f49fa Update SctpDataChannelTest suite to include the proxy.
The tests now have two ways of addressing the channel under test:
* channel_: All SctpDataChannelTest methods. This way calls get
  executed as specified by the proxy and more accurately reflects
  production.
* inner_channel: For SctpDataChannel methods that are not a part of
  the SctpDataChannelTest interface. Use this to invoke event handlers
  etc.

Upcoming changes will include threading changes and changes to the
proxy, so it's important to cover both.

Bug: webrtc:11547
Change-Id: I26c284ece82b9a58e2b5dc4468d124d54012d959
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299264
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39725}
2023-03-31 09:56:30 +00:00
Tommi
1158bde7c2 [SctpDataChannel] Add a copy of the sid for the network thread.
* Rename id_ -> id_s_, add id_n_ and thread guards.
* Same for getters, sid() -> sid_s(), add sid_n()

As more things migrate over to the network thread, we'll only need the
_n variant.

Bug: webrtc:11547
Change-Id: Ic998330f4c81b0f6833967631ac70edc2ca2301c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299141
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39724}
2023-03-31 07:14:39 +00:00
webrtc-version-updater
c888db24a4 Update WebRTC code version (2023-03-31T04:01:43).
Bug: None
Change-Id: Ia30943c043e7c381b1b44cac2e5eff88d1d45ab7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299580
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@{#39723}
2023-03-31 06:00:40 +00:00
Sergey Silkin
910b225d82 Fetch encoded QP from MediaCodec encoders
It is a part of "encoding statistics" feature [1] available in Android SDK 33. Local testing revealed that for HW VP8/9 encoders we get QP in range [0,64] which is not what WebRTC quality scaler expects. Exclude VP8/9 encoders for now.

[1] https://developer.android.com/reference/android/media/MediaFormat#VIDEO_ENCODING_STATISTICS_LEVEL_1

Bug: webrtc:15015
Change-Id: I8af2fd96afb34e18cb3e2cc3562b10149324c16e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298306
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39722}
2023-03-30 10:19:22 +00:00
Tommi
77158ace75 DataChannelController: Rename HasDataChannels->HasDataChannelsForTest
The reason is that:
* SDP/PeerConnection code should use HasUsedDataChannels() instead.
* HasDataChannels() touches the list of data channels on the signaling
  thread, which will be a problem when it's moved to the network
  thread.
* It's only needed by tests.

Bug: webrtc:11547
Change-Id: Idd47365c429e5f1d6e3812cf558c4e6fefbf733c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299481
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39721}
2023-03-30 09:47:54 +00:00
Tommi
91160efca4 Call HasUsedDataChannels() instead of HasDataChannels.
...when checking if negotiation is needed.

I noticed this call site after we recently updated PeerConnection here:
https://webrtc-review.googlesource.com/c/src/+/297860

Bug: chromium:1423562
Change-Id: Id37c938d731eadfccff44c95ef757a3cabd64936
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299480
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39720}
2023-03-30 00:53:19 +00:00
Tommi
4f7ade5c58 Create SctpDataChannel objects on the network thread.
* Change data channel creation code to return RTCError for more
  detailed/accurate errors.
* Move DataChannelController::sid_allocator_ to the network thread.
* Add a temporary duplicate vector of channels on the network thread.
  This will eventually be the main vector.
* Delete one test that turns out to be racy (as long as we're using
  both the signaling and network threads).

Bug: webrtc:11547, webrtc:12796
Change-Id: I93ab721a09872d075046a907df60e8aee4263371
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298624
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39719}
2023-03-29 20:27:54 +00:00