# HG changeset patch # User diego # Date 1302433965 0 # Node ID d941d34d5b0f53477915bf4469e6693aef8ad09c # Parent 7486c14f0087abc4fa663c105a2fdbe79d3daef1 Add V4L2 support for OpenBSD (and NetBSD). patch by Brad, brad comstyle com diff -r 7486c14f0087 -r d941d34d5b0f configure --- a/configure Sun Apr 10 10:58:42 2011 +0000 +++ b/configure Sun Apr 10 11:12:45 2011 +0000 @@ -3709,6 +3709,14 @@ 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 @@ -7385,6 +7393,8 @@ _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 && sys_videoio_h=yes ; then + _tv_v4l2=yes fi fi if test "$_tv_v4l2" = yes ; then @@ -8310,6 +8320,7 @@ $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 -r 7486c14f0087 -r d941d34d5b0f stream/tvi_v4l2.c --- a/stream/tvi_v4l2.c Sun Apr 10 10:58:42 2011 +0000 +++ b/stream/tvi_v4l2.c Sun Apr 10 11:12:45 2011 +0000 @@ -49,8 +49,12 @@ #ifdef HAVE_SYS_SYSINFO_H #include #endif +#ifdef HAVE_SYS_VIDEOIO_H +#include +#else #include #include +#endif #include "mp_msg.h" #include "libmpcodecs/img_format.h" #include "libmpcodecs/dec_teletext.h"