#include "libavcodec/imgconvert.h"
#include "avfilter.h"
Go to the source code of this file.
Data Structures | |
struct | FilterList |
list of registered filters More... | |
Defines | |
#define | link_dpad(link) link->dst-> input_pads[link->dstpad] |
helper macros to get the in/out pad on the dst/src filter | |
#define | link_spad(link) link->src->output_pads[link->srcpad] |
Functions | |
unsigned | avfilter_version (void) |
Returns the LIBAVFILTER_VERSION_INT constant. | |
AVFilterPicRef * | avfilter_ref_pic (AVFilterPicRef *ref, int pmask) |
Add a new reference to a picture. | |
void | avfilter_unref_pic (AVFilterPicRef *ref) |
Remove a reference to a picture. | |
void | avfilter_insert_pad (unsigned idx, unsigned *count, size_t padidx_off, AVFilterPad **pads, AVFilterLink ***links, AVFilterPad *newpad) |
Insert a new pad. | |
int | avfilter_link (AVFilterContext *src, unsigned srcpad, AVFilterContext *dst, unsigned dstpad) |
Link two filters together. | |
int | avfilter_insert_filter (AVFilterLink *link, AVFilterContext *filt, unsigned in, unsigned out) |
Insert a filter in the middle of an existing link. | |
int | avfilter_config_links (AVFilterContext *filter) |
Negotiate the colorspace, dimensions, etc of all inputs to a filter. | |
AVFilterPicRef * | avfilter_get_video_buffer (AVFilterLink *link, int perms) |
Request a picture buffer with a specific set of permissions. | |
int | avfilter_request_frame (AVFilterLink *link) |
Request an input frame from the filter at the other end of the link. | |
int | avfilter_poll_frame (AVFilterLink *link) |
Poll a frame from the filter chain. | |
void | avfilter_start_frame (AVFilterLink *link, AVFilterPicRef *picref) |
Notify the next filter of the start of a frame. | |
void | avfilter_end_frame (AVFilterLink *link) |
Notify the next filter that the current frame has finished. | |
void | avfilter_draw_slice (AVFilterLink *link, int y, int h) |
Send a slice to the next filter. | |
AVFilter * | avfilter_get_by_name (const char *name) |
Gets a filter definition matching the given name. | |
void | avfilter_register (AVFilter *filter) |
Register a filter. | |
void | avfilter_uninit (void) |
Uninitialize the filter system. | |
static int | pad_count (const AVFilterPad *pads) |
static const char * | filter_name (void *p) |
AVFilterContext * | avfilter_open (AVFilter *filter, const char *inst_name) |
Create a filter instance. | |
void | avfilter_destroy (AVFilterContext *filter) |
Destroy a filter. | |
int | avfilter_init_filter (AVFilterContext *filter, const char *args, void *opaque) |
Initialize a filter. | |
Variables | |
struct FilterList * | filters |
list of registered filters | |
static const AVClass | avfilter_class |
#define link_dpad | ( | link | ) | link->dst-> input_pads[link->dstpad] |
helper macros to get the in/out pad on the dst/src filter
Definition at line 37 of file avfilter.c.
Referenced by avfilter_config_links(), avfilter_draw_slice(), avfilter_end_frame(), avfilter_get_video_buffer(), and avfilter_start_frame().
#define link_spad | ( | link | ) | link->src->output_pads[link->srcpad] |
Definition at line 38 of file avfilter.c.
Referenced by avfilter_config_links(), avfilter_poll_frame(), and avfilter_request_frame().
int avfilter_config_links | ( | AVFilterContext * | filter | ) |
Negotiate the colorspace, dimensions, etc of all inputs to a filter.
filter | the filter to negotiate the properties for its inputs |
Definition at line 125 of file avfilter.c.
Referenced by avfilter_config_links().
void avfilter_destroy | ( | AVFilterContext * | filter | ) |
Destroy a filter.
filter | the filter to destroy |
Definition at line 368 of file avfilter.c.
Referenced by avfilter_graph_destroy(), create_filter(), and query_formats().
void avfilter_draw_slice | ( | AVFilterLink * | link, | |
int | y, | |||
int | h | |||
) |
Send a slice to the next filter.
link | the output link over which the frame is being sent | |
y | offset in pixels from the top of the image for this slice | |
h | height of this slice in pixels |
Definition at line 249 of file avfilter.c.
Referenced by avfilter_default_draw_slice().
void avfilter_end_frame | ( | AVFilterLink * | link | ) |
Notify the next filter that the current frame has finished.
link | the output link the frame was sent over |
Definition at line 231 of file avfilter.c.
Referenced by avfilter_default_end_frame().
AVFilter* avfilter_get_by_name | ( | const char * | name | ) |
Gets a filter definition matching the given name.
name | the filter name to find |
Definition at line 288 of file avfilter.c.
Referenced by create_filter(), and query_formats().
AVFilterPicRef* avfilter_get_video_buffer | ( | AVFilterLink * | link, | |
int | perms | |||
) |
Request a picture buffer with a specific set of permissions.
link | the output link to the filter from which the picture will be requested | |
perms | the required access permissions |
Definition at line 163 of file avfilter.c.
Referenced by avfilter_default_start_frame().
int avfilter_init_filter | ( | AVFilterContext * | filter, | |
const char * | args, | |||
void * | opaque | |||
) |
Initialize a filter.
filter | the filter to initialize | |
args | A string of parameters to use when initializing the filter. The format and meaning of this string varies by filter. | |
opaque | Any extra non-string data needed by the filter. The meaning of this parameter varies by filter. |
Definition at line 395 of file avfilter.c.
Referenced by create_filter().
int avfilter_insert_filter | ( | AVFilterLink * | link, | |
AVFilterContext * | filt, | |||
unsigned | in, | |||
unsigned | out | |||
) |
Insert a filter in the middle of an existing link.
link | the link into which the filter should be inserted | |
filt | the filter to be inserted | |
in | the input pad on the filter to connect | |
out | the output pad on the filter to connect |
Definition at line 98 of file avfilter.c.
Referenced by query_formats().
void avfilter_insert_pad | ( | unsigned | idx, | |
unsigned * | count, | |||
size_t | padidx_off, | |||
AVFilterPad ** | pads, | |||
AVFilterLink *** | links, | |||
AVFilterPad * | newpad | |||
) |
Insert a new pad.
idx | Insertion point. Pad is inserted at the end if this point is beyond the end of the list of pads. | |
count | Pointer to the number of pads in the list | |
padidx_off | Offset within an AVFilterLink structure to the element to increment when inserting a new pad causes link numbering to change | |
pads | Pointer to the pointer to the beginning of the list of pads | |
links | Pointer to the pointer to the beginning of the list of links | |
newpad | The new pad to add. A copy is made when adding. |
Definition at line 56 of file avfilter.c.
Referenced by avfilter_insert_inpad(), and avfilter_insert_outpad().
int avfilter_link | ( | AVFilterContext * | src, | |
unsigned | srcpad, | |||
AVFilterContext * | dst, | |||
unsigned | dstpad | |||
) |
Link two filters together.
src | the source filter | |
srcpad | index of the output pad on the source filter | |
dst | the destination filter | |
dstpad | index of the input pad on the destination filter |
Definition at line 77 of file avfilter.c.
Referenced by avfilter_insert_filter(), and link_filter().
AVFilterContext* avfilter_open | ( | AVFilter * | filter, | |
const char * | inst_name | |||
) |
Create a filter instance.
filter | the filter to create an instance of | |
inst_name | Name to give to the new instance. Can be NULL for none. |
Definition at line 337 of file avfilter.c.
Referenced by create_filter(), and query_formats().
int avfilter_poll_frame | ( | AVFilterLink * | link | ) |
Poll a frame from the filter chain.
link | the input link |
Definition at line 185 of file avfilter.c.
Referenced by avfilter_poll_frame().
AVFilterPicRef* avfilter_ref_pic | ( | AVFilterPicRef * | ref, | |
int | pmask | |||
) |
Add a new reference to a picture.
ref | an existing reference to the picture | |
pmask | a bitmask containing the allowable permissions in the new reference |
Definition at line 40 of file avfilter.c.
Referenced by avfilter_default_start_frame().
void avfilter_register | ( | AVFilter * | filter | ) |
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 | the filter to register |
Definition at line 299 of file avfilter.c.
int avfilter_request_frame | ( | AVFilterLink * | link | ) |
Request an input frame from the filter at the other end of the link.
link | the input link |
Definition at line 176 of file avfilter.c.
Referenced by avfilter_request_frame().
void avfilter_start_frame | ( | AVFilterLink * | link, | |
AVFilterPicRef * | picref | |||
) |
Notify the next filter of the start of a frame.
link | the output link the frame will be sent over | |
picref | A reference to the frame about to be sent. The data for this frame need only be valid once draw_slice() is called for that portion. The receiving filter will free this reference when it no longer needs it. |
Definition at line 203 of file avfilter.c.
Referenced by avfilter_default_start_frame().
void avfilter_uninit | ( | void | ) |
void avfilter_unref_pic | ( | AVFilterPicRef * | ref | ) |
Remove a reference to a picture.
If this is the last reference to the picture, the picture itself is also automatically freed.
ref | reference to the picture |
Definition at line 49 of file avfilter.c.
Referenced by avfilter_default_end_frame(), and avfilter_end_frame().
unsigned avfilter_version | ( | void | ) |
static const char* filter_name | ( | void * | p | ) | [static] |
Definition at line 326 of file avfilter.c.
static int pad_count | ( | const AVFilterPad * | pads | ) | [static] |
const AVClass avfilter_class [static] |
struct FilterList * filters |
list of registered filters
Referenced by avfilter_get_by_name(), avfilter_register(), avfilter_uninit(), and tta_decode_frame().