88
90
* A linked-list of the inputs/outputs of the filter chain.
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
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.
96
98
typedef struct AVFilterInOut {
97
99
/** unique name for this input/output in the list */
113
* Allocate a single AVFilterInOut entry.
114
* Must be freed with avfilter_inout_free().
115
* @return allocated AVFilterInOut on success, NULL on failure.
117
AVFilterInOut *avfilter_inout_alloc(void);
120
* Free the supplied list of AVFilterInOut and set *inout to NULL.
121
* If *inout is NULL, do nothing.
123
void avfilter_inout_free(AVFilterInOut **inout);
111
126
* Add a graph described by a string to a graph.
113
128
* @param graph the filter graph where to link the parsed graph context
120
135
AVFilterInOut *inputs, AVFilterInOut *outputs,
139
* Add a graph described by a string to a graph.
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
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
168
int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters,
169
AVFilterInOut **inputs,
170
AVFilterInOut **outputs);
123
172
#endif /* AVFILTER_AVFILTERGRAPH_H */