[SCM] libav/experimental: Remove usage of AVFilterGraphDesc outside avfiltergraph.c Commited in SoC by Vitor Sessak on 2008-03-26 20:51:24
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:18:27 UTC 2013
The following commit has been merged in the experimental branch:
commit 87506daafddca7c73524a1be3440244e7c99340e
Author: Vitor Sessak <vitor1001 at gmail.com>
Date: Fri Apr 4 20:09:02 2008 +0000
Remove usage of AVFilterGraphDesc outside avfiltergraph.c
Commited in SoC by Vitor Sessak on 2008-03-26 20:51:24
Originally committed as revision 12738 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index c2da4cf..62da23f 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -554,16 +554,25 @@ static AVFilterGraphDesc *parse_chain(const char *filters, int has_in)
/**
* Parse a string describing a filter graph.
*/
-AVFilterGraphDesc *avfilter_graph_parse_chain(const char *filters)
+int avfilter_graph_parse_chain(AVFilterGraph *graph, const char *filters, AVFilterContext *in, int inpad, AVFilterContext *out, int outpad)
{
- AVFilterGraphDesc *ret;
+ AVFilterGraphDesc *desc;
/* Try first to parse supposing there is no (in) element */
- if ((ret = parse_chain(filters, 0)))
- return ret;
+ if (!(desc = parse_chain(filters, 0))) {
+ /* If it didn't work, parse supposing there is an (in) element */
+ desc = parse_chain(filters, 1);
+ }
+ if (!desc)
+ return -1;
+
+ if (graph_load_from_desc3(graph, desc, in, inpad, out, outpad) < 0) {
+ avfilter_graph_free_desc(desc);
+ return -1;
+ }
- /* Parse supposing there is an (in) element */
- return parse_chain(filters, 1);
+ avfilter_graph_free_desc(desc);
+ return 0;
}
/**
diff --git a/libavfilter/avfiltergraph.h b/libavfilter/avfiltergraph.h
index 08d25b7..cadd091 100644
--- a/libavfilter/avfiltergraph.h
+++ b/libavfilter/avfiltergraph.h
@@ -72,12 +72,16 @@ typedef struct AVFilterGraph {
} AVFilterGraph;
/**
- * Parse a graph composed of a simple chain of filters which is described by
- * a single string.
- * @param filters String listing filters and their arguments.
- * @return The parsed graph description.
+ * Add to a graph a graph described by a string.
+ * @param graph the filter graph where to link the parsed graph context
+ * @param filters string to be parsed
+ * @param in input to the graph to be parsed (TODO: allow several)
+ * @param inpad pad index of the input
+ * @param in output to the graph to be parsed (TODO: allow several)
+ * @param inpad pad index of the output
+ * @return zero on success, -1 on error
*/
-AVFilterGraphDesc *avfilter_graph_parse_chain(const char *filters);
+int avfilter_graph_parse_chain(AVFilterGraph *graph, const char *filters, AVFilterContext *in, int inpad, AVFilterContext *out, int outpad);
/**
* Free a filter graph description.
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list