X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Ffilters.h;h=11577554038796326589c841bcf4103f2d47b36a;hb=a240097ecd4fb1639db99e7becb888ae478405cd;hp=4e2652ebe52cf8a513cd0fff896659502eae228f;hpb=f4cf6ba8c9646814af842a99335c6ee312ded299;p=ffmpeg diff --git a/libavfilter/filters.h b/libavfilter/filters.h index 4e2652ebe52..11577554038 100644 --- a/libavfilter/filters.h +++ b/libavfilter/filters.h @@ -60,12 +60,25 @@ int ff_inlink_process_commands(AVFilterLink *link, const AVFrame *frame); */ int ff_inlink_evaluate_timeline_at_frame(AVFilterLink *link, const AVFrame *frame); +/** + * Get the number of frames available on the link. + * @return the number of frames available in the link fifo. + */ +size_t ff_inlink_queued_frames(AVFilterLink *link); + /** * Test if a frame is available on the link. * @return >0 if a frame is available */ int ff_inlink_check_available_frame(AVFilterLink *link); + +/*** + * Get the number of samples available on the link. + * @return the numer of samples available on the link. + */ +int ff_inlink_queued_samples(AVFilterLink *link); + /** * Test if enough samples are available on the link. * @return >0 if enough samples are available @@ -102,6 +115,13 @@ int ff_inlink_consume_frame(AVFilterLink *link, AVFrame **rframe); int ff_inlink_consume_samples(AVFilterLink *link, unsigned min, unsigned max, AVFrame **rframe); +/** + * Access a frame in the link fifo without consuming it. + * The first frame is numbered 0; the designated frame must exist. + * @return the frame at idx position in the link fifo. + */ +AVFrame *ff_inlink_peek_frame(AVFilterLink *link, size_t idx); + /** * Make sure a frame is writable. * This is similar to av_frame_make_writable() except it uses the link's