[FFmpeg-devel] [PATCH] avutil/WIP: add AVAsync API

Clément Bœsch u at pkh.me
Tue Nov 24 17:38:06 CET 2015


On Fri, Nov 13, 2015 at 03:57:22PM +0100, Nicolas George wrote:
> Le primidi 21 brumaire, an CCXXIV, Clement Boesch a écrit :
> > You construct something like this:
> > 
> >   AVAsyncContext(
> >     AVAsyncReader(
> >       AVAsyncDecoder(...),
> >       AVAsyncDecoder(...),
> >       AVAsyncDecoder(...),
> >       ...
> >     ),
> >     AVAsyncReader(
> >       AVAsyncDecoder(...),
> >       AVAsyncDecoder(...),
> >       ...
> >     ),
> >     ....
> >   )
> 
> Is there a specific reason you use a different type for decoders and
> readers? If I understand correctly, readers would be demuxers, and
> basically, if you look from high enough, demuxers and decoders are basically
> the same.
> 

Not sure I understand what you mean. It's important to have a threading
separation between the two for the sole reason of performance. Yes,
readers are demuxers in this simple model; one reader for N decoders.

[...]
> > - first, in threadmessage it seems I can't yet flush the fifo properly
> >   (for example by calling av_frame_free() on each entry of the frame
> >   queue): should I extend the API? Nicolas, maybe you have a suggestion?
> 
> Not really. IIUC, you need a function for the sender to tell "all queued
> messages are useless, discard them"? Or maybe more generic out-of-band /
> prioritized messages?

No idea what would be appropriate; I just need a way to drain the demuxer
and decoder queues, which contain AVFrame and AVPacket that needs to be
free'd properly.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151124/094eca36/attachment.sig>


More information about the ffmpeg-devel mailing list