Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-85309

Unable to compile QtWebEngine with PipeWire support

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.15.1
    • 5.15.0
    • WebEngine
    • None
    • Linux/Wayland
    • e5b5fcb1a2c186f14ae35f4c48f593e6fa75dd87 (qt/qtwebengine/5.15)

    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",
      

       

      Attachments

        For Gerrit Dashboard: QTBUG-85309
        # Subject Branch Project Status CR V

        Activity

          People

            qt_webengine_team Qt WebEngine Team
            maximbaz Maxim Baz
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes