diff options
author | Uoti Urpala <uau@mplayer2.org> | 2011-06-29 07:19:49 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-06-29 07:23:24 +0300 |
commit | 2d187f97509f89faff8a544c05b971a344c9163f (patch) | |
tree | 9c9e492f3e07639e891ad9fe20035b26ac6b538d | |
parent | 017c173d7400a8070cb23a0ead812220037f74be (diff) | |
download | mpv-2d187f97509f89faff8a544c05b971a344c9163f.tar.bz2 mpv-2d187f97509f89faff8a544c05b971a344c9163f.tar.xz |
stream/tvi_v4l2: Add V4L2 support for OpenBSD (and NetBSD)
Patch by Brad <brad@comstyle.com>.
-rwxr-xr-x | configure | 11 | ||||
-rw-r--r-- | stream/tvi_v4l2.c | 4 |
2 files changed, 15 insertions, 0 deletions
@@ -3262,6 +3262,14 @@ fi echores "$_soundcard_h" +echocheck "sys/videoio.h" +sys_videoio_h=no +def_sys_videoio_h='#undef HAVE_SYS_VIDEOIO_H' +header_check sys/videoio.h && sys_videoio_h=yes && + def_sys_videoio_h='#define HAVE_SYS_VIDEOIO_H 1' +echores "$sys_videoio_h" + + echocheck "sys/dvdio.h" _dvdio=no # FreeBSD 8.1 has broken dvdio.h @@ -6260,6 +6268,8 @@ if test "$_tv_v4l2" = auto ; then _tv_v4l2=no if test "$_tv" = yes && linux ; then header_check_broken sys/time.h linux/videodev2.h && _tv_v4l2=yes + elif test "$_tv" = yes && test "$sys_videoio_h" = "yes" ; then + _tv_v4l2=yes fi fi if test "$_tv_v4l2" = yes ; then @@ -6909,6 +6919,7 @@ $def_soundcard_h $def_sys_asoundlib_h $def_sys_soundcard_h $def_sys_sysinfo_h +$def_sys_videoio_h $def_termios_h $def_termios_sys_h $def_winsock2_h diff --git a/stream/tvi_v4l2.c b/stream/tvi_v4l2.c index def59ad40d..234a5ac019 100644 --- a/stream/tvi_v4l2.c +++ b/stream/tvi_v4l2.c @@ -49,8 +49,12 @@ known issues: #ifdef HAVE_SYS_SYSINFO_H #include <sys/sysinfo.h> #endif +#ifdef HAVE_SYS_VIDEOIO_H +#include <sys/videoio.h> +#else #include <linux/types.h> #include <linux/videodev2.h> +#endif #include "mp_msg.h" #include "libmpcodecs/img_format.h" #include "libmpcodecs/dec_teletext.h" |