avfilter: add ff_inlink_queued_samples()

This commit is contained in:
Paul B Mahol 2018-10-02 21:57:00 +02:00
parent ebc3d04b8d
commit 7d65fe87e9
2 changed files with 12 additions and 0 deletions

View File

@ -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);

View File

@ -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