[MPlayer-dev-eng] [PATCH] V4L2 support for OpenBSD (and NetBSD)
Brad
brad at comstyle.com
Sat Apr 9 20:51:48 CEST 2011
The following diff allows the V4L2 support in MPlayer to build on OpenBSD (and NetBSD).
Index: stream/tvi_v4l2.c
===================================================================
--- stream/tvi_v4l2.c (revision 33237)
+++ stream/tvi_v4l2.c (working copy)
@@ -49,8 +49,12 @@
#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"
Index: configure
===================================================================
--- configure (revision 33237)
+++ configure (working copy)
@@ -3729,6 +3729,17 @@
echores "$_cdio"
+echocheck "sys/videoio.h"
+_sys_videoio_h=no
+header_check sys/videoio.h && _sys_videoio_h=yes
+if test "$_sys_videoio_h" = yes ; then
+ def_sys_videoio_h='#define HAVE_SYS_VIDEOIO_H 1'
+else
+ def_sys_videoio_h='#undef HAVE_SYS_VIDEOIO_H'
+fi
+echores "$_sys_videoio_h"
+
+
echocheck "linux/cdrom.h"
_cdrom=no
header_check linux/cdrom.h && _cdrom=yes
@@ -7381,6 +7392,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
@@ -8306,6 +8319,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
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the MPlayer-dev-eng
mailing list