Commit Graph

36455 Commits

Author SHA1 Message Date
e1223747c2 wayland: Add a common interface for screencast and remote desktop portal
Change adapts the `base_capturer_pipewire` so that a portal can be
injected in the capturer. This allows the remoting to inject its
own portal for the purpose of capturing desktop stream as long
as the injected portal provides implementation of the new interface
that is added as part of this change.

Additionally, a method has been exposed on the capturer to get
details about the portal session so that the remoting
implementation can use the same underlying session for controlling
inputs on the remote host.

Finally, desktop capturer interface is extended with a generic
method `GetMetadata` that is used to retrieve session related
information by CRD and relay it over to its input injector. Clients
provide override for the method and it eventually invokes the
underlying `GetSessionDetails` method on the portal instance.

Bug: chromium:1291247
Change-Id: I81b7ce3b949d8be2e24e2d303d5fbc76a849209c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256400
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Salman Malik <salmanmalik@google.com>
Cr-Commit-Position: refs/heads/main@{#36323}
2022-03-24 17:53:53 +00:00
ed4a5763f8 Migrate parameterized tests to the standard parameterized runner
The only caveat is that a name attribute for the `@Parameters`
annotation is required, as otherwise the test infrastructure
doesn’t find test results.

Bug: webrtc:13662
Change-Id: Ib3e2a6671d1045b0e19746ce78dd434fbee78b87
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256462
Reviewed-by: Linus Nilsson <lnilsson@webrtc.org>
Auto-Submit: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36322}
2022-03-24 15:38:53 +00:00
75e19ed421 Roll chromium_revision 464bf1c171..2bacc42b75 (984608:984803)
Change log: 464bf1c171..2bacc42b75
Full diff: 464bf1c171..2bacc42b75

Changed dependencies
* src/base: 757ea78481..0f8f0209a3
* src/build: 57b3452d26..e8430f658c
* src/ios: d11e422ea6..905cc78523
* src/testing: 03bf7a8890..c5694d8fc1
* src/third_party: c9246c6fc4..6fed3b9b4f
* src/third_party/depot_tools: 4de5deacd4..62396c5a83
* src/third_party/googletest/src: 0affd45b62..af29db7ec2
* src/third_party/perfetto: ae44ad76bd..a8f0cd2c06
* src/tools: 772716903d..201492c4b5
* src/tools/luci-go: git_revision:cb424e70e75136736a86359ef070aa96425fe7a3..git_revision:6da0608e4fa8a3c6d1fa4f855485c0038b05bf72
* src/tools/luci-go: git_revision:cb424e70e75136736a86359ef070aa96425fe7a3..git_revision:6da0608e4fa8a3c6d1fa4f855485c0038b05bf72
DEPS diff: 464bf1c171..2bacc42b75/DEPS

No update to Clang.

BUG=None

Change-Id: I1e16f0bba8f18e7ceb90689818821b67a06efd78
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256700
Bot-Commit: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: Christoffer Jansson <jansson@google.com>
Cr-Commit-Position: refs/heads/main@{#36321}
2022-03-24 14:53:33 +00:00
824d8b0263 Don't Prune a to-be-deleted connection object
Bug: webrtc:13865
Change-Id: I87c18c8a1dfc0284bef1e721a56ad61ab89dc1c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256680
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36320}
2022-03-24 14:29:03 +00:00
5ab4102233 Exclude partition_allocator header check
This will unblock the roll

Bug: b/226557854
Change-Id: I7f5c5b6385e91bf55c5c39fa63ebb8b55c639734
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256681
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@google.com>
Cr-Commit-Position: refs/heads/main@{#36319}
2022-03-24 14:05:23 +00:00
a6fcbb1830 Use a standard Androidx test runner instead of the org.chromium one
Bug: webrtc:13662
Change-Id: I7ae28a61ea8f7e578d8aef8e3104f8564f3dd7b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256621
Auto-Submit: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Linus Nilsson <lnilsson@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36318}
2022-03-24 10:49:44 +00:00
dacd31f5e8 Use the default Junit runner and Android’s UI thread rule
Bug: webrtc:13662
Change-Id: Ifc8a81905345093c096066b7a659b943464d38b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256464
Auto-Submit: Xavier Lepaul‎ <xalep@webrtc.org>
Reviewed-by: Linus Nilsson <lnilsson@webrtc.org>
Commit-Queue: Linus Nilsson <lnilsson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36317}
2022-03-24 10:44:23 +00:00
568bc23208 dcsctp: Don't reassemble already received chunks
This is a solution to some problems that have been found locally when
running the fuzzer for a long time. The fuzzer keeps on fuzzing, and has
found a way to trigger a consistency check to fail when a client
intentionally sends different messages - unordered and ordered - using
the same TSNs. As the reassembly queue has different handling of ordered
and unordered chunks due to how they are reassembled, it will not notice
if it receives two different chunks with the same TSN. They will both go
to their respective reassembly streams, as those are separate by design.

The data tracker - which keeps track of all received DATA chunks as it
needs to generate SACKs, has a global understanding of all received
chunks. By having it indicate if this is a duplicate received chunk, the
socket can avoid forwarding both chunks to the reassembly queue; only
one chunk will get there.

Bug: None
Change-Id: I602a8552a9a4c853684fcf105309ec3d8073f2c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256110
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36316}
2022-03-24 10:39:03 +00:00
0c28820dcd Fix FRAME delimiter is not handled properly in yuv/y4m reader
Note that sdk/android/api/org/webrtc/FileVideoCapturer.java is handling
correctly.

Bug: None
Change-Id: I3a9783d75bd0a4b3a454b87a01039154200c4d29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256581
Auto-Submit: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36315}
2022-03-24 10:14:17 +00:00
6a15e3ba5c Remove deprecated heavy_metrics_computation_enabled
Bug: None
Change-Id: Ieaccca83559d0f17b394c2c9bbc8d52acbaebcdb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256601
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36314}
2022-03-24 09:39:13 +00:00
195b0a9849 Modernize TimestampExtrapolator to use correct units
* Add unit tests
* Use TimestampUnwrapper
* Follow style guide

Change-Id: I057b05faba0aeafb2830a45007474be0eca1c6e0
Bug: webrtc:13756
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256261
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36313}
2022-03-24 09:36:43 +00:00
ccc9d979a5 Add checks for a null msg_queue_ to VirtualSocketServer.
The Thread class internally (`Thread::DoDestroy`) makes this call:
  ss_->SetMessageQueue(nullptr);

Which sets the `msg_queue_` member variable of VirtualSocketServer
to nullptr. VSS checks for this in several places, but not all. In
particular `CancelConnects()` does handle it, but Disconnect(), which
is called from the same place (VirtualSocket::Close()), is missing
this check.

This CL adds some DCHECKs to catch when a pointer might be nullptr
and also avoids dereferencing a potential nullptr deref during teardown
if `Disconnect` is called, e.g. from within `VirtualSocket::Close()`
which is called from the dtor of `VirtualSocket`.

Bug: webrtc:13864
Change-Id: I717a0f033ebf70b1f59338680957723a77ccf4ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256600
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36312}
2022-03-24 08:18:43 +00:00
b6b34fc213 Add weighted PSNR-YUV from Ohm2012 to PC test framework.
This metric weights the PSNRs of luma and chroma planes in
a slightly smarter way than our current PSNR metric.

> J. Ohm, G. J. Sullivan, H. Schwarz, T. K. Tan and T. Wiegand,
> "Comparison of the Coding Efficiency of Video Coding Standards—Including
> High Efficiency Video Coding (HEVC)," in IEEE Transactions on Circuits and
> Systems for Video Technology, vol. 22, no. 12, pp. 1669-1684, Dec. 2012
> doi: 10.1109/TCSVT.2012.2221192.

Bug: None
Change-Id: Iec105e0b491628fc0ad4be9155b991203846ad1b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256463
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36311}
2022-03-24 07:12:33 +00:00
6c61b90458 Update WebRTC code version (2022-03-24T04:09:55).
Bug: None
Change-Id: Ie69631a4fe14b83c62971ecd7a2b1f4da27f7d10
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256544
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@{#36310}
2022-03-24 05:24:42 +00:00
5f1fd1b137 Roll chromium_revision 351d363e43..464bf1c171 (984486:984608)
Change log: 351d363e43..464bf1c171
Full diff: 351d363e43..464bf1c171

Changed dependencies
* src/build: 06d68454b6..57b3452d26
* src/ios: 96749f818a..d11e422ea6
* src/testing: 84761dcaa0..03bf7a8890
* src/third_party: ff3b8cfc75..c9246c6fc4
* src/third_party/depot_tools: e7eb3eb81a..4de5deacd4
* src/third_party/perfetto: ab32c07962..ae44ad76bd
* src/tools: eea907b99a..772716903d
DEPS diff: 351d363e43..464bf1c171/DEPS

No update to Clang.

BUG=None

Change-Id: I20cb3b5e635b7615f439f3bc9d1707d931885562
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256541
Bot-Commit: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#36309}
2022-03-24 00:31:53 +00:00
b9c636506b Roll chromium_revision e391064aa9..351d363e43 (984363:984486)
Change log: e391064aa9..351d363e43
Full diff: e391064aa9..351d363e43

Changed dependencies
* src/base: 2cb3acd739..757ea78481
* src/build: 5aa939d269..06d68454b6
* src/buildtools/third_party/libunwind/trunk: d1c7f92b8b..0662c09a82
* src/ios: 0ce3fc7530..96749f818a
* src/testing: 5f4d7cb097..84761dcaa0
* src/third_party: 0f4367b186..ff3b8cfc75
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/96e1fe8c33..72a759f779
* src/third_party/perfetto: 30a70afa95..ab32c07962
* src/tools: 0c850287ed..eea907b99a
DEPS diff: e391064aa9..351d363e43/DEPS

No update to Clang.

BUG=None

Change-Id: Iaa70dc01b8bc18b26bb07f5d0f585f4039b4bb67
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256520
Bot-Commit: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#36308}
2022-03-23 20:43:22 +00:00
96544b72eb PipeWire capturer: split some PipeWire code that can be reused
This is code that will be used to write tests and that makes sense to be
moved out and used somewhere else.

Bug: webrtc:13429
Change-Id: I2dd8f3111fdc9e6fa121c1e18644cbcf340b584e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256009
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#36307}
2022-03-23 16:48:02 +00:00
1bcdafca0e Reland of remove NV12 to I420 conversion in webrtc AV1 Encoder.
libaom supports for NV12 inputs for encoding av1 stream. It will reduce
unnecessary conversion from NV12 to I420 format.
(https://bugs.chromium.org/p/aomedia/issues/detail?id=3232&q=3232&can=2)

Original CL reviewed at https://webrtc-review.googlesource.com/c/src/+/251920

Bug: webrtc:13746
Change-Id: I96cc99674f315518d98355cb90566e78bead3e55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254340
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36306}
2022-03-23 16:33:32 +00:00
e7985a491d Roll chromium_revision a697245f3d..e391064aa9 (984227:984363)
Change log: a697245f3d..e391064aa9
Full diff: a697245f3d..e391064aa9

Changed dependencies
* src/base: d07854bae7..2cb3acd739
* src/build: 8ae687514c..5aa939d269
* src/ios: af28cc6c8b..0ce3fc7530
* src/testing: 46f39ff7fc..5f4d7cb097
* src/third_party: 5ad0921fc7..0f4367b186
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/180b8d540d..96e1fe8c33
* src/third_party/perfetto: 5731615c4b..30a70afa95
* src/tools: b5911e5f6e..0c850287ed
DEPS diff: a697245f3d..e391064aa9/DEPS

No update to Clang.

BUG=None

Change-Id: I1176cbe2357a815c657eae8165dc2f685ab7cb7a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256502
Bot-Commit: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#36305}
2022-03-23 16:30:22 +00:00
50f4ae1522 Pace at max of BWE and lower link capacity only when loss based estimate is not less than delay based estimate.
It is hard to add an unit test for this change, because OnTransportPacketsFeedback is the way to change the loss based estimate, and it also changes the lower link capacity.

Thus we cannot track the two values without making changes in goog_cc, which seem to be unecessary.

Bug: none
Change-Id: I689ef52c4440c9bc2ff30f88b9cda96a90b0b64e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256368
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36304}
2022-03-23 13:48:42 +00:00
a2219e22d2 Use acked bitrate only when network is overusing.
Bug: webrtc:12707
Change-Id: I9a263ec60f07cfd03eed0374c730c87e20014d65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256113
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36303}
2022-03-23 13:35:32 +00:00
c62dcc951d Reland "Avoid using lld when compiling iin iOS with bitcode"
This is a reland of commit b7ba6027659913883af3d64ec0fdfcba96176816

Original change's description:
> Avoid using lld when compiling iin iOS with bitcode
>
> The resulting framework's LLVM __bundle segment is empty otherwise.
>
> Bug: webrtc:13774
> Change-Id: I235a3005f8e0d68168f29108be0f7c5b7914182b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253140
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36178}

Bug: webrtc:13774
Change-Id: Ia88b26d91bf1cf7323d04f024155ecf394498c41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256481
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36302}
2022-03-23 13:21:02 +00:00
0e5e647efb Upgrade xcode version to 13c100.
This is a minor change to see if the config from the 'main' branch is used.

Bug: chromium:1159728
Change-Id: Id9d1959b9c581712488e822e971f3c3667e0e06e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256480
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#36301}
2022-03-23 10:53:34 +00:00
d7fdb95346 Remove typing detection
Motivation: never used.
Follow-up CL of https://webrtc-review.googlesource.com/c/src/+/250680.

Tested on a custom chromium build by making a video call and with
keyboard activity. The expected logs from the APM transient suppressor
sub-module were shown.

Bug: webrtc:11226
Change-Id: I4186994412dd8ba2e71ed8f9dcc9cf8f8e40fbd3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250667
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36300}
2022-03-23 10:23:54 +00:00
2756ace4ce Roll chromium_revision cd60f7c147..a697245f3d (983336:984227)
Change log: cd60f7c147..a697245f3d
Full diff: cd60f7c147..a697245f3d

Changed dependencies
* src/base: 62ab5ed470..d07854bae7
* src/build: 0a7d5e2362..8ae687514c
* src/buildtools: d8c375426d..e1471b21ee
* src/buildtools/third_party/libc++abi/trunk: 93b8dcd57b..edde7bbc40
* src/ios: f05ae3297c..af28cc6c8b
* src/testing: e6c44c92f4..46f39ff7fc
* src/third_party: 9581bbe809..5ad0921fc7
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/54219055fc..180b8d540d
* src/third_party/depot_tools: f0bc2d2404..e7eb3eb81a
* src/third_party/googletest/src: b007c54f29..0affd45b62
* src/third_party/libvpx/source/libvpx: df0d06de6d..bf672f23a5
* src/third_party/perfetto: 723b273d39..5731615c4b
* src/third_party/turbine: Go9J3Mz5ankZAgxmn5GxeXKdEDV73zaZp2ojNfGC1RQC..yMO-x5RrhSksWmdTW_uQczi0PrHWCEfIyOkqwdFLExoC
* src/tools: a49530481c..b5911e5f6e
DEPS diff: cd60f7c147..a697245f3d/DEPS

No update to Clang.

BUG=None

Change-Id: If1b2148ca4fa04e96316b62f6921e2773352f3a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256440
Reviewed-by: Christoffer Jansson <jansson@google.com>
Owners-Override: Christoffer Jansson <jansson@google.com>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Christoffer Jansson <jansson@google.com>
Cr-Commit-Position: refs/heads/main@{#36299}
2022-03-23 10:05:24 +00:00
a76ae851ad Run instrumentation tests with the default runner
This migrates all tests that work by just changing their runner.

This excludes tests using `@RunWith(ParameterizedRunner.class)`, and a
few other non-parameterized tests that fail with the default runner.

Bug: webrtc:13662
Change-Id: Ia0b7c80e04a6a6b7a51348b3a7f587d10061b58e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256367
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Xavier Lepaul‎ <xalep@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36298}
2022-03-23 10:01:04 +00:00
e7d7497e34 Split Mac clang format + use py3 for all clang-format OS's
No-Try: True
Bug: b/226298805
Change-Id: Iebd074aac1b15feb740a6fdcab122fe66053b2e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256460
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@google.com>
Cr-Commit-Position: refs/heads/main@{#36297}
2022-03-23 09:02:26 +00:00
445a750d38 Update WebRTC code version (2022-03-23T04:05:31).
Bug: None
Change-Id: I0bdb52494a01c82bcdc682807f37a4be1e69559b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256425
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@{#36296}
2022-03-23 06:25:33 +00:00
56b836d958 Ensure there is a unique FrameQueue for each DxgiOutputDuplicator
DxgiOutputDuplicator objects hold a reference to the last frame that
they succesfully captured by maintaining a reference to the
SharedDesktopFrame that was passed as their target. This is done because
the DirectX capture APIs may fail to provide an update if there has been
no (or no substantial) change since the last capture call was made.
However, the higher levels of this capture stack
(DxgiDuplicatorController and ScreenCapturerWinDirectX), were unaware of
this, and assumed that the caller of CaptureFrame is the only one who
may have held a reference to the frame. Thus, when CaptureFrame is
called, the DirectX screen capturer assumes that the oldest frame in its
queue can be safely reused.

In the steady state, where capture is not being switched between
monitors, this is fine as there are no competing DxgiOutputDuplicators
being run and this assumption mostly holds true (or the frame is being
overwritten only when the DxgiOutputDuplicator is also done holding it).
However, when capture is being rapidly switched between multiple targets
(e.g. to show a preview of each of the available monitors), this can
result in a frame being held by one DxgiOutputDuplicator being passed to
another as a valid target and overwritten. In the common case of only a
single monitor this is essentially the same as steady state capture,
where there are no competing DxgiOutputDuplicator. In the other common
case of two monitors being captured, the fact that the
ScreenCaptureFrameQueue has two frames ends up masking this issue. Since
each monitor is captured in the same order, the same frame ends up
getting passed to each DxgiOutputDuplicator, so no data actually ends
up getting overwritten. In the case of 3 monitors, the 1st and 3rd
monitor end up sharing a frame, which when capture fails on one of them
surfaces as the other monitor being duplicately shown.

This change addresses the issue by ensuring that each screen that the
ScreenCapturerWinDirectX *actually attempts* to capture, gets it's own
FrameQueue, and thus essentially brings us back to the "steady state"
case for each monitor. Note that this does increase memory usage of
capturers that are switched between multiple targets by 2 frames/target
used (and actually attempted to be captured).

Alternatives considered:
DxgiOutputDuplicator makes a copy of the frame, rather than holding
a reference
  This was rejected because adding an additional copy for every
  capture upon getting a new frame, would expensive and could degrade
  performance.

Allow the DxgiOutputDuplicators to "fail" when there has been no update
  This would result in either a breaking change to the API for consumers
  or would require the ScreenCapturerWinDirectX to track these last
  captured frames; which would result in essentially the same approach,
  but with less abstraction for re-using the frames.

Bug: chromium:1296228
Change-Id: I5442ec40e9f234046010b562b258db63693ccc6b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256043
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#36295}
2022-03-22 16:53:53 +00:00
d7f9550647 Fix interaction between ScopedkeyValueConfig and global field trials string
This patch fixes a problem for test programs that mix usage of
ScopedKeyValueConfig and the global field trial string.

In this case, tests that were using CallTest.

The solution is to check the global string when nothing has been explicitly added to a ScopedKeyValueConfig.

Bug: webrtc:13828
Change-Id: Ib89735670cfe93340ca0a8bac53f8a64a600ad66
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256366
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36294}
2022-03-22 16:40:33 +00:00
8f1159b518 [cleanup] Remove VCMTiming::get_min/max_playout_delay
These methods were only used for testing.

Change-Id: Icbb6a3cc59cbc0b5e1f42efcb86a7203704b92d8
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256362
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36293}
2022-03-22 15:38:23 +00:00
92e89d7f77 [cleanup] Return struct from VCMTiming::GetTimings
Cleans callers having to initialize TimeDeltas.

Change-Id: Ib00a59bedf05fb82c9fde1d9fdd1e341e2132cb8
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256360
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36292}
2022-03-22 15:15:13 +00:00
6ceb81f62b Clean up SimpleStringBuilder after absl::string_view adoption
Bug: webrtc:13579
Change-Id: I8fdc65e19893c9a96b263bbc99c4f9139fa4b78f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256268
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36291}
2022-03-22 14:33:14 +00:00
ed3832b89f Make sure OnChanged() notifications are handled, post construction.
If an instance of AudioRtpReceiver was initialized with a valid media
channel pointer (i.e. SetMediaChannel() was not being called), then
OnChanged() notification would not be handled correctly.

This fixes the issue by making sure the safety flag is marked as
'alive' when [re]starting the media channel.

Bug: webrtc:13854
Fixes: webrtc:13854
Change-Id: Iaa5cfeb4036bfc9dc2efbfa9e1319d508ab151a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256361
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36290}
2022-03-22 14:04:04 +00:00
6dbc1723f1 [cleanup] Prefer VCMTiming unique_ptr in VideoReceiveStream2 c'tor
Change-Id: Ifc2667ef9da38563266fb5ca7800ec757464035e
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256363
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36289}
2022-03-22 13:15:33 +00:00
04c881683d Switch to absl::string_view in field_trial::FindFullName()
Bug: webrtc:13579
Change-Id: Iaaea42957afb4af66ad5eea6447e75dddc13b5ea
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256263
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Ali Tofigh <alito@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36288}
2022-03-22 10:35:15 +00:00
2b168062d6 Update WebRTC code version (2022-03-22T04:02:08).
Bug: None
Change-Id: I5732b1ca0e5266952f5d33f9a7257236586c7c79
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256217
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@{#36287}
2022-03-22 05:51:13 +00:00
44ff88dd04 DXGI capturer hangs when changing resolution in detached sessions
This CL addresses an issue where the desktop appears to freeze after
resizing the desktop in a curtained CRD session when using the DXGI
capturer. This problem does not reproduce when using the GDI capturer
nor does it reproduce when the Windows session is attached to the local
console.

After digging in, it appears that the DXGI DuplicateOutput API stops
providing updated frame data. No errors are returned but yet no data is
produced. The problem is that when in this condition, there isn't a
good way to discern between this problem and a case where the desktop
is actually static.

The DxgiDuplicatorController already contains logic to attempt to
capture a frame prior to returning success after reinitialization.  This
logic works fine in the console case and occasionally works in the
detached session case. What I noticed in my reproductions was that DXGI
would produce a few frames before hanging (usually 1-2 but sometimes 3
or 4).  My solution is to check the session state and adjust the number
of frames we attempt to capture (I also simplified the wait logic as
there was a bug in the time calc and it seemed more complicated than it
needed to be).

One option considered would be to introduced a new differ class higher
up in the stack which would run the GDI and DXGI capturers in parallel
(instead of in the fallback configuration as they are today) however
that seemed like overkill for this specific issue.

Bug: chromium:1307357
Change-Id: Idba4bb9b2aa7692040344d480be3f0d09b9ce9e9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256214
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@google.com>
Commit-Queue: Joe Downing <joedow@google.com>
Cr-Commit-Position: refs/heads/main@{#36286}
2022-03-21 23:49:03 +00:00
608f9a5489 screencast_portal: Allow hooks to adapt behavior for remote desktop
Change adds callbacks to the class so that the remote desktop portal can
still make use of this class for selecting sources but can provide its
own implementation on what to do after the sources are selected.
Furthermore, few getters are exposed in the class interface so as to
allow the remote desktop portal class to leverage them when sending the
captured pipewire frames onto the capture stream's consumer. Setters are
added for session, pipewire stream node id and few interfaces are made
public since remote desktop portal relies on them (e.g.
`SelectSources`).

The reason behind the change is that remote desktop portal depends on
screen cast portal for selecting sources. Also the setup to select
devices to control remotely as well as source selection should be
handled as part of the same session (and session should be
instantiated only once).

Currently, starting the screencast portal calls into a callback chain
that not only selects the sources but also starts the session but with
this change a consumer, such as remote desktop portal, can hook into
this callback chain by overriding the callbacks and provide a custom
callback chain from there onwards, if need be.

Bug: chromium:1291247
Change-Id: I983aff062ec2ddf52fdef5545fc58fede416e6ed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249862
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Salman Malik <salmanmalik@google.com>
Cr-Commit-Position: refs/heads/main@{#36285}
2022-03-21 21:12:52 +00:00
19a6e9438b Expose RTCSSLCertificateVerifier from iOS SDK.
Bug: webrtc:11710
Change-Id: I825c6350a71b2ff180520f8643cbd4d6febdc883
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254821
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/main@{#36284}
2022-03-21 17:24:12 +00:00
df59e53818 Reland "Pacer: Reduce TQ wake up and improve packet size estimation"
Update `early_execute_margin` after process packets, and the test case.

Original change's description:
>Pacer: Reduce TQ wake up and improve packet size estimation
>
>The TQ Pacer schedules delayed task according to target time of
>PacingController. It drains all valid ProcessPackets() in single loop,
>denies retired scheduled tasks, and round up the timeout to 1ms.
>
>This CL also improves packet size estimation in TQ Pacer by removing
>zero initialization, and introduces `include_overhead_` configuration.
>
>Tests:
>1. webrtc_perf_tests: MaybeProcessPackets() calls
>  2075147 -> 2007995
>
>2. module_unittests: MaybeProcessPackets() calls
>  203393 -> 183563
>
>3. peerconnection_unittests: MaybeProcessPackets() calls
>  66713-> 64333
>
>Bug: webrtc:13417, webrtc:13437
>Change-Id: I18eb0a36dbe063c606b1f27014df74a65ebfc486
>Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242962
>Reviewed-by: Erik Språng <sprang@webrtc.org>
>Reviewed-by: Henrik Boström <hbos@webrtc.org>
>Commit-Queue: Erik Språng <sprang@webrtc.org>
>Cr-Commit-Position: refs/heads/main@{#36179}

Bug: webrtc:13417, webrtc:13437
Change-Id: I79f2554cf02364b67ce7073698611a3ae337a73b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256145
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Owners-Override: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36283}
2022-03-21 16:41:42 +00:00
98274ee948 Roll chromium_revision 3fdea4fb00..cd60f7c147 (983226:983336)
Change log: 3fdea4fb00..cd60f7c147
Full diff: 3fdea4fb00..cd60f7c147

Changed dependencies
* src/build: 2432cc5556..0a7d5e2362
* src/ios: ae135d284f..f05ae3297c
* src/testing: 47c212f7df..e6c44c92f4
* src/third_party: f6fd5326b8..9581bbe809
* src/third_party/freetype/src: a960be9e5e..fc15ebe0a6
* src/third_party/perfetto: 5f95e72333..723b273d39
* src/tools: 8ec39e2d1b..a49530481c
DEPS diff: 3fdea4fb00..cd60f7c147/DEPS

No update to Clang.

BUG=None

Change-Id: I774058c6a6b9793e69fc66753d2f0209b911d82f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256211
Bot-Commit: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#36282}
2022-03-21 16:36:02 +00:00
9dde120d65 Reject double RefCountedObject inheritance in rtc::make_ref_counted.
Bug: webrtc:12701
Change-Id: Ie45707e3266e6a27cae073f824a1c77707d77000
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256240
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36281}
2022-03-21 16:31:21 +00:00
cf08d33944 Remove deprecated TurnPort::Create() versions
Bug: webrtc:10335
Change-Id: I62eb0534ade2de221bc90c2f6c4f3caa0ac2e91b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256266
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36280}
2022-03-21 16:04:02 +00:00
493718ea47 Make MockRtpTransceiver not inherit from RefCountedObject
Bug: webrtc:12701
Change-Id: Ia43c943cbf96ef7d745dfea79ecca6e52e8bc3b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256104
Reviewed-by: Niels Moller <nisse@webrtc.org>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36279}
2022-03-21 14:09:02 +00:00
94029b812f Remove unused script webrtc_dashboard_upload.py
The script process_perf_results.py is used instead.

Bug: webrtc:13806
Change-Id: I672da41d7264d5f996eef38f1178f486dad968ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256220
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#36278}
2022-03-21 12:54:42 +00:00
769de49937 Update VideoTrack::Create to use rtc::scoped_refptr.
Bug: webrtc:13464
Change-Id: I6508fbede2f447f8c0c9b37556d37e7fc2ccb744
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252441
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36277}
2022-03-21 10:38:52 +00:00
b3517fea83 Remove RefCountedObject dependency from FakeFrameDecryptor
Bug: webrtc:12701
Change-Id: I705007948eed7b8300f02a61307e8f4b3410e666
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256108
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36276}
2022-03-21 09:43:12 +00:00
a9fa92efdb Roll chromium_revision b76e799ccc..3fdea4fb00 (983116:983226)
Change log: b76e799ccc..3fdea4fb00
Full diff: b76e799ccc..3fdea4fb00

Changed dependencies
* src/base: 30c6152ced..62ab5ed470
* src/build: 2a9033b2ea..2432cc5556
* src/ios: d0ddd84c26..ae135d284f
* src/testing: 0f9838ee47..47c212f7df
* src/third_party: a3946cc010..f6fd5326b8
* src/third_party/depot_tools: fbb927599f..f0bc2d2404
* src/third_party/freetype/src: d2c3bbcd8e..a960be9e5e
* src/tools: 25fb123606..8ec39e2d1b
* src/tools/resultdb: git_revision:735a8a662d3874d8b1d795a40e46ea0f57b52758..git_revision:6cc18e2763e180929d70c786b419c1f8e6bcc66c
DEPS diff: b76e799ccc..3fdea4fb00/DEPS

No update to Clang.

BUG=None

Change-Id: Iaba181b0a0088e9e388c5371ab676ef294c23580
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256207
Bot-Commit: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Commit-Queue: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#36275}
2022-03-21 08:51:04 +00:00
f11a04d0f5 remove all but 2 redundant factory methods in TurnPort
and those will be fixed after I fixed downstream.

Bug: webrtc:10335
Change-Id: Ie824b422b4240fbcdb5d7ee40ae9be91655abae7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256111
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36274}
2022-03-21 08:12:22 +00:00