[FFmpeg-devel] [PATCH 3/5] ffmpeg: flush and drain video filters.

Michael Niedermayer michaelni at gmx.at
Sat Mar 10 23:11:42 CET 2012


On Sat, Mar 10, 2012 at 09:26:15PM +0100, Nicolas George wrote:
> Le decadi 20 ventôse, an CCXX, Stefano Sabatini a écrit :
> > Can you comment on this? Why is the poll API not enough in this case?
> 
> My problem with the poll API is that it is partially redundant code that
> _needs_ to be consistent with request_frame, on pain of bugs and strange
> behaviours.
> 
> This would be a necessary evil if the function did something useful, but it
> does not: if you need to know whether there is a frame available, just
> request it and see if it comes.

assume you have 2 outputs from a filter graph
and both will be written into seperate files
from which do you request ?

one might output at twice the rate, if both come from the same
source file via a split filter, half the files frames will need to be
buffered in memory.

Or another example
you have a demuxer + decoderS and the lets say 2 streams get then
inserted into a filter graph and that has 2 outputs.
From which output do you read
There may be half a second of audio available ready to be used while
reading video might requre the demuxer and the connected protocol (UDP
V4L whatever) to wait for more data.
poll_frame() reduces latency here. Which would matter if it was
realtime communication or the memory was very constrained.


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120310/39d7a820/attachment.asc>


More information about the ffmpeg-devel mailing list