Waylandsink : Add SN21 video format 50/132750/1
authorHyunil <hyunil46.park@samsung.com>
Wed, 7 Jun 2017 10:38:52 +0000 (19:38 +0900)
committerHyunil <hyunil46.park@samsung.com>
Wed, 7 Jun 2017 10:38:52 +0000 (19:38 +0900)
Change-Id: Icc7587b4c5aacf3d7d5f7380cdaaedf99075056f
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
ext/wayland/gstwaylandsink.c
ext/wayland/tizen-wlvideoformat.c
packaging/gst-plugins-bad.spec

index 8055a1e..7eacd2b 100755 (executable)
@@ -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;
   }
index b38a8b9..8ebf505 100644 (file)
@@ -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}
 };
 
index 64ec68f..4660f0d 100644 (file)
@@ -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