avfilter: add ff_inlink_queued_samples()

pull/299/head
Paul B Mahol 6 years ago
parent ebc3d04b8d
commit 7d65fe87e9
  1. 5
      libavfilter/avfilter.c
  2. 7
      libavfilter/filters.h

@ -1458,6 +1458,11 @@ int ff_inlink_check_available_frame(AVFilterLink *link)
return ff_framequeue_queued_frames(&link->fifo) > 0;
}
int ff_inlink_queued_samples(AVFilterLink *link)
{
return ff_framequeue_queued_samples(&link->fifo);
}
int ff_inlink_check_available_samples(AVFilterLink *link, unsigned min)
{
uint64_t samples = ff_framequeue_queued_samples(&link->fifo);

@ -72,6 +72,13 @@ size_t ff_inlink_queued_frames(AVFilterLink *link);
*/
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

Loading…
Cancel
Save