[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: use of Recommends by vlc to force users to use pipewire



On 2022-05-26 20:08:22 +0100, Simon McVittie wrote:
> On Thu, 26 May 2022 at 17:21:27 +0200, Vincent Lefevre wrote:
> > Here, this could be
> > 
> >   Recommends: pipewire | pulseaudio
> 
> Those are not interchangeable.
> 
> pipewire started as a multiplexer for video streams, and only later
> gained audio capabilities. The reason most people with pipewire will
> have it installed is that it's necessary when doing screen-sharing or
> screencasting from a Wayland environment like GNOME.
> 
> If you're *also* using pipewire as an audio multiplexing server, which
> is not the default for any installation of Debian yet (but might be in
> future), then you will also need pipewire-pulse, which has two purposes:
> 
> * it configures the pipewire service to open the audio device;
> * it provides a separate PulseAudio-compatible server which acts as a
>   wire-protocol-compatible replacement for pulseaudio
> 
> Without pipewire-pulse, pipewire is only a video multiplexer, not an
> audio multiplexer.

This doesn't seem to be correct. The pipewire-pulse package was not
installed on my machine (it got installed on 2021-10-26 due to some
upgrade, but the change was reverted or something like that, and it
got removed 3 days later). However, with the installation of
vlc-plugin-pipewire, VLC was automatically using pipewire, and
apparently ditto with ogg123 (via ALSA, which I had as the default).

> pipewire is actually more like a metapackage, which pulls in the packages
> that are needed to have Pipewire actually work for a particular library
> architecture (libpipewire-0.3-0 cannot pull in libpipewire-0.3-modules
> itself, because that would be a circular dependency), together with the
> pipewire service from the primary architecture (pipewire-bin).

However, for the support of bluetooth devices, libspa-0.2-bluetooth
is needed, but it isn't even pulled when pipewire is installed!

> > Indeed, for a remote VM, it is silly to recommend a sound server,
> > just because a library appears in the chain of dependencies:
> > 
> > joooj:~> apt-get install -s atril | grep '^Inst pipewire'
> 
> It looks like that's happening because atril depends on WebKitGTK, a
> relatively complete web browser engine, which uses xdg-desktop-portal
> to invoke per-user services across a sandbox boundary (so that it can
> provide the web APIs people expect from it, without having arbitrary
> websites able to access your webcam without your permission).
> 
> xdg-desktop-portal depends on pipewire because one of the services it
> provides is access to webcams, and another is screen-sharing and
> screencasting. Both of those use the Pipewire video protocol to get the
> actual frames across the sandbox boundary.
> 
> Maybe Atril never actually uses WebKitGTK to access arbitrary websites,
> but WebKitGTK is a fully-featured web browser engine, so it has to
> be prepared to do anything that an arbitrary website expects to work,
> and that includes (for example) the Jitsi web frontend.

Thanks for the explanations. But xdg-desktop-portal just depends
on the libpipewire-0.3-0 library package. If it needs more than
the library, then I suppose that it should also recommend pipewire
directly and not expect that the library will do it. Moreover,
even with pipewire installed automatically, users should expect
regressions (see above about bluetooth devices).

Packages depend on library packages just to be able to use some
provided functions, in case they will be called. It doesn't mean
that the intent is that associated optional services will be used.

For instance, many packages (providing applications or libraries)
depend on libcups2, but this doesn't mean that the user will need
a CUPS server (or client). Ditto for libavahi-client3 and various
other libraries.

Concerning WebKitGTK, in a similar way, I think that there should
be a separation between the basic rendering library and the fully
featured web browser engine. So libwebkit2gtk-4.0-37 should not
recommend anything, and there could be a metapackage webkit2gtk-full
(or webkit2gtk-extra) that has the complete Recommends. Something
like that.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


Reply to: