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

git at videolan.org git at videolan.org
Sun Jun 20 19:14:00 CEST 2010


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

V4L2 on NetBSD

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

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

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

diff --git a/configure.ac b/configure.ac
index 0887370..c9d8074 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2164,7 +2164,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 452d29e..6412f56 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