diff options
author | Marton Balint <cus@passwd.hu> | 2018-10-01 00:28:28 +0300 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2018-10-03 23:09:49 +0300 |
commit | 8f14170b9a4e0fcb5525e5408c8df14076ec8948 (patch) | |
tree | 3e94df9e613a548f3d707459d6f6aafe5051f877 /libavfilter/avfilter.c | |
parent | 93443225739606cf277e44b71c758c93ada8aa66 (diff) |
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/avfilter.c')
-rw-r--r-- | libavfilter/avfilter.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 90799d450c..27d163f79a 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -1448,6 +1448,11 @@ int ff_inlink_acknowledge_status(AVFilterLink *link, int *rstatus, int64_t *rpts return 1; } +size_t ff_inlink_queued_frames(AVFilterLink *link) +{ + return ff_framequeue_queued_frames(&link->fifo); +} + int ff_inlink_check_available_frame(AVFilterLink *link) { return ff_framequeue_queued_frames(&link->fifo) > 0; @@ -1507,6 +1512,11 @@ int ff_inlink_consume_samples(AVFilterLink *link, unsigned min, unsigned max, return 1; } +AVFrame *ff_inlink_peek_frame(AVFilterLink *link, size_t idx) +{ + return ff_framequeue_peek(&link->fifo, idx); +} + int ff_inlink_make_frame_writable(AVFilterLink *link, AVFrame **rframe) { AVFrame *frame = *rframe; |