Skip to content

V4l2 colorimetry fixup

Hi,

after upgrading to 1.18 we have a few colorimetry handling problems for m2m transform elements.

A m2m convert/transform element doesn't support colorpsace conversion except for devices setting the V4L2_FMT_FLAG_CSC_COLORSPACE flag. So enumerating colorspaces on the capture side makes only sense if the the flag is set or if it is not an m2m device e.g. a camera src (v4l2src) element.

The current state is that the v4l2transform class tries to enum the colospace on capture side as well using the try_fmt() and according the API the driver returns the current set value from the output side. So after probing the summary is that GStreamer thinks that we support only one colorspace on the capture side.

This PR tries to fix this for the m2m transform element by checking if the colorspace conversion is supported. If that is the case the colorimetry caps are not modified in all other cases the colorimetry is updated.

Merge request reports

Loading