v4l2: define V4L2_FIELD_INTERLACED_{TB,BT} if not available in header
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 12 Jan 2011 20:38:59 +0000 (20:38 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Wed, 12 Jan 2011 22:41:17 +0000 (22:41 +0000)
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

sys/v4l2/gstv4l2bufferpool.c
sys/v4l2/gstv4l2object.c

index 505689a..e976ec5 100644 (file)
 #include "v4l2_calls.h"
 #include "gst/gst-i18n-plugin.h"
 
+/* videodev2.h is not versioned and we can't easily check for the presence
+ * of enum values at compile time, but the V4L2_CAP_VIDEO_OUTPUT_OVERLAY define
+ * was added in the same commit as V4L2_FIELD_INTERLACED_{TB,BT} (b2787845) */
+#ifndef V4L2_CAP_VIDEO_OUTPUT_OVERLAY
+#define V4L2_FIELD_INTERLACED_TB 8
+#define V4L2_FIELD_INTERLACED_BT 9
+#endif
+
 
 GST_DEBUG_CATEGORY_EXTERN (v4l2_debug);
 #define GST_CAT_DEFAULT v4l2_debug
index 21ec2bc..7e15489 100644 (file)
 
 #include "gst/gst-i18n-plugin.h"
 
+/* videodev2.h is not versioned and we can't easily check for the presence
+ * of enum values at compile time, but the V4L2_CAP_VIDEO_OUTPUT_OVERLAY define
+ * was added in the same commit as V4L2_FIELD_INTERLACED_{TB,BT} (b2787845) */
+#ifndef V4L2_CAP_VIDEO_OUTPUT_OVERLAY
+#define V4L2_FIELD_INTERLACED_TB 8
+#define V4L2_FIELD_INTERLACED_BT 9
+#endif
 
 GST_DEBUG_CATEGORY_EXTERN (v4l2_debug);
 #define GST_CAT_DEFAULT v4l2_debug