[FFmpeg-devel] [PATCH] Add support for sndio to libavdevice

Måns Rullgård mans
Thu Aug 5 09:22:59 CEST 2010


Brad <brad at comstyle.com> writes:

> sndio is a relatively new audio API utilized by OpenBSD.
>
> Below is a patch to add sndio playback and record support
> to FFmpeg.
>
> I believe I have touched everything that needs updating
> including documentation such as the recently added
> indevs.texi and outdevs.texi, but if not please let
> me know.
>
> The sndio code was written by Jacob Meuser <jakemsr sdf lonestar org>
>
> Please provide any feedback.
>
> Index: configure
> ===================================================================
> --- configure	(revision 24666)
> +++ configure	(working copy)
> @@ -1030,6 +1030,7 @@
>      sdl
>      sdl_video_size
>      setmode
> +    sndio_h
>      socklen_t
>      soundcard_h
>      poll_h
> @@ -1361,6 +1362,10 @@
>  libdc1394_indev_deps="libdc1394"
>  oss_indev_deps_any="soundcard_h sys_soundcard_h"
>  oss_outdev_deps_any="soundcard_h sys_soundcard_h"
> +sndio_indev_deps="sndio_h"
> +sndio_indev_extralibs="-lsndio"
> +sndio_outdev_deps="sndio_h"
> +sndio_outdev_extralibs="-lsndio"

The _extralibs are not necessary since ...

>  v4l_indev_deps="linux_videodev_h"
>  v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h"
>  vfwcap_indev_deps="capCreateCaptureWindow vfwcap_defines"
> @@ -2772,11 +2777,14 @@
>
>  check_header sys/soundcard.h
>  check_header soundcard.h
> +check_header sndio.h
>
>  enabled_any alsa_indev alsa_outdev && check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound
>
>  enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack
>
> +enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio

... this will add -lsndio.

>  enabled x11grab                         &&
>  check_header X11/Xlib.h                 &&
>  check_header X11/extensions/XShm.h      &&

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



More information about the ffmpeg-devel mailing list