[0/1] Make Gstreamer prefer non-raw caps
mbox series

Message ID 20260702145317.86482-1-david.plowman@raspberrypi.com
Headers show
Series
  • Make Gstreamer prefer non-raw caps
Related show

Message

David Plowman July 2, 2026, 2:39 p.m. UTC
Hi everyone

Another episode in my side-quest to make gstreamer/libcamera work
better on the Pi. I thought a cover-note was desirable because I'm not
100% sure about these bits of gstreamer, so some background may help.

Basically I was trying to run "cheese". It uses libcamera through
gstreamer so I thought it should stand a fighting chance.
Unfortuntely, though, I found that its preference for fixed size
outputs (over ranges) gave it a nasty habit of going for raw (Bayer)
image formats which general-purpose camera apps like "cheese" can't
handle.

Anyway, I've rearranged it a bit to perform the same logic as before
(preferring fixed size over ranges), but _separately_ for raw and
non-raw streams. Finally, it will prefer non-raw over raw, if it
can. So folks who explicitly want raw will still get it, but
otherwise, those general-purpose apps should mostly get non-raw.

I think this makes sense, and may work for everyone, but it's hard to
be sure so it would be good to have some other opinions!

Thanks in advance

David

David Plowman (1):
  gstreamer: Prefer non-raw (i.e. non-Bayer) formats in caps negotiation

 src/gstreamer/gstlibcamera-utils.cpp | 96 +++++++++++++++++++++-------
 src/gstreamer/gstlibcamera-utils.h   |  2 +-
 src/gstreamer/gstlibcamerasrc.cpp    |  3 +-
 3 files changed, 75 insertions(+), 26 deletions(-)