[FFmpeg-devel] [PATCH] Yield on AVERROR(EAGAIN).

Reimar Döffinger Reimar.Doeffinger
Fri Mar 5 08:23:07 CET 2010


On Fri, Mar 05, 2010 at 03:48:52AM +0100, Michael Niedermayer wrote:
> What you suggest needs a select() like system that works with files,
> network protocols, audio and video grab APIs as well as screen capture
> APIs needs to work on all platforms
> that support yield()/sleep() of some kind and needs to work with
> any set of supported protocols on that platform and needs protocols
> to pass thier file/object handle(s) through demuxers to the user app so
> it can do that select() call

Actually... No, it would be enough for the devices to just do a select themselves.
After all, our networking code does not just do a non-blocking read and then
just returns EAGAIN if it didn't get anything.
Now the issue is a bit larger if audio and video are separate, we can't block
on one while the other overflows a buffer, but a 10ms select in each of the
devices that currently cause this issue should be enough, shouldn't it?



More information about the ffmpeg-devel mailing list