diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-11 23:56:39 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-12 00:31:44 +0200 |
commit | 86070b8e5a0e0ba087a9ce2a050c00094e29f35b (patch) | |
tree | 6e82eb3de383fa6f8756c5053d26e52fbf29f07b /libavfilter/avfilter.h | |
parent | 9da369604ecf31d9dce2dee21ed214b8c43264c6 (diff) | |
parent | bc1a985ba030e9861d24965d42792850b43a43ea (diff) |
Merge commit 'bc1a985ba030e9861d24965d42792850b43a43ea'
* commit 'bc1a985ba030e9861d24965d42792850b43a43ea':
lavfi: replace avfilter_open() with avfilter_graph_alloc_filter().
Conflicts:
libavfilter/avfiltergraph.c
libavfilter/internal.h
libavfilter/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/avfilter.h')
-rw-r--r-- | libavfilter/avfilter.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 296cc420b1..dbdcf9d210 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -817,8 +817,8 @@ void avfilter_uninit(void); /** * Register a filter. This is only needed if you plan to use * avfilter_get_by_name later to lookup the AVFilter structure by name. A - * filter can still by instantiated with avfilter_open even if it is not - * registered. + * filter can still by instantiated with avfilter_graph_alloc_filter even if it + * is not registered. * * @param filter the filter to register * @return 0 if the registration was successful, a negative value @@ -843,6 +843,7 @@ AVFilter *avfilter_get_by_name(const char *name); */ AVFilter **av_filter_next(AVFilter **filter); +#if FF_API_AVFILTER_OPEN /** * Create a filter instance. * @@ -851,8 +852,11 @@ AVFilter **av_filter_next(AVFilter **filter); * @param filter the filter to create an instance of * @param inst_name Name to give to the new instance. Can be NULL for none. * @return >= 0 in case of success, a negative error code otherwise + * @deprecated use avfilter_graph_alloc_filter() instead */ +attribute_deprecated int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char *inst_name); +#endif /** * Initialize a filter. @@ -949,6 +953,24 @@ typedef struct AVFilterGraph { AVFilterGraph *avfilter_graph_alloc(void); /** + * Create a new filter instance in a filter graph. + * + * @param graph graph in which the new filter will be used + * @param filter the filter to create an instance of + * @param name Name to give to the new instance (will be copied to + * AVFilterContext.name). This may be used by the caller to identify + * different filters, libavfilter itself assigns no semantics to + * this parameter. May be NULL. + * + * @return the context of the newly created filter instance (note that it is + * also retrievable directly through AVFilterGraph.filters or with + * avfilter_graph_get_filter()) on success or NULL or failure. + */ +AVFilterContext *avfilter_graph_alloc_filter(AVFilterGraph *graph, + const AVFilter *filter, + const char *name); + +/** * Get a filter instance with name name from graph. * * @return the pointer to the found filter instance or NULL if it |