GNOME Bugzilla – Bug 639339
v4l2: fails to build with older kernels due to missing V4L_FIELD_INTERLACED_{TB,BT}
Last modified: 2011-01-12 22:45:42 UTC
With the latest pre-releases, I cannot build the v4l2 plugin on CentOS 5 (x86-64). Here is the error message: gstv4l2object.c: In function ‘gst_v4l2_object_get_nearest_size’: gstv4l2object.c:1987: error: ‘V4L2_FIELD_INTERLACED_TB’ undeclared (first use in this function) gstv4l2object.c:1987: error: (Each undeclared identifier is reported only once gstv4l2object.c:1987: error: for each function it appears in.) gstv4l2object.c:1988: error: ‘V4L2_FIELD_INTERLACED_BT’ undeclared (first use in this function) gstv4l2bufferpool.c: In function ‘gst_v4l2_buffer_pool_dqbuf’: gstv4l2bufferpool.c:565: error: ‘V4L2_FIELD_INTERLACED_TB’ undeclared (first use in this function) gstv4l2bufferpool.c:565: error: (Each undeclared identifier is reported only once gstv4l2bufferpool.c:565: error: for each function it appears in.) gstv4l2bufferpool.c:567: error: ‘V4L2_FIELD_INTERLACED_BT’ undeclared (first use in this function) make[2]: *** [libgstvideo4linux2_la-gstv4l2object.lo] Error 1 An easy workaround is to configure with --disable-gst_v4l2.
Could you attach your /usr/include/linux/videodev2.h please?
Created attachment 178166 [details] /usr/include/linux/videodev2.h from my CentOS 5 box
(In reply to comment #1) > Could you attach your /usr/include/linux/videodev2.h please? Attached.
This should fix it: commit 9dcb60822f2befa8d5eeee7d927681a7406427fc Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Wed Jan 12 20:38:59 2011 +0000 v4l2: define V4L2_FIELD_INTERLACED_{TB,BT} if not available in header Older kernels don't have these, and there's no easy way to check for the existance of enums that doesn't involve a configure check, so just define these if the V4L2_CAP_VIDEO_OUTPUT_OVERLAY define is not there, which was added in the same commit as the TB/BT enum. Fixes compilation on CentOS 5. https://bugzilla.gnome.org/show_bug.cgi?id=639339