libavfilter/avfilter.c File Reference

#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.
AVFilterPicRefavfilter_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.
AVFilterPicRefavfilter_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.
AVFilteravfilter_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)
AVFilterContextavfilter_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 FilterListfilters
 list of registered filters
static const AVClass avfilter_class


Define Documentation

#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().


Function Documentation

int avfilter_config_links ( AVFilterContext filter  ) 

Negotiate the colorspace, dimensions, etc of all inputs to a filter.

Parameters:
filter the filter to negotiate the properties for its inputs
Returns:
zero on successful negotiation

Definition at line 125 of file avfilter.c.

Referenced by avfilter_config_links().

void avfilter_destroy ( AVFilterContext filter  ) 

Destroy a filter.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
name the filter name to find
Returns:
the filter definition, if any matching one is registered. NULL if none found.

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.

Parameters:
link the output link to the filter from which the picture will be requested
perms the required access permissions
Returns:
A reference to the picture. This must be unreferenced with avfilter_unref_pic when you are finished with it.

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.

Parameters:
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.
Returns:
zero on success

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.

Parameters:
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
Returns:
zero on success

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.

Parameters:
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.

Parameters:
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
Returns:
zero on success

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.

Parameters:
filter the filter to create an instance of
inst_name Name to give to the new instance. Can be NULL for none.
Returns:
Pointer to the new instance on success. NULL on failure.

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.

Parameters:
link the input link
Returns:
the number of immediately available frames, a negative number in case of error

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.

Parameters:
ref an existing reference to the picture
pmask a bitmask containing the allowable permissions in the new reference
Returns:
a new reference to the picture with the same properties as the old, excluding any permissions denied by pmask

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.

Parameters:
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.

Parameters:
link the input link
Returns:
zero on success

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.

Parameters:
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   ) 

Uninitialize the filter system.

Unregisters all filters

Definition at line 308 of file avfilter.c.

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.

Parameters:
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   ) 

Returns the LIBAVFILTER_VERSION_INT constant.

Definition at line 25 of file avfilter.c.

static const char* filter_name ( void *  p  )  [static]

Definition at line 326 of file avfilter.c.

static int pad_count ( const AVFilterPad pads  )  [static]

Definition at line 318 of file avfilter.c.

Referenced by avfilter_open().


Variable Documentation

const AVClass avfilter_class [static]

Initial value:

 {
    "AVFilter",
    filter_name
}

Definition at line 332 of file avfilter.c.

struct FilterList * filters

list of registered filters

Referenced by avfilter_get_by_name(), avfilter_register(), avfilter_uninit(), and tta_decode_frame().


Generated on Fri Oct 26 02:35:45 2012 for FFmpeg by  doxygen 1.5.8