aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/avfilter.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-03-31 08:28:11 +0200
committerAnton Khirnov <anton@khirnov.net>2013-04-11 20:34:14 +0200
commitbc1a985ba030e9861d24965d42792850b43a43ea (patch)
tree5bfe8c12dcb58b6560a0028a03da63bfc36cde80 /libavfilter/avfilter.h
parent38f0c0781a6e099f11c0acec07f9b8be742190c4 (diff)
downloadffmpeg-bc1a985ba030e9861d24965d42792850b43a43ea.tar.gz
lavfi: replace avfilter_open() with avfilter_graph_alloc_filter().
Since we do not support "standalone" filters not attached to an AVFilterGraph, we should not have a public function to create such filters. In addition that function is horribly named, the action it does cannot be possibly described as "opening" a filter.
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