Apply grammar/consistency nits to avfilter_graph_add_filter() doxy.
[libav.git] / libavfilter / avfiltergraph.h
CommitLineData
eccb6fb7
VS
1/*
2 * Filter graphs
3 * copyright (c) 2007 Bobby Bingham
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
98790382
SS
22#ifndef AVFILTER_AVFILTERGRAPH_H
23#define AVFILTER_AVFILTERGRAPH_H
eccb6fb7
VS
24
25#include "avfilter.h"
26
f2ee8083
VS
27typedef struct AVFilterGraph {
28 unsigned filter_count;
29 AVFilterContext **filters;
39c07b8e
SS
30
31 char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters
9f39bb37 32} AVFilterGraph;
3ec394ea 33
d22ebb1b 34/**
c5c6f626 35 * Gets a filter instance with name name from graph.
9864142b
SS
36 *
37 * @return the pointer to the found filter instance or NULL if it
38 * cannot be found.
d22ebb1b 39 */
d2027baa 40AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, char *name);
d22ebb1b 41
57d4a157 42/**
c5c6f626 43 * Adds an existing filter instance to a filter graph.
bc3c85a3
SS
44 *
45 * @param graph the filter graph
46 * @param filter the filter to be added
eccb6fb7 47 */
4e4a3e23 48int avfilter_graph_add_filter(AVFilterGraph *graphctx, AVFilterContext *filter);
eccb6fb7 49
256d0e0a 50/**
c5c6f626 51 * Checks for the validity of graph.
822005ed
SS
52 *
53 * A graph is considered valid if all its input and output pads are
54 * connected.
55 *
56 * @return 0 in case of success, a negative value otherwise
57 */
58int avfilter_graph_check_validity(AVFilterGraph *graphctx, AVClass *log_ctx);
59
60/**
4ec42240
SS
61 * Configures all the links of graphctx.
62 *
63 * @return 0 in case of success, a negative value otherwise
64 */
65int avfilter_graph_config_links(AVFilterGraph *graphctx, AVClass *log_ctx);
66
67/**
c5c6f626 68 * Configures the formats of all the links in the graph.
7b470878 69 */
3fb8e77a 70int avfilter_graph_config_formats(AVFilterGraph *graphctx, AVClass *log_ctx);
7b470878
VS
71
72/**
c5c6f626 73 * Frees a graph and destroys its links.
c4913b81 74 */
d7dbe558 75void avfilter_graph_destroy(AVFilterGraph *graph);
c4913b81 76
98790382 77#endif /* AVFILTER_AVFILTERGRAPH_H */