Skip to contentSkip to conversation

package/gstreamer1/gst1-plugins-good: Select GUDEV if available

PATCH Superseded Ezequiel Garcia 2 participants 3 messages Jun 1, 2020 – Jun 7, 2020

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/gstreamer1/gst1-plugins-good: Select GUDEV if available

From: Nicolas Dufresne <[email protected]>

Using udev for probes (such as Video4Linux2 devices probes) and device monitor greatly improves load time and monitoring performance.

It also enables hotplug monitoring for cameras.

---
v2:
* Enable/disable v4l2-gudev explicitly

 package/gstreamer1/gst1-plugins-good/Config.in           | 1 +
 .../gstreamer1/gst1-plugins-good/gst1-plugins-good.mk    | 9 +++++++++
 2 files changed, 10 insertions(+)
package/gstreamer1/gst1-plugins-good/Config.in +1 -0
index 20aebc473e89..be77f5a82e3d 100644
@@ -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
 
package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk +9 -0
index 223af9850897..bd4bdcbc1ff1 100644
@@ -40,6 +40,10 @@ else
 GST1_PLUGINS_GOOD_CONF_OPTS += -Djack=disabled
 endif
 
+ifeq ($(BR2_PACKAGE_LIBGUDEV),y)
+GST1_PLUGINS_GOOD_DEPENDENCIES += libgudev
+endif
+
 ifeq ($(BR2_PACKAGE_LIBV4L),y)
 GST1_PLUGINS_GOOD_CONF_OPTS += -Dv4l2-libv4l2=enabled
 GST1_PLUGINS_GOOD_DEPENDENCIES += libv4l
@@ -355,6 +359,11 @@ endif
 
 ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_V4L2),y)
 GST1_PLUGINS_GOOD_CONF_OPTS += -Dv4l2=enabled
+ifeq ($(BR2_PACKAGE_LIBGUDEV),y)
+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
Signature · 1 line
2.26.0.rc2
#1 lore raw

PATCH v2 1/1 package/gstreamer1/gst1-plugins-good: Select GUDEV if available

Ezequiel, Nicolas, All,

On 2020-06-01 13:43 -0300, Ezequiel Garcia spake thusly:

Quoted 22 lines

From: Nicolas Dufresne <[email protected]>

Using udev for probes (such as Video4Linux2 devices probes) and device monitor greatly improves load time and monitoring performance.

It also enables hotplug monitoring for cameras.

---
v2:
* Enable/disable v4l2-gudev explicitly

 package/gstreamer1/gst1-plugins-good/Config.in           | 1 +
 .../gstreamer1/gst1-plugins-good/gst1-plugins-good.mk    | 9 +++++++++
 2 files changed, 10 insertions(+)
package/gstreamer1/gst1-plugins-good/Config.in +0 -0
index 20aebc473e89..be77f5a82e3d 100644

package/gstreamer1/gst1-plugins-good/Config.in config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SHOUT2 · line 298

Quoted 4 lines
package/gstreamer1/gst1-plugins-good/Config.in +1 -0
@@ -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

So there is still something that evades my understanding: gudev is selected only when V4L2 is enabled.

However...

Quoted 8 lines
package/gstreamer1/gst1-plugins-good/Config.in +0 -0
 	help
 	  elements for Video 4 Linux
 
package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk +0 -0
index 223af9850897..bd4bdcbc1ff1 100644

package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk else · line 45

Quoted 6 lines
package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk +3 -0
@@ -40,6 +40,10 @@ else
 GST1_PLUGINS_GOOD_CONF_OPTS += -Djack=disabled
 endif
 
+ifeq ($(BR2_PACKAGE_LIBGUDEV),y)
+GST1_PLUGINS_GOOD_DEPENDENCIES += libgudev
+endif

The dependency is added glbally.

So we end up with this truth table:

gudev | v4l2 plugin | dependency
--------+-------------+------------
n | n | n
Y | n | Y
Y | Y | Y

(the fourth case is not possible, as the v4l2 plugin select gudev)

Is that what you expect?

From the commit log, it looks like v4l2 is only one case amongst many:
"Using udev for probes (such as Video4Linux2 devices probes)".

So, I would have expected the select to be on the main gst1-plugins0-good symbol:

menuconfig BR2_PACKAGE_GST1_PLUGINS_GOOD
bool "gst1-plugins-good"
select BR2_PACKAGE_LIBGUDEV if BR2_PACKAGE_HAS_UDEV

Regards,
Yann E. MORIN.

Quoted 22 lines
package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk +5 -0
 ifeq ($(BR2_PACKAGE_LIBV4L),y)
 GST1_PLUGINS_GOOD_CONF_OPTS += -Dv4l2-libv4l2=enabled
 GST1_PLUGINS_GOOD_DEPENDENCIES += libv4l
@@ -355,6 +359,11 @@ endif
 
 ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_V4L2),y)
 GST1_PLUGINS_GOOD_CONF_OPTS += -Dv4l2=enabled
+ifeq ($(BR2_PACKAGE_LIBGUDEV),y)
+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
Signature · 6 lines
2.26.0.rc2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH v2 1/1 package/gstreamer1/gst1-plugins-good: Select GUDEV if available

Quoted 61 lines · Yann E. MORIN

Ezequiel, Nicolas, All,

On 2020-06-01 13:43 -0300, Ezequiel Garcia spake thusly:

Quoted 22 lines

From: Nicolas Dufresne <[email protected]>

Using udev for probes (such as Video4Linux2 devices probes) and device monitor greatly improves load time and monitoring performance.

It also enables hotplug monitoring for cameras.

---
v2:
* Enable/disable v4l2-gudev explicitly

 package/gstreamer1/gst1-plugins-good/Config.in           | 1 +
 .../gstreamer1/gst1-plugins-good/gst1-plugins-good.mk    | 9 +++++++++
 2 files changed, 10 insertions(+)
package/gstreamer1/gst1-plugins-good/Config.in +0 -0
index 20aebc473e89..be77f5a82e3d 100644

package/gstreamer1/gst1-plugins-good/Config.in config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SHOUT2 · line 298

Quoted 4 lines
package/gstreamer1/gst1-plugins-good/Config.in +1 -0
@@ -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

So there is still something that evades my understanding: gudev is selected only when V4L2 is enabled.

However...

Quoted 8 lines
package/gstreamer1/gst1-plugins-good/Config.in +0 -0
      help
        elements for Video 4 Linux
 
package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk +0 -0
index 223af9850897..bd4bdcbc1ff1 100644

package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk else · line 45

Quoted 6 lines
package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk +3 -0
@@ -40,6 +40,10 @@ else
 GST1_PLUGINS_GOOD_CONF_OPTS += -Djack=disabled
 endif
 
+ifeq ($(BR2_PACKAGE_LIBGUDEV),y)
+GST1_PLUGINS_GOOD_DEPENDENCIES += libgudev
+endif

The dependency is added glbally.

So we end up with this truth table:

gudev | v4l2 plugin | dependency
--------+-------------+------------
n | n | n
Y | n | Y
Y | Y | Y

Quoted 7 lines

(the fourth case is not possible, as the v4l2 plugin select gudev)

Is that what you expect?

From the commit log, it looks like v4l2 is only one case amongst many:
"Using udev for probes (such as Video4Linux2 devices probes)".

Yes, that was the idea, but this is a mistake on my side, as I assumed gudev was being used by other plugins.

Seems Video4Linux2 plugins are really the only gudev users.

The REQUIREMENTS file in gst-plugins-good clarifies this:

Package:        gudev
Version:        >= 147
DebianPackage:  libgudev-1.0-dev
Plugins:        v4l2 (v4l2src)
URL:            http://www.freedesktop.org/software/systemd/
Notes:          This dependency is entirely optional, the video4linux plugin

will work just fine without it. gudev is only required for the device probing and monitoring functionality to detect video4linux devices appearing/disappearing at run-time.

Let me get a new patch.

Thanks again for the review,
Ezequiel

Quoted 40 lines

So, I would have expected the select to be on the main gst1-plugins0-good symbol:

menuconfig BR2_PACKAGE_GST1_PLUGINS_GOOD
bool "gst1-plugins-good"
select BR2_PACKAGE_LIBGUDEV if BR2_PACKAGE_HAS_UDEV

Regards,
Yann E. MORIN.

Quoted 18 lines
package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk +5 -1
 ifeq ($(BR2_PACKAGE_LIBV4L),y)
 GST1_PLUGINS_GOOD_CONF_OPTS += -Dv4l2-libv4l2=enabled
 GST1_PLUGINS_GOOD_DEPENDENCIES += libv4l
@@ -355,6 +359,11 @@ endif
 
 ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_V4L2),y)
 GST1_PLUGINS_GOOD_CONF_OPTS += -Dv4l2=enabled
+ifeq ($(BR2_PACKAGE_LIBGUDEV),y)
+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
--

2.26.0.rc2

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'