From 79d8cfacf07863500d4fedec669c49e2552c3876 Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Sun, 31 Mar 2013 19:17:57 +0200 Subject: lavfi: loop on request_frame if necessary. Some filters need several input frames before producing output. For these filter, it becomes simpler to return 0 in request_frame() and let the framework call it again until output has been produced. --- libavfilter/internal.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libavfilter/internal.h') diff --git a/libavfilter/internal.h b/libavfilter/internal.h index 9a42ae0..0b28422 100644 --- a/libavfilter/internal.h +++ b/libavfilter/internal.h @@ -325,4 +325,18 @@ int ff_buffersink_read_samples_compat(AVFilterContext *ctx, AVFilterBufferRef ** */ int ff_filter_frame(AVFilterLink *link, AVFrame *frame); +/** + * Flags for AVFilterLink.flags. + */ +enum { + + /** + * Frame requests may need to loop in order to be fulfilled. + * A filter must set this flags on an output link if it may return 0 in + * request_frame() without filtering a frame. + */ + FF_LINK_FLAG_REQUEST_LOOP = 1, + +}; + #endif /* AVFILTER_INTERNAL_H */ -- cgit v1.1