[FFmpeg-devel] [PATCH] lavdevice: SDL Audio Playback

Ivo ivop
Fri Nov 27 20:28:03 CET 2009


On Friday 27 November 2009, 17:49:01, Diego Biurrun wrote:
> On Fri, Nov 27, 2009 at 05:38:41PM +0100, Ivo wrote:
> > The attached patch implements an SDL audio playback muxer in
> > libavdevice. Sadly, SDL does not support recording. In theory this
> > should also enable audio playback on windows/cygwin (not tested).
>
> A documentation update is missing.

Added locally to general.texi. Any more places I need to add it?

> > --- /dev/null
> > +++ b/libavdevice/sdl_audio.c
> > @@ -0,0 +1,148 @@
> > +static void sdl_audio_callback(void *opaque, Uint8 *stream, int len) {
>
> K&R style for new files please.

Done locally.

> > +av_cold static int audio_write_header(AVFormatContext *s1) {
>
> I think it's "static av_cold" everywhere else, please check.

I see. I looked at alsa-* and that's the only (de)muxer that has it the 
otherway around too :)

Fixed.

> > +#if HAVE_BIGENDIAN
> > +    CODEC_ID_PCM_S16BE,
> > +#else
> > +    CODEC_ID_PCM_S16LE,
> > +#endif
>
> Maybe we should have S16NE for this?

Yes. It occurred to me too. I'll prepare another patch for that.

Thanks,
--Ivo



More information about the ffmpeg-devel mailing list