After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 563504 - add libv4l2 support to v4l2 gst plugin - required for most new webcams
add libv4l2 support to v4l2 gst plugin - required for most new webcams
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.x
Other Linux
: Normal major
: 0.10.14
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 553132
 
 
Reported: 2008-12-06 22:03 UTC by Alexandre Rostovtsev
Modified: 2009-01-23 08:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fedora's v4l2 plugin libv4l2 patch, for version 0.10.11 (23.10 KB, patch)
2008-12-06 22:05 UTC, Alexandre Rostovtsev
none Details | Review
Patch to make libv4l dependency non-automagic (1.00 KB, patch)
2008-12-06 22:09 UTC, Alexandre Rostovtsev
committed Details | Review

Description Alexandre Rostovtsev 2008-12-06 22:03:28 UTC
In kernel 2.6.27 and higher, the drivers for gspca and most uvc webcams (i.e. most USB webcams in existence) require userspace v4l2 clients to do their own video format conversion. The gstreamer v4l2 plugin (all versions up to 0.10.11, and the CVS version too, as far as I can tell) currently does not perform this
conversion, hence making the plugin very nearly useless.

Fortunately, Fedora has done the hard work of developing a patch for the v4l2 plugin to use the libv4l2 library to do automatic format conversion.

See http://cvs.fedoraproject.org/viewvc/rpms/gstreamer-plugins-good/devel/gst-plugins-good-0.10.9-libv4l.patch?view=log

Works so well that Debian and Ubuntu have borrowed and started using it too:

http://packages.debian.org/changelogs/pool/main/g/gst-plugins-good0.10/gst-plugins-good0.10_0.10.11-2/changelog
http://changelogs.ubuntu.com/changelogs/pool/main/g/gst-plugins-good0.10/gst-plugins-good0.10_0.10.10.4-1ubuntu1/changelog


But for reasons unknown, neither Fedora nor Debian nor Ubuntu have bothered to actually submit the patch upstream! So, I suppose it falls to me, a Gentoo user, to do it for them...
Comment 1 Alexandre Rostovtsev 2008-12-06 22:05:45 UTC
Created attachment 124075 [details] [review]
Fedora's v4l2 plugin libv4l2 patch, for version 0.10.11

Fedora's patch
Comment 2 Alexandre Rostovtsev 2008-12-06 22:09:54 UTC
Created attachment 124077 [details] [review]
Patch to make libv4l dependency non-automagic

Unfortunately, Fedora's patch makes the dependency on libv4l2 "automagic": if it's detected by configure, it will always be compiled-in, with no way to opt-out. Generally, that's not a very good policy; so here is a patch (to apply on top of Fedora's) that adds an --enable-libv4l2 flag to configure. By default, libv4l will still be compiled-in if it is found; however, now users have a way of disabling the dependency should they want to.
Comment 3 Alexandre Rostovtsev 2008-12-06 22:16:51 UTC
For tracking purposes, here is a link to the relevant bug in Gentoo bugzilla:
http://bugs.gentoo.org/show_bug.cgi?id=250079
Comment 4 Sebastian Dröge (slomo) 2008-12-07 19:01:22 UTC
The first part was already committed some weeks ago ;)

2008-12-07  Sebastian Dröge  <sebastian.droege@collabora.co.uk>

        Patch by: Alexandre Rostovtsev <tetromino at gmail dot com>

        * configure.ac:
        Make usage of libv4l optional by a configure parameter.
        Fixes bug #563504.
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2008-12-10 09:51:25 UTC
Is the colorspace conversion a conversion from raw (bayer) to yuv/rgb? I am asking because we already have a colorspace conversion element that handles various yuv and rfb formats.
Comment 6 Sebastian Dröge (slomo) 2008-12-10 10:11:52 UTC
(In reply to comment #5)
> Is the colorspace conversion a conversion from raw (bayer) to yuv/rgb? I am
> asking because we already have a colorspace conversion element that handles
> various yuv and rfb formats.

Not that I can answer this but the only element that converts bayer is the bayer element from gst-plugins-bad (which can convert from/to rgb). ffmpegcolorspace doesn't support bayer yet.
Comment 7 Alexandre Rostovtsev 2008-12-10 12:49:31 UTC
(In reply to comment #5)
> Is the colorspace conversion a conversion from raw (bayer) to yuv/rgb? I am
> asking because we already have a colorspace conversion element that handles
> various yuv and rfb formats.

from the libv4l README:

"libv4lconvert offers functions to convert from any (known) pixelformat
to V4l2_PIX_FMT_BGR24 or V4l2_PIX_FMT_YUV420.

Currently the following source formats are supported:
jpeg, mjpeg, bayer (all 4 variants: bggr, rggb, gbrg, grbg),
spca501 (chip specific yuv 420 with interlaced components),
spca561 (chip specific compressed gbrg bayer)
For more details on the v4lconvert_ functions see libv4lconvert.h"