X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Favfiltergraph.h;h=a975926fd16a9e4c1f40be918feece4b04c0f270;hb=5d35b279e21814b3b1499ae0b2e0e0dad7d7f782;hp=0140af0801d203df386d486fc79934f00f9380b4;hpb=85b21147594101ba2d8e7ea2cfa504c0d1baee5a;p=ffmpeg diff --git a/libavfilter/avfiltergraph.h b/libavfilter/avfiltergraph.h index 0140af0801d..a975926fd16 100644 --- a/libavfilter/avfiltergraph.h +++ b/libavfilter/avfiltergraph.h @@ -76,7 +76,7 @@ int avfilter_graph_create_filter(AVFilterContext **filt_ctx, AVFilter *filt, * @param log_ctx context used for logging * @return 0 in case of success, a negative AVERROR code otherwise */ -int avfilter_graph_config(AVFilterGraph *graphctx, AVClass *log_ctx); +int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx); /** * Free a graph, destroy its links, and set *graph to NULL. @@ -107,17 +107,33 @@ typedef struct AVFilterInOut { struct AVFilterInOut *next; } AVFilterInOut; +/** + * Create an AVFilterInOut. + * Must be free with avfilter_inout_free(). + */ +AVFilterInOut *avfilter_inout_alloc(void); + +/** + * Free the AVFilterInOut in *inout, and set its pointer to NULL. + * If *inout is NULL, do nothing. + */ +void avfilter_inout_free(AVFilterInOut **inout); + /** * 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 + * @param inputs linked list to the inputs of the graph, may be NULL. + * It is updated to contain the list of open inputs after the parsing, + * should be freed with avfilter_inout_free(). + * @param outputs linked list to the outputs of the graph, may be NULL. + * It is updated to contain the list of open outputs after the parsing, + * should be freed with avfilter_inout_free(). * @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); + AVFilterInOut **inputs, AVFilterInOut **outputs, + void *log_ctx); -#endif /* AVFILTER_AVFILTERGRAPH_H */ +#endif /* AVFILTER_AVFILTERGRAPH_H */