[MPlayer-dev-eng] [PATCH] MPlayer-CVS with V4L compile when V4L2 installed

Arpi arpi at thot.banki.hu
Fri Aug 15 17:07:37 CEST 2003


Hi,

this is ok, can be commited. but please, only once! :)

> Hi,
> 
> this small patch allows to compile the file libmpdemux/tvi_v4l.c properly, 
> when the Linux is patched with the V4L2 patch, which automatically 
> includes <linux/videodev2.h> when you include <linux/videodev.h>.
> It is necessary then to prevent <linux/time.h> from including (by defining 
> the _LINUX_TIME_H macro) in order to resolve some collisions and it is 
> also necessary to prevent the defining of "struct v4l2_capability" and 
> "VIDIOC_QUERYCAP" in libmpdemux/tvi_v4l.c, when they are allready defined 
> in the <linux/videodev2.h>.
> 
> Martin Drab
> 
> 
> 
> diff -Naur MPlayer-20030814.orig/libmpdemux/tvi_v4l.c MPlayer
> -20030814/libmpdemux/tvi_v4l.c.
> --- MPlayer-20030814.orig/libmpdemux/tvi_v4l.c	2003-08-13 18:
> 01:53.000000000 +0200.
> +++ MPlayer-20030814/libmpdemux/tvi_v4l.c	2003-08-15 09:51:18.000000000 +0200.
> @@ -26,6 +26,10 @@.
>  #include <sys/ioctl.h>.
>  #include <sys/types.h>.
>  #include <sys/time.h>.
> +.
> +/* Necessary to prevent collisions between <linux/time.h> and
> <sys/time.h> when V4L2 is installed. */.
> +#define _LINUX_TIME_H.
> +.
>  #include <linux/videodev.h>.
>  #include <unistd.h>.
>  #include <sys/mman.h>.
> @@ -404,6 +408,7 @@.
>      }.
>  }.
>  .
> +#ifndef __LINUX_VIDEODEV2_H.
>  struct v4l2_capability.
>  {.
>          __u8    driver[16];     /* i.e. "bttv" */.
> @@ -415,6 +420,7 @@.
>  };.
>  .
>  #define VIDIOC_QUERYCAP         _IOR  ('V',  0, struct v4l2_capability).
> +#endif.
>  .
>  static int init(priv_t *priv).
>  {.
>  {
>  {
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
> 
> 


A'rpi / Astral & ESP-team

--
Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list