Skip to content

Screencast: use dma-bufs only when client explicitly asks for it

Jan Grulich requested to merge (removed):screencast-dma-buf into master

There are clients with wrong implementation for dma buffers (e.g. WebRTC) which work only for Intel graphics cards, but crashes with AMD or NVidia. We should avoid defaulting to use dma buffers if the client doesn't explicitly ask for it. This is same behavior Mutter does.

I tested it with Chromium, where with this change it defaults to use MemFd buffer data type and when I specify: SPA_PARAM_BUFFERS_dataType, SPA_POD_CHOICE_FLAGS_Int(1<<SPA_DATA_DmaBuf), then it uses dma buffers.

Here are some related issues in PipeWire itself: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1054 https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1055

And fixes: https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/9c8a578e214a43d632d97aad77d6289bea94b030 https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/cd79cdfb406482c06dfc9309d1a481e9c8b302f1

Merge request reports