Skip to contentSkip to conversation

v4l-utils: a new recipe

PATCH In review [email protected] 3 participants 8 messages Aug 8, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 v4l-utils: a new recipe

From: Nitin A Kamble <[email protected]>

The v4l-utils recipe provides v4l2-ctl and other tools, which help in understanding the configuration needed by v4l2 devices like a camera.

This recipe is imported from meta-oe layer, and then updated and modified to work with the newest version.

---
 meta/recipes-multimedia/v4lapps/v4l-utils_1.0.0.bb | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 meta/recipes-multimedia/v4lapps/v4l-utils_1.0.0.bb
meta/recipes-multimedia/v4lapps/v4l-utils_1.0.0.bb new file +35 -0
new file mode 100644
index 0000000..738e3ca
@@ -0,0 +1,35 @@
+DESCRIPTION = "v4l2 and IR applications"
+LICENSE = "GPLv2 & LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=48da9957849056017dc568bbc43d8975 \
+                    file://COPYING.libv4l;md5=d749e86a105281d7a44c2328acebc4b0"
+
+PR = "r0"
+
+DEPENDS = "jpeg"
+
+inherit autotools gettext
+
+# libv4l was absorbed into this, let OE know that
+PROVIDES = "libv4l"
+
+SRC_URI = "http://linuxtv.org/downloads/v4l-utils/v4l-utils-1.0.0.tar.bz2"
+
+SRC_URI[md5sum] = "2127f2d06be9162b0d346f7037a9e852"
+SRC_URI[sha256sum] = "1de3882099e04e89e354675ee408b82c8ac8afd3ca6ab27ea321771901285f30"
+
+EXTRA_OECONF = "--disable-qv4l2 --enable-shared"
+
+do_configure() {
+    # autotools_do_configure fails with:
+    # | configure.ac:139: error: required file 'build-aux/config.rpath' not found
+    autoreconf -vfi
+    oe_runconf
+}
+
+PACKAGES =+ "rc-keymaps libv4l-dbg libv4l libv4l-dev"
+
+FILES_rc-keymaps = "${sysconfdir}/rc* ${base_libdir}/udev/rc*"
+FILES_${PN} = "${bindir} ${sbindir} ${base_libdir}/udev/rules.d/70-infrared.rules"
+FILES_libv4l += "${libdir}/libv4l/* ${libdir}/*.so.*"
+FILES_libv4l-dbg += "${libdir}/libv4l/.debug ${libdir}/libv4l/plugins/.debug"
+FILES_libv4l-dev += "${libdir}/*.so ${includedir}/lib* ${libdir}/pkgconfig/lib*"
Signature · 1 line
1.8.1.4
#1 lore raw

PATCH 2/3 packagegroup-base.bb: add a new machine feature: v4l2

From: Nitin A Kamble <[email protected]>

This new machine feature gives a choice to add the video for linux 2 drivers and related utilities to BSPs.

---
 meta/recipes-core/packagegroups/packagegroup-base.bb | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/recipes-core/packagegroups/packagegroup-base.bb +8 -0
index 1c0c757..839c400 100644
@@ -24,6 +24,7 @@ PACKAGES = ' \
             ${@base_contains("MACHINE_FEATURES", "serial", "packagegroup-base-serial", "", d)} \
             ${@base_contains("MACHINE_FEATURES", "usbgadget", "packagegroup-base-usbgadget", "", d)} \
             ${@base_contains("MACHINE_FEATURES", "usbhost", "packagegroup-base-usbhost", "", d)} \
+            ${@base_contains("MACHINE_FEATURES", "v4l2", "packagegroup-base-v4l2", "", d)} \
             \
             ${@base_contains("DISTRO_FEATURES", "bluetooth", "packagegroup-base-bluetooth", "", d)} \
             ${@base_contains("DISTRO_FEATURES", "wifi", "packagegroup-base-wifi", "", d)} \
@@ -60,6 +61,7 @@ RDEPENDS_packagegroup-base = "\
     ${@base_contains('MACHINE_FEATURES', 'acpi', 'packagegroup-base-acpi', '',d)} \
     ${@base_contains('MACHINE_FEATURES', 'keyboard', 'packagegroup-base-keyboard', '',d)} \
     ${@base_contains('MACHINE_FEATURES', 'phone', 'packagegroup-base-phone', '',d)} \
+    ${@base_contains('MACHINE_FEATURES', 'v4l2', 'packagegroup-base-v4l2', '',d)} \
     \
     ${@base_contains('COMBINED_FEATURES', 'alsa', 'packagegroup-base-alsa', '',d)} \
     ${@base_contains('COMBINED_FEATURES', 'ext2', 'packagegroup-base-ext2', '',d)} \
@@ -355,6 +357,12 @@ SUMMARY_packagegroup-base-zeroconf = "Zeroconf support"
 RDEPENDS_packagegroup-base-zeroconf = "\
     avahi-daemon"
 
+SUMMARY_packagegroup-base-v4l2 = "Video for Linux 2 support"
+RDEPENDS_packagegroup-base-v4l2 = "\
+    kernel-module-v4l2-int-device \
+    kernel-module-v4l2-common \
+    v4l-utils"
+
 SUMMARY_packagegroup-base-ipv6 = "IPv6 support"
 RDEPENDS_packagegroup-base-ipv6 = "\
     "
Signature · 1 line
1.8.1.4
#2 lore raw

PATCH 3/3 gst-meta-base: bring in the v4l2 related gst plugin

In reply to [email protected]

From: Nitin A Kamble <[email protected]>

If the v4l2 machine feature is enabled, then the v4l2 gstreamer plugin is also pulled in the gst-meta-base packages.

---
 meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb +3 -1
index 210da37..c1139f4 100644
@@ -35,7 +35,9 @@ RDEPENDS_gst-meta-base = "\
     gst-plugins-base-videoscale \
     gst-plugins-base-ffmpegcolorspace \
     gst-plugins-good-autodetect \
-    gst-plugins-good-souphttpsrc"
+    gst-plugins-good-souphttpsrc \
+    gst-plugins-base-videotestsrc \
+    ${@base_contains('MACHINE_FEATURES', 'v4l2', 'gst-plugins-good-video4linux2', '', d)}"
 
 RRECOMMENDS_gst-meta-x11-base = "\
     gst-plugins-base-ximagesink \
Signature · 1 line
1.8.1.4
#3 lore raw

Re: [PATCH 3/3] gst-meta-base: bring in the v4l2 related gst plugin

Quoted 15 lines · On Thu, Aug 8, 2013 at 6:34 PM, <[email protected]> wrote:

From: Nitin A Kamble <[email protected]>

If the v4l2 machine feature is enabled, then the v4l2 gstreamer plugin is also pulled in the gst-meta-base packages.

---
 meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb +0 -0
index 210da37..c1139f4 100644

meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb RDEPENDS_gst-meta-base = "\ · line 39

Quoted 6 lines
meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb +2 -1
@@ -35,7 +35,9 @@ RDEPENDS_gst-meta-base = "\
     gst-plugins-base-videoscale \
     gst-plugins-base-ffmpegcolorspace \
     gst-plugins-good-autodetect \
-    gst-plugins-good-souphttpsrc"
+    gst-plugins-good-souphttpsrc \
+    gst-plugins-base-videotestsrc \

videotestsrc is not related to this change.

Quoted 11 lines
meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb +1 -1
+    ${@base_contains('MACHINE_FEATURES', 'v4l2', 'gst-plugins-good-video4linux2', '', d)}"
 
 RRECOMMENDS_gst-meta-x11-base = "\
     gst-plugins-base-ximagesink \
--

1.8.1.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#4 lore raw

Re: [PATCH 3/3] gst-meta-base: bring in the v4l2 related gst plugin

Quoted 22 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Otavio Salvador
Sent: Thursday, August 08, 2013 2:57 PM
To: Kamble, Nitin A
Cc: Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCH 3/3] gst-meta-base: bring in the v4l2 related gst plugin

Quoted 10 lines · On Thu, Aug 8, 2013 at 6:34 PM, <[email protected]> wrote:

From: Nitin A Kamble <[email protected]>

If the v4l2 machine feature is enabled, then the v4l2 gstreamer plugin is also pulled in the gst-meta-base packages.

---
 meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 15 lines

meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb RDEPENDS_gst-meta-base = "\ · line 39

Quoted 12 lines
meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb +2 -1
index 210da37..c1139f4 100644
@@ -35,7 +35,9 @@ RDEPENDS_gst-meta-base = "\
     gst-plugins-base-videoscale \
     gst-plugins-base-ffmpegcolorspace \
     gst-plugins-good-autodetect \
-    gst-plugins-good-souphttpsrc"
+    gst-plugins-good-souphttpsrc \
+    gst-plugins-base-videotestsrc \

videotestsrc is not related to this change.

Thanks for the feedback Otavio. I need it for the encoding support. So I will move it in a separate commit instead.

Nitin

Quoted 19 lines

meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb RDEPENDS_gst-meta-base = "\ · line 40

Quoted 1 line
meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb +1 -0
+    ${@base_contains('MACHINE_FEATURES', 'v4l2', 'gst-plugins-good-

video4linux2', '', d)}"

Quoted 10 lines
meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb +0 -1
 RRECOMMENDS_gst-meta-x11-base = "\
     gst-plugins-base-ximagesink \
--

1.8.1.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750

#5 lore raw

Re: [PATCH 3/3] gst-meta-base: bring in the v4l2 related gst plugin

In reply to [email protected]
Quoted 15 lines · On Thu, Aug 08, 2013 at 09:34:29PM +0000, [email protected] wrote:

From: Nitin A Kamble <[email protected]>

If the v4l2 machine feature is enabled, then the v4l2 gstreamer plugin is also pulled in the gst-meta-base packages.

---
 meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb +0 -0
index 210da37..c1139f4 100644

meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb RDEPENDS_gst-meta-base = "\ · line 40

Quoted 7 lines
meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb +3 -1
@@ -35,7 +35,9 @@ RDEPENDS_gst-meta-base = "\
     gst-plugins-base-videoscale \
     gst-plugins-base-ffmpegcolorspace \
     gst-plugins-good-autodetect \
-    gst-plugins-good-souphttpsrc"
+    gst-plugins-good-souphttpsrc \
+    gst-plugins-base-videotestsrc \
+    ${@base_contains('MACHINE_FEATURES', 'v4l2', 'gst-plugins-good-video4linux2', '', d)}"

I was expecting to see PACKAGECONFIG somewhere, is v4l2 autodetected?

Why not keep v4l2-utils in meta-multimedia?

Quoted 10 lines
meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb +0 -0
 RRECOMMENDS_gst-meta-x11-base = "\
     gst-plugins-base-ximagesink \
Signature · 6 lines
1.8.1.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#6 lore raw

Re: [PATCH 3/3] gst-meta-base: bring in the v4l2 related gst plugin

Quoted 36 lines

-----Original Message-----
From: Martin Jansa [mailto:[email protected]]
Sent: Thursday, August 08, 2013 3:37 PM
To: Kamble, Nitin A
Cc: [email protected]
Subject: Re: [OE-core] [PATCH 3/3] gst-meta-base: bring in the v4l2 related gst plugin

Quoted 16 lines · On Thu, Aug 08, 2013 at 09:34:29PM +0000, [email protected] wrote:

From: Nitin A Kamble <[email protected]>

If the v4l2 machine feature is enabled, then the v4l2 gstreamer plugin is also pulled in the gst-meta-base packages.

---
 meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb +0 -0
index 210da37..c1139f4 100644

meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb RDEPENDS_gst-meta-base = "\ · line 40

Quoted 7 lines
meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb +3 -1
@@ -35,7 +35,9 @@ RDEPENDS_gst-meta-base = "\
     gst-plugins-base-videoscale \
     gst-plugins-base-ffmpegcolorspace \
     gst-plugins-good-autodetect \
-    gst-plugins-good-souphttpsrc"
+    gst-plugins-good-souphttpsrc \
+    gst-plugins-base-videotestsrc \
+    ${@base_contains('MACHINE_FEATURES', 'v4l2', 'gst-plugins-good-

video4linux2', '', d)}"

Quoted 1 line

I was expecting to see PACKAGECONFIG somewhere, is v4l2 autodetected?

There are PACKAGECONFIG definitions for v4l in meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc & meta/recipes-multimedia/gstreamer/gst-plugins-good_0.10.31.bb in oecore, which controls building of the v4l2 plugin. And I see it is built even when v4l is not listed in PACKAGECONFIG var, so looks like it is autodetected.

But the above change is to make sure that the v4l2 plugins gets pulled in the image.

Quoted 2 lines

Why not keep v4l2-utils in meta-multimedia?

Because of the general availability of accelerated encoding in processors, many BSPs can include the accelerated encoding support. Also because the gstreamers plugin for v4l2 is in oecore, so oecore will be ideal location for v4l-utils.

Thanks,
Nitin

Quoted 14 lines
Quoted 11 lines
meta/recipes-multimedia/gstreamer/gst-meta-base_0.10.bb +0 -1
 RRECOMMENDS_gst-meta-x11-base = "\
     gst-plugins-base-ximagesink \
--

1.8.1.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

--
Martin 'JaMa' Jansa jabber: [email protected]

#7 lore raw

cover RFC: few commits for a new machine feature: v4l2

From: Nitin A Kamble <[email protected]>

Here are few commits to add a new machine feature, v4l2. These commits provide:

* A new recipe which provides tools to poke v4l2 config on the target
* a new machine feature: v4l2 which brings a set of related packages.
* modification to gst-meta-base recipe, to enable the v4l2 gstreamer plugins, when the v4l2 machine features is enabled.

With this, one can easily enable a v4l2 video device on any BSP. This v4l2 support will also be used by the upcoming hardware accelerated encoding support for BSPs.

I am sending these commits as "Request for comments" for now, but I also see that these are complete enough to pull in the oecore layer.

Thanks,
Nitin

The following changes since commit f63e7f4323368c0d6fe7a1d44393a7e15652d4f2:

subversion: Add patch to use neon 0.30 (2013-08-07 07:43:47 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib nitin/misc
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=nitin/misc

Nitin A Kamble (3):
v4l-utils: a new recipe packagegroup-base.bb: add a new machine feature: v4l2
gst-meta-base: bring in the v4l2 related gst plugin

 .../packagegroups/packagegroup-base.bb             |  8 +++++
 .../gstreamer/gst-meta-base_0.10.bb                |  4 ++-
 meta/recipes-multimedia/v4lapps/v4l-utils_1.0.0.bb | 35 ++++++++++++++++++++++
 3 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-multimedia/v4lapps/v4l-utils_1.0.0.bb
Signature · 1 line
1.8.1.4