[FFmpeg-devel] [PATCH] Frame rate emulation
Mon Jun 18 16:53:16 CEST 2007
Ramiro Ribeiro Polla wrote:
> The rate emulation code from x11grab.c was copied from grab.c, so new
> patch also removed that one.
> Now I wonder... Why is waiting not a problem in v4l2.c? Around line 334,
> it whiles around if the error is EAGAIN. Isn't that also blocking FFmpeg?
While I agree that calling the sleep function in grab.c can be wrong (it
always created a lot of problems to me), I do not think that v4l2 code
is wrong... It is synchronizing with the input, and I think a v4l2 input
format needs to synchronize with the input.
(Anyway, the EAGAIN case should happen only if the ioctl() is
interrupted by a signal, no?)
I think udp.c::udp_read() (and many other input functions) block when no
input packet is available, no?
And what happens if you do
./ffmpeg -i pipe.mpg ...
where "pipe.mpg" is a named pipe? I think each read for an input packet
will block until the packet is available, no? In my opinion, v4l2.c case
(and I think v4l2 is not doing "frame rate emulation", it is just
synchronizing with the real rate of the input...)
But if I am wrong, let me know how v4l2.c should behave, and I'll try to
More information about the ffmpeg-devel