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

Rémi Denis-Courmont remi at remlab.net
Tue Oct 11 14:31:26 CEST 2011


On Sun,  9 Oct 2011 15:18:12 +0800, Andreas Schwarz
<bikinobakeru at gmail.com> wrote:
> 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. */

Eeeeeeh?

> +#ifndef V4L2_COLORFX_NEGATIVE

This does not make sense for enumeration values.

> +# 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>

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list