From 2ca706626090323d5c5934e7eec558efb686a6b2 Mon Sep 17 00:00:00 2001 From: Hyunil Date: Wed, 7 Jun 2017 19:38:52 +0900 Subject: [PATCH] Waylandsink : Add SN21 video format Change-Id: Icc7587b4c5aacf3d7d5f7380cdaaedf99075056f Signed-off-by: Hyunil --- ext/wayland/gstwaylandsink.c | 11 ++++++++--- ext/wayland/tizen-wlvideoformat.c | 1 + packaging/gst-plugins-bad.spec | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c index 8055a1e..7eacd2b 100755 --- a/ext/wayland/gstwaylandsink.c +++ b/ext/wayland/gstwaylandsink.c @@ -187,7 +187,7 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", ("{ BGRx, BGRA, RGBx, xBGR, xRGB, RGBA, ABGR, ARGB, RGB, BGR, " "RGB16, BGR16, YUY2, YVYU, UYVY, AYUV, NV12, NV21, NV16, " #ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT - "SN12, ST12, SR32, S420," + "SN12, ST12, SN21, SR32, S420," #endif "YUV9, YVU9, Y41B, I420, YV12, Y42B, v308 }")) ); @@ -1569,7 +1569,7 @@ gst_wayland_sink_get_caps (GstBaseSink * bsink, GstCaps * filter) g_value_set_string (&value, gst_wl_tbm_format_to_string (tbm_fmt)); gst_value_list_append_value (&list, &value); - /* TBM doesn't support Native formats(SN12, ST12, SR32 and S420), + /* TBM doesn't support Native formats(SN12, ST12, SN21, SR32 and S420), So we add Native formats manually as supported format. */ if (tbm_fmt == TBM_FORMAT_NV12) { g_value_set_string (&value, @@ -1579,6 +1579,10 @@ gst_wayland_sink_get_caps (GstBaseSink * bsink, GstCaps * filter) g_value_set_string (&value, gst_video_format_to_string (GST_VIDEO_FORMAT_ST12)); gst_value_list_append_value (&list, &value); + } else if (tbm_fmt == TBM_FORMAT_NV21) { + g_value_set_string (&value, + gst_video_format_to_string (GST_VIDEO_FORMAT_SN21)); + gst_value_list_append_value (&list, &value); } else if (tbm_fmt == TBM_FORMAT_ARGB8888) { g_value_set_string (&value, gst_video_format_to_string (GST_VIDEO_FORMAT_SR32)); @@ -1704,6 +1708,7 @@ gst_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps) if (sink->USE_TBM) { if (GST_VIDEO_INFO_FORMAT (&info) == GST_VIDEO_FORMAT_SN12 || GST_VIDEO_INFO_FORMAT (&info) == GST_VIDEO_FORMAT_ST12 || + GST_VIDEO_INFO_FORMAT (&info) == GST_VIDEO_FORMAT_SN21 || GST_VIDEO_INFO_FORMAT (&info) == GST_VIDEO_FORMAT_SR32 || GST_VIDEO_INFO_FORMAT (&info) == GST_VIDEO_FORMAT_S420) { sink->display->is_native_format = TRUE; @@ -2058,7 +2063,7 @@ gst_wayland_sink_create_wlbuffer_with_previous_plugin_tbm (GstWaylandSink * ("buffer(%p) is created by previous plugin with no BufferPool does not have a wl_buffer", buffer); GST_LOG ("Use native format with previous plugins TBM"); - /* in case of native format (SN12, ST12, SR32 and S420) */ + /* in case of native format (SN12, ST12, SN21, SR32 and S420) */ if (!gst_wayland_sink_get_mm_video_buf_info (sink, buffer)) { return GST_FLOW_ERROR; } diff --git a/ext/wayland/tizen-wlvideoformat.c b/ext/wayland/tizen-wlvideoformat.c index b38a8b9..8ebf505 100644 --- a/ext/wayland/tizen-wlvideoformat.c +++ b/ext/wayland/tizen-wlvideoformat.c @@ -78,6 +78,7 @@ static const wl_TbmVideoFormat tbm_formats[] = { {TBM_FORMAT_YUV444, GST_VIDEO_FORMAT_v308}, {TBM_FORMAT_NV12MT, GST_VIDEO_FORMAT_ST12}, {TBM_FORMAT_NV12, GST_VIDEO_FORMAT_SN12}, + {TBM_FORMAT_NV21, GST_VIDEO_FORMAT_SN21}, {TBM_FORMAT_YUV420, GST_VIDEO_FORMAT_S420} }; diff --git a/packaging/gst-plugins-bad.spec b/packaging/gst-plugins-bad.spec index 64ec68f..4660f0d 100644 --- a/packaging/gst-plugins-bad.spec +++ b/packaging/gst-plugins-bad.spec @@ -4,7 +4,7 @@ Name: gst-plugins-bad Version: 1.6.1 -Release: 12 +Release: 13 Summary: GStreamer Streaming-Media Framework Plug-Ins License: LGPL-2.0+ Group: Multimedia/Framework -- 2.7.4