~ubuntu-branches/ubuntu/vivid/libav/vivid

« back to all changes in this revision

Viewing changes to libavfilter/avfiltergraph.h

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2013-10-22 23:24:08 UTC
  • mfrom: (1.3.36 sid)
  • Revision ID: package-import@ubuntu.com-20131022232408-b8tvvn4pyzri9mi3
Tags: 6:9.10-1ubuntu1
* Build all -extra flavors from this source package, as libav got demoted
  from main to universe, cf LP: #1243235
* Simplify debian/rules to follow exactly the code that debian executes
* New upstream (LP: #1180288) fixes lots of security issues (LP: #1242802)
* Merge from unstable, remaining changes:
  - build-depend on libtiff5-dev rather than libtiff4-dev,
    avoids FTBFS caused by imlib
  - follow the regular debian codepaths

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#define AVFILTER_AVFILTERGRAPH_H
24
24
 
25
25
#include "avfilter.h"
 
26
#include "libavutil/log.h"
26
27
 
27
28
typedef struct AVFilterGraph {
 
29
    const AVClass *av_class;
28
30
    unsigned filter_count;
29
31
    AVFilterContext **filters;
30
32
 
87
89
/**
88
90
 * A linked-list of the inputs/outputs of the filter chain.
89
91
 *
90
 
 * This is mainly useful for avfilter_graph_parse(), since this
91
 
 * function may accept a description of a graph with not connected
92
 
 * input/output pads. This struct specifies, per each not connected
93
 
 * pad contained in the graph, the filter context and the pad index
94
 
 * required for establishing a link.
 
92
 * This is mainly useful for avfilter_graph_parse() / avfilter_graph_parse2(),
 
93
 * where it is used to communicate open (unlinked) inputs and outputs from and
 
94
 * to the caller.
 
95
 * This struct specifies, per each not connected pad contained in the graph, the
 
96
 * filter context and the pad index required for establishing a link.
95
97
 */
96
98
typedef struct AVFilterInOut {
97
99
    /** unique name for this input/output in the list */
108
110
} AVFilterInOut;
109
111
 
110
112
/**
 
113
 * Allocate a single AVFilterInOut entry.
 
114
 * Must be freed with avfilter_inout_free().
 
115
 * @return allocated AVFilterInOut on success, NULL on failure.
 
116
 */
 
117
AVFilterInOut *avfilter_inout_alloc(void);
 
118
 
 
119
/**
 
120
 * Free the supplied list of AVFilterInOut and set *inout to NULL.
 
121
 * If *inout is NULL, do nothing.
 
122
 */
 
123
void avfilter_inout_free(AVFilterInOut **inout);
 
124
 
 
125
/**
111
126
 * Add a graph described by a string to a graph.
112
127
 *
113
128
 * @param graph   the filter graph where to link the parsed graph context
120
135
                         AVFilterInOut *inputs, AVFilterInOut *outputs,
121
136
                         void *log_ctx);
122
137
 
 
138
/**
 
139
 * Add a graph described by a string to a graph.
 
140
 *
 
141
 * @param[in]  graph   the filter graph where to link the parsed graph context
 
142
 * @param[in]  filters string to be parsed
 
143
 * @param[out] inputs  a linked list of all free (unlinked) inputs of the
 
144
 *                     parsed graph will be returned here. It is to be freed
 
145
 *                     by the caller using avfilter_inout_free().
 
146
 * @param[out] outputs a linked list of all free (unlinked) outputs of the
 
147
 *                     parsed graph will be returned here. It is to be freed by the
 
148
 *                     caller using avfilter_inout_free().
 
149
 * @return zero on success, a negative AVERROR code on error
 
150
 *
 
151
 * @note the difference between avfilter_graph_parse2() and
 
152
 * avfilter_graph_parse() is that in avfilter_graph_parse(), the caller provides
 
153
 * the lists of inputs and outputs, which therefore must be known before calling
 
154
 * the function. On the other hand, avfilter_graph_parse2() \em returns the
 
155
 * inputs and outputs that are left unlinked after parsing the graph and the
 
156
 * caller then deals with them. Another difference is that in
 
157
 * avfilter_graph_parse(), the inputs parameter describes inputs of the
 
158
 * <em>already existing</em> part of the graph; i.e. from the point of view of
 
159
 * the newly created part, they are outputs. Similarly the outputs parameter
 
160
 * describes outputs of the already existing filters, which are provided as
 
161
 * inputs to the parsed filters.
 
162
 * avfilter_graph_parse2() takes the opposite approach -- it makes no reference
 
163
 * whatsoever to already existing parts of the graph and the inputs parameter
 
164
 * will on return contain inputs of the newly parsed part of the graph.
 
165
 * Analogously the outputs parameter will contain outputs of the newly created
 
166
 * filters.
 
167
 */
 
168
int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters,
 
169
                          AVFilterInOut **inputs,
 
170
                          AVFilterInOut **outputs);
 
171
 
123
172
#endif /* AVFILTER_AVFILTERGRAPH_H */