diff options
author | Zan Dobersek <zdobersek@igalia.com> | 2021-03-26 11:09:21 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2021-06-04 14:23:01 +0200 |
commit | 1ae79646e5b0464f52e560ce827c12524edc67cb (patch) | |
tree | 6ceb7627df2a8162563e9304e3fe196e734bdbf8 /recipes-multimedia | |
parent | 7535a70c016f6ff41609b037ddf303d2709674f4 (diff) |
gstreamer1.0-plugins-base: patch glupload to avoid early DirectVIV upload rejection
With GStreamer GL-oriented video sinks that support other caps than just RGBA,
the DirectVIV uploader can reject the upload because of the negotiated caps on
the glupload element not yet properly indicating RGBA-only format that the
DirectVIV uploader enforces on the source side.
The rejection means that a different upload mechanism will be chosen, which
breaks correct sampling of such a resource inside the GL sink. Avoiding the
rejection, the DirectVIV ends up accepting and uploading the buffer and the
pipeline is reconfigured with RGBA caps all the way to the sink, enabling it to
correctly render the decoded frames.
(cherry picked from commit 883713d65a405fa6f3601485a7daaed39aa84423)
Reworked to a bbappend as it is no longer a backport.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-multimedia')
2 files changed, 34 insertions, 0 deletions
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-glupload-don-t-reject-non-RGBA-output-format-in-_dir.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-glupload-don-t-reject-non-RGBA-output-format-in-_dir.patch new file mode 100644 index 0000000..373d343 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-glupload-don-t-reject-non-RGBA-output-format-in-_dir.patch @@ -0,0 +1,32 @@ +From a2df510b1cc6d1c45614cf7e58d9f203d15ea716 Mon Sep 17 00:00:00 2001 +From: Zan Dobersek <zdobersek@igalia.com> +Date: Thu, 25 Mar 2021 10:27:30 +0100 +Subject: [PATCH] glupload: don't reject non-RGBA output format in + _directviv_upload_accept + +In case of a more advanced sink that can support RGBA but also different YUV +formats, the initial output format for the glupload element might not be RGBA. +In that case, rejecting inside the upload method for the DirectVIV uploader +means picking a different uploader that won't do the job properly. + +If the rejecetion is removed, the upload proceeds and the pipeline is later +reconfigured so that the DirectVIV uploader's RGBA-only output is respected, +meaning the final sink will also move over from handling I420 to RGBA. +--- + gst-libs/gst/gl/gstglupload.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c +index 50169adb0..079ed695e 100644 +--- a/gst-libs/gst/gl/gstglupload.c ++++ b/gst-libs/gst/gl/gstglupload.c +@@ -1761,9 +1761,6 @@ _directviv_upload_accept (gpointer impl, GstBuffer * buffer, GstCaps * in_caps, + + #if GST_GL_HAVE_PHYMEM + GstVideoInfo *in_info = &directviv->upload->priv->in_info; +- GstVideoFormat fmt = GST_VIDEO_INFO_FORMAT (&directviv->upload->priv->out_info); +- if (fmt != GST_VIDEO_FORMAT_RGBA) +- return FALSE; + + if (n_mem != 1 || !mem || !gst_is_phys_memory (mem)) { + GstVideoFrame frame1, frame2; diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.imx.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.imx.bbappend new file mode 100644 index 0000000..d2e8c5f --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.imx.bbappend @@ -0,0 +1,2 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +SRC_URI += " file://0001-glupload-don-t-reject-non-RGBA-output-format-in-_dir.patch" |