On Thu Jan 5 17:41:28 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. > > --- a/configure > +++ b/configure
@@ -1146,6 +1146,7 @@ sys_resource_h sys_select_h sys_soundcard_h + sys_videodev2_h sys_videoio_h threads trunc > @@ -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 > + Frame rate/size enumerations are unsupported, at least ATM. > 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 Michael _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel