Commit graph

237 commits

Author SHA1 Message Date
Hanna Silen
90c430cda4 AudioProcessingImpl: Remove the use of transient suppressor
Remove the use of transient suppression, i.e.:
 - Transient suppressor submodule (ignore the config),
 - WebRTC-TransientSuppressorForcedOff fieldtrial,
 - Voice activity detection submodule (use AGC2/AGC VAD instead),
 - Submodule overrides, and
 - WEBRTC_EXCLUDE_TRANSIENT_SUPPRESSOR macro.

Bug: webrtc:7494, webrtc:13663, webrtc:357281131
Change-Id: I7edb46c7ff048992ac5a10473800405bad268895
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355880
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Hanna Silen <silen@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42724}
2024-08-05 12:38:37 +00:00
Mirko Bonadei
9ebf0921ea Remove RTC_JNI_GENERATOR_LEGACY_SYMBOLS.
Bug: b/325408567
Change-Id: I4bd5fbe7cecdfd3fcce8da352ce30eeb0f5b6dd7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356780
Reviewed-by: Zoé Lepaul <xalep@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#42615}
2024-07-10 06:47:39 +00:00
Jan Grulich
0f862520dc Video encoding: allow to use system OpenH264
OpenH264 cannot be usually used everywhere as it's proprietary and for
that reason it's usually disabled or apps using it are not allowed to be
available in default installations. Using system OpenH264  option allows
us to use e.g. noopenH264, that can be present in default installations
and later replaced by OpenH264 installed from 3rd party repository.

Bug: webrtc:14717
Change-Id: I015aacdb48c0636935f611459f0c9a6aa74a8f94
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349301
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Jan Grulich <grulja@gmail.com>
Cr-Commit-Position: refs/heads/main@{#42509}
2024-06-18 13:39:21 +00:00
Per K
49c860fd61 Remove BWE logging functionality
BWE logging has as far as I know know been used for a long time. RTC event logs are the prefered method of logging.
Removed since it causes some BUILD pain.

For debugging  the metrics API https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/api/test/metrics/ can be used instead.

Bug: webrtc:343347276
Change-Id: I046b58d880faabfadbc22269b0392fdd644155fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352602
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42402}
2024-05-29 12:18:44 +00:00
Florent Castelli
ae5d50320d Deprecate absl_deps in templates and update documentation.
Bug: webrtc:341803749
Change-Id: I1ea6a2160c9a1d6d15a4f5e83f37d53f42215746
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352200
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42382}
2024-05-27 12:49:03 +00:00
Florent Castelli
3ffa0e8b6f gn: Remove the need for absl_deps
Abseil deps are automatically filtered and replaced by the catch-all
Abseil dependency when built within Chromium. This removes the need to
have special handling for Abseil dependencies in our rules and facilitates
tooling.

Bug: webrtc:341803749
Change-Id: I07425e85d9eeccb66ad423fb1db8b59527a0956a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351003
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42365}
2024-05-22 13:32:41 +00:00
Evan Shrubsole
fa870371b0 Always use Perfetto when build_with_chromium
Bug: b/336718643
Change-Id: I64ff6babbaa8e9dabd8c877c52b23ec49a77624c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349583
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Reviewed-by: Mikhail Khokhlov <khokhlov@google.com>
Cr-Commit-Position: refs/heads/main@{#42209}
2024-05-02 14:03:06 +00:00
Byoungchan Lee
1ce9a171b9 Generate privacy manifest when creating Apple Framework
Bug: webrtc:42226059
Change-Id: I4427346b2340c6fafcaf9934ee462582dfa83fc5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349440
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42198}
2024-04-30 10:49:08 +00:00
Evan Shrubsole
cd09858f4a Convert decoder TRACE_EVENT to flows
This is the first new style trace event so this CL adds and updates
WebRTCs Perfetto configuration.

* Changes all #includes to target "third_party/perfetto". Added this
to DEPS.
* Expose the Perfetto public config in the "tracing" group using
an all_dependent_configs statement. This means the config is included
in all parts that include the "//:tracing" group. However, direct
perfetto includes are banned per DEPS.
* In order to expose Perfetto types (ie Flow/TerminatingFlow) the
perfetto headers are a dependancy on all targets. This should not
affect binary size as these are not used when perfetto is not enabled
and will not be linked.

Bug: b/42226290
Change-Id: I5711d81dae95ee907cbcd41bf1ee9b55d2ec595c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349161
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/main@{#42197}
2024-04-30 08:47:29 +00:00
Evan Shrubsole
047238ebda WebRTC perfetto chromium integration
Bug: webrtc:15917
Change-Id: I2a459565364e0eedba8d22c23427409b35ba8387
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348780
Reviewed-by: Mikhail Khokhlov <khokhlov@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/main@{#42192}
2024-04-29 12:12:48 +00:00
Evan Shrubsole
db50b03553 Add perfetto build config
This adds Perfetto support to WebRTC with a GN flag rtc_use_perfetto.
The configuration of perfetto depends on whether or not webrtc is
build within Chrome or not. When in Chrome, WebRTC will depend on
//third_party/perfetto:libperfetto. When building standalone, specific includes required for Perfetto are exposed with the library webrtc_libperfetto.

The perfetto trace API is exposed with a header export in
trace_event.h which is used instead of the legacy API.

The addition of Perfetto means there are 4 compilation modes for
tracing in WebRTC,
1. No tracing implementation.
2. Legacy tracing (AddTraceEvent/GetCategoryEnabled).
3.a. Perfetto statically linked (webrtc_libperfetto).
3.b. Perfetto in Chrome (Chrome's libperfetto).

This CL removes the tracing expectations from
rtc_stats_integrationtest.cc because those directly used the old API.

Integration into Chrome is a follow up CL which depends on
https://chromium-review.googlesource.com/c/chromium/src/+/5471691.

Tested: Ran Chrome with Perfetto and traces appear. WebRTC Unit test tracing working: https://ui.perfetto.dev/#!?s=04ea2613ea36b814394639a1ec4b60be5b5097527f1a485995ecc13469885468
Bug: webrtc:15917
Change-Id: I537d79dc247c2b759689910c621087286a4d8fdc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347880
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@google.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mikhail Khokhlov <khokhlov@google.com>
Cr-Commit-Position: refs/heads/main@{#42166}
2024-04-24 20:53:23 +00:00
Mirko Bonadei
e3b42636f3 Set rtc_use_h265 to enable_hevc_parser_and_hw_decoder in Chromium builds
Bug: None
Change-Id: If7cfb365363bae756f4099d952b588711f3ae672
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344682
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41973}
2024-03-27 13:33:11 +00:00
Danil Chapovalov
9fdceb80b5 Add environment_construction poison
This poison guards against accidental use of EnvironmentFactory and thus ensures low level WebRTC class would use utilities from propagated environment instead of accidentally using a default implementation.

This poison extends and thus replaces default task queue poison.

Bug: webrtc:15656
Change-Id: I577bef8af08b9c7dd649ad5a2284eb236e6f4a8f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328380
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41247}
2023-11-27 11:44:50 +00:00
Sam Zackrisson
2e1f16d55c Make AEC3 json parsing code testonly
Reasons:
- the code is no longer used in Chrome
- it is conceptually weird for WebRTC to have JSON parsing in its API
- there are concerns around the reliability of the underlying JSON library

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

Bug: webrtc:1493351
Change-Id: I0b621b0e3f183df7315919d9c89242fbe387928f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325062
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41014}
2023-10-26 12:03:02 +00:00
Arthur Sonzogni
47faf32287 Add rtc_common_public_deps
When built for chromium, some webrtc implementations are overridden and
are implemented by chrome's "//base". For instance webrtc::Location is
implemented by base::Location. So far so good, the affected targets are
correctly defined in GN to depend on base.

The problem: Most targets in webrtc do not declare correctly their
public_deps. When a public header of a target includes one from its
dependency, the dependency must be a public_deps. The public_deps
instruct GN to forward the capability to use code from the dependency
toward the dependent.

Unfortunately, it is not possible to fix the `public_deps` in webrtc,
because its is disallowed via a presubmit. See:
https://webrtc-review.googlesource.com/c/src/+/30262

WebRTC developers decided not to use `public_deps`, because GN config
are "translated" toward different kind of downstream build system who do
not really support the `public` dependencies concept. Instead WebRTC is
using some "common" configuration applied to all of its targets.

This patch add `rtc_common_public_deps` argument, to let embedders
add the dependencies WebRTC depends on.

Bug: chromium:1467773
Change-Id: I7de43372414a09886fcb07905451e6339c8ecc64
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316660
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40595}
2023-08-22 11:32:06 +00:00
qwu16
972f28335a Added HEVC parser for WebRTC
This is part of effort to enable HEVC for WebRTC. Parser added here to support parsing of QP/picture size for bitstream, for dynamic adaptation and stream metadata abstraction.

Bug: webrtc:13485
Change-Id: I2fbdf210e72e77989ca87ce285da174df5bedd5c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298421
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40572}
2023-08-18 17:48:11 +00:00
Mirko Bonadei
2bfa071d09 Add GN flag for an easier JNI generator upgrade.
Bug: b/293234089
Change-Id: I06dca333a806992cbff1b175f1b0875728a9f1fb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315120
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40518}
2023-08-07 11:41:50 +00:00
Christoffer Jansson
fe2e7eaa20 Reland "Add ARC enablement to WebRTC only if it isn't already present"
This reverts commit 787e326c18.

Reason for revert: Downstream fixed

Original change's description:
> Revert "Add ARC enablement to WebRTC only if it isn't already present"
>
> This reverts commit 96137813f7.
>
> Reason for revert: Breaks downstream projects.
>
> Original change's description:
> > Add ARC enablement to WebRTC only if it isn't already present
> >
> > WebRTC unconditionally enables ARC for Objective-C code. Chromium is
> > now enabling this globally, so change WebRTC to only enable it if it's
> > not already enabled.
> >
> > Bug: chromium:733237
> > Change-Id: I0d5694d0640bb79ae83209aa0bdd36e099b85042
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314180
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#40493}
>
> Bug: chromium:733237
> Change-Id: Ifbf79c030262897baec44ba0e67b21d54fcb6f77
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314482
> Owners-Override: Christoffer Jansson <jansson@webrtc.org>
> Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#40496}

Bug: chromium:733237
Change-Id: I47291a4c99ea3a70ea3083f8b9fe44f3ecc6582f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314700
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40498}
2023-08-02 09:41:17 +00:00
Christoffer Jansson
787e326c18 Revert "Add ARC enablement to WebRTC only if it isn't already present"
This reverts commit 96137813f7.

Reason for revert: Breaks downstream projects.

Original change's description:
> Add ARC enablement to WebRTC only if it isn't already present
>
> WebRTC unconditionally enables ARC for Objective-C code. Chromium is
> now enabling this globally, so change WebRTC to only enable it if it's
> not already enabled.
>
> Bug: chromium:733237
> Change-Id: I0d5694d0640bb79ae83209aa0bdd36e099b85042
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314180
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40493}

Bug: chromium:733237
Change-Id: Ifbf79c030262897baec44ba0e67b21d54fcb6f77
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314482
Owners-Override: Christoffer Jansson <jansson@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#40496}
2023-08-01 07:30:29 +00:00
Avi Drissman
96137813f7 Add ARC enablement to WebRTC only if it isn't already present
WebRTC unconditionally enables ARC for Objective-C code. Chromium is
now enabling this globally, so change WebRTC to only enable it if it's
not already enabled.

Bug: chromium:733237
Change-Id: I0d5694d0640bb79ae83209aa0bdd36e099b85042
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314180
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40493}
2023-07-31 11:47:49 +00:00
Mirko Bonadei
9130431b54 Add possibility to set RTC_OBJC_TYPE_PREFIX from GN.
This CL also adds the prefix RTC_TESTING to `ios_internal_pure_release_bot_arm64` in order to avoid ODR
violations.

Bug: b/292472934
Change-Id: If63020e679c8670b4c797217eb38fc8c2954d422
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/313240
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40476}
2023-07-26 12:29:55 +00:00
Kári Tristan Helgason
ba50cb322c Reland "Delete deprecated NSGLVideoView."
This is a reland of commit 54d7547faf

Original change's description:
> Delete deprecated NSGLVideoView.
>
> Bug: b/288827308
> Change-Id: I08f731d893ebc947b7c4db6deb33ed695dcf53b5
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310622
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
> Auto-Submit: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40368}

Bug: b/288827308
Change-Id: Ib6c0972c62a0ca97bd3bb1b8e7b1c11f9fe49725
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310783
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40380}
2023-06-29 15:36:11 +00:00
Mirko Bonadei
ea668e36a9 Revert "Delete deprecated NSGLVideoView."
This reverts commit 54d7547faf.

Reason for revert: Breaks downstream project

Original change's description:
> Delete deprecated NSGLVideoView.
>
> Bug: b/288827308
> Change-Id: I08f731d893ebc947b7c4db6deb33ed695dcf53b5
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310622
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
> Auto-Submit: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40368}

Bug: b/288827308
Change-Id: I4d683c3dc59eaf87f2634284acfddcfea174c8b3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310820
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@{#40370}
2023-06-28 14:47:15 +00:00
Kári Tristan Helgason
54d7547faf Delete deprecated NSGLVideoView.
Bug: b/288827308
Change-Id: I08f731d893ebc947b7c4db6deb33ed695dcf53b5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310622
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Auto-Submit: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40368}
2023-06-28 14:08:24 +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
Peter Kasting
1e6d77c29a Always check out google_benchmark, part 3.
Add a WebRTC-specific arg that can be used to control use of targets
that rely on //third_party/google_benchmarks, so the .gni in that
directory can eventually be removed.

Bug: chromium:1404759
Change-Id: I2a9422fae119ca13eb50028d962fc0a671b5fb33
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297460
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39553}
2023-03-14 12:14:51 +00:00
Emil Lundmark
9109e856d5 Add option to log a warning for unregistered field trials
Until now you only had the option to RTC_DCHECK for unregistered field
trials. This makes it possible to log a warning instead.

Bug: webrtc:14154
Change-Id: I8628054e3c9b5d690f241a93e61299126b732ed0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295300
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39417}
2023-02-28 15:43:18 +00:00
Emil Lundmark
6bf20cc76a Verify field trials looked up through field_trial::FindFullName
For now, the run-time check will only be enabled if the
rtc_strict_field_trials GN arg is set.

In order to allow testing with imaginary field trial keys, two test
helpers have been added. It's a bit awkward to test these since the
field trial string is already global, hence the helpers are also
modifying global state. Tests must make sure this global state is reset
between runs. Things won't be an issue anymore when [1] has removed the
global string.

[1] https://crbug.com/webrtc/10335

Bug: webrtc:14154
Change-Id: Ida44cc817079d7177325e2228cf1f1d242b799e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276269
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38447}
2022-10-20 10:46:01 +00:00
Christoffer Jansson
25e4156e3e Add Fuchsia platform deps
Bug: b/232740856
Change-Id: Ia0c14753262f2d66e2bb2aa794ecf5124a016835
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275520
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38175}
2022-09-23 07:49:47 +00:00
Ryan Keane
cf7802d3f4 [Cast Convergence] Replace is_chromecast with new args
Replace `is_chromecast` with `is_castos` and `is_cast_android` as
appropriate. See linked bug for further context.

Bug: chromium:1219802
Change-Id: If24af59e058940b7259cf4f1d9a3ba2ee0449cdb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265601
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: David Dorwin <ddorwin@google.com>
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
Commit-Queue: Ryan Keane <rwkeane@google.com>
Cr-Commit-Position: refs/heads/main@{#37230}
2022-06-16 00:50:08 +00:00
Björn Terelius
49850c328c Fork test/ios/google_test_runner.mm from Chromium's //base
WebRTC should not depend on Chromium's //base.

Bug: webrtc:13662
Change-Id: I7ce7036c96b26a79de46a519ed24dd660a298433
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260925
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36754}
2022-05-04 11:26:07 +00:00
Björn Terelius
cbf07f70e2 Revert "Fork //base/test/google_test_runner"
This reverts commit 166650ada7.

Reason for revert: Seems to break downstream on-device ios tests.

Original change's description:
> Fork //base/test/google_test_runner
>
> (Used to run gtests on iOS, but we don't want to depend on //base.)
>
> Optimistically try to use the existing partial fork
>
> Bug: webrtc:13402
> Change-Id: I10528670862f2db67e77adb73b8a71b19642666d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260328
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36703}

Bug: webrtc:13402
Change-Id: I5bef679e95693b7a6942375801daf9273d260e1d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260462
Auto-Submit: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
Owners-Override: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#36705}
2022-04-29 11:52:22 +00:00
Björn Terelius
166650ada7 Fork //base/test/google_test_runner
(Used to run gtests on iOS, but we don't want to depend on //base.)

Optimistically try to use the existing partial fork

Bug: webrtc:13402
Change-Id: I10528670862f2db67e77adb73b8a71b19642666d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260328
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36703}
2022-04-29 10:21:42 +00:00
Florent Castelli
87b6e7beff An rtc_library with no source file should be an rtc_source_set
Bug: webrtc:9838
Change-Id: I9b8db581e3e180aff11ffc38b1c9155b2bd3671c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260060
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36687}
2022-04-28 10:03:23 +00:00
Byoungchan Lee
26b23b8fcc Merge GN templates for iOS and MacOS framework creation
The two GN templates are nearly identical, so merge them to reduce
maintenance.

Bug: webrtc:13949
Change-Id: I5f53ade5f9d09ce6f23a6cb29c9d39df4485a237
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258380
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#36495}
2022-04-08 12:10:36 +00:00
Florent Castelli
f2599a7f43 Remove usrsctp, dcSCTP is now the unique SCTP implementation
Bug: chromium:1243702
Change-Id: Id11299d26f0f8713a57781b57277837aace531f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251821
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36423}
2022-04-04 10:30:46 +00:00
Arthur Eubanks
160b37b70f Don't include clang package's libstdc++.so in sanitizer builds
LLVM binaries no longer need libstdc++.so as of https://crrev.com/c/3513603.

Change-Id: I00c18e3d24167a8edda1b0a25a9ef00c0c2bde52
Bug: chromium:1286289
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255641
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36212}
2022-03-16 08:20:43 +00:00
Florent Castelli
023be3c977 Data Channel Benchmarking tool
Create a server using:
./data_channel_benchmark --server --port 12345
Start the flow of data from the server to a client using:
./data_channel_benchmark --port 12345 --transfer_size 100
The throughput is reported on the server console.

The negotiation does not require a 3rd party server and is done over a
gRPC transport. No TURN server is configured, so both peers need to be
reachable using STUN only.

Bug: webrtc:13288
Change-Id: Iac9a96cf390ab465ea45a46bf0b40950c56dfceb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235661
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36206}
2022-03-15 16:18:16 +00:00
Jeremy Leconte
b8ba8c9248 Build //base/test:google_test_runner for iOS device.
It seems the build failure is fixed and it is required so that "testRunGoogleTests" would be invoked as a "xctest".

Bug: b/223364112
Change-Id: I2572af62d14c71e31b751c73a76e9f6e5d064ea8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254682
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#36202}
2022-03-15 09:35:58 +00:00
Jeremy Leconte
d15f3e1220 Prepare the code to run ios tests with the standalone recipe.
The flags isolated-script-test-output and isolated-script-test-perf-output need to be consumed by the tests.

The generated .app folder in added in the data list of the gni file.
This will make it available in the runtime_deps file and thus will be populated to the swarming tasks.

Bug: webrtc:13556
Change-Id: I2c75774b847d9f686c3abc00ba0400bbc3fcefae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/240520
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Christoffer Jansson <jansson@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#36029}
2022-02-18 12:57:42 +00:00
Sam Zackrisson
03cb7e5a61 APM: Make echo detector an optionally compilable and injectable component
Important: This change does not in any way affect echo cancellation or standardized stats. The user audio experience is unchanged. Only non-standard stats are affected. Echo return loss metrics are unchanged. Residual echo likelihood {recent max} will no longer be computed by default.

Important: The echo detector is no longer enabled by default.

API change, PSA: https://groups.google.com/g/discuss-webrtc/c/mJV5cDysBDI/m/7PTPBjVHCgAJ

This CL removes the default usage of the residual echo detector in APM.
It can now only be used via injection and the helper function webrtc::CreateEchoDetector. See how the function audio_processing_unittest.cc:CreateApm() changed, for an example.

The echo detector implementation is marked poisonous, to avoid accidental dependencies.

Some cleanup is done:
- EchoDetector::PackRenderAudioBuffer is declared in one target but is defined in another target. It is not necessary to keep in the API. It is made an implementation detail, and the echo detector input is documented in the API.
- The internal state of APM is large and difficult to track. Submodule pointers that are set permanently on construction are now appropriately marked const.

Tested:
- existing + new unit tests
- audioproc_f is bitexact on a large number of aecdumps

Bug: webrtc:11539
Change-Id: I00cc2ee112fedb06451a533409311605220064d0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/239652
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35550}
2021-12-16 17:39:11 +00:00
philipel
b09d87232b Reland "Add dav1d decoder to WebRTC."
This reverts commit 8498b7e7f6.

Reason for revert: Updating CL to include conditional build flag.

Original change's description:
> Revert "Add dav1d decoder to WebRTC."
>
> This reverts commit 147858577d.
>
> Reason for revert: High binary size increase
>
> Original change's description:
> > Add dav1d decoder to WebRTC.
> >
> > Bug: none
> > Change-Id: I7642f42e592dcf510679f881f118bc4dab93b31c
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237504
> > Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
> > Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> > Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#35394}
>
> TBR=danilchap@webrtc.org,mbonadei@webrtc.org,ilnik@webrtc.org,philipel@webrtc.org,mflodman@webrtc.org,ssilkin@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: I00a8acd6ea94ce523c2d5ba705333c9174678180
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: none
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/238560
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
> Owners-Override: Artem Titov <titovartem@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#35395}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: none
Change-Id: Iff51848731646159e87e075c38af7cb6355f5b5b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/238661
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35409}
2021-11-23 15:59:58 +00:00
Mirko Bonadei
339965f93c Fix typo in comment.
No-Try: True
Bug: None
Change-Id: I97825766301b3a2e133bf168749e65e945dbfc8f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234862
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35188}
2021-10-12 15:10:50 +00:00
Mirko Bonadei
56ed4680c4 Add GN arg to force RTC_DLOG to be ON.
Bug: None
Change-Id: I7f5e80c015157718bb3f1d192b0c14f09f9bf3bf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234840
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35184}
2021-10-12 08:48:22 +00:00
Jan Grulich
e1e05afec7 Reland "PipeWire capturer: implement proper DMA-BUFs support""
This is a reland of f2177f6612

Original change's description:
> PipeWire capturer: implement proper DMA-BUFs support
>
> Currently both KWin (KDE) and Mutter (GNOME) window managers don't
> use DMA-BUFs by default, but only when client asks specifically for
> them (KWin) or when experimental DMA-BUF support is enabled (Mutter).
> While current implementation works just fine on integrated graphics
> cards, it causes issues on dedicated GPUs (AMD and NVidia) where the
> code either crashes or screensharing is slow and unusable.
>
> To fix this, DMA-BUFs has to be opened using OpenGL context and not
> being directly mmaped(). This implementation requires to use DMA-BUF
> modifiers, as they are now mandatory for DMA-BUFs usage.
>
> Documentation for this behavior can be found here:
> https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/doc/dma-buf.dox
>
> Bug: chromium:1233417
> Change-Id: I0cecf16d6bb0f576954b9e8f071cab526f7baf2c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227022
> Commit-Queue: Tommi <tommi@webrtc.org>
> Reviewed-by: Tommi <tommi@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34889}

Bug: chromium:1233417
Change-Id: I308501d86ec18ab6df9bcee569c4b72df7926549
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231180
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35152}
2021-10-06 10:31:51 +00:00
Maksim Sisov
ef4d0b6c7a rename use_x11 to ozone_platform_x11
Ozone is default now in Chromium and non-Ozone/X11 (aka use_x11) is
deprecated. During the transition period use_x11 == ozone_platform_x11.

Bug: chromium:1096425
Change-Id: Ie3643360ec6607796533054bdedf8e2bb8e7e749
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231650
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35040}
2021-09-20 15:13:55 +00:00
Artem Titov
4d6a76d781 Revert "Reland "PipeWire capturer: implement proper DMA-BUFs support"""
This reverts commit 677195d3eb.

Reason for revert: Broke WebRTC to Chrome rolls:
https://crrev.com/c/3141000
example: https://ci.chromium.org/ui/p/chromium/builders/try/linux-rel/790256/overview
The error is similar to the failure on previous attempt to land this CL. See: https://crrev.com/c/3135220, and crash https://ci.chromium.org/ui/p/chromium/builders/try/linux-rel/787945/overview

Original change's description:
> Reland "PipeWire capturer: implement proper DMA-BUFs support""
>
> This is a reland of f2177f6612
>
> Original change's description:
> > PipeWire capturer: implement proper DMA-BUFs support
> >
> > Currently both KWin (KDE) and Mutter (GNOME) window managers don't
> > use DMA-BUFs by default, but only when client asks specifically for
> > them (KWin) or when experimental DMA-BUF support is enabled (Mutter).
> > While current implementation works just fine on integrated graphics
> > cards, it causes issues on dedicated GPUs (AMD and NVidia) where the
> > code either crashes or screensharing is slow and unusable.
> >
> > To fix this, DMA-BUFs has to be opened using OpenGL context and not
> > being directly mmaped(). This implementation requires to use DMA-BUF
> > modifiers, as they are now mandatory for DMA-BUFs usage.
> >
> > Documentation for this behavior can be found here:
> > https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/doc/dma-buf.dox
> >
> > Bug: chromium:1233417, webrtc:13137
> > Change-Id: I0cecf16d6bb0f576954b9e8f071cab526f7baf2c
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227022
> > Commit-Queue: Tommi <tommi@webrtc.org>
> > Reviewed-by: Tommi <tommi@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#34889}
>
> Bug: chromium:1233417, webrtc:13137
> Change-Id: I7d5763dd5db708cee20a31e559b26db0287f40d6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230946
> Reviewed-by: Tommi <tommi@webrtc.org>
> Commit-Queue: Tommi <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34903}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:1233417, webrtc:13137
Change-Id: I64e2ce864f69e6097aba65ade04af7166e407409
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231135
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34915}
2021-09-03 11:28:26 +00:00
Jan Grulich
677195d3eb Reland "PipeWire capturer: implement proper DMA-BUFs support""
This is a reland of f2177f6612

Original change's description:
> PipeWire capturer: implement proper DMA-BUFs support
>
> Currently both KWin (KDE) and Mutter (GNOME) window managers don't
> use DMA-BUFs by default, but only when client asks specifically for
> them (KWin) or when experimental DMA-BUF support is enabled (Mutter).
> While current implementation works just fine on integrated graphics
> cards, it causes issues on dedicated GPUs (AMD and NVidia) where the
> code either crashes or screensharing is slow and unusable.
>
> To fix this, DMA-BUFs has to be opened using OpenGL context and not
> being directly mmaped(). This implementation requires to use DMA-BUF
> modifiers, as they are now mandatory for DMA-BUFs usage.
>
> Documentation for this behavior can be found here:
> https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/doc/dma-buf.dox
>
> Bug: chromium:1233417, webrtc:13137
> Change-Id: I0cecf16d6bb0f576954b9e8f071cab526f7baf2c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227022
> Commit-Queue: Tommi <tommi@webrtc.org>
> Reviewed-by: Tommi <tommi@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34889}

Bug: chromium:1233417, webrtc:13137
Change-Id: I7d5763dd5db708cee20a31e559b26db0287f40d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230946
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34903}
2021-09-02 09:34:31 +00:00
Olga Sharonova
0d51a5fc00 Revert "PipeWire capturer: implement proper DMA-BUFs support"
This reverts commit f2177f6612.

Reason for revert: Broke WebRTC to Chrome rolls:
https://chromium-review.googlesource.com/c/chromium/src/+/3135220
example: https://ci.chromium.org/ui/p/chromium/builders/try/fuchsia-x64-cast/431230/overview

ERROR at //third_party/webrtc/modules/desktop_capture/linux/egl_dmabuf.cc:26:11: Include not allowed.
#include "rtc_base/sanitizer.h"
          ^-------------------
It is not in any dependency of
  //third_party/webrtc/modules/desktop_capture:desktop_capture_generic
The include file is in the target(s):
  //third_party/webrtc/rtc_base:sanitizer
which should somehow be reachable.



Original change's description:
> PipeWire capturer: implement proper DMA-BUFs support
>
> Currently both KWin (KDE) and Mutter (GNOME) window managers don't
> use DMA-BUFs by default, but only when client asks specifically for
> them (KWin) or when experimental DMA-BUF support is enabled (Mutter).
> While current implementation works just fine on integrated graphics
> cards, it causes issues on dedicated GPUs (AMD and NVidia) where the
> code either crashes or screensharing is slow and unusable.
>
> To fix this, DMA-BUFs has to be opened using OpenGL context and not
> being directly mmaped(). This implementation requires to use DMA-BUF
> modifiers, as they are now mandatory for DMA-BUFs usage.
>
> Documentation for this behavior can be found here:
> https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/doc/dma-buf.dox
>
> Bug: chromium:1233417, webrtc:13137
> Change-Id: I0cecf16d6bb0f576954b9e8f071cab526f7baf2c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227022
> Commit-Queue: Tommi <tommi@webrtc.org>
> Reviewed-by: Tommi <tommi@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34889}

TBR=mbonadei@webrtc.org,tommi@webrtc.org,sprang@webrtc.org,mfoltz@chromium.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com,grulja@gmail.com

Change-Id: I2c573f17adbb216156cd72f62f4dbb7328f8fb6a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1233417, webrtc:13137
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230944
Reviewed-by: Olga Sharonova <olka@webrtc.org>
Commit-Queue: Olga Sharonova <olka@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34892}
2021-09-01 11:32:42 +00:00
Jan Grulich
f2177f6612 PipeWire capturer: implement proper DMA-BUFs support
Currently both KWin (KDE) and Mutter (GNOME) window managers don't
use DMA-BUFs by default, but only when client asks specifically for
them (KWin) or when experimental DMA-BUF support is enabled (Mutter).
While current implementation works just fine on integrated graphics
cards, it causes issues on dedicated GPUs (AMD and NVidia) where the
code either crashes or screensharing is slow and unusable.

To fix this, DMA-BUFs has to be opened using OpenGL context and not
being directly mmaped(). This implementation requires to use DMA-BUF
modifiers, as they are now mandatory for DMA-BUFs usage.

Documentation for this behavior can be found here:
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/doc/dma-buf.dox

Bug: chromium:1233417, webrtc:13137
Change-Id: I0cecf16d6bb0f576954b9e8f071cab526f7baf2c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227022
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34889}
2021-09-01 08:10:40 +00:00