diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2010-02-24 23:57:04 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2010-02-24 23:57:04 +0000 |
commit | f6fe1935082d9dc1c6f923e80f62c9e9c90d1169 (patch) | |
tree | 3b8f5425fca60835b44ff7116689b9935a02fdf4 | |
parent | b808b9acc254027fa881c3123ab1b73984e2c1dd (diff) | |
download | xine-lib-f6fe1935082d9dc1c6f923e80f62c9e9c90d1169.tar.gz xine-lib-f6fe1935082d9dc1c6f923e80f62c9e9c90d1169.tar.bz2 |
Fix up V4L/V4L2 for non-Linux.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | src/input/Makefile.am | 5 | ||||
-rw-r--r-- | src/input/input_v4l2.c | 8 |
4 files changed, 19 insertions, 5 deletions
@@ -1,5 +1,6 @@ xine-lib (1.1.18.1) 2010-??-?? * Oops. compat.c (for DXR3 support) was omitted. + * Fix up V4L/V4L2 compilation. Some non-Linux have V4L2 but not V4L. xine-lib (1.1.18) 2010-02-23 * Bump the FLAC decoder's priority above ffmpegaudio. This should fix diff --git a/configure.ac b/configure.ac index d41b0442c..f5310590c 100644 --- a/configure.ac +++ b/configure.ac @@ -678,15 +678,19 @@ dnl ---------------------------------------------- AC_ARG_ENABLE([v4l], AS_HELP_STRING([--disable-v4l], [do not build Video4Linux input plugins])) +have_v4l=no +have_v4l2=no if test "x$enable_v4l" != "xno"; then - AC_CHECK_HEADERS([linux/videodev.h linux/videodev2.h], [have_v4l=yes], [have_v4l=no]) + AC_CHECK_HEADERS([linux/videodev.h], [have_v4l=yes], []) + AC_CHECK_HEADERS([linux/videodev2.h sys/videoio.h sys/videodev2.h], [have_v4l2=yes], []) AC_CHECK_HEADERS([asm/types.h]) - if test "x$enable_v4l" = "xyes" && test "x$have_v4l" = "xno"; then + if test "x$enable_v4l" = "xyes" && test "x$have_v4l$have_v4l2" = "xnono"; then AC_MSG_ERROR([Video4Linux support requested, but prerequisite headers not found.]) fi fi AM_CONDITIONAL(HAVE_V4L, [test "x$have_v4l" = "xyes"]) +AM_CONDITIONAL(HAVE_V4L2, [test "x$have_v4l2" = "xyes"]) dnl ---------------------------------------------- dnl Check for libv4l support @@ -694,7 +698,7 @@ dnl ---------------------------------------------- AC_ARG_ENABLE([libv4l], AS_HELP_STRING([--disable-libv4l], [do not build with libv4l support])) -if test "x$have_v4l" = xyes; then +if test "x$have_v4l2" = xyes; then have_libv4l=no PKG_CHECK_MODULES([V4L2], [libv4l2], [have_libv4l=yes diff --git a/src/input/Makefile.am b/src/input/Makefile.am index 1c34f9aaa..beb101f8c 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -21,10 +21,13 @@ endif if HAVE_V4L in_v4l = xineplug_inp_v4l.la -in_v4l2 = xineplug_inp_v4l2.la in_pvr = xineplug_inp_pvr.la endif +if HAVE_V4L2 +in_v4l2 = xineplug_inp_v4l2.la +endif + if HAVE_GNOME_VFS in_gnome_vfs = xineplug_inp_gnome_vfs.la endif diff --git a/src/input/input_v4l2.c b/src/input/input_v4l2.c index 255b1f17c..5396594f4 100644 --- a/src/input/input_v4l2.c +++ b/src/input/input_v4l2.c @@ -37,7 +37,13 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> -#include <linux/videodev2.h> +#ifdef HAVE_SYS_VIDEOIO_H +# include <sys/videoio.h> +#elif defined(HAVE_SYS_VIDEODEV2_H) +# include <sys/videodev2.h> +#else +# include <linux/videodev2.h> +#endif #include <sys/mman.h> #include <stdio.h> #include <errno.h> |