[vlc-commits] commit: V4L2 on NetBSD (Adam Hoka )

git at videolan.org git at videolan.org
Sun Jun 20 19:17:03 CEST 2010


vlc/vlc-1.1 | branch: master | Adam Hoka <ahoka at netbsd.org> | Sun Jun 20 20:13:13 2010 +0300| [0e9a6ccaacd0ef6a9a4739b9080a16da65f2d035] | committer: Rémi Denis-Courmont 

V4L2 on NetBSD

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
(cherry picked from commit 0c55b2d8d29921428716ec5e8ffcaaf057146823)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=0e9a6ccaacd0ef6a9a4739b9080a16da65f2d035
---

 configure.ac          |    2 +-
 modules/access/v4l2.c |    8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index be8df03..7194004 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2184,7 +2184,7 @@ then
   fi
 
   CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_v4l2}"
-  AC_CHECK_HEADERS(linux/videodev2.h, [
+  AC_CHECK_HEADERS(linux/videodev2.h sys/videoio.h, [
     VLC_ADD_PLUGIN([v4l2])
   ],[])
   CPPFLAGS="${CPPFLAGS_save}"
diff --git a/modules/access/v4l2.c b/modules/access/v4l2.c
index 4f1ee50..791cccf 100644
--- a/modules/access/v4l2.c
+++ b/modules/access/v4l2.c
@@ -51,7 +51,13 @@
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 
-#include <linux/videodev2.h>
+#if defined(HAVE_LINUX_VIDEODEV2_H)
+#   include <linux/videodev2.h>
+#elif defined(HAVE_SYS_VIDEOIO_H)
+#   include <sys/videoio.h>
+#else
+#   error "No Video4Linux2 headers found."
+#endif
 
 #include <poll.h>
 



More information about the vlc-commits mailing list