[FFmpeg-devel] [PATCH] V4L2 support for OpenBSD

Måns Rullgård mans
Sun Sep 21 12:59:38 CEST 2008


Brad <brad at comstyle.com> writes:

> Resending this since I forgot to prefix the subject with [PATCH]..
>
> The following diff adds support for V4L2 for OpenBSD.
>
> --- configure.orig	Sun Sep 21 00:15:25 2008
> +++ configure	Sun Sep 21 00:16:37 2008
> @@ -904,7 +904,7 @@ rtp_muxer_deps="network rtp_protocol"
>  rtsp_demuxer_deps="sdp_demuxer"
>  sdp_demuxer_deps="rtp_protocol mpegts_demuxer"
>  v4l_demuxer_deps="linux_videodev_h"
> -v4l2_demuxer_deps="linux_videodev2_h"
> +v4l2_demuxer_deps_any="linux_videodev2_h sys_videoio_h"
>  vfwcap_demuxer_deps="capCreateCaptureWindow"
>  vfwcap_demuxer_extralibs="-lvfw32"
>  x11_grab_device_demuxer_deps="x11grab XShmCreateImage"
> @@ -1817,6 +1817,7 @@ EOF
>
>  check_header linux/videodev.h
>  check_header linux/videodev2.h
> +check_header sys/videoio.h
>
>  check_func2 "windows.h vfw.h" capCreateCaptureWindow -lvfw32

OK

> --- libavdevice/v4l2.c.orig	Sun Sep 21 00:11:40 2008
> +++ libavdevice/v4l2.c	Sun Sep 21 00:14:59 2008
> @@ -35,8 +35,12 @@
>  #include <sys/ioctl.h>
>  #include <sys/mman.h>
>  #include <sys/time.h>
> +#ifdef __OpenBSD__
> +#include <sys/videoio.h>
> +#else
>  #include <asm/types.h>
>  #include <linux/videodev2.h>
> +#endif
>  #include <time.h>
>  #include <strings.h>

This should use #ifdef HAVE_SYS_VIDEOIO_H

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list