libcamerasrc / gstreamer plugin expose sensor-mode configuration

Jacopo Mondi jacopo.mondi at ideasonboard.com
Thu Feb 27 12:18:01 CET 2025


Hi Jeffrey

On Thu, Feb 27, 2025 at 11:09:08AM +0100, Jeffrey Katz wrote:
> Hello list,
>
> it was suggested on the github issue
> (https://github.com/raspberrypi/libcamera/issues/222) to bring this topic to
> the list, so I am doing so.

Thanks.

I see in the issue a link to this patch series
https://patchwork.libcamera.org/patch/18459/
that never made it to upstream.

Albeit not knowing much about gstreamer, reading the patches there it
seems the there proposed property is meant to "enumerate and set" the
sensor modes.

Long story (very) short: libcamera has an option to configure the
desired sensor mode [1] but there is currently no way to enumerate
them. Without going into details, the kernel interfaces at the moment
do no support 'testing' a mode without actually changing the sensor
configuration, so there is no way we can sanely enumerate what a
sensor support.

So we allow users of the libcamera API to set a desired sensor
configuration but it has to be correct otherwise the camera
configuration fails.

[1] https://patchwork.libcamera.org/cover/19065/

In the above linked series in [1] the last patches in the series
https://patchwork.libcamera.org/patch/19077/ add an option to cam and
qcam to allow setting a sensor configuration, as an example usage of
the API.

I presume the gstreamer patches need to be ported to this new
mechanism and resubmitted. Is this something you would be iterested in
looking at ? cc Nicolas as well.

>
> The usability of libcamerasrc is severely impacted by not being able to
> force a specific sensor configuration, especially on platforms like the
> Raspberry Pi 5 where there is no additional hardware support for things like
> resizing or recoloring video.
>
> Ideally, as with exposure controls and the rest, we should be able to
> specify a sensor format in the gstreamer pipeline.
>
> We are currently patching around this, but it seems like a fairly important
> bit of functionality to have missing.
>
> (far more details in the linked github issue)
>
> -jk


More information about the libcamera-devel mailing list