FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
AVFilter Struct Reference

Filter definition. More...

#include <avfilter.h>

Data Fields

const char * name
 filter name
 
const char * description
 A description for the filter.
 
const AVFilterPadinputs
 NULL terminated list of inputs. NULL if none.
 
const AVFilterPadoutputs
 NULL terminated list of outputs. NULL if none.
 
int(* init )(AVFilterContext *ctx, const char *args)
 Filter initialization function.
 
void(* uninit )(AVFilterContext *ctx)
 Filter uninitialization function.
 
int(* query_formats )(AVFilterContext *)
 Queries formats/layouts supported by the filter and its pads, and sets the in_formats/in_chlayouts for links connected to its output pads, and out_formats/out_chlayouts for links connected to its input pads.
 
int priv_size
 size of private data to allocate for the filter
 
int(* process_command )(AVFilterContext *, const char *cmd, const char *arg, char *res, int res_len, int flags)
 Make the filter instance process a command.
 
int(* init_opaque )(AVFilterContext *ctx, const char *args, void *opaque)
 Filter initialization function, alternative to the init() callback.
 
const AVClasspriv_class
 private class, containing filter specific options
 

Detailed Description

Filter definition.

This defines the pads a filter contains, and all the callback functions used to interact with the filter.

Examples:
doc/examples/filtering_audio.c, and doc/examples/filtering_video.c.

Definition at line 413 of file avfilter.h.

Field Documentation

const char* AVFilter::name
const char* AVFilter::description

A description for the filter.

You should use the NULL_IF_CONFIG_SMALL() macro to define it.

Definition at line 420 of file avfilter.h.

const AVFilterPad* AVFilter::inputs

NULL terminated list of inputs. NULL if none.

Definition at line 422 of file avfilter.h.

Referenced by av_buffersink_read(), av_buffersink_read_samples(), avfilter_open(), avfilter_register(), main(), and split_init().

const AVFilterPad* AVFilter::outputs

NULL terminated list of outputs. NULL if none.

Definition at line 423 of file avfilter.h.

Referenced by avfilter_open(), and main().

int(* AVFilter::init)(AVFilterContext *ctx, const char *args)

Filter initialization function.

Args contains the user-supplied parameters. FIXME: maybe an AVOption-based system would be better?

Definition at line 437 of file avfilter.h.

Referenced by avfilter_init_filter().

void(* AVFilter::uninit)(AVFilterContext *ctx)

Filter uninitialization function.

Should deallocate any memory held by the filter, release any buffer references, etc. This does not need to deallocate the AVFilterContext->priv memory itself.

Definition at line 444 of file avfilter.h.

Referenced by avfilter_free().

int(* AVFilter::query_formats)(AVFilterContext *)

Queries formats/layouts supported by the filter and its pads, and sets the in_formats/in_chlayouts for links connected to its output pads, and out_formats/out_chlayouts for links connected to its input pads.

Returns
zero on success, a negative value corresponding to an AVERROR code otherwise

Definition at line 454 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 456 of file avfilter.h.

Referenced by avfilter_open().

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.

Parameters
cmdthe command to process, for handling simplicity all commands must be alphanumeric only
argthe argument for the command
resa buffer with size res_size where the filter(s) can return a response. This must not change when the command is not supported.
flagsif AVFILTER_CMD_FLAG_FAST is set and the command would be time consuming then a filter should treat it like an unsupported command
Returns
>=0 on success otherwise an error code. AVERROR(ENOSYS) on unsupported commands

Definition at line 470 of file avfilter.h.

Referenced by avfilter_process_command().

int(* AVFilter::init_opaque)(AVFilterContext *ctx, const char *args, 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 477 of file avfilter.h.

Referenced by avfilter_init_filter().

const AVClass* AVFilter::priv_class

private class, containing filter specific options

Definition at line 479 of file avfilter.h.

Referenced by filter_child_next().


The documentation for this struct was generated from the following file: