[FFmpeg-devel] [PATCH 2/5] Remove graphparser.h header, move avfilter_graph_parse() declaration to libavfilter/avfiltergraph.h.

Stefano Sabatini stefano.sabatini-lala
Tue Nov 2 21:02:22 CET 2010


Simplify and less confusing for the user.
---
 ffmpeg.c                    |    1 -
 ffplay.c                    |    1 -
 libavfilter/avfiltergraph.h |   24 +++++++++++++++++++
 libavfilter/graphparser.c   |    1 -
 libavfilter/graphparser.h   |   52 -------------------------------------------
 5 files changed, 24 insertions(+), 55 deletions(-)
 delete mode 100644 libavfilter/graphparser.h

diff --git a/ffmpeg.c b/ffmpeg.c
index 85ee5bb..159c7be 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -48,7 +48,6 @@
 #if CONFIG_AVFILTER
 # include "libavfilter/avfilter.h"
 # include "libavfilter/avfiltergraph.h"
-# include "libavfilter/graphparser.h"
 # include "libavfilter/vsrc_buffer.h"
 #endif
 
diff --git a/ffplay.c b/ffplay.c
index 581e994..cd175df 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -40,7 +40,6 @@
 #if CONFIG_AVFILTER
 # include "libavfilter/avfilter.h"
 # include "libavfilter/avfiltergraph.h"
-# include "libavfilter/graphparser.h"
 #endif
 
 #include "cmdutils.h"
diff --git a/libavfilter/avfiltergraph.h b/libavfilter/avfiltergraph.h
index 0b08f02..428c531 100644
--- a/libavfilter/avfiltergraph.h
+++ b/libavfilter/avfiltergraph.h
@@ -87,4 +87,28 @@ int avfilter_graph_config(AVFilterGraph *graphctx, AVClass *log_ctx);
  */
 void avfilter_graph_destroy(AVFilterGraph *graph);
 
+/**
+ * A linked-list of the inputs/outputs of the filter chain.
+ */
+typedef struct AVFilterInOut {
+    char *name;
+    AVFilterContext *filter;
+    int pad_idx;
+
+    struct AVFilterInOut *next;
+} AVFilterInOut;
+
+/**
+ * Add a graph described by a string to a graph.
+ *
+ * @param graph   the filter graph where to link the parsed graph context
+ * @param filters string to be parsed
+ * @param inputs  linked list to the inputs of the graph
+ * @param outputs linked list to the outputs of the graph
+ * @return        zero on success, -1 on error
+ */
+int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
+                         AVFilterInOut *inputs, AVFilterInOut *outputs,
+                         AVClass *log_ctx);
+
 #endif  /* AVFILTER_AVFILTERGRAPH_H */
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index fab0423..b2522c2 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -24,7 +24,6 @@
 #include <string.h>
 
 #include "libavutil/avstring.h"
-#include "graphparser.h"
 #include "avfilter.h"
 #include "avfiltergraph.h"
 #include "parseutils.h"
diff --git a/libavfilter/graphparser.h b/libavfilter/graphparser.h
deleted file mode 100644
index 510b4b3..0000000
--- a/libavfilter/graphparser.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Filter graph parser
- * copyright (c) 2007 Bobby Bingham
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef AVFILTER_GRAPHPARSER_H
-#define AVFILTER_GRAPHPARSER_H
-
-#include "avfilter.h"
-#include "avfiltergraph.h"
-
-/**
- * A linked-list of the inputs/outputs of the filter chain.
- */
-typedef struct AVFilterInOut {
-    char *name;
-    AVFilterContext *filter;
-    int pad_idx;
-
-    struct AVFilterInOut *next;
-} AVFilterInOut;
-
-/**
- * Add a graph described by a string to a graph.
- *
- * @param graph   the filter graph where to link the parsed graph context
- * @param filters string to be parsed
- * @param inputs  linked list to the inputs of the graph
- * @param outputs linked list to the outputs of the graph
- * @return        zero on success, -1 on error
- */
-int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
-                         AVFilterInOut *inputs, AVFilterInOut *outputs,
-                         AVClass *log_ctx);
-
-#endif  /* AVFILTER_GRAPHPARSER_H */
-- 
1.7.1




More information about the ffmpeg-devel mailing list