Re: [meta-arago] [PATCH] gstreamer1.0-plugins-good: Fix Failed Negotiation in Non-contiguous Formats

Brandon Brnich <[email protected]> Tue, 10 Mar 2026 20:31:52 -0500
Newsgroups org.yoctoproject.lists.meta-arago
Message-ID <[email protected]>
Hello all,

Forgot to add master to subject. Will send a v2 for this but will wait 
first to see if there is any other feedback.

Best,
Brandon

On 3/10/2026 8:29 PM, Brandon Brnich via lists.yoctoproject.org wrote:
> Upstream gstreamer has introduced a new method for mapping V4L2 buffer
> formats to their respective GST format. Previously it was a big switch
> statement manually assigning all contiguous and non-contiguous variants to
> fourcc and fourcc_nc respectively. Formats that didn't have both options
> would only populate the fourcc. The new mapping properly sets the
> corresponding fourcc/fourcc_nc. This means for pixel formats that have no
> contiguous option, the non-contiguous option should be checked prior to
> pipeline negotiation failures.
> 
> Signed-off-by: Brandon Brnich <[email protected]>
> ---
>   ...pt-non-contiguous-if-contiguous-form.patch | 36 +++++++++++++++++++
>   .../gstreamer1.0-plugins-good_1.26-arago.inc  |  1 +
>   2 files changed, 37 insertions(+)
>   create mode 100644 meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0007-v4l2object-Attempt-non-contiguous-if-contiguous-form.patch
> 
> diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0007-v4l2object-Attempt-non-contiguous-if-contiguous-form.patch b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0007-v4l2object-Attempt-non-contiguous-if-contiguous-form.patch
> new file mode 100644
> index 00000000..db7e6f0c
> --- /dev/null
> +++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0007-v4l2object-Attempt-non-contiguous-if-contiguous-form.patch
> @@ -0,0 +1,36 @@
> +From 8d29018dd31be2045f6724db0942ae1a7da0a789 Mon Sep 17 00:00:00 2001
> +From: Brandon Brnich <[email protected]>
> +Date: Tue, 10 Mar 2026 19:47:35 -0500
> +Subject: [PATCH] v4l2object: Attempt non-contiguous if contiguous format isn't
> + present
> +
> +Gstreamer previously had logic that would set fourcc even if the format
> +being negotiated didn't have a contiguous option - YUYV for example. A fix
> +was sent to properly set either forcc/forcc_nc properly. For formats that
> +don't have contiguous formats, that would mean attempting non-contiguous
> +options wouldn't happen. Attempt non-contiguous formats before erroring
> +out if applicable.
> +
> +Upstream-Status: Inappropriate [TI-custom]
> +
> +Signed-off-by: Brandon Brnich <[email protected]>
> +---
> + sys/v4l2/gstv4l2object.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
> +index dbfe4992be..b4a7c32f31 100644
> +--- a/sys/v4l2/gstv4l2object.c
> ++++ b/sys/v4l2/gstv4l2object.c
> +@@ -2167,7 +2167,7 @@ gst_v4l2_object_get_caps_info (GstV4l2Object * v4l2object, GstCaps * caps,
> +
> +   if (fourcc)
> +     fmt = gst_v4l2_object_get_format_from_fourcc (v4l2object, fourcc);
> +-  else if (fourcc == 0)
> ++  else if (fourcc_nc == 0)
> +     goto unhandled_format;
> +
> +   if (fmt == NULL) {
> +--
> +2.43.0
> +
> diff --git a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.26-arago.inc b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.26-arago.inc
> index f64790bc..9e418b86 100644
> --- a/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.26-arago.inc
> +++ b/meta-arago-extras/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.26-arago.inc
> @@ -7,6 +7,7 @@ SRC_URI:append = " \
>       file://0005-HACK-gstv4l2object-Increase-min-buffers-for-CSI-capt.patch \
>       file://0001-v4l2jpegenc-Add-support-for-cropping-in-JPEG-Encoder.patch \
>       file://0006-v4l2object-use-actual-stream-resolution-for-encoded-.patch \
> +    file://0007-v4l2object-Attempt-non-contiguous-if-contiguous-form.patch \
>   "
>   
>   PR:append = ".arago0"