summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/avfilter.h')
-rw-r--r--libavfilter/avfilter.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 6416e579bf..abc4eae11b 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -602,8 +602,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 succesfull, a negative value
@@ -628,6 +628,7 @@ AVFilter *avfilter_get_by_name(const char *name);
*/
AVFilter **av_filter_next(AVFilter **filter);
+#if FF_API_AVFILTER_OPEN
/**
* Create a filter instance.
*
@@ -636,8 +637,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.
@@ -721,6 +725,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