[FFmpeg-devel] [PATCH] handle EAGAIN case in ffmpeg.c
Ramiro Ribeiro Polla
Wed Sep 12 15:01:13 CEST 2007
Luca Abeni wrote:
> Ramiro Polla wrote:
>> The best thing IMO is to make realtime grabbing in separate threads.
> This can be true for some grabbing interfaces. But if you use v4l2 a
> single thread can do the work (as a matter of fact, ffmpeg is perfectly
> able to grab v4l2 video and oss audio, with perfect A/V synch). The
> trick is that v4l2 provides a timestamp for each captured frame (so, if
> ffmpeg blocks while reading another input - for example the audio - and
> reads a frame "too late", it can still know when the frame was sampled,
> and can synchronize it with the audio).
But does that block ffmpeg too? What I'm going for (like Michael said)
is that no input should block ffmpeg, so that it can keep
demuxing/decoding/encoding/muxing other stuff while it's waiting. Or is
it non-blocking in a busy wait manner?
More information about the ffmpeg-devel