[FFmpeg-cvslog] r25502 - in trunk: doc/APIchanges ffmpeg.c ffplay.c libavfilter/avfilter.h libavfilter/avfiltergraph.c libavfilter/avfiltergraph.h tools/graph2dot.c

stefano subversion
Sat Oct 16 12:20:53 CEST 2010


Author: stefano
Date: Sat Oct 16 12:20:53 2010
New Revision: 25502

Log:
Add avfilter_graph_config().

Modified:
   trunk/doc/APIchanges
   trunk/ffmpeg.c
   trunk/ffplay.c
   trunk/libavfilter/avfilter.h
   trunk/libavfilter/avfiltergraph.c
   trunk/libavfilter/avfiltergraph.h
   trunk/tools/graph2dot.c

Modified: trunk/doc/APIchanges
==============================================================================
--- trunk/doc/APIchanges	Sat Oct 16 12:06:13 2010	(r25501)
+++ trunk/doc/APIchanges	Sat Oct 16 12:20:53 2010	(r25502)
@@ -13,6 +13,9 @@ libavutil:   2009-03-08
 
 API changes, most recent first:
 
+2010-10-16 - r25502 - lavfi 1.52.0 - avfilter_graph_config()
+  Add the function avfilter_graph_config() in avfiltergraph.h.
+
 2010-10-15 - r25493 - lavf 52.83.0 - metadata API
   Change demuxers to export metadata in generic format and
   muxers to accept generic format. Deprecate the public

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	Sat Oct 16 12:06:13 2010	(r25501)
+++ trunk/ffmpeg.c	Sat Oct 16 12:20:53 2010	(r25502)
@@ -452,12 +452,7 @@ static int configure_filters(AVInputStre
             return ret;
     }
 
-    /* configure all the filter links */
-    if ((ret = avfilter_graph_check_validity(graph, NULL)) < 0)
-        return ret;
-    if ((ret = avfilter_graph_config_formats(graph, NULL)) < 0)
-        return ret;
-    if ((ret = avfilter_graph_config_links(graph, NULL)) < 0)
+    if ((ret = avfilter_graph_config(graph, NULL)) < 0)
         return ret;
 
     codec->width  = ist->output_video_filter->inputs[0]->w;

Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c	Sat Oct 16 12:06:13 2010	(r25501)
+++ trunk/ffplay.c	Sat Oct 16 12:20:53 2010	(r25502)
@@ -1849,9 +1849,8 @@ static int video_thread(void *arg)
     avfilter_graph_add_filter(graph, filt_src);
     avfilter_graph_add_filter(graph, filt_out);
 
-    if(avfilter_graph_check_validity(graph, NULL))           goto the_end;
-    if(avfilter_graph_config_formats(graph, NULL))           goto the_end;
-    if(avfilter_graph_config_links(graph, NULL))             goto the_end;
+    if (avfilter_graph_config(graph, NULL) < 0)
+        goto the_end;
 
     is->out_video_filter = filt_out;
 #endif

Modified: trunk/libavfilter/avfilter.h
==============================================================================
--- trunk/libavfilter/avfilter.h	Sat Oct 16 12:06:13 2010	(r25501)
+++ trunk/libavfilter/avfilter.h	Sat Oct 16 12:20:53 2010	(r25502)
@@ -25,8 +25,8 @@
 #include "libavutil/avutil.h"
 
 #define LIBAVFILTER_VERSION_MAJOR  1
-#define LIBAVFILTER_VERSION_MINOR 51
-#define LIBAVFILTER_VERSION_MICRO  1
+#define LIBAVFILTER_VERSION_MINOR 52
+#define LIBAVFILTER_VERSION_MICRO  0
 
 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
                                                LIBAVFILTER_VERSION_MINOR, \

Modified: trunk/libavfilter/avfiltergraph.c
==============================================================================
--- trunk/libavfilter/avfiltergraph.c	Sat Oct 16 12:06:13 2010	(r25501)
+++ trunk/libavfilter/avfiltergraph.c	Sat Oct 16 12:20:53 2010	(r25502)
@@ -202,3 +202,16 @@ int avfilter_graph_config_formats(AVFilt
     return 0;
 }
 
+int avfilter_graph_config(AVFilterGraph *graphctx, AVClass *log_ctx)
+{
+    int ret;
+
+    if ((ret = avfilter_graph_check_validity(graphctx, log_ctx)))
+        return ret;
+    if ((ret = avfilter_graph_config_formats(graphctx, log_ctx)))
+        return ret;
+    if ((ret = avfilter_graph_config_links(graphctx, log_ctx)))
+        return ret;
+
+    return 0;
+}

Modified: trunk/libavfilter/avfiltergraph.h
==============================================================================
--- trunk/libavfilter/avfiltergraph.h	Sat Oct 16 12:06:13 2010	(r25501)
+++ trunk/libavfilter/avfiltergraph.h	Sat Oct 16 12:20:53 2010	(r25502)
@@ -70,6 +70,14 @@ int avfilter_graph_config_links(AVFilter
 int avfilter_graph_config_formats(AVFilterGraph *graphctx, AVClass *log_ctx);
 
 /**
+ * Check validity and configure all the links and formats in the graph.
+ *
+ * @see avfilter_graph_check_validity(), avfilter_graph_config_links(),
+ * avfilter_graph_config_formats()
+ */
+int avfilter_graph_config(AVFilterGraph *graphctx, AVClass *log_ctx);
+
+/**
  * Free a graph and destroy its links.
  */
 void avfilter_graph_destroy(AVFilterGraph *graph);

Modified: trunk/tools/graph2dot.c
==============================================================================
--- trunk/tools/graph2dot.c	Sat Oct 16 12:06:13 2010	(r25501)
+++ trunk/tools/graph2dot.c	Sat Oct 16 12:20:53 2010	(r25502)
@@ -152,9 +152,7 @@ int main(int argc, char **argv)
         return 1;
     }
 
-    if (avfilter_graph_check_validity(graph, NULL) ||
-        avfilter_graph_config_formats(graph, NULL) ||
-        avfilter_graph_config_links  (graph, NULL))
+    if (avfilter_graph_config(graph, NULL) < 0)
         return 1;
 
     print_digraph(outfile, graph);



More information about the ffmpeg-cvslog mailing list