tizenencodebin: Add new format capability for image pad 53/292253/1 accepted/tizen/7.0/unified/20230505.170230
authorJeongmo Yang <jm80.yang@samsung.com>
Tue, 2 May 2023 10:46:34 +0000 (19:46 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Tue, 2 May 2023 10:47:41 +0000 (19:47 +0900)
- NV12, NV21, SN12, SN21

[Version] 1.20.0-16
[Issue Type] New feature

Change-Id: Id4f85cfdbf48a9a8d08253386878a166007244ea
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/gst-plugins-tizen.spec
tizenencodebin/src/gsttizenencodebin.c

index 1ec13cf..60095fa 100644 (file)
@@ -5,7 +5,7 @@
 Name:       gst-plugins-tizen
 Version:    1.20.0
 Summary:    GStreamer tizen plugins (common)
-Release:    15
+Release:    16
 Group:      Multimedia/Framework
 Url:        http://gstreamer.freedesktop.org/
 License:    LGPL-2.1+
index c96aa2d..2c23a1e 100644 (file)
@@ -214,6 +214,15 @@ GST_STATIC_CAPS ( \
   GST_VIDEO_CAPS_MAKE("AYUV") \
 )
 
+#define STATIC_IMAGE_CAPS \
+GST_STATIC_CAPS ( \
+  GST_VIDEO_CAPS_MAKE("I420") ";" \
+  GST_VIDEO_CAPS_MAKE("NV12") ";" \
+  GST_VIDEO_CAPS_MAKE("NV21") ";" \
+  GST_VIDEO_CAPS_MAKE("SN12") ";" \
+  GST_VIDEO_CAPS_MAKE("SN21") \
+)
+
 
 static GstStaticPadTemplate tizen_encode_bin_src_template =
 GST_STATIC_PAD_TEMPLATE ("src",
@@ -239,7 +248,7 @@ static GstStaticPadTemplate tizen_encode_bin_image_sink_template =
 GST_STATIC_PAD_TEMPLATE ("image",
     GST_PAD_SINK,
     GST_PAD_REQUEST,
-    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("I420"))
+    STATIC_IMAGE_CAPS
     );
 
 GST_DEBUG_CATEGORY_STATIC (gst_tizen_encode_bin_debug);
@@ -827,7 +836,7 @@ gst_tizen_encode_bin_request_new_pad (GstElement *element, GstPadTemplate *templ
        g_return_val_if_fail (templ != NULL, NULL);
 
        if (templ->direction != GST_PAD_SINK) {
-               GST_WARNING_OBJECT (GST_IS_TIZEN_ENCODE_BIN (element), "encodebin: request pad that is not a SINK pad\n");
+               GST_WARNING_OBJECT (element, "encodebin: request pad that is not a SINK pad\n");
                return NULL;
        }
 
@@ -849,7 +858,7 @@ gst_tizen_encode_bin_request_new_pad (GstElement *element, GstPadTemplate *templ
                        }
                        else
                        {
-                               GST_WARNING_OBJECT (GST_IS_TIZEN_ENCODE_BIN (element), "encodebin: audio pad is aleady existed, return existing audio pad\n");
+                               GST_WARNING_OBJECT (encodebin, "encodebin: audio pad is aleady existed, return existing audio pad\n");
                                return encodebin->audio_sinkpad;
                        }
 
@@ -870,7 +879,7 @@ gst_tizen_encode_bin_request_new_pad (GstElement *element, GstPadTemplate *templ
                        }
                        else
                        {
-                               GST_WARNING_OBJECT (GST_IS_TIZEN_ENCODE_BIN (element), "encodebin: video pad is aleady existed, return existing video pad\n");
+                               GST_WARNING_OBJECT (encodebin, "encodebin: video pad is aleady existed, return existing video pad\n");
                                return encodebin->video_sinkpad;
                        }
 
@@ -888,7 +897,7 @@ gst_tizen_encode_bin_request_new_pad (GstElement *element, GstPadTemplate *templ
                        }
                        else
                        {
-                               GST_WARNING_OBJECT (GST_IS_TIZEN_ENCODE_BIN (element), "encodebin: image pad is aleady existed, return existing image pad\n");
+                               GST_WARNING_OBJECT (encodebin, "encodebin: image pad is aleady existed, return existing image pad\n");
                                return encodebin->image_sinkpad;
                        }
 
@@ -909,7 +918,7 @@ gst_tizen_encode_bin_request_new_pad (GstElement *element, GstPadTemplate *templ
                        }
                        else
                        {
-                               GST_WARNING_OBJECT (GST_IS_TIZEN_ENCODE_BIN (element), "encodebin: image pad is aleady existed, return existing image pad\n");
+                               GST_WARNING_OBJECT (encodebin, "encodebin: image pad is aleady existed, return existing image pad\n");
                                return encodebin->image_sinkpad;
                        }