Module: wine Branch: master Commit: 8d4f636d543362ef901e2233cc9f9149f5f14bb4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8d4f636d543362ef901e2233cc...
Author: Damjan Jovanovic damjan.jov@gmail.com Date: Sun Jan 13 21:06:14 2013 +0200
qcap: Use libv4l1.h when available, instead of linux/videodev.h which is deprecated/obsolete.
---
configure | 2 +- configure.ac | 2 +- dlls/qcap/v4l.c | 8 +++++--- dlls/qcap/yuv.c | 2 +- include/config.h.in | 3 +++ 5 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/configure b/configure index 8394dea..04b3dc3 100755 --- a/configure +++ b/configure @@ -6251,7 +6251,7 @@ fi done
-for ac_header in linux/videodev.h linux/videodev2.h +for ac_header in linux/videodev.h linux/videodev2.h libv4l1.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TIME_H diff --git a/configure.ac b/configure.ac index 78d4f4b..fd760cf 100644 --- a/configure.ac +++ b/configure.ac @@ -667,7 +667,7 @@ AC_CHECK_HEADERS([pthread_np.h],,, #include <pthread.h> #endif])
-AC_CHECK_HEADERS([linux/videodev.h linux/videodev2.h],,, +AC_CHECK_HEADERS([linux/videodev.h linux/videodev2.h libv4l1.h],,, [#ifdef HAVE_SYS_TIME_H #include <sys/time.h> #endif diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index 1851ba4..f5baaeb 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -45,7 +45,9 @@ #ifdef HAVE_ASM_TYPES_H #include <asm/types.h> #endif -#ifdef HAVE_LINUX_VIDEODEV_H +#ifdef HAVE_LIBV4L1_H +#include <libv4l1.h> +#elif defined(HAVE_LINUX_VIDEODEV_H) #include <linux/videodev.h> #endif #ifdef HAVE_UNISTD_H @@ -68,7 +70,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(qcap_v4l);
-#ifdef HAVE_LINUX_VIDEODEV_H +#if defined(HAVE_LINUX_VIDEODEV_H) || defined(HAVE_LIBV4L1_H)
static typeof(open) *video_open = open; static typeof(close) *video_close = close; @@ -994,4 +996,4 @@ HRESULT qcap_driver_stop(Capture *capBox, FILTER_STATE *state) FAIL_WITH_ERR; }
-#endif /* HAVE_LINUX_VIDEODEV_H */ +#endif /* HAVE_LINUX_VIDEODEV_H || HAVE_LINUX_LIBV4L1_H */ diff --git a/dlls/qcap/yuv.c b/dlls/qcap/yuv.c index 608e571..6b8ff29 100644 --- a/dlls/qcap/yuv.c +++ b/dlls/qcap/yuv.c @@ -32,7 +32,7 @@ #include "wine/debug.h"
/* This is not used if V4L support is missing */ -#ifdef HAVE_LINUX_VIDEODEV_H +#if defined(HAVE_LINUX_VIDEODEV_H) || defined(HAVE_LIBV4L1_H)
WINE_DEFAULT_DEBUG_CHANNEL(qcap);
diff --git a/include/config.h.in b/include/config.h.in index b8acb15..9a7d109 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -347,6 +347,9 @@ /* Define to 1 if you have the `ossaudio' library (-lossaudio). */ #undef HAVE_LIBOSSAUDIO
+/* Define to 1 if you have the <libv4l1.h> header file. */ +#undef HAVE_LIBV4L1_H + /* Define if you have the libxml2 library */ #undef HAVE_LIBXML2