[v4l2src] Enable libv4l2 to use emulated format 23/228623/2 accepted/tizen/unified/20200325.055653 submit/tizen/20200324.013709
authorJeongmo Yang <jm80.yang@samsung.com>
Tue, 24 Mar 2020 07:22:44 +0000 (16:22 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Tue, 24 Mar 2020 07:41:54 +0000 (16:41 +0900)
- libv4l2 was disabled as default since 1.14.
- libv4l2 can be enabled by run-time environment value(GST_V4L2_USE_LIBV4L2=1).
- This patch always enables libv4l2 with tizen feature
  and GST_V4L2_USE_LIBV4L2 will be ignored in run-time.

[Version] 1.16.2-1
[Profile] Common
[Issue Type] Update

Change-Id: I9588f455dd7df12f51766a5446971f3583368ba6
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/gst-plugins-good.spec
sys/v4l2/gstv4l2object.c

index 392cb7e..c46a535 100644 (file)
@@ -3,7 +3,7 @@
 
 Name:           gst-plugins-good
 Version:        1.16.2
-Release:        0
+Release:        1
 License:        LGPL-2.1+
 Summary:        GStreamer Streaming-Media Framework Plug-Ins
 Url:            http://gstreamer.freedesktop.org/
@@ -70,24 +70,26 @@ plugins not included in official Tizen images, which may be used for development
 # warning: failed to load external entity "xml/plugin-video4linux2.xml"
 export V=1
 NOCONFIGURE=1 ./autogen.sh
-export CFLAGS+=" -DTIZEN_FEATURE_V4L2SRC_SCAN_DEVICE_NODE\
-                -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"
+export CFLAGS+=" \
+       -DTIZEN_FEATURE_V4L2SRC_SCAN_DEVICE_NODE\
+       -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\
+       -DTIZEN_FEATURE_USE_LIBV4L2\
+       -fstack-protector-strong\
+       -Wl,-z,relro\
+       -D_FORTIFY_SOURCE=2"
 %configure\
 %if ! 0%{?ENABLE_AALIB}
        --disable-aalib\
index 92fabc6..d04cc3d 100644 (file)
@@ -516,7 +516,11 @@ gst_v4l2_object_new (GstElement * element,
 
   /* We now disable libv4l2 by default, but have an env to enable it. */
 #ifdef HAVE_LIBV4L2
+#ifdef TIZEN_FEATURE_USE_LIBV4L2
+  if (1) {
+#else /* TIZEN_FEATURE_USE_LIBV4L2 */
   if (g_getenv ("GST_V4L2_USE_LIBV4L2")) {
+#endif /* TIZEN_FEATURE_USE_LIBV4L2 */
     v4l2object->fd_open = v4l2_fd_open;
     v4l2object->close = v4l2_close;
     v4l2object->dup = v4l2_dup;