1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavfi: remove needs_fifo.

This commit is contained in:
Nicolas George 2020-08-12 19:13:37 +02:00
parent 29e0c30b1c
commit 4ca1fb9d2a
3 changed files with 1 additions and 50 deletions

View File

@ -493,8 +493,7 @@ struct AVFilterLink {
/**
* Audio only, the destination filter sets this to a non-zero value to
* request that buffers with the given number of samples should be sent to
* it. AVFilterPad.needs_fifo must also be set on the corresponding input
* pad.
* it.
* Last buffer before EOF will be padded with silence.
*/
int request_samples;

View File

@ -1226,52 +1226,12 @@ static int graph_config_pointers(AVFilterGraph *graph,
return 0;
}
static int graph_insert_fifos(AVFilterGraph *graph, AVClass *log_ctx)
{
AVFilterContext *f;
int i, j, ret;
int fifo_count = 0;
for (i = 0; i < graph->nb_filters; i++) {
f = graph->filters[i];
for (j = 0; j < f->nb_inputs; j++) {
AVFilterLink *link = f->inputs[j];
AVFilterContext *fifo_ctx;
const AVFilter *fifo;
char name[32];
if (!link->dstpad->needs_fifo)
continue;
fifo = f->inputs[j]->type == AVMEDIA_TYPE_VIDEO ?
avfilter_get_by_name("fifo") :
avfilter_get_by_name("afifo");
snprintf(name, sizeof(name), "auto_fifo_%d", fifo_count++);
ret = avfilter_graph_create_filter(&fifo_ctx, fifo, name, NULL,
NULL, graph);
if (ret < 0)
return ret;
ret = avfilter_insert_filter(link, fifo_ctx, 0, 0);
if (ret < 0)
return ret;
}
}
return 0;
}
int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx)
{
int ret;
if ((ret = graph_check_validity(graphctx, log_ctx)))
return ret;
if ((ret = graph_insert_fifos(graphctx, log_ctx)) < 0)
return ret;
if ((ret = graph_config_formats(graphctx, log_ctx)))
return ret;
if ((ret = graph_config_links(graphctx, log_ctx)))

View File

@ -117,14 +117,6 @@ struct AVFilterPad {
*/
int (*config_props)(AVFilterLink *link);
/**
* The filter expects a fifo to be inserted on its input link,
* typically because it has a delay.
*
* input pads only.
*/
int needs_fifo;
/**
* The filter expects writable frames from its input link,
* duplicating data buffers if needed.