On 2012-01-05 19:55:32 +0400, Michael Kostylev wrote: > > On Thu Jan 5 16:26:25 2012 > Janne Grunau wrote: > > > > > #if HAVE_SYS_VIDEOIO_H > > > > #include <sys/videoio.h> > > > > #else > > > > > > Btw, why there is no checking for sys/videodev2.h? > > > > That provides the same interface as linux/videodev2.h? > > Yes. > > > should it be > > included instead of sys/videoio.h or additionally? > > sys/videoio.h is a {Net,Open}BSD header. > > > debian/kfreebsd apparently provides linux/videodev2.h > > I tested on SunOS.
ok, attached patch should add support for it. Janne ---8<--- --- configure | 5 ++++- libavdevice/v4l2.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/configure b/configure index 9bf65d2..07fad4a 100755 --- a/configure +++ b/configure @@ -1489,7 +1489,7 @@ pulse_indev_deps="libpulse" sndio_indev_deps="sndio_h" sndio_outdev_deps="sndio_h" v4l_indev_deps="linux_videodev_h" -v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h" +v4l2_indev_deps_any="linux_videodev2_h sys_videodev2_h sys_videoio_h" vfwcap_indev_deps="capCreateCaptureWindow vfwcap_defines" vfwcap_indev_extralibs="-lavicap32" x11_grab_device_indev_deps="x11grab XShmCreateImage" @@ -2996,6 +2996,9 @@ check_header linux/videodev.h check_header linux/videodev2.h check_struct linux/videodev2.h "struct v4l2_frmivalenum" discrete +check_header sys/videodev2.h +check_struct sys/videodev2.h "struct v4l2_frmivalenum" discrete + check_header sys/videoio.h check_func_headers "windows.h vfw.h" capCreateCaptureWindow "$vfwcap_indev_extralibs" diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c index 71e5b11..deedfad 100644 --- a/libavdevice/v4l2.c +++ b/libavdevice/v4l2.c @@ -38,6 +38,8 @@ #include <sys/time.h> #if HAVE_SYS_VIDEOIO_H #include <sys/videoio.h> +#elif HAVE_SYS_VIDEODEV2_H +#include <sys/videodev2.h> #else #include <linux/videodev2.h> #endif -- 1.7.8.2 _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel