]> git.sesse.net Git - ffmpeg/commitdiff
Add avfilter_graph_config().
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Sat, 16 Oct 2010 10:20:53 +0000 (10:20 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Sat, 16 Oct 2010 10:20:53 +0000 (10:20 +0000)
Originally committed as revision 25502 to svn://svn.ffmpeg.org/ffmpeg/trunk

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

index d126c13eddea3437b015f4a0c239cc55825aa41e..b92e5dc907230db64ac0a40810d5bd7c601094f6 100644 (file)
@@ -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
index 9513c7f5fc212c66cc62a0e5139d39e0ac83792c..500ec158cd4645deadad4f65a0580ea67657692e 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -452,12 +452,7 @@ static int configure_filters(AVInputStream *ist, AVOutputStream *ost)
             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;
index 93208e213799c32b69c6af0561794fdb51d0b396..da12810d18c0f4fbf45eb36437c10698d7f3acf1 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -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
index f29ebe7f6c71330a4a194c9d1973447ec41564d8..94928c5cd2c5c91fb9eea73d95a01d1dbe096de8 100644 (file)
@@ -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, \
index 2123c2806cbb2e0c50e0cbb5ae09cd52ba48c24b..baffc5168ba7cc4a226a24feb4079ae49fb74d7a 100644 (file)
@@ -202,3 +202,16 @@ int avfilter_graph_config_formats(AVFilterGraph *graph, AVClass *log_ctx)
     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;
+}
index 23fc57c3116dfc75b7aebb929cafa115ad86177f..efb9cc02bcfb7e443c2cf97e1456ba423368fe15 100644 (file)
@@ -69,6 +69,14 @@ int avfilter_graph_config_links(AVFilterGraph *graphctx, AVClass *log_ctx);
  */
 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.
  */
index a1a68be30c19f4f989814a1eeaf9e651441c0767..515a00342d595a8114b32370531dd2a1f9f50b3f 100644 (file)
@@ -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);