[FFmpeg-cvslog] r12695 - in trunk/libavfilter: avfiltergraph.c avfiltergraph.h

vitor subversion
Fri Apr 4 22:06:23 CEST 2008


Author: vitor
Date: Fri Apr  4 22:06:22 2008
New Revision: 12695

Log:
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


Modified:
   trunk/libavfilter/avfiltergraph.c
   trunk/libavfilter/avfiltergraph.h

Modified: trunk/libavfilter/avfiltergraph.c
==============================================================================
--- trunk/libavfilter/avfiltergraph.c	(original)
+++ trunk/libavfilter/avfiltergraph.c	Fri Apr  4 22:06:22 2008
@@ -49,6 +49,20 @@ void avfilter_graph_add_filter(AVFilterC
     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;

Modified: trunk/libavfilter/avfiltergraph.h
==============================================================================
--- trunk/libavfilter/avfiltergraph.h	(original)
+++ trunk/libavfilter/avfiltergraph.h	Fri Apr  4 22:06:22 2008
@@ -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 */




More information about the ffmpeg-cvslog mailing list