[vlc-devel] [PATCH] Fix a problem with outdated Video4Linux2 headers.

Andreas Schwarz bikinobakeru at gmail.com
Sun Oct 9 09:18:12 CEST 2011


Hi everyone,
On some kernels, the compilation of libv4l2_plugin_la-video.lo fails, because 
of outdated Video4Linux2 headers. This patch attempts to fix this.

The headers in question are:
V4L2_COLORFX_NEGATIVE
V4L2_COLORFX_EMBOSS
V4L2_COLORFX_SKETCH
V4L2_COLORFX_SKY_BLUE
V4L2_COLORFX_GRASS_GREEN 
V4L2_COLORFX_SKIN_WHITEN
V4L2_COLORFX_VIVID

It occured with a 2.6.35-25 kernel on Ubuntu 10.04 x86_64.
 
 More details here:
 http://forum.videolan.org/viewtopic.php?f=13&t=94751

Cheers

Andreas

---
 modules/access/v4l2/v4l2.h |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/modules/access/v4l2/v4l2.h b/modules/access/v4l2/v4l2.h
index 7fed7b7..72be580 100644
--- a/modules/access/v4l2/v4l2.h
+++ b/modules/access/v4l2/v4l2.h
@@ -51,6 +51,29 @@
 # define V4L2_CID_ROTATE (V4L2_CID_BASE+34)
 #endif
 
+/* Some kernels crash if these values not defined. */
+#ifndef V4L2_COLORFX_NEGATIVE
+# define V4L2_COLORFX_NEGATIVE 3
+#endif
+#ifndef V4L2_COLORFX_EMBOSS
+# define V4L2_COLORFX_EMBOSS 4
+#endif
+#ifndef V4L2_COLORFX_SKETCH
+# define V4L2_COLORFX_SKETCH 5
+#endif
+#ifndef V4L2_COLORFX_SKY_BLUE
+# define V4L2_COLORFX_SKY_BLUE 6
+#endif
+#ifndef V4L2_COLORFX_GRASS_GREEN
+# define V4L2_COLORFX_GRASS_GREEN 7
+#endif
+#ifndef V4L2_COLORFX_SKIN_WHITEN
+# define V4L2_COLORFX_SKIN_WHITEN 8
+#endif
+#ifndef V4L2_COLORFX_VIVID
+# define V4L2_COLORFX_VIVID 9
+#endif
+
 
 #ifdef HAVE_LIBV4L2
 #   include <libv4l2.h>
-- 
1.7.0.4




More information about the vlc-devel mailing list