mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
lavfi: remove needs_fifo.
This commit is contained in:
parent
29e0c30b1c
commit
4ca1fb9d2a
@ -493,8 +493,7 @@ struct AVFilterLink {
|
|||||||
/**
|
/**
|
||||||
* Audio only, the destination filter sets this to a non-zero value to
|
* 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
|
* 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
|
* it.
|
||||||
* pad.
|
|
||||||
* Last buffer before EOF will be padded with silence.
|
* Last buffer before EOF will be padded with silence.
|
||||||
*/
|
*/
|
||||||
int request_samples;
|
int request_samples;
|
||||||
|
@ -1226,52 +1226,12 @@ static int graph_config_pointers(AVFilterGraph *graph,
|
|||||||
return 0;
|
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 avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if ((ret = graph_check_validity(graphctx, log_ctx)))
|
if ((ret = graph_check_validity(graphctx, log_ctx)))
|
||||||
return ret;
|
return ret;
|
||||||
if ((ret = graph_insert_fifos(graphctx, log_ctx)) < 0)
|
|
||||||
return ret;
|
|
||||||
if ((ret = graph_config_formats(graphctx, log_ctx)))
|
if ((ret = graph_config_formats(graphctx, log_ctx)))
|
||||||
return ret;
|
return ret;
|
||||||
if ((ret = graph_config_links(graphctx, log_ctx)))
|
if ((ret = graph_config_links(graphctx, log_ctx)))
|
||||||
|
@ -117,14 +117,6 @@ struct AVFilterPad {
|
|||||||
*/
|
*/
|
||||||
int (*config_props)(AVFilterLink *link);
|
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,
|
* The filter expects writable frames from its input link,
|
||||||
* duplicating data buffers if needed.
|
* duplicating data buffers if needed.
|
||||||
|
Loading…
Reference in New Issue
Block a user