[FFmpeg-devel] [RFC] libavdevice, audio output devices
Michael Niedermayer
michaelni
Wed Nov 25 01:35:59 CET 2009
On Sun, Nov 22, 2009 at 08:44:30PM +0100, Ivo wrote:
> Hi,
>
> Recently, an issue came up on -cvslog and as per Michael's suggestion, I'm
> posting it here, so it can be discussed.
>
> First some context:
>
>
> avformat.h:
>
> #define AVFMT_FLAG_NONBLOCK 0x0004 \
> ///< Do not block when reading packets from input.
>
>
> alsa-audio-common.c:
>
> if (ctx->flags & AVFMT_FLAG_NONBLOCK) {
> flags = SND_PCM_NONBLOCK;
> }
>
>
> oss_audio.c:
>
> if (!is_output)
> fcntl(audio_fd, F_SETFL, O_NONBLOCK);
>
>
> Basically, alsa blocks on input and output if AVFMT_FLAG_NONBLOCK is not set
> and does not block on input and output if it is set. On the other hand, oss
> always blocks on output, and never blocks on input. If you look at the
> description in avformat.h, both are not functioning as is described.
>
> My proposal would be to extend AVFMT_FLAG_NONBLOCK to non-blocking behaviour
> for output too and fix oss_audio. This leads to the greatest flexibility
> for third-party applications using libavdevice.
if you can make muxers non blocking thats great, though i think this
will might be hard with more complex muxers
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- 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/20091125/81dcff96/attachment.pgp>
More information about the ffmpeg-devel
mailing list