diff options
author | Marton Balint <cus@passwd.hu> | 2018-09-30 23:28:28 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2018-10-03 22:09:49 +0200 |
commit | 8f14170b9a4e0fcb5525e5408c8df14076ec8948 (patch) | |
tree | 3e94df9e613a548f3d707459d6f6aafe5051f877 /libavfilter/filters.h | |
parent | 93443225739606cf277e44b71c758c93ada8aa66 (diff) | |
download | ffmpeg-8f14170b9a4e0fcb5525e5408c8df14076ec8948.tar.gz |
avfilter/filters: add ff_inlink_peek_frame and ff_inlink_queued_frames to access frames in the inlink fifo
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavfilter/filters.h')
-rw-r--r-- | libavfilter/filters.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavfilter/filters.h b/libavfilter/filters.h index 4e2652ebe5..ff900da63f 100644 --- a/libavfilter/filters.h +++ b/libavfilter/filters.h @@ -61,6 +61,12 @@ 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 */ @@ -103,6 +109,13 @@ 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 * buffer allocation callback, and therefore allows direct rendering. |