diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-03-30 13:58:00 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-03-30 13:58:00 +0000 |
commit | 4f90625b8e21f163da790d2225e9fbbb010e417b (patch) | |
tree | 060e5248bdcf722ab7cf7ab1a8db7b9b6b35ebf3 | |
parent | eb272260cc9d7dca466f1f2f45cf216af31d7077 (diff) | |
download | gstreamer-plugins-base-4f90625b8e21f163da790d2225e9fbbb010e417b.tar.gz |
0.6.1 accepted release patch fixes v4l/v4l2 plugin compilation problems
Original commit message from CVS:
0.6.1 accepted release patch fixes v4l/v4l2 plugin compilation problems
-rw-r--r-- | configure.ac | 25 | ||||
-rw-r--r-- | sys/v4l/gstv4lelement.c | 4 | ||||
-rw-r--r-- | sys/v4l/gstv4lelement.h | 15 | ||||
-rw-r--r-- | sys/v4l/gstv4lmjpegsink.c | 4 | ||||
-rw-r--r-- | sys/v4l/gstv4lmjpegsrc.c | 4 | ||||
-rw-r--r-- | sys/v4l/gstv4lsrc.c | 4 | ||||
-rw-r--r-- | sys/v4l/v4l-overlay_calls.c | 4 | ||||
-rw-r--r-- | sys/v4l/v4l_calls.c | 4 | ||||
-rw-r--r-- | sys/v4l/v4lmjpegsink_calls.c | 4 | ||||
-rw-r--r-- | sys/v4l/v4lmjpegsrc_calls.c | 4 | ||||
-rw-r--r-- | sys/v4l/v4lsrc_calls.c | 4 |
11 files changed, 73 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 727b34d5b..df4975dcb 100644 --- a/configure.ac +++ b/configure.ac @@ -294,15 +294,36 @@ dnl this one is for hadess, no qcam when no nasm found ]) dnl *** Video 4 Linux *** +dnl for information about the header/define, see sys/v4l/gstv4lelement.h translit(dnm, m, l) AM_CONDITIONAL(USE_V4L, true) GST_CHECK_FEATURE(V4L, [Video 4 Linux], v4lsrc v4lmjpegsrc v4lmjpegsink, [ - AC_CHECK_DECL(VID_TYPE_MPEG_ENCODER, HAVE_V4L="yes", HAVE_V4L="no", [#include <linux/videodev.h>]) + AC_CHECK_DECL(VID_TYPE_MPEG_ENCODER, HAVE_V4L="yes", HAVE_V4L="no", [ +#include <sys/types.h> +#define _LINUX_TIME_H +#include <linux/videodev.h> + ]) ]) dnl *** Video 4 Linux 2*** +dnl for information about the header/define, see sys/v4l2/gstv4l2element.h translit(dnm, m, l) AM_CONDITIONAL(USE_V4L2, true) GST_CHECK_FEATURE(V4L2, [Video 4 Linux 2], v4l2src, [ - AC_CHECK_HEADER(linux/videodev2.h, HAVE_V4L2="yes", HAVE_V4L2="no") + AC_MSG_CHECKING([Checking for uptodate v4l2 installation]) + AC_TRY_COMPILE([ +#include <sys/types.h> +#include <linux/types.h> +#define _LINUX_TIME_H +#include <linux/videodev2.h> +#if defined(V4L2_MAJOR_VERSION) || defined(V4L2_MINOR_VERSION) +#error too early v4l2 version or no v4l2 at all +#endif + ], [ +return 0; + ], [ HAVE_V4L2="yes" && AC_MSG_RESULT(yes)], + [ HAVE_V4L2="no" && AC_MSG_RESULT(no) && + AC_CHECK_HEADER(linux/videodev2.h, + [ AC_MSG_WARN([video4linux2 headers were found, but they're old. Please update v4l2 to compile the v4l2 plugins])], + [ AC_MSG_WARN([video4linux2 was not found])])]) ]) dnl *** Video CD *** diff --git a/sys/v4l/gstv4lelement.c b/sys/v4l/gstv4lelement.c index a5b635b60..bdcdbb6c9 100644 --- a/sys/v4l/gstv4lelement.c +++ b/sys/v4l/gstv4lelement.c @@ -17,6 +17,10 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "v4l_calls.h" /* elementfactory information */ diff --git a/sys/v4l/gstv4lelement.h b/sys/v4l/gstv4lelement.h index 97cccc017..ba440c751 100644 --- a/sys/v4l/gstv4lelement.h +++ b/sys/v4l/gstv4lelement.h @@ -20,9 +20,22 @@ #ifndef __GST_V4LELEMENT_H__ #define __GST_V4LELEMENT_H__ -#include <config.h> #include <gst/gst.h> + +/* Because of some really cool feature in video4linux1, also known as + * 'not including sys/types.h and sys/time.h', we had to include it + * ourselves. In all their intelligence, these people decided to fix + * this in the next version (video4linux2) in such a cool way that it + * breaks all compilations of old stuff... + * The real problem is actually that linux/time.h doesn't use proper + * macro checks before defining types like struct timeval. The proper + * fix here is to either fuck the kernel header (which is what we do + * by defining _LINUX_TIME_H, an innocent little hack) or by fixing it + * upstream, which I'll consider doing later on. If you get compiler + * errors here, check your linux/time.h && sys/time.h header setup. + */ #include <sys/types.h> +#define _LINUX_TIME_H #include <linux/videodev.h> #ifdef __cplusplus diff --git a/sys/v4l/gstv4lmjpegsink.c b/sys/v4l/gstv4lmjpegsink.c index c4df74f73..ecc447bbb 100644 --- a/sys/v4l/gstv4lmjpegsink.c +++ b/sys/v4l/gstv4lmjpegsink.c @@ -17,6 +17,10 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <string.h> #include "v4lmjpegsink_calls.h" diff --git a/sys/v4l/gstv4lmjpegsrc.c b/sys/v4l/gstv4lmjpegsrc.c index 3c9c0b5d9..c64886889 100644 --- a/sys/v4l/gstv4lmjpegsrc.c +++ b/sys/v4l/gstv4lmjpegsrc.c @@ -17,6 +17,10 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <string.h> #include "v4lmjpegsrc_calls.h" diff --git a/sys/v4l/gstv4lsrc.c b/sys/v4l/gstv4lsrc.c index 10074571c..253062619 100644 --- a/sys/v4l/gstv4lsrc.c +++ b/sys/v4l/gstv4lsrc.c @@ -17,6 +17,10 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <string.h> #include <sys/time.h> #include "v4lsrc_calls.h" diff --git a/sys/v4l/v4l-overlay_calls.c b/sys/v4l/v4l-overlay_calls.c index ccbd5fb33..0132ac70e 100644 --- a/sys/v4l/v4l-overlay_calls.c +++ b/sys/v4l/v4l-overlay_calls.c @@ -17,6 +17,10 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> diff --git a/sys/v4l/v4l_calls.c b/sys/v4l/v4l_calls.c index 26cbc5491..2d331b75d 100644 --- a/sys/v4l/v4l_calls.c +++ b/sys/v4l/v4l_calls.c @@ -17,6 +17,10 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> diff --git a/sys/v4l/v4lmjpegsink_calls.c b/sys/v4l/v4lmjpegsink_calls.c index e8ef1dffd..c9f2385d6 100644 --- a/sys/v4l/v4lmjpegsink_calls.c +++ b/sys/v4l/v4lmjpegsink_calls.c @@ -17,6 +17,10 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> diff --git a/sys/v4l/v4lmjpegsrc_calls.c b/sys/v4l/v4lmjpegsrc_calls.c index cb299ffd1..7b9d4d95e 100644 --- a/sys/v4l/v4lmjpegsrc_calls.c +++ b/sys/v4l/v4lmjpegsrc_calls.c @@ -17,6 +17,10 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> diff --git a/sys/v4l/v4lsrc_calls.c b/sys/v4l/v4lsrc_calls.c index b42be9e86..fc3e4ef90 100644 --- a/sys/v4l/v4lsrc_calls.c +++ b/sys/v4l/v4lsrc_calls.c @@ -17,6 +17,10 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> |