diff options
Diffstat (limited to 'meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0003-kmssink-add-YUYV-support.patch')
-rw-r--r-- | meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0003-kmssink-add-YUYV-support.patch | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0003-kmssink-add-YUYV-support.patch b/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0003-kmssink-add-YUYV-support.patch deleted file mode 100644 index a57a0bbfa..000000000 --- a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0003-kmssink-add-YUYV-support.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 11a3ff4b9451f12374006f853ef5736f5d098932 Mon Sep 17 00:00:00 2001 -From: Eric Ruei <e-ruei1@ti.com> -Date: Tue, 14 Mar 2017 17:24:07 -0400 -Subject: [PATCH 3/3] kmssink: add YUYV support - -Signed-off-by: Eric Ruei <e-ruei1@ti.com> ---- - sys/kms/gstkmsbufferpriv.c | 32 +++++++++++++++++++++++++++----- - sys/kms/gstkmssink.c | 2 +- - 2 files changed, 28 insertions(+), 6 deletions(-) - -diff --git a/sys/kms/gstkmsbufferpriv.c b/sys/kms/gstkmsbufferpriv.c -index 172a4c3..57c01f8 100644 ---- a/sys/kms/gstkmsbufferpriv.c -+++ b/sys/kms/gstkmsbufferpriv.c -@@ -41,22 +41,44 @@ - static int - create_fb (GstKMSBufferPriv * priv, GstKMSSink * sink) - { -+ - /* TODO get format, etc from caps.. and query device for - * supported formats, and make this all more flexible to - * cope with various formats: - */ -- uint32_t fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2'); -- -+ GstVideoFormat format = sink->format; -+ uint32_t fourcc; - uint32_t handles[4] = { -- omap_bo_handle (priv->bo), omap_bo_handle (priv->bo), -+ omap_bo_handle (priv->bo), - }; - uint32_t pitches[4] = { -- GST_ROUND_UP_4 (sink->input_width), GST_ROUND_UP_4 (sink->input_width), -+ GST_ROUND_UP_4 (sink->input_width), - }; - uint32_t offsets[4] = { -- 0, pitches[0] * sink->input_height -+ 0, - }; - -+ /** -+ * Only two formats are supported: -+ * AM3/4: YUYV -+ * AM5: NV12, YUYV -+ */ -+ if(format == GST_VIDEO_FORMAT_YUY2) -+ { -+ /* YUYV */ -+ fourcc = GST_MAKE_FOURCC ('Y', 'U', 'Y', 'V'); -+ pitches[0] = GST_ROUND_UP_4 (sink->input_width*2); -+ } -+ else -+ { -+ /* NV12 */ -+ fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2'); -+ handles[1] = omap_bo_handle (priv->bo); -+ pitches[1] = GST_ROUND_UP_4 (sink->input_width); -+ offsets[1] = pitches[0] * sink->input_height; -+ } -+ -+ - return drmModeAddFB2 (priv->fd, sink->input_width, sink->input_height, - fourcc, handles, pitches, offsets, &priv->fb_id, 0); - } -diff --git a/sys/kms/gstkmssink.c b/sys/kms/gstkmssink.c -index 9795bdf..b36d88f 100644 ---- a/sys/kms/gstkmssink.c -+++ b/sys/kms/gstkmssink.c -@@ -50,7 +50,7 @@ static GstStaticPadTemplate gst_kms_sink_template_factory = - GST_STATIC_PAD_TEMPLATE ("sink", - GST_PAD_SINK, - GST_PAD_ALWAYS, -- GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE("NV12")) -+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE("{NV12,YUY2}")) - ); - - enum --- -1.9.1 - |