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

Måns Rullgård mans
Sun Sep 21 19:45:34 CEST 2008


Brad <brad at comstyle.com> writes:

> On Sun, Sep 21, 2008 at 11:59:38AM +0100, M?ns Rullg?rd wrote:
>> 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.
>> >
>> 
>> This should use #ifdef HAVE_SYS_VIDEOIO_H
>
> So I went looking for how soundcard.h vs sys/soundcard.h is handled
> since soundcard.h is OpenBSD specific and I see the missing piece.
> Here is a updated diff.
>
> --- configure.orig	Sun Sep 21 00:15:25 2008
> +++ configure	Sun Sep 21 11:17:09 2008
> @@ -765,6 +765,7 @@ HAVE_LIST="
>      inline_asm
>      libdc1394_1
>      libdc1394_2
> +    linux_videodev2_h
>      llrint
>      lrint
>      lrintf

This isn't needed.

> @@ -786,6 +787,7 @@ HAVE_LIST="
>      sys_resource_h
>      sys_select_h
>      sys_soundcard_h
> +    sys_videoio_h
>      termios_h
>      threads
>      winsock2_h

OK

> @@ -904,7 +906,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 +1819,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
>
> --- libavdevice/v4l2.c.orig	Sun Sep 21 00:11:40 2008
> +++ libavdevice/v4l2.c	Sun Sep 21 11:17:53 2008
> @@ -35,8 +35,12 @@
>  #include <sys/ioctl.h>
>  #include <sys/mman.h>
>  #include <sys/time.h>
> +#ifdef HAVE_SYS_VIDEOIO_H
> +#include <sys/videoio.h>
> +#else
>  #include <asm/types.h>
>  #include <linux/videodev2.h>
> +#endif
>  #include <time.h>
>  #include <strings.h>

OK

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




More information about the ffmpeg-devel mailing list