aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2008-04-04 20:06:22 +0000
committerVitor Sessak <vitor1001@gmail.com>2008-04-04 20:06:22 +0000
commit256d0e0a72823a1a6fa0fa074b82f31aa9b4b1fc (patch)
treee5fa03e871604fdb76848f034eb073b7d64f1439 /libavfilter
parent1deec58ba308f66280e388071dbcc223c3728595 (diff)
downloadffmpeg-256d0e0a72823a1a6fa0fa074b82f31aa9b4b1fc.tar.gz
Separate the process of creating links between filters from that of configuring
the links. Commited in SoC by Bobby Bingham on 2007-08-07 21:02:18 Originally committed as revision 12695 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avfiltergraph.c14
-rw-r--r--libavfilter/avfiltergraph.h5
2 files changed, 19 insertions, 0 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 875ef0edca..8a067b80ea 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -49,6 +49,20 @@ void avfilter_graph_add_filter(AVFilterContext *graphctx, AVFilterContext *filte
graph->filters[graph->filter_count - 1] = filter;
}
+int avfilter_graph_config_links(AVFilterContext *graphctx)
+{
+ GraphContext *graph = graphctx->priv;
+ int i, j;
+
+ for(i = 0; i < graph->filter_count; i ++) {
+ for(j = 0; j < graph->filters[i]->input_count; j ++)
+ if(avfilter_config_link(graph->filters[i]->inputs[j]))
+ return -1;
+ }
+
+ return 0;
+}
+
static AVFilterContext *create_filter_with_args(const char *filt, void *opaque)
{
AVFilterContext *ret;
diff --git a/libavfilter/avfiltergraph.h b/libavfilter/avfiltergraph.h
index 9b0783d277..309921c800 100644
--- a/libavfilter/avfiltergraph.h
+++ b/libavfilter/avfiltergraph.h
@@ -31,4 +31,9 @@
*/
void avfilter_graph_add_filter(AVFilterContext *graphctx, AVFilterContext *filter);
+/**
+ * Configure the colorspace, resolution, etc of all links in the graph
+ */
+int avfilter_graph_config_links(AVFilterContext *graphctx);
+
#endif /* FFMPEG_AVFILTER_H */