diff options
author | Karthik Ramanan <a0393906@ti.com> | 2017-03-30 13:42:50 +0530 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2017-04-04 08:49:07 +0000 |
commit | e5647d8e3da999c353a48c139c9a968705c5a891 (patch) | |
tree | 42cdea20ccabfddf5bb836913a32da04572edc1e /meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0003-kmssink-add-YUYV-support.patch | |
parent | 8b721aa4ae997a5e18d97d5125038f1cd4640949 (diff) |
dra7xx: gstreamer1.0-plugins-bad: Upgrade to 1.8.2
Apart from upgrading to 1.8.2 as the base, it also contains
several TI specific patches that are required to enable
functionality for kmssink and waylandsink.
A few bug fixes have also been included in this patch set.
This recipe is rehosted from meta-arago
Change-Id: I2a5b95db1b0e6b2b907f3e82ff738fd8124c0998
Signed-off-by: Karthik Ramanan <a0393906@ti.com>
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, 81 insertions, 0 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 new file mode 100644 index 000000000..a57a0bbfa --- /dev/null +++ b/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0003-kmssink-add-YUYV-support.patch @@ -0,0 +1,81 @@ +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 + |