2008-04-04 23:02:10 +03:00
|
|
|
/*
|
|
|
|
* Filter graphs
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
2008-08-31 10:39:47 +03:00
|
|
|
#ifndef AVFILTER_AVFILTERGRAPH_H
|
|
|
|
#define AVFILTER_AVFILTERGRAPH_H
|
2008-04-04 23:02:10 +03:00
|
|
|
|
|
|
|
#include "avfilter.h"
|
|
|
|
|
2008-04-04 23:08:49 +03:00
|
|
|
typedef struct AVFilterGraph {
|
|
|
|
unsigned filter_count;
|
|
|
|
AVFilterContext **filters;
|
2009-02-24 01:45:21 +02:00
|
|
|
|
|
|
|
char *scale_sws_opts; ///< sws options to use for the auto-inserted scale filters
|
2008-04-04 23:08:56 +03:00
|
|
|
} AVFilterGraph;
|
2008-04-04 23:08:31 +03:00
|
|
|
|
2008-04-04 23:07:54 +03:00
|
|
|
/**
|
2009-05-14 21:13:17 +03:00
|
|
|
* Gets a filter instance with name name from graph.
|
2008-12-27 00:25:47 +02:00
|
|
|
*
|
|
|
|
* @return the pointer to the found filter instance or NULL if it
|
|
|
|
* cannot be found.
|
2008-04-04 23:07:54 +03:00
|
|
|
*/
|
2008-04-04 23:09:27 +03:00
|
|
|
AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, char *name);
|
2008-04-04 23:07:54 +03:00
|
|
|
|
2008-04-04 23:02:10 +03:00
|
|
|
/**
|
2009-05-14 21:13:17 +03:00
|
|
|
* Adds an existing filter instance to a filter graph.
|
2008-04-04 23:02:10 +03:00
|
|
|
* @param graph The filter graph
|
|
|
|
* @param filter The filter to be added
|
|
|
|
*/
|
2008-04-04 23:09:47 +03:00
|
|
|
int avfilter_graph_add_filter(AVFilterGraph *graphctx, AVFilterContext *filter);
|
2008-04-04 23:02:10 +03:00
|
|
|
|
2009-01-26 22:21:25 +02:00
|
|
|
/**
|
2009-05-14 21:13:17 +03:00
|
|
|
* Checks for the validity of graph.
|
2009-01-26 22:21:25 +02:00
|
|
|
*
|
|
|
|
* A graph is considered valid if all its input and output pads are
|
|
|
|
* connected.
|
|
|
|
*
|
|
|
|
* @return 0 in case of success, a negative value otherwise
|
|
|
|
*/
|
|
|
|
int avfilter_graph_check_validity(AVFilterGraph *graphctx, AVClass *log_ctx);
|
|
|
|
|
2009-05-31 19:30:12 +03:00
|
|
|
/**
|
|
|
|
* Configures all the links of graphctx.
|
|
|
|
*
|
|
|
|
* @return 0 in case of success, a negative value otherwise
|
|
|
|
*/
|
|
|
|
int avfilter_graph_config_links(AVFilterGraph *graphctx, AVClass *log_ctx);
|
|
|
|
|
2008-04-04 23:06:22 +03:00
|
|
|
/**
|
2009-05-14 21:13:17 +03:00
|
|
|
* Configures the formats of all the links in the graph.
|
2008-04-04 23:07:41 +03:00
|
|
|
*/
|
2008-04-04 23:08:56 +03:00
|
|
|
int avfilter_graph_config_formats(AVFilterGraph *graphctx);
|
2008-04-04 23:07:41 +03:00
|
|
|
|
2008-04-04 23:09:14 +03:00
|
|
|
/**
|
2009-05-14 21:13:17 +03:00
|
|
|
* Frees a graph and destroys its links.
|
2008-04-04 23:09:14 +03:00
|
|
|
*/
|
2009-02-27 00:02:09 +02:00
|
|
|
void avfilter_graph_destroy(AVFilterGraph *graph);
|
2008-04-04 23:09:14 +03:00
|
|
|
|
2008-08-31 10:39:47 +03:00
|
|
|
#endif /* AVFILTER_AVFILTERGRAPH_H */
|