Details
Description
Hello,
I'm trying to compile QtWebEngine with PipeWire support for Arch Linux package in order to enable screen sharing under Wayland as per [1] and [2], however I can't figure out if this is possible to achieve today - any help is highly appreciated!
Here's what I found so far:
I noticed in src/3rdparty/chromium/third_party/webrtc/webrtc.gni the following snippet:
# Set this to use PipeWire on the Wayland display server. # By default it's only enabled on desktop Linux (excludes ChromeOS) and # only when using the sysroot as PipeWire is not available in older and # supported Ubuntu and Debian distributions. rtc_use_pipewire = is_desktop_linux && use_sysroot
The Arch Linux packages for Chromium [3] (which is compiled with PipeWire support) and QtWebEngine both build with `use_sysroot=false`, I assume this is correct and should not be changed, so I am looking for a way to override `rtc_use_pipewire` parameter.
As far as I understood there is no way to just pass gn variables directly when compiling QtWebEngine, the only way is to add a new Qt feature (say `webengine-webrtc-pipewire`) and pass it to `qmake` like so:
$ qmake . -- -webengine-webrtc-pipewire ...
Is this correct?
If yes, I believe the patch below does the job, but maybe you will want to adapt it before merging.
Did I miss something? Let me know your thoughts!
1: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-packagers/oEtkQUfwcus
2: https://github.com/qutebrowser/qutebrowser/issues/5421
3: https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/chromium
--- a/src/buildtools/config/linux.pri +++ b/src/buildtools/config/linux.pri @@ -205,6 +205,8 @@ host_build { qtConfig(webengine-webrtc): gn_args += rtc_use_x11=true } + qtConfig(webengine-webrtc-pipewire): gn_args += rtc_use_pipewire=true + qtConfig(webengine-system-libevent): gn_args += use_system_libevent=true qtConfig(webengine-system-libwebp): gn_args += use_system_libwebp=true qtConfig(webengine-system-libxml2): gn_args += use_system_libxml=true use_system_libxslt=true --- a/src/core/configure.json +++ b/src/core/configure.json @@ -25,6 +25,7 @@ "webengine-native-spellchecker": "boolean", "webengine-extensions": "boolean", "webengine-webrtc": "boolean", + "webengine-webrtc-pipewire": "boolean", "webengine-geolocation": "boolean", "webengine-webchannel": "boolean", "webengine-kerberos": "boolean", @@ -187,6 +188,11 @@ "autoDetect": "!features.webengine-embedded-build", "output": [ "privateFeature" ] }, + "webengine-webrtc-pipewire": { + "label": "PipeWire", + "purpose": "Provides PipeWire support.", + "output": [ "privateFeature" ] + }, "webengine-ozone-x11" : { "label": "Support qpa-xcb", "condition": "config.unix @@ -268,6 +274,7 @@ "webengine-spellchecker", "webengine-native-spellchecker", "webengine-webrtc", + "webengine-webrtc-pipewire", "webengine-geolocation", "webengine-webchannel", "webengine-kerberos",