[FFmpeg-devel] [PATCH] Add support for sndio to libavdevice
Sun Aug 8 00:51:40 CEST 2010
On Thu, Aug 05, 2010 at 11:07:03AM -0400, Brad wrote:
> On Mon, Aug 02, 2010 at 07:42:27PM -0400, Brad wrote:
> > 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.
> Here is a second revision with some adjustments based on the feedback
> so far.
Except for the fact that I suggested splitting into separate files to
avoid the ifdeffery and ease conditional compilation. What about it?
> --- libavdevice/sndio.c (revision 0)
> +++ libavdevice/sndio.c (revision 0)
> @@ -0,0 +1,301 @@
> +static av_cold int audio_open(AVFormatContext *s1, int is_output,
> + const char *audio_device)
Indentation is off.
> + if (par.bits != 16 || par.sig != 1 || par.le != SIO_LE_NATIVE ||
> + (is_output && (par.pchan != s->channels)) ||
> + (!is_output && (par.rchan != s->channels)) ||
Align the && for extra readability.
> +/* grab support */
> +static av_cold int audio_read_header(AVFormatContext *s1, AVFormatParameters *ap)
More information about the ffmpeg-devel