A dmabuf content negotation problem
We are currently adding support for dmabuf textures to gtk. We use https://gitlab.gnome.org/GNOME/pipewire-media-stream as our testbed.
Adding camera support to it via the camera portal has resulted in this problem:
When we create the pw stream, we add all our supported dmabuf formats to the params, each with multiple modifiers, also including the INVALID modifier (to signal that we accept implicit modifiers). The formats we add are various ARGB and XRGB ordering variations, and YUYV (which is what my camera supports). If the YUYV format first in the list, the stream connects and everything works. If I put YUVY at the end, I get a "no more input formats" error from pipewire.
This gives a somewhat paradoxical behavior: I need to remove formats from the list to make the "no more formats" error go away.
It feels as if pipewire gives up after the first format in the list.
The format setup code is here: https://gitlab.gnome.org/GNOME/pipewire-media-stream/-/blob/main/pw-media-stream.c#L325