summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZan Dobersek <zdobersek@igalia.com>2021-03-26 11:09:21 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2021-03-26 11:45:45 +0100
commit883713d65a405fa6f3601485a7daaed39aa84423 (patch)
tree9e376c9a2a36f27766bffea91547bc391eb2c8e6
parenta2c41a85fac38f908934536826fbedb96a39c9ca (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.
-rw-r--r--backports/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-glupload-don-t-reject-non-RGBA-output-format-in-_dir.patch32
-rw-r--r--backports/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb1
2 files changed, 33 insertions, 0 deletions
diff --git a/backports/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-glupload-don-t-reject-non-RGBA-output-format-in-_dir.patch b/backports/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/backports/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/backports/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb b/backports/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb
index db0b740..c965be9 100644
--- a/backports/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb
+++ b/backports/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb
@@ -15,6 +15,7 @@ SRC_URI = "${GST1.0-PLUGINS-BASE_SRC};branch=${SRCBRANCH} \
file://0009-glimagesink-Downrank-to-marginal.patch \
file://0001-gst-libs-gst-gl-wayland-fix-meson-build.patch \
file://0001-meson-viv-fb-code-must-link-against-libg2d.patch \
+ file://0001-glupload-don-t-reject-non-RGBA-output-format-in-_dir.patch \
"
S = "${WORKDIR}/git"