summaryrefslogtreecommitdiff
path: root/ffmpeg/darwin-aarch64/include/libavfilter/avfilter.h
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg/darwin-aarch64/include/libavfilter/avfilter.h')
-rw-r--r--ffmpeg/darwin-aarch64/include/libavfilter/avfilter.h191
1 files changed, 86 insertions, 105 deletions
diff --git a/ffmpeg/darwin-aarch64/include/libavfilter/avfilter.h b/ffmpeg/darwin-aarch64/include/libavfilter/avfilter.h
index 73a723d..be12424 100644
--- a/ffmpeg/darwin-aarch64/include/libavfilter/avfilter.h
+++ b/ffmpeg/darwin-aarch64/include/libavfilter/avfilter.h
@@ -68,6 +68,7 @@ typedef struct AVFilterContext AVFilterContext;
typedef struct AVFilterLink AVFilterLink;
typedef struct AVFilterPad AVFilterPad;
typedef struct AVFilterFormats AVFilterFormats;
+typedef struct AVFilterChannelLayouts AVFilterChannelLayouts;
/**
* Get the number of elements in a NULL-terminated array of AVFilterPads (e.g.
@@ -79,7 +80,7 @@ int avfilter_pad_count(const AVFilterPad *pads);
* Get the name of an AVFilterPad.
*
* @param pads an array of AVFilterPads
- * @param pad_idx index of the pad in the array it; is the caller's
+ * @param pad_idx index of the pad in the array; it is the caller's
* responsibility to ensure the index is valid
*
* @return name of the pad_idx'th pad in pads
@@ -264,13 +265,13 @@ typedef struct AVFilter {
* and outputs are fixed), shortly before the format negotiation. This
* callback may be called more than once.
*
- * This callback must set AVFilterLink.out_formats on every input link and
- * AVFilterLink.in_formats on every output link to a list of pixel/sample
+ * This callback must set AVFilterLink.outcfg.formats on every input link and
+ * AVFilterLink.incfg.formats on every output link to a list of pixel/sample
* formats that the filter supports on that link. For audio links, this
- * filter must also set @ref AVFilterLink.in_samplerates "in_samplerates" /
- * @ref AVFilterLink.out_samplerates "out_samplerates" and
- * @ref AVFilterLink.in_channel_layouts "in_channel_layouts" /
- * @ref AVFilterLink.out_channel_layouts "out_channel_layouts" analogously.
+ * filter must also set @ref AVFilterLink.incfg.samplerates "in_samplerates" /
+ * @ref AVFilterLink.outcfg.samplerates "out_samplerates" and
+ * @ref AVFilterLink.incfg.channel_layouts "in_channel_layouts" /
+ * @ref AVFilterLink.outcfg.channel_layouts "out_channel_layouts" analogously.
*
* This callback may be NULL for filters with one input, in which case
* libavfilter assumes that it supports all input formats and preserves
@@ -285,11 +286,13 @@ typedef struct AVFilter {
int flags_internal; ///< Additional flags for avfilter internal use only.
+#if FF_API_NEXT
/**
* Used by the filter registration system. Must not be touched by any other
* code.
*/
struct AVFilter *next;
+#endif
/**
* Make the filter instance process a command.
@@ -406,9 +409,54 @@ struct AVFilterContext {
* a higher value suggests a more urgent activation.
*/
unsigned ready;
+
+ /**
+ * Sets the number of extra hardware frames which the filter will
+ * allocate on its output links for use in following filters or by
+ * the caller.
+ *
+ * Some hardware filters require all frames that they will use for
+ * output to be defined in advance before filtering starts. For such
+ * filters, any hardware frame pools used for output must therefore be
+ * of fixed size. The extra frames set here are on top of any number
+ * that the filter needs internally in order to operate normally.
+ *
+ * This field must be set before the graph containing this filter is
+ * configured.
+ */
+ int extra_hw_frames;
};
/**
+ * Lists of formats / etc. supported by an end of a link.
+ *
+ * This structure is directly part of AVFilterLink, in two copies:
+ * one for the source filter, one for the destination filter.
+
+ * These lists are used for negotiating the format to actually be used,
+ * which will be loaded into the format and channel_layout members of
+ * AVFilterLink, when chosen.
+ */
+typedef struct AVFilterFormatsConfig {
+
+ /**
+ * List of supported formats (pixel or sample).
+ */
+ AVFilterFormats *formats;
+
+ /**
+ * Lists of supported sample rates, only for audio.
+ */
+ AVFilterFormats *samplerates;
+
+ /**
+ * Lists of supported channel layouts, only for audio.
+ */
+ AVFilterChannelLayouts *channel_layouts;
+
+} AVFilterFormatsConfig;
+
+/**
* A link between two filters. This contains pointers to the source and
* destination filters between which this link exists, and the indexes of
* the pads involved. In addition, this link also contains the parameters
@@ -455,33 +503,16 @@ struct AVFilterLink {
* New public fields should be added right above.
*****************************************************************
*/
- /**
- * Lists of formats and channel layouts supported by the input and output
- * filters respectively. These lists are used for negotiating the format
- * to actually be used, which will be loaded into the format and
- * channel_layout members, above, when chosen.
- *
- */
- AVFilterFormats *in_formats;
- AVFilterFormats *out_formats;
/**
- * Lists of channel layouts and sample rates used for automatic
- * negotiation.
+ * Lists of supported formats / etc. supported by the input filter.
*/
- AVFilterFormats *in_samplerates;
- AVFilterFormats *out_samplerates;
- struct AVFilterChannelLayouts *in_channel_layouts;
- struct AVFilterChannelLayouts *out_channel_layouts;
+ AVFilterFormatsConfig incfg;
/**
- * Audio only, the destination filter sets this to a non-zero value to
- * request that buffers with the given number of samples should be sent to
- * it. AVFilterPad.needs_fifo must also be set on the corresponding input
- * pad.
- * Last buffer before EOF will be padded with silence.
+ * Lists of supported formats / etc. supported by the output filter.
*/
- int request_samples;
+ AVFilterFormatsConfig outcfg;
/** stage of the initialization of the link properties (dimensions, etc) */
enum {
@@ -557,11 +588,6 @@ struct AVFilterLink {
int channels;
/**
- * Link processing flags.
- */
- unsigned flags;
-
- /**
* Number of past frames sent through the link.
*/
int64_t frame_count_in, frame_count_out;
@@ -647,11 +673,15 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad,
*/
void avfilter_link_free(AVFilterLink **link);
+#if FF_API_FILTER_GET_SET
/**
* Get the number of channels of a link.
+ * @deprecated Use av_buffersink_get_channels()
*/
+attribute_deprecated
int avfilter_link_get_channels(AVFilterLink *link);
-
+#endif
+#if FF_API_FILTER_LINK_SET_CLOSED
/**
* Set the closed field of a link.
* @deprecated applications are not supposed to mess with links, they should
@@ -659,7 +689,7 @@ int avfilter_link_get_channels(AVFilterLink *link);
*/
attribute_deprecated
void avfilter_link_set_closed(AVFilterLink *link, int closed);
-
+#endif
/**
* Negotiate the media format, dimensions, etc of all inputs to a filter.
*
@@ -677,14 +707,21 @@ int avfilter_config_links(AVFilterContext *filter);
*/
int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags);
-/** Initialize the filter system. Register all builtin filters. */
-void avfilter_register_all(void);
+/**
+ * Iterate over all registered filters.
+ *
+ * @param opaque a pointer where libavfilter will store the iteration state. Must
+ * point to NULL to start the iteration.
+ *
+ * @return the next registered filter or NULL when the iteration is
+ * finished
+ */
+const AVFilter *av_filter_iterate(void **opaque);
-#if FF_API_OLD_FILTER_REGISTER
-/** Uninitialize the filter system. Unregister all filters. */
+#if FF_API_NEXT
+/** Initialize the filter system. Register all builtin filters. */
attribute_deprecated
-void avfilter_uninit(void);
-#endif
+void avfilter_register_all(void);
/**
* Register a filter. This is only needed if you plan to use
@@ -696,70 +733,28 @@ void avfilter_uninit(void);
* @return 0 if the registration was successful, a negative value
* otherwise
*/
+attribute_deprecated
int avfilter_register(AVFilter *filter);
/**
- * Get a filter definition matching the given name.
- *
- * @param name the filter name to find
- * @return the filter definition, if any matching one is registered.
- * NULL if none found.
- */
-#if !FF_API_NOCONST_GET_NAME
-const
-#endif
-AVFilter *avfilter_get_by_name(const char *name);
-
-/**
* Iterate over all registered filters.
* @return If prev is non-NULL, next registered filter after prev or NULL if
* prev is the last filter. If prev is NULL, return the first registered filter.
*/
-const AVFilter *avfilter_next(const AVFilter *prev);
-
-#if FF_API_OLD_FILTER_REGISTER
-/**
- * If filter is NULL, returns a pointer to the first registered filter pointer,
- * if filter is non-NULL, returns the next pointer after filter.
- * If the returned pointer points to NULL, the last registered filter
- * was already reached.
- * @deprecated use avfilter_next()
- */
attribute_deprecated
-AVFilter **av_filter_next(AVFilter **filter);
+const AVFilter *avfilter_next(const AVFilter *prev);
#endif
-#if FF_API_AVFILTER_OPEN
/**
- * Create a filter instance.
+ * Get a filter definition matching the given name.
*
- * @param filter_ctx put here a pointer to the created filter context
- * on success, NULL on failure
- * @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
+ * @param name the filter name to find
+ * @return the filter definition, if any matching one is registered.
+ * NULL if none found.
*/
-attribute_deprecated
-int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char *inst_name);
-#endif
+const AVFilter *avfilter_get_by_name(const char *name);
-#if FF_API_AVFILTER_INIT_FILTER
-/**
- * Initialize a filter.
- *
- * @param filter the filter to initialize
- * @param args A string of parameters to use when initializing the filter.
- * The format and meaning of this string varies by filter.
- * @param opaque Any extra non-string data needed by the filter. The meaning
- * of this parameter varies by filter.
- * @return zero on success
- */
-attribute_deprecated
-int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque);
-#endif
-
/**
* Initialize a filter with the supplied parameters.
*
@@ -959,24 +954,10 @@ AVFilterContext *avfilter_graph_alloc_filter(AVFilterGraph *graph,
*/
AVFilterContext *avfilter_graph_get_filter(AVFilterGraph *graph, const char *name);
-#if FF_API_AVFILTER_OPEN
-/**
- * Add an existing filter instance to a filter graph.
- *
- * @param graphctx the filter graph
- * @param filter the filter to be added
- *
- * @deprecated use avfilter_graph_alloc_filter() to allocate a filter in a
- * filter graph
- */
-attribute_deprecated
-int avfilter_graph_add_filter(AVFilterGraph *graphctx, AVFilterContext *filter);
-#endif
-
/**
* Create and add a filter instance into an existing graph.
* The filter instance is created from the filter filt and inited
- * with the parameters args and opaque.
+ * with the parameter args. opaque is currently ignored.
*
* In case of success put in *filt_ctx the pointer to the created
* filter instance, otherwise set *filt_ctx to NULL.