[FFmpeg-devel] Asynchronously delivering data to FFmpeg, and extending the API to do this...

Hendrik Leppkes h.leppkes at gmail.com
Tue Mar 20 10:43:29 EET 2018

On Tue, Mar 20, 2018 at 3:06 AM, Philip Prindeville
<philipp_subx at redfish-solutions.com> wrote:
> What’s involved in doing this?

Re-writing every single demuxer in libavformat, probably.

It seems entirely unfeasible to me to do this, because nothing in the
architecture even remotely supports something like this. IO is
fundamentally a "pull" model in ffmpeg, all components pull data as
they need it, and they don't have any mechanism to give feedback when
a packet was finished, or anything like that.
If you have a push data source, the easiest way to interface with
ffmpeg would be to buffer data and let it pull from the buffer as it
needs (with blocking when waiting for new data, possibly). It'll tell
you if it finished a frame because av_read_frame returns one to you.

Obviously this defeats the purpose of using an event-based source, but
if thats all you have, then you gotta make it work somehow.

- Hendrik

More information about the ffmpeg-devel mailing list