From 8d4f636d543362ef901e2233cc9f9149f5f14bb4 Mon Sep 17 00:00:00 2001 From: Damjan Jovanovic Date: Sun, 13 Jan 2013 21:06:14 +0200 Subject: [PATCH] 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 8394dead672..04b3dc3e80e 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 78d4f4bb428..fd760cf0a75 100644 --- a/configure.ac +++ b/configure.ac @@ -667,7 +667,7 @@ AC_CHECK_HEADERS([pthread_np.h],,, #include #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 #endif diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c index 1851ba451cc..f5baaeb9cf3 100644 --- a/dlls/qcap/v4l.c +++ b/dlls/qcap/v4l.c @@ -45,7 +45,9 @@ #ifdef HAVE_ASM_TYPES_H #include #endif -#ifdef HAVE_LINUX_VIDEODEV_H +#ifdef HAVE_LIBV4L1_H +#include +#elif defined(HAVE_LINUX_VIDEODEV_H) #include #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 608e571d1af..6b8ff29f9bf 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 b8acb15285d..9a7d1090d1a 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 header file. */ +#undef HAVE_LIBV4L1_H + /* Define if you have the libxml2 library */ #undef HAVE_LIBXML2