summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-gstwaylandsink-add-input-format-I420-support.patch
diff options
context:
space:
mode:
authorKarthik Ramanan <a0393906@ti.com>2017-03-30 13:42:50 +0530
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-04-04 08:49:07 +0000
commite5647d8e3da999c353a48c139c9a968705c5a891 (patch)
tree42cdea20ccabfddf5bb836913a32da04572edc1e /meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-gstwaylandsink-add-input-format-I420-support.patch
parent8b721aa4ae997a5e18d97d5125038f1cd4640949 (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/0001-gstwaylandsink-add-input-format-I420-support.patch')
-rw-r--r--meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-gstwaylandsink-add-input-format-I420-support.patch89
1 files changed, 89 insertions, 0 deletions
diff --git a/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-gstwaylandsink-add-input-format-I420-support.patch b/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-gstwaylandsink-add-input-format-I420-support.patch
new file mode 100644
index 000000000..507f57b92
--- /dev/null
+++ b/meta-agl-bsp/meta-ti/recipes-arago/gstreamer/gstreamer1.0-plugins-bad/0001-gstwaylandsink-add-input-format-I420-support.patch
@@ -0,0 +1,89 @@
+From 1364ee6e60eb09a3fe3b072fe4671c5d645e523a Mon Sep 17 00:00:00 2001
+From: Eric Ruei <e-ruei1@ti.com>
+Date: Wed, 22 Feb 2017 10:49:01 -0500
+Subject: [PATCH 1/3] gstwaylandsink: add input format I420 support
+
+The software-based video decoder produces the output in I420 format. To display
+the output without additional ARM MHz consumed in video format conversion,
+the function gst_wl_memory_construct_wl_buffer is enhanced to support I420 format.
+
+Signed-off-by: Eric Ruei <e-ruei1@ti.com>
+---
+ ext/wayland/wldrm.c | 41 ++++++++++++++++++++++++++++++++++-------
+ 1 file changed, 34 insertions(+), 7 deletions(-)
+
+diff --git a/ext/wayland/wldrm.c b/ext/wayland/wldrm.c
+index 3dc9c21..ecbdc88 100644
+--- a/ext/wayland/wldrm.c
++++ b/ext/wayland/wldrm.c
+@@ -5,33 +5,60 @@
+ #include <omap_drmif.h>
+ #include <wayland-client.h>
+
++GST_DEBUG_CATEGORY_EXTERN (gstwayland_debug);
++#define GST_CAT_DEFAULT gstwayland_debug
++
++
+ struct wl_buffer *
+ gst_wl_drm_memory_construct_wl_buffer (GstMemory * mem, GstWlDisplay * display,
+ const GstVideoInfo * info)
+ {
+ gint video_width = GST_VIDEO_INFO_WIDTH (info);
+ gint video_height = GST_VIDEO_INFO_HEIGHT (info);
++ GstVideoFormat format = GST_VIDEO_INFO_FORMAT (info);
+ int fd = -1;
+ struct omap_bo *bo;
+ struct wl_buffer *buffer;
+-
+- /* 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');
++ uint32_t fourcc;
+ uint32_t name;
+ /* note: wayland and mesa use the terminology:
+ * stride - rowstride in bytes
+ * pitch - rowstride in pixels
+ */
+ uint32_t strides[3] = {
+- GST_ROUND_UP_4 (video_width), GST_ROUND_UP_4 (video_width), 0,
++ GST_ROUND_UP_4 (video_width), 0, 0,
+ };
+ uint32_t offsets[3] = {
+ 0, strides[0] * video_height, 0
+ };
+
++ if (format == GST_VIDEO_FORMAT_NV12)
++ {
++ /* NV12 */
++ fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
++ strides[1] = GST_ROUND_UP_4 (video_width);
++ }
++ else if(format == GST_VIDEO_FORMAT_I420)
++ {
++ /* YUV420 */
++ fourcc = GST_MAKE_FOURCC ('Y', 'U', '1', '2');
++ strides[1] = strides[2] = GST_ROUND_UP_4 (video_width/2);
++ offsets[2] = offsets[1] + strides[1] * video_height/2;
++ }
++ else
++ {
++
++ GST_DEBUG ("Unsupported video format: %d", format);
++ /*
++ * There are two xRGB frames with width and height = 1 required in the begining of a video stream.
++ * If we consider them as errot, then it will case libwayland-clent.so crashes
++ * due to invalid error handling.
++ * Consider them as NV12 until we can figure out a better solution
++ */
++ fourcc = GST_MAKE_FOURCC ('N', 'V', '1', '2');
++ strides[1] = GST_ROUND_UP_4 (video_width);
++ }
++
+ fd = gst_fd_memory_get_fd (mem);
+
+ if (fd < 0 ) {
+--
+1.9.1
+