[FFmpeg-devel] [PATCH] api-example for libavfilter

Stefano Sabatini stefano.sabatini-lala
Sun Dec 26 13:46:34 CET 2010

On date Sunday 2010-12-26 12:23:12 +0100, Nicolas George encoded:
> Le duodi 22 frimaire, an CCXIX, Stefano Sabatini a ?crit?:
> > If you want to dedicate some time on this that's definitively welcome,
> > I still don't consider it an high-priority (as I want to fix all the
> > various regressions). I suppose the cmdutils.c:ffsink and
> > get_filtered_video_frame() may be used as a base for creating such an
> > API.
> I gave some more thought about that point: ffsink and
> get_filtered_video_frame were what I imitated in the first place.
> As far as I can tell, the only difference between ffsink and nullsink is
> that ffsink only accepts one pixel format. It would be reasonably easy to
> add this feature to nullsink or to rely on an additional "format" filter.

Think nullsink as a sort of /dev/null (which can sometimes be
useful for testing purposes), so it should not be modified, but it
shoul be pretty straightforward to make ffsink public (buffersink?).

> Or is there something I am missing?
> (As for me, I am still trying to figure out what ffplay's input_filter
> does.)

input_filter requests video frames through get_video_frame(), and
wraps them around a video buffer reference which is passed to the

Strict integration/direct rendering with the decoder is performed
through the get/release/reget buffer libavcodec API, so that the
decoder uses the same buffers provided by the filterchain by calling
avfilter_get_video_buffer(), thus avoiding unnecessary memcpies.

If you have specific questions I can try to address them.
FFmpeg = Faithless and Funny Miracolous Powered Eccentric Governor

More information about the ffmpeg-devel mailing list