package/gstreamer1/gst1-plugins-good: Enable GUDEV for V4L2 if available
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Mon, 8 Jun 2020 00:00:26 +0000 (21:00 -0300)
committerYann E. MORIN <yann.morin.1998@free.fr>
Thu, 2 Jul 2020 21:43:35 +0000 (23:43 +0200)
Video4Linux2 plugins can udev for device probing and monitor.
This greatly improves load time and monitoring performance.

It also enables hotplug monitoring for cameras.

gstreamer is libglib2-based; libgudev is libnglib2-based. So they both
have the same basic dependencies as liblib2 has, and thus propagating
the dependencies of libgudev is not necessary (but might be confusing in
the future, even though such a change is highly unlikely...)

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/gstreamer1/gst1-plugins-good/Config.in
package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk

index 20aebc473e893b8bdac16c5b1003edc091784dde..be77f5a82e3d4ec46b269495557e4cf4dbee0bd2 100644 (file)
@@ -295,6 +295,7 @@ config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SHOUT2
 config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_V4L2
        bool "v4l2"
        depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # multi planar api
+       select BR2_PACKAGE_LIBGUDEV if BR2_PACKAGE_HAS_UDEV
        help
          elements for Video 4 Linux
 
index 6709f14ccab4a19a9b5ffdace3eafbd796abd962..eed4bfe117b44b438e503b26ebb389160279eaaa 100644 (file)
@@ -354,6 +354,13 @@ endif
 
 ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_V4L2),y)
 GST1_PLUGINS_GOOD_CONF_OPTS += -Dv4l2=enabled
+# Enable use of gudev if available, for device probing and monitoring.
+ifeq ($(BR2_PACKAGE_LIBGUDEV),y)
+GST1_PLUGINS_GOOD_DEPENDENCIES += libgudev
+GST1_PLUGINS_GOOD_CONF_OPTS += -Dv4l2-gudev=enabled
+else
+GST1_PLUGINS_GOOD_CONF_OPTS += -Dv4l2-gudev=disabled
+endif
 else
 GST1_PLUGINS_GOOD_CONF_OPTS += -Dv4l2=disabled
 endif