Skip to contentSkip to conversation

package/gstreamer1/gst1-plugins-good: Optionally select GUDEV

PATCH New Ezequiel Garcia 2 participants 3 messages May 31, 2020 – Jun 1, 2020 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/gstreamer1/gst1-plugins-good: Optionally select GUDEV

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.

---
 package/gstreamer1/gst1-plugins-good/Config.in            | 1 +
 package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk | 4 ++++
 2 files changed, 5 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 +4 -0
index 223af9850897..6878ce6ae85b 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
Signature · 1 line
2.26.0.rc2
#1 lore raw

PATCH 1/1 package/gstreamer1/gst1-plugins-good: Optionally select GUDEV

Ezequiel, Nicolas, All,

On 2020-05-31 10:53 -0300, Ezequiel Garcia spake thusly:

Quoted 19 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.

---
 package/gstreamer1/gst1-plugins-good/Config.in            | 1 +
 package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk | 4 ++++
 2 files changed, 5 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

The title is a bit misleading: gudev is not optional; instead, it is forcibly selected when udev is enabled.

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

Quoted 13 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 +2 -0
index 223af9850897..6878ce6ae85b 100644
@@ -40,6 +40,10 @@ else
 GST1_PLUGINS_GOOD_CONF_OPTS += -Djack=disabled
 endif
 
+ifeq ($(BR2_PACKAGE_LIBGUDEV),y)
+GST1_PLUGINS_GOOD_DEPENDENCIES += libgudev

I think we would also need to add:

    GST1_PLUGINS_GOOD_CONF_OPTS += -Dv4l2-gudev=enabled

and the converse when ghudev is not enabled:

    GST1_PLUGINS_GOOD_CONF_OPTS += -Dv4l2-gudev=disabled

Care to check that, and respin please?

Regards,
Yann E. MORIN.

Quoted 12 lines
package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk +2 -0
+endif
+
 ifeq ($(BR2_PACKAGE_LIBV4L),y)
 GST1_PLUGINS_GOOD_CONF_OPTS += -Dv4l2-libv4l2=enabled
 GST1_PLUGINS_GOOD_DEPENDENCIES += libv4l
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.  |
'------------------------------^-------^------------------^--------------------'

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

PATCH 1/1 package/gstreamer1/gst1-plugins-good: Optionally select GUDEV

Ezequiel, Nicolas, All,

On 2020-05-31 21:05 -0300, Ezequiel Garcia spake thusly:

Quoted 3 lines · Yann E. MORIN
Quoted 2 lines

On 2020-05-31 10:53 -0300, Ezequiel Garcia spake thusly:

Quoted 1 line

From: Nicolas Dufresne <[email protected]>

[--SNIP--]

Quoted 5 lines
Quoted 3 lines

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

Quoted 1 line
package/gstreamer1/gst1-plugins-good/Config.in +1 -0
+	select BR2_PACKAGE_LIBGUDEV if BR2_PACKAGE_HAS_UDEV

The title is a bit misleading: gudev is not optional; instead, it is forcibly selected when udev is enabled.

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

As I see it, gudev is optional, and brings the whole libglib2 stack behind it. Do we really need to forcibly select it?

I mean: can't we just keep the part in the .mk, to guarantee the build ordre when libgudev is enabled?

Quoted 2 lines
Quoted 2 lines

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

Quoted 2 lines
package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk +2 -0
+ifeq ($(BR2_PACKAGE_LIBGUDEV),y)
+GST1_PLUGINS_GOOD_DEPENDENCIES += libgudev

I.e. we just keep that part.

Quoted 5 lines
Quoted 4 lines

I think we would also need to add:

    GST1_PLUGINS_GOOD_CONF_OPTS += -Dv4l2-gudev=enabled
and the converse when ghudev is not enabled:
    GST1_PLUGINS_GOOD_CONF_OPTS += -Dv4l2-gudev=disabled

You made me dig on this a bit closer :-)

That was my intention. ;-)

Quoted 5 lines

v4l2-gudev is a meson feature, auto-detected by default, so the above is not required to enable it on the build.

The same applies to v4l2-libv4l2, so it seems to me enabling/disabling is not needed.

We want explcit enableing/disabling of optional features when there is an option for that: this ensures that the buildsystem of the package does not accidentally picks up the headers or libs from the host by chance (e.g. a build on an x86 host for an x86 target).

By the look of it, that val2-gudev option is exactly about controlling use of gudev:

option('v4l2-gudev', type : 'feature', value : 'auto',
description : 'Use libgudev for probing v4l2 devices')

So, is this correct, that this option controls use of gudev?

Quoted 6 lines

If the library is present, the only thing needed is the xxx_DEPENDENCIES change, to enforce a build order.

The story is different for the v4l2 option. It's also an auto-detected feature, but we are interested in controlling its enable/disable state.

Regards,
Yann E. MORIN.

Quoted 17 lines
Quoted 15 lines

Regards,
Yann E. MORIN.

Quoted 12 lines
package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk +2 -0
+endif
+
 ifeq ($(BR2_PACKAGE_LIBV4L),y)
 GST1_PLUGINS_GOOD_CONF_OPTS += -Dv4l2-libv4l2=enabled
 GST1_PLUGINS_GOOD_DEPENDENCIES += libv4l
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.  |
'------------------------------^-------^------------------^--------------------'