[FFmpeg-devel] [PATCH] Yield on AVERROR(EAGAIN).
Fri Mar 5 11:52:44 CET 2010
On Fri, Mar 05, 2010 at 11:46:03AM +0100, Luca Abeni wrote:
> Michael Niedermayer wrote:
>> On Fri, Mar 05, 2010 at 08:23:07AM +0100, Reimar D?ffinger wrote:
>>> 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
>>> After all, our networking code does not just do a non-blocking read and
>>> just returns EAGAIN if it didn't get anything.
>> this should be fixed of course
> The networking code does not support the AVFMT_FLAG_NONBLOCK flag.
> I tried adding support for it in the UDP and RTP protocols some
> time ago (this is actually quite trivial), but then I had issues with
> some other code in libavformat (av_find_stream_info(), if I remember
> well - but I might be wrong) that is not prepared to it...
> Then, I ran out of time :)
av_find_stream_info() will block from the users point of view, unless the
user stops it through url_interrupt_cb()
is there some other problem with it?
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel