v4l2video: decrease plugin rank
authorEunhye Choi <eunhae1.choi@samsung.com>
Wed, 26 Feb 2020 07:06:27 +0000 (16:06 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Wed, 26 Feb 2020 07:11:43 +0000 (16:11 +0900)
- set primary rank to v4l2 video decoder
  prev commit : a3d33c9390cd87827dea563dca0b211142506ae4
- and set secondary rank to v4l2 video encoder

Change-Id: I0ecb91d2310b669d1ed415cb1ccd8a00ca73c973

packaging/gst-plugins-good.spec
sys/v4l2/gstv4l2videodec.c
sys/v4l2/gstv4l2videoenc.c

index 55d8af4..c8be1b8 100644 (file)
@@ -71,22 +71,23 @@ plugins not included in official Tizen images, which may be used for development
 export V=1
 NOCONFIGURE=1 ./autogen.sh
 export CFLAGS+=" -DTIZEN_FEATURE_V4L2SRC_SCAN_DEVICE_NODE\
-               -DTIZEN_FEATURE_V4L2SRC_SUPPORT_CAMERA_ID\
-               -DTIZEN_FEATURE_WAVPARSE_MODIFICATION\
-               -DTIZEN_FEATURE_MP3PARSE_MODIFICATION\
-               -DTIZEN_FEATURE_AACPARSE_MODIFICATION\
-               -DTIZEN_FEATURE_QTDEMUX_MODIFICATION\
-               -DTIZEN_FEATURE_FLVDEMUX_MODIFICATION\
-               -DTIZEN_FEATURE_GST_UPSTREAM\
+                -DTIZEN_FEATURE_V4L2SRC_SUPPORT_CAMERA_ID\
+                -DTIZEN_FEATURE_V4L2VIDEO_ADJ_RANK\
+                -DTIZEN_FEATURE_WAVPARSE_MODIFICATION\
+                -DTIZEN_FEATURE_MP3PARSE_MODIFICATION\
+                -DTIZEN_FEATURE_AACPARSE_MODIFICATION\
+                -DTIZEN_FEATURE_QTDEMUX_MODIFICATION\
+                -DTIZEN_FEATURE_FLVDEMUX_MODIFICATION\
+                -DTIZEN_FEATURE_GST_UPSTREAM\
                 -DTIZEN_FEATURE_RTSP_MODIFICATION\
-               -DTIZEN_FEATURE_GST_MUX_ENHANCEMENT\
-               -DTIZEN_FEATURE_SOUP_MODIFICATION\
-               -DTIZEN_FEATURE_RGVOLUME_MODIFICATION\
-               -DTIZEN_FEATURE_BASEPARSE_MODIFICATION\
-               -DTIZEN_FEATURE_DISABLE_V4L2_DEPENDENCY\
-               -fstack-protector-strong\
-               -Wl,-z,relro\
-               -D_FORTIFY_SOURCE=2"
+                -DTIZEN_FEATURE_GST_MUX_ENHANCEMENT\
+                -DTIZEN_FEATURE_SOUP_MODIFICATION\
+                -DTIZEN_FEATURE_RGVOLUME_MODIFICATION\
+                -DTIZEN_FEATURE_BASEPARSE_MODIFICATION\
+                -DTIZEN_FEATURE_DISABLE_V4L2_DEPENDENCY\
+                -fstack-protector-strong\
+                -Wl,-z,relro\
+                -D_FORTIFY_SOURCE=2"
 %configure\
 %if ! 0%{?ENABLE_AALIB}
        --disable-aalib\
index 39f845c..0ce881c 100644 (file)
@@ -1168,9 +1168,15 @@ gst_v4l2_video_dec_register (GstPlugin * plugin, const gchar * basename,
     type_info.instance_init = gst_v4l2_video_dec_subinstance_init;
 
     subtype = g_type_register_static (type, type_name, &type_info, 0);
+#ifdef TIZEN_FEATURE_V4L2VIDEO_ADJ_RANK
+    if (!gst_element_register (plugin, type_name, GST_RANK_PRIMARY,
+            subtype))
+      GST_WARNING ("Failed to register plugin '%s'", type_name);
+#else
     if (!gst_element_register (plugin, type_name, GST_RANK_PRIMARY + 1,
             subtype))
       GST_WARNING ("Failed to register plugin '%s'", type_name);
+#endif
 
     g_free (type_name);
   }
index 379cc83..3d627b7 100644 (file)
@@ -1197,8 +1197,13 @@ gst_v4l2_video_enc_register (GstPlugin * plugin, GType type,
 
   subtype = g_type_register_static (type, type_name, &type_info, 0);
 
+#ifdef TIZEN_FEATURE_V4L2VIDEO_ADJ_RANK
+  if (!gst_element_register (plugin, type_name, GST_RANK_SECONDARY, subtype))
+    GST_WARNING ("Failed to register plugin '%s'", type_name);
+#else
   if (!gst_element_register (plugin, type_name, GST_RANK_PRIMARY + 1, subtype))
     GST_WARNING ("Failed to register plugin '%s'", type_name);
+#endif
 
   g_free (type_name);
 }