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 105467 - Check for V4L2 is not robust enough
Check for V4L2 is not robust enough
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.6.0
Other other
: Normal normal
: 0.6.1
Assigned To: Ronald Bultje
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-02-07 04:36 UTC by Loban Rahman
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Loban Rahman 2003-02-07 04:36:12 UTC
The check for V4L2 is not robust enough. Currently it just checks if
"videodev2.h" was found on the system, and if so, attempts to build the
V4L2 plugins. However, the videodev2.h file varies widely depending on the
version. For example, on my Mandrake 9.0 box, the v4l2_clip and
4l2_capability structs in videodev2.h are completely different from what
gstreamer expects, breaking compilation So, the check for V4L2 needs a
version check as well. I dunno what version is necessary, just that mine
isn't recent enough. Mine has:

        #define V4L2_MAJOR_VERSION      0
        #define V4L2_MINOR_VERSION      20
Comment 1 Ronald Bultje 2003-02-07 07:20:19 UTC
I just checked and v4l2 doesn't have versions anymore. I guess Gerd
removed them for some reason... I could check for absence of this
variable and only continue compiling if it's not there... Would that
be ok?
Comment 2 Loban Rahman 2003-02-07 09:29:29 UTC
I dunno. Were the versions removed when the API was deemed stable and
unchanging? If that's the case, it seems like your idea is a
reasonable check to make.

However, I think the most robust solution is to have one of them
"./configure checks" that attempts to compile a small program that
includes the videodev2.h file and manipulates the questionable
structs. If the compilation fails, then the videodev2.h is too old.

At the very least, these issues should be documented in the README. :-)
Comment 3 Christian Fredrik Kalager Schaller 2003-02-24 12:33:12 UTC
Ronald,Loban:  is there any unresolved issues in this bug? Or can it
be closed?
Comment 4 Ronald Bultje 2003-02-24 13:19:35 UTC
I actually need thomas to help me out here and suggest the best way to
do this. Let's discuss this tonight on IRC, ok?
Comment 5 Ronald Bultje 2003-02-27 15:11:50 UTC
Reply from Gerd:

"Easiest way is to ship a private copy of that header file."

So, should we do that? (It's evil, but...).
Comment 6 Ronald Bultje 2003-03-11 12:26:39 UTC
Current CVS should work. It checks for V4L2_{MAJOR,MINOR}_VERSION not
being defined. Also, it checks for struct timeval/timespec duplicate
definitions and does a crappy fix to solve that. Please try it out and
reopen if anything is wrong.