[FFmpeg-cvslog] lavfi: add AVFilterContext.graph.

Anton Khirnov git at videolan.org
Fri Apr 12 00:51:33 CEST 2013


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Mar 31 12:17:07 2013 +0200| [111367263af41c88a44bd763ceefc11d53a7f655] | committer: Anton Khirnov

lavfi: add AVFilterContext.graph.

It will be useful in the following commits.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=111367263af41c88a44bd763ceefc11d53a7f655
---

 doc/APIchanges              |    2 ++
 libavfilter/avfilter.h      |    2 ++
 libavfilter/avfiltergraph.c |    4 ++++
 3 files changed, 8 insertions(+)

diff --git a/doc/APIchanges b/doc/APIchanges
index dd6532d..9748565 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -18,6 +18,8 @@ API changes, most recent first:
   avfilterhraph.h, user applications should include just avfilter.h
   Add avfilter_graph_alloc_filter(), deprecate avfilter_open() and
   avfilter_graph_add_filter().
+  Add AVFilterContext.graph pointing to the AVFilterGraph that contains the
+  filter.
 
 2013-xx-xx - lavfi 3.7.0 - avfilter.h
   Add AVFilter.priv_class for exporting filter options through the AVOptions API
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 94d5d61..b37b74f 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -458,6 +458,8 @@ struct AVFilterContext {
     unsigned    nb_outputs;         ///< number of output pads
 
     void *priv;                     ///< private data for use by the filter
+
+    struct AVFilterGraph *graph;    ///< filtergraph this filter belongs to
 };
 
 /**
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 828b462..969d958 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -73,6 +73,8 @@ int avfilter_graph_add_filter(AVFilterGraph *graph, AVFilterContext *filter)
     graph->filter_count = graph->nb_filters;
 #endif
 
+    filter->graph = graph;
+
     return 0;
 }
 #endif
@@ -121,6 +123,8 @@ AVFilterContext *avfilter_graph_alloc_filter(AVFilterGraph *graph,
     graph->filter_count = graph->nb_filters;
 #endif
 
+    s->graph = graph;
+
     return s;
 }
 



More information about the ffmpeg-cvslog mailing list