[FFmpeg-devel] [PATCH] ALSA for libavdevice

Michael Niedermayer michaelni
Wed Jan 21 02:04:05 CET 2009

On Tue, Jan 20, 2009 at 11:39:31AM +0100, Nicolas George wrote:
> Le primidi 1er pluvi?se, an CCXVII, Luca Abeni a ?crit?:
> > I tested your previous version with -i hw, and it worked fine on debian
> > unstable. I hope to find some time for repeating the test this evening,
> > but I guess it will still work ;-)
> Good.
> > One only important doubt: what happens if the alsa library installed on
> > the system does not provide snd_pcm_htimestamp()? Is alsa compilation
> > disabled by configure, or will the build fail? I think this is very
> > important in order to avoid a storm of "rxxx broke ffmpeg compilation on
> > my system" (AFAICS, many linux distributions do not provide
> > snd_pcm_htimestamp()).
> You are perfectly right to raise the issue: with all the excitement about
> dsnoop hanging, I forgot the build problem with older libasound versions.
> With the current version of the patch, the build would fail. The attached
> updated version checks for snd_pcm_htimestamp, and only builds the demuxer
> if it is available; the muxer does not need it.
> Apart from the cosmetic changes suggested by Diego, the changes in this
> version of the patch are thus:

> +int ff_alsa_open(AVFormatContext *ctx, int mode, unsigned int *sample_rate,
> +                 int channels, int *codec_id)

av_cold and similarly for the other just once run functions

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090121/1b2f5132/attachment.pgp>

More information about the ffmpeg-devel mailing list