From 1e80a0eaa4905aa043690f715843f9c01dfea913 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sun, 7 Nov 2010 22:56:29 +0000 Subject: Remove graphparser.h header, move AVFilterInOut and avfilter_graph_parse() declaration to libavfilter/avfiltergraph.h. Simplify, and less confusing for the user. Originally committed as revision 25705 to svn://svn.ffmpeg.org/ffmpeg/trunk --- doc/APIchanges | 4 +++ ffmpeg.c | 1 - ffplay.c | 1 - libavfilter/avfilter.h | 2 +- libavfilter/avfiltergraph.h | 36 +++++++++++++++++++++++++ libavfilter/graphparser.c | 1 - libavfilter/graphparser.h | 64 --------------------------------------------- tools/graph2dot.c | 2 +- 8 files changed, 42 insertions(+), 69 deletions(-) delete mode 100644 libavfilter/graphparser.h diff --git a/doc/APIchanges b/doc/APIchanges index a417205478..63f33b436f 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,10 @@ libavutil: 2009-03-08 API changes, most recent first: +2010-11-07 - r25705 - lavfi 1.58.0 - avfiltergraph.h + Remove graphparser.h header, move AVFilterInOut and + avfilter_graph_parse() declarations to libavfilter/avfiltergraph.h. + 2010-11-07 - r25700 - lavfi 1.57.0 - AVFilterInOut Rename field AVFilterInOut.filter to AVFilterInOut.filter_ctx. This change breaks libavfilter API. diff --git a/ffmpeg.c b/ffmpeg.c index 4bac0cb7eb..fc1d52bfd7 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -49,7 +49,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 33192e7ded..c2c41343fc 100644 --- a/ffplay.c +++ b/ffplay.c @@ -41,7 +41,6 @@ #if CONFIG_AVFILTER # include "libavfilter/avfilter.h" # include "libavfilter/avfiltergraph.h" -# include "libavfilter/graphparser.h" #endif #include "cmdutils.h" diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index b12b7c7d81..544c2e93f3 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -25,7 +25,7 @@ #include "libavutil/avutil.h" #define LIBAVFILTER_VERSION_MAJOR 1 -#define LIBAVFILTER_VERSION_MINOR 57 +#define LIBAVFILTER_VERSION_MINOR 58 #define LIBAVFILTER_VERSION_MICRO 0 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ diff --git a/libavfilter/avfiltergraph.h b/libavfilter/avfiltergraph.h index 793c3a44f4..5bc8f0d4b8 100644 --- a/libavfilter/avfiltergraph.h +++ b/libavfilter/avfiltergraph.h @@ -87,4 +87,40 @@ int avfilter_graph_config(AVFilterGraph *graphctx, AVClass *log_ctx); */ void avfilter_graph_free(AVFilterGraph *graph); +/** + * A linked-list of the inputs/outputs of the filter chain. + * + * This is mainly useful for avfilter_graph_parse(), since this + * function may accept a description of a graph with not connected + * input/output pads. This struct specifies, per each not connected + * pad contained in the graph, the filter context and the pad index + * required for establishing a link. + */ +typedef struct AVFilterInOut { + /** unique name for this input/output in the list */ + char *name; + + /** filter context associated to this input/output */ + AVFilterContext *filter_ctx; + + /** index of the filt_ctx pad to use for linking */ + int pad_idx; + + /** next input/input in the list, NULL if this is the last */ + 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, a negative AVERROR code 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 076b22a83c..1bce3bcbb5 100644 --- a/libavfilter/graphparser.c +++ b/libavfilter/graphparser.c @@ -24,7 +24,6 @@ #include #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 f044b58c44..0000000000 --- a/libavfilter/graphparser.h +++ /dev/null @@ -1,64 +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. - * - * This is mainly useful for avfilter_graph_parse(), since this - * function may accept a description of a graph with not connected - * input/output pads. This struct specifies, per each not connected - * pad contained in the graph, the filter context and the pad index - * required for establishing a link. - */ -typedef struct AVFilterInOut { - /** unique name for this input/output in the list */ - char *name; - - /** filter context associated to this input/output */ - AVFilterContext *filter_ctx; - - /** index of the filt_ctx pad to use for linking */ - int pad_idx; - - /** next input/input in the list, NULL if this is the last */ - 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, a negative AVERROR code on error - */ -int avfilter_graph_parse(AVFilterGraph *graph, const char *filters, - AVFilterInOut *inputs, AVFilterInOut *outputs, - AVClass *log_ctx); - -#endif /* AVFILTER_GRAPHPARSER_H */ diff --git a/tools/graph2dot.c b/tools/graph2dot.c index 515a00342d..6715a30e1a 100644 --- a/tools/graph2dot.c +++ b/tools/graph2dot.c @@ -22,7 +22,7 @@ #undef HAVE_AV_CONFIG_H #include "libavutil/pixdesc.h" -#include "libavfilter/graphparser.h" +#include "libavfilter/avfiltergraph.h" static void usage(void) { -- cgit v1.2.3