FFmpeg
|
Filter definition. More...
#include <avfilter.h>
Data Fields | |
const char * | name |
Filter name. More... | |
const char * | description |
A description of the filter. More... | |
const AVFilterPad * | inputs |
List of inputs, terminated by a zeroed element. More... | |
const AVFilterPad * | outputs |
List of outputs, terminated by a zeroed element. More... | |
const AVClass * | priv_class |
A class for the private data, used to declare filter private AVOptions. More... | |
int | flags |
A combination of AVFILTER_FLAG_*. More... | |
int(* | init )(AVFilterContext *ctx) |
Filter initialization function. More... | |
int(* | init_dict )(AVFilterContext *ctx, AVDictionary **options) |
Should be set instead of init by the filters that want to pass a dictionary of AVOptions to nested contexts that are allocated during init. More... | |
void(* | uninit )(AVFilterContext *ctx) |
Filter uninitialization function. More... | |
int(* | query_formats )(AVFilterContext *) |
Query formats supported by the filter on its inputs and outputs. More... | |
int | priv_size |
size of private data to allocate for the filter More... | |
struct AVFilter * | next |
Used by the filter registration system. More... | |
int(* | process_command )(AVFilterContext *, const char *cmd, const char *arg, char *res, int res_len, int flags) |
Make the filter instance process a command. More... | |
int(* | init_opaque )(AVFilterContext *ctx, void *opaque) |
Filter initialization function, alternative to the init() callback. More... | |
Filter definition.
This defines the pads a filter contains, and all the callback functions used to interact with the filter.
Definition at line 470 of file avfilter.h.
const char* AVFilter::name |
Filter name.
Must be non-NULL and unique among filters.
Definition at line 474 of file avfilter.h.
Referenced by av_buffersink_get_frame_rate(), av_buffersink_poll_frame(), avfilter_get_by_name(), avfilter_graph_dump_to_buf(), avfilter_graph_parse(), avfilter_graph_queue_command(), avfilter_graph_send_command(), avfilter_init_str(), avfilter_process_command(), default_filter_name(), ff_filter_frame(), ff_tlog_link(), filter_frame(), graph_check_validity(), init(), lavfi_read_header(), link_filter(), link_filter_inouts(), movie_common_init(), parse_channel_expressions(), print_digraph(), set_enable_expr(), and show_filters().
const char* AVFilter::description |
A description of the filter.
May be NULL.
You should use the NULL_IF_CONFIG_SMALL() macro to define it.
Definition at line 481 of file avfilter.h.
Referenced by show_filters().
const AVFilterPad* AVFilter::inputs |
List of inputs, terminated by a zeroed element.
NULL if there are no (static) inputs. Instances of filters with AVFILTER_FLAG_DYNAMIC_INPUTS set may have more inputs than present in this list.
Definition at line 490 of file avfilter.h.
Referenced by avfilter_register(), ff_filter_alloc(), init(), show_filters(), and split_init().
const AVFilterPad* AVFilter::outputs |
List of outputs, terminated by a zeroed element.
NULL if there are no (static) outputs. Instances of filters with AVFILTER_FLAG_DYNAMIC_OUTPUTS set may have more outputs than present in this list.
Definition at line 498 of file avfilter.h.
Referenced by ff_filter_alloc(), init(), and show_filters().
const AVClass* AVFilter::priv_class |
A class for the private data, used to declare filter private AVOptions.
This field is NULL for filters that do not declare any options.
If this field is non-NULL, the first member of the filter private data must be a pointer to AVClass, which will be set by libavfilter generic code to this class.
Definition at line 508 of file avfilter.h.
Referenced by avfilter_free(), avfilter_init_dict(), avfilter_init_str(), ff_filter_alloc(), filter_child_class_next(), and filter_child_next().
int AVFilter::flags |
A combination of AVFILTER_FLAG_*.
Definition at line 513 of file avfilter.h.
Referenced by avfilter_init_dict(), avfilter_register(), ff_filter_frame_framed(), set_enable_expr(), and show_filters().
int(* AVFilter::init)(AVFilterContext *ctx) |
Filter initialization function.
This callback will be called only once during the filter lifetime, after all the options have been set, but before links between filters are established and format negotiation is done.
Basic filter initialization should be done here. Filters with dynamic inputs and/or outputs should create those inputs/outputs here based on provided options. No more changes to this filter's inputs/outputs can be done after this callback.
This callback must not assume that the filter links exist or frame parameters are known.
uninit is guaranteed to be called even if initialization fails, so this callback does not have to clean up on failure.
Definition at line 544 of file avfilter.h.
Referenced by avfilter_init_dict().
int(* AVFilter::init_dict)(AVFilterContext *ctx, AVDictionary **options) |
Should be set instead of init by the filters that want to pass a dictionary of AVOptions to nested contexts that are allocated during init.
On return, the options dict should be freed and replaced with one that contains all the options which could not be processed by this filter (or with NULL if all the options were processed).
Otherwise the semantics is the same as for init.
Definition at line 557 of file avfilter.h.
Referenced by avfilter_init_dict().
void(* AVFilter::uninit)(AVFilterContext *ctx) |
Filter uninitialization function.
Called only once right before the filter is freed. Should deallocate any memory held by the filter, release any buffer references, etc. It does not need to deallocate the AVFilterContext.priv memory itself.
This callback may be called even if init was not called or failed, so it must be prepared to handle such a situation.
Definition at line 569 of file avfilter.h.
Referenced by avfilter_free().
int(* AVFilter::query_formats)(AVFilterContext *) |
Query formats supported by the filter on its inputs and outputs.
This callback is called after the filter is initialized (so the inputs 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 formats that the filter supports on that link. For audio links, this filter must also set in_samplerates / out_samplerates and in_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 them on output.
Definition at line 593 of file avfilter.h.
Referenced by filter_query_formats(), main(), and query_formats().
int AVFilter::priv_size |
size of private data to allocate for the filter
Definition at line 595 of file avfilter.h.
Referenced by ff_filter_alloc().
struct AVFilter* AVFilter::next |
Used by the filter registration system.
Must not be touched by any other code.
Definition at line 601 of file avfilter.h.
Referenced by avfilter_next(), and avfilter_register().
int(* AVFilter::process_command)(AVFilterContext *, const char *cmd, const char *arg, char *res, int res_len, int flags) |
Make the filter instance process a command.
cmd | the command to process, for handling simplicity all commands must be alphanumeric only |
arg | the argument for the command |
res | a buffer with size res_size where the filter(s) can return a response. This must not change when the command is not supported. |
flags | if AVFILTER_CMD_FLAG_FAST is set and the command would be time consuming then a filter should treat it like an unsupported command |
Definition at line 615 of file avfilter.h.
Referenced by avfilter_process_command(), and show_filters().
int(* AVFilter::init_opaque)(AVFilterContext *ctx, void *opaque) |
Filter initialization function, alternative to the init() callback.
Args contains the user-supplied parameters, opaque is used for providing binary data.
Definition at line 622 of file avfilter.h.
Referenced by avfilter_init_dict().