libavfilter/avfilter.h File Reference

#include "libavutil/avutil.h"
#include "libavutil/log.h"
#include "libavutil/samplefmt.h"
#include "libavutil/pixfmt.h"
#include "libavutil/rational.h"
#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  AVFilterBuffer
 A reference-counted buffer data type used by the filter system. More...
struct  AVFilterBufferRefAudioProps
 Audio specific properties in a reference to an AVFilterBuffer. More...
struct  AVFilterBufferRefVideoProps
 Video specific properties in a reference to an AVFilterBuffer. More...
struct  AVFilterBufferRef
 A reference to an AVFilterBuffer. More...
struct  AVFilterFormats
 A list of supported formats for one end of a filter link. More...
struct  AVFilterPad
 A filter pad used for either input or output. More...
struct  AVFilter
 Filter definition. More...
struct  AVFilterContext
 An instance of a filter. More...
struct  AVFilterLink
 A link between two filters. More...

Defines

#define LIBAVFILTER_VERSION_MAJOR   2
#define LIBAVFILTER_VERSION_MINOR   53
#define LIBAVFILTER_VERSION_MICRO   0
#define LIBAVFILTER_VERSION_INT
#define LIBAVFILTER_VERSION
#define LIBAVFILTER_BUILD   LIBAVFILTER_VERSION_INT
#define FF_API_OLD_VSINK_API   (LIBAVFILTER_VERSION_MAJOR < 3)
#define FF_API_OLD_ALL_FORMATS_API   (LIBAVFILTER_VERSION_MAJOR < 3)
#define AV_PERM_READ   0x01
 can read from the buffer
#define AV_PERM_WRITE   0x02
 can write to the buffer
#define AV_PERM_PRESERVE   0x04
 nobody else can overwrite the buffer
#define AV_PERM_REUSE   0x08
 can output the buffer multiple times, with the same contents each time
#define AV_PERM_REUSE2   0x10
 can output the buffer multiple times, modified each time
#define AV_PERM_NEG_LINESIZES   0x20
 the buffer requested can have negative linesizes
#define AV_PERM_ALIGN   0x40
 the buffer must be aligned
#define AVFILTER_ALIGN   16
#define AVFILTER_CMD_FLAG_ONE   1
 Stop once a filter understood the command (for target=all for example), fast filters are favored automatically.
#define AVFILTER_CMD_FLAG_FAST   2
 Only execute command when its fast (like a video out that supports contrast adjustment in hw).

Typedefs

typedef struct AVFilterContext AVFilterContext
typedef struct AVFilterLink AVFilterLink
typedef struct AVFilterPad AVFilterPad

Enumerations

enum  AVFilterPacking { AVFILTER_PACKED = 0, AVFILTER_PLANAR }

Functions

unsigned avfilter_version (void)
 Return the LIBAVFILTER_VERSION_INT constant.
const char * avfilter_configuration (void)
 Return the libavfilter build-time configuration.
const char * avfilter_license (void)
 Return the libavfilter license.
static void avfilter_copy_buffer_ref_props (AVFilterBufferRef *dst, AVFilterBufferRef *src)
 Copy properties of src to dst, without copying the actual data.
AVFilterBufferRefavfilter_ref_buffer (AVFilterBufferRef *ref, int pmask)
 Add a new reference to a buffer.
void avfilter_unref_buffer (AVFilterBufferRef *ref)
 Remove a reference to a buffer.
AVFilterFormatsavfilter_make_format_list (const int *fmts)
 Create a list of supported formats.
AVFilterFormatsavfilter_make_format64_list (const int64_t *fmts)
int avfilter_add_format (AVFilterFormats **avff, int64_t fmt)
 Add fmt to the list of media formats contained in *avff.
attribute_deprecated
AVFilterFormats
avfilter_all_formats (enum AVMediaType type)
AVFilterFormatsavfilter_make_all_formats (enum AVMediaType type)
 Return a list of all formats supported by FFmpeg for the given media type.
AVFilterFormatsavfilter_make_all_channel_layouts (void)
 Return a list of all channel layouts supported by FFmpeg.
AVFilterFormatsavfilter_make_all_packing_formats (void)
 Return a list of all audio packing formats.
AVFilterFormatsavfilter_merge_formats (AVFilterFormats *a, AVFilterFormats *b)
 Return a format list which contains the intersection of the formats of a and b.
void avfilter_formats_ref (AVFilterFormats *formats, AVFilterFormats **ref)
 Add *ref as a new reference to formats.
void avfilter_formats_unref (AVFilterFormats **ref)
 If *ref is non-NULL, remove *ref as a reference to the format list it currently points to, deallocates that list if this was the last reference, and sets *ref to NULL.
void avfilter_formats_changeref (AVFilterFormats **oldref, AVFilterFormats **newref)
 Before After ________ ________ |formats |<---------.
void avfilter_default_start_frame (AVFilterLink *link, AVFilterBufferRef *picref)
 default handler for start_frame() for video inputs
void avfilter_default_draw_slice (AVFilterLink *link, int y, int h, int slice_dir)
 default handler for draw_slice() for video inputs
void avfilter_default_end_frame (AVFilterLink *link)
 default handler for end_frame() for video inputs
void avfilter_default_filter_samples (AVFilterLink *link, AVFilterBufferRef *samplesref)
 default handler for filter_samples() for audio inputs
AVFilterBufferRefavfilter_default_get_video_buffer (AVFilterLink *link, int perms, int w, int h)
 default handler for get_video_buffer() for video inputs
AVFilterBufferRefavfilter_default_get_audio_buffer (AVFilterLink *link, int perms, int nb_samples)
 default handler for get_audio_buffer() for audio inputs
void avfilter_set_common_pixel_formats (AVFilterContext *ctx, AVFilterFormats *formats)
 Helpers for query_formats() which set all links to the same list of formats/layouts.
void avfilter_set_common_sample_formats (AVFilterContext *ctx, AVFilterFormats *formats)
void avfilter_set_common_channel_layouts (AVFilterContext *ctx, AVFilterFormats *formats)
void avfilter_set_common_packing_formats (AVFilterContext *ctx, AVFilterFormats *formats)
int avfilter_default_query_formats (AVFilterContext *ctx)
 Default handler for query_formats().
void avfilter_null_start_frame (AVFilterLink *link, AVFilterBufferRef *picref)
 start_frame() handler for filters which simply pass video along
void avfilter_null_draw_slice (AVFilterLink *link, int y, int h, int slice_dir)
 draw_slice() handler for filters which simply pass video along
void avfilter_null_end_frame (AVFilterLink *link)
 end_frame() handler for filters which simply pass video along
void avfilter_null_filter_samples (AVFilterLink *link, AVFilterBufferRef *samplesref)
 filter_samples() handler for filters which simply pass audio along
AVFilterBufferRefavfilter_null_get_video_buffer (AVFilterLink *link, int perms, int w, int h)
 get_video_buffer() handler for filters which simply pass video along
AVFilterBufferRefavfilter_null_get_audio_buffer (AVFilterLink *link, int perms, int nb_samples)
 get_audio_buffer() handler for filters which simply pass audio along
int avfilter_link (AVFilterContext *src, unsigned srcpad, AVFilterContext *dst, unsigned dstpad)
 Link two filters together.
void avfilter_link_free (AVFilterLink **link)
 Free the link in *link, and set its pointer to NULL.
int avfilter_config_links (AVFilterContext *filter)
 Negotiate the media format, dimensions, etc of all inputs to a filter.
AVFilterBufferRefavfilter_get_video_buffer (AVFilterLink *link, int perms, int w, int h)
 Request a picture buffer with a specific set of permissions.
AVFilterBufferRefavfilter_get_video_buffer_ref_from_arrays (uint8_t *const data[4], const int linesize[4], int perms, int w, int h, enum PixelFormat format)
 Create a buffer reference wrapped around an already allocated image buffer.
AVFilterBufferRefavfilter_get_audio_buffer (AVFilterLink *link, int perms, int nb_samples)
 Request an audio samples buffer with a specific set of permissions.
AVFilterBufferRefavfilter_get_audio_buffer_ref_from_arrays (uint8_t *data[8], int linesize[8], int perms, int nb_samples, enum AVSampleFormat sample_fmt, uint64_t channel_layout, int planar)
 Create an audio buffer reference wrapped around an already allocated samples buffer.
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, AVFilterBufferRef *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, int slice_dir)
 Send a slice to the next filter.
int avfilter_process_command (AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags)
 Make the filter instance process a command.
void avfilter_filter_samples (AVFilterLink *link, AVFilterBufferRef *samplesref)
 Send a buffer of audio samples to the next filter.
void avfilter_register_all (void)
 Initialize the filter system.
void avfilter_uninit (void)
 Uninitialize the filter system.
int avfilter_register (AVFilter *filter)
 Register a filter.
AVFilteravfilter_get_by_name (const char *name)
 Get a filter definition matching the given name.
AVFilter ** av_filter_next (AVFilter **filter)
 If filter is NULL, returns a pointer to the first registered filter pointer, if filter is non-NULL, returns the next pointer after filter.
int avfilter_open (AVFilterContext **filter_ctx, AVFilter *filter, const char *inst_name)
 Create a filter instance.
int avfilter_init_filter (AVFilterContext *filter, const char *args, void *opaque)
 Initialize a filter.
void avfilter_free (AVFilterContext *filter)
 Free a filter context.
int avfilter_insert_filter (AVFilterLink *link, AVFilterContext *filt, unsigned filt_srcpad_idx, unsigned filt_dstpad_idx)
 Insert a filter in the middle of an existing link.
void avfilter_insert_pad (unsigned idx, unsigned *count, size_t padidx_off, AVFilterPad **pads, AVFilterLink ***links, AVFilterPad *newpad)
 Insert a new pad.
static void avfilter_insert_inpad (AVFilterContext *f, unsigned index, AVFilterPad *p)
 Insert a new input pad for the filter.
static void avfilter_insert_outpad (AVFilterContext *f, unsigned index, AVFilterPad *p)
 Insert a new output pad for the filter.

Variables

const int64_t avfilter_all_channel_layouts []
 A list of all channel layouts supported by libavfilter.


Define Documentation

#define AV_PERM_ALIGN   0x40

the buffer must be aligned

Definition at line 103 of file avfilter.h.

Referenced by get_video_buffer(), and start_frame().

#define AV_PERM_NEG_LINESIZES   0x20

the buffer requested can have negative linesizes

Definition at line 102 of file avfilter.h.

Referenced by avfilter_start_frame(), ff_get_ref_perms_string(), get_video_buffer(), and start_frame().

#define AV_PERM_PRESERVE   0x04

nobody else can overwrite the buffer

Definition at line 99 of file avfilter.h.

Referenced by ff_get_ref_perms_string(), return_frame(), and start_frame().

#define AV_PERM_READ   0x01

#define AV_PERM_REUSE   0x08

can output the buffer multiple times, with the same contents each time

Definition at line 100 of file avfilter.h.

Referenced by ff_get_ref_perms_string(), return_frame(), and start_frame().

#define AV_PERM_REUSE2   0x10

can output the buffer multiple times, modified each time

Definition at line 101 of file avfilter.h.

Referenced by ff_get_ref_perms_string(), and vf_next_put_image().

#define AV_PERM_WRITE   0x02

#define AVFILTER_ALIGN   16

Definition at line 105 of file avfilter.h.

Referenced by get_video_buffer().

#define AVFILTER_CMD_FLAG_FAST   2

Only execute command when its fast (like a video out that supports contrast adjustment in hw).

Definition at line 828 of file avfilter.h.

Referenced by avfilter_graph_send_command().

#define AVFILTER_CMD_FLAG_ONE   1

Stop once a filter understood the command (for target=all for example), fast filters are favored automatically.

Definition at line 827 of file avfilter.h.

Referenced by avfilter_graph_queue_command(), avfilter_graph_send_command(), and transcode().

#define FF_API_OLD_ALL_FORMATS_API   (LIBAVFILTER_VERSION_MAJOR < 3)

Definition at line 47 of file avfilter.h.

#define FF_API_OLD_VSINK_API   (LIBAVFILTER_VERSION_MAJOR < 3)

Definition at line 44 of file avfilter.h.

#define LIBAVFILTER_BUILD   LIBAVFILTER_VERSION_INT

Definition at line 41 of file avfilter.h.

#define LIBAVFILTER_VERSION

#define LIBAVFILTER_VERSION_INT

#define LIBAVFILTER_VERSION_MAJOR   2

Definition at line 31 of file avfilter.h.

#define LIBAVFILTER_VERSION_MICRO   0

Definition at line 33 of file avfilter.h.

#define LIBAVFILTER_VERSION_MINOR   53

Definition at line 32 of file avfilter.h.


Typedef Documentation

Definition at line 68 of file avfilter.h.

typedef struct AVFilterLink AVFilterLink

Definition at line 69 of file avfilter.h.

typedef struct AVFilterPad AVFilterPad

Definition at line 70 of file avfilter.h.


Enumeration Type Documentation

Enumerator:
AVFILTER_PACKED 
AVFILTER_PLANAR 

Definition at line 610 of file avfilter.h.


Function Documentation

AVFilter** av_filter_next ( AVFilter **  filter  ) 

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.

Definition at line 721 of file avfilter.c.

Referenced by opt_filters().

int avfilter_add_format ( AVFilterFormats **  avff,
int64_t  fmt 
)

Add fmt to the list of media formats contained in *avff.

If *avff is NULL the function allocates the filter formats struct and puts its pointer in *avff.

Returns:
a non negative value in case of success, or a negative value corresponding to an AVERROR code in case of error

Definition at line 131 of file formats.c.

Referenced by avfilter_make_all_formats(), and query_formats().

attribute_deprecated AVFilterFormats* avfilter_all_formats ( enum AVMediaType  type  ) 

Deprecated:
Use avfilter_make_all_formats() instead.

Definition at line 149 of file formats.c.

int avfilter_config_links ( AVFilterContext filter  ) 

Negotiate the media format, 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 241 of file avfilter.c.

Referenced by avfilter_config_links(), and ff_avfilter_graph_config_links().

const char* avfilter_configuration ( void   ) 

Return the libavfilter build-time configuration.

Definition at line 37 of file avfilter.c.

static void avfilter_copy_buffer_ref_props ( AVFilterBufferRef dst,
AVFilterBufferRef src 
) [inline, static]

Copy properties of src to dst, without copying the actual data.

Definition at line 166 of file avfilter.h.

Referenced by av_vsrc_buffer_add_video_buffer_ref(), avfilter_default_start_frame(), avfilter_start_frame(), filter_samples(), return_frame(), and start_frame().

void avfilter_default_draw_slice ( AVFilterLink link,
int  y,
int  h,
int  slice_dir 
)

default handler for draw_slice() for video inputs

Definition at line 123 of file defaults.c.

Referenced by avfilter_draw_slice().

void avfilter_default_end_frame ( AVFilterLink link  ) 

default handler for end_frame() for video inputs

Definition at line 134 of file defaults.c.

Referenced by avfilter_end_frame(), and end_frame().

void avfilter_default_filter_samples ( AVFilterLink link,
AVFilterBufferRef samplesref 
)

default handler for filter_samples() for audio inputs

Definition at line 154 of file defaults.c.

Referenced by avfilter_filter_samples().

AVFilterBufferRef* avfilter_default_get_audio_buffer ( AVFilterLink link,
int  perms,
int  nb_samples 
)

default handler for get_audio_buffer() for audio inputs

Definition at line 83 of file defaults.c.

Referenced by avfilter_default_filter_samples(), avfilter_filter_samples(), and avfilter_get_audio_buffer().

AVFilterBufferRef* avfilter_default_get_video_buffer ( AVFilterLink link,
int  perms,
int  w,
int  h 
)

default handler for get_video_buffer() for video inputs

Definition at line 37 of file defaults.c.

Referenced by avfilter_get_video_buffer(), and get_video_buffer().

int avfilter_default_query_formats ( AVFilterContext ctx  ) 

Default handler for query_formats().

Definition at line 223 of file defaults.c.

Referenced by main(), and query_formats().

void avfilter_default_start_frame ( AVFilterLink link,
AVFilterBufferRef picref 
)

default handler for start_frame() for video inputs

Definition at line 109 of file defaults.c.

Referenced by avfilter_start_frame().

void avfilter_draw_slice ( AVFilterLink link,
int  y,
int  h,
int  slice_dir 
)

Send a slice to the next filter.

Slices have to be provided in sequential order, either in top-bottom or bottom-top order. If slices are provided in non-sequential order the behavior of the function is undefined.

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
slice_dir the assumed direction for sending slices, from the top slice to the bottom slice if the value is 1, from the bottom slice to the top slice if the value is -1, for other values the behavior of the function is undefined.

Definition at line 603 of file avfilter.c.

Referenced by avfilter_default_draw_slice(), avfilter_null_draw_slice(), color_request_frame(), draw_send_bar_slice(), draw_slice(), end_frame(), request_frame(), return_frame(), and vf_next_put_image().

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 586 of file avfilter.c.

Referenced by avfilter_default_end_frame(), avfilter_null_end_frame(), color_request_frame(), end_frame(), request_frame(), return_frame(), and vf_next_put_image().

void avfilter_filter_samples ( AVFilterLink link,
AVFilterBufferRef samplesref 
)

Send a buffer of audio samples to the next filter.

Parameters:
link the output link over which the audio samples are being sent
samplesref a reference to the buffer of audio samples being sent. The receiving filter will free this reference when it no longer needs it or pass it on to the next filter.

Definition at line 655 of file avfilter.c.

Referenced by avfilter_default_filter_samples(), avfilter_null_filter_samples(), filter_samples(), and request_frame().

void avfilter_formats_changeref ( AVFilterFormats **  oldref,
AVFilterFormats **  newref 
)

Before After ________ ________ |formats |<---------.

|formats |<---------. | ____ | ___|___ | ____ | ___|___ | |refs| | | | | | |refs| | | | | NULL | |* *--------->|*oldref| | |* *--------->|*newref| ^ | |* * | | |_______| | |* * | | |_______| ___|___ | |____| | | |____| | | | | |________| |________| |*oldref| |_______|

Definition at line 228 of file formats.c.

Referenced by avfilter_insert_filter().

void avfilter_formats_ref ( AVFilterFormats formats,
AVFilterFormats **  ref 
)

Add *ref as a new reference to formats.

That is the pointers will point like in the ASCII art below: ________ |formats |<--------. | ____ | ____|___________________ | |refs| | | __|_ | |* * | | | | | | AVFilterLink | |* *--------->|*ref| | |____| | | |____| |________| |________________________

Definition at line 191 of file formats.c.

Referenced by query_formats(), and set_common_formats().

void avfilter_formats_unref ( AVFilterFormats **  ref  ) 

If *ref is non-NULL, remove *ref as a reference to the format list it currently points to, deallocates that list if this was the last reference, and sets *ref to NULL.

Before After ________ ________ NULL |formats |<--------. |formats | ^ | ____ | ____|________________ | ____ | ____|________________ | |refs| | | __|_ | |refs| | | __|_ | |* * | | | | | | AVFilterLink | |* * | | | | | | AVFilterLink | |* *--------->|*ref| | |* | | | |*ref| | |____| | | |____| | |____| | | |____| |________| |_____________________ |________| |_____________________

Definition at line 207 of file formats.c.

Referenced by avfilter_free(), pick_format(), and query_formats().

void avfilter_free ( AVFilterContext filter  ) 

Free a filter context.

Parameters:
filter the filter to free

Definition at line 811 of file avfilter.c.

Referenced by av_vsrc_buffer_add_video_buffer_ref(), avfilter_graph_create_filter(), avfilter_graph_free(), avfilter_graph_parse(), create_filter(), insert_filter(), main(), and remove_filter().

AVFilterBufferRef* avfilter_get_audio_buffer ( AVFilterLink link,
int  perms,
int  nb_samples 
)

Request an audio samples buffer with a specific set of permissions.

Parameters:
link the output link to the filter from which the buffer will be requested
perms the required access permissions
nb_samples the number of samples per channel
Returns:
A reference to the samples. This must be unreferenced with avfilter_unref_buffer when you are finished with it.

Definition at line 456 of file avfilter.c.

Referenced by avfilter_null_get_audio_buffer(), filter_samples(), init_buffers(), and request_frame().

AVFilterBufferRef* avfilter_get_audio_buffer_ref_from_arrays ( uint8_t *  data[8],
int  linesize[8],
int  perms,
int  nb_samples,
enum AVSampleFormat  sample_fmt,
uint64_t  channel_layout,
int  planar 
)

Create an audio buffer reference wrapped around an already allocated samples buffer.

Parameters:
data pointers to the samples plane buffers
linesize linesize for the samples plane buffers
perms the required access permissions
nb_samples number of samples per channel
sample_fmt the format of each sample in the buffer to allocate
channel_layout the channel layout of the buffer
planar audio data layout - planar or packed

Definition at line 474 of file avfilter.c.

Referenced by av_asrc_buffer_add_samples(), avfilter_default_get_audio_buffer(), and init_buffers().

AVFilter* avfilter_get_by_name ( const char *  name  ) 

Get 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 696 of file avfilter.c.

Referenced by av_vsrc_buffer_add_video_buffer_ref(), create_filter(), init_filters(), insert_conv_filter(), insert_filter(), lavfi_read_header(), and main().

AVFilterBufferRef* avfilter_get_video_buffer ( AVFilterLink link,
int  perms,
int  w,
int  h 
)

Request a picture buffer with a specific set of permissions.

Parameters:
link the output link to the filter from which the buffer will be requested
perms the required access permissions
w the minimum width of the buffer to allocate
h the minimum height of the buffer to allocate
Returns:
A reference to the buffer. This must be unreferenced with avfilter_unref_buffer when you are finished with it.

Definition at line 394 of file avfilter.c.

Referenced by av_vsrc_buffer_add_video_buffer_ref(), avfilter_default_start_frame(), avfilter_null_get_video_buffer(), avfilter_start_frame(), color_request_frame(), get_video_buffer(), request_frame(), return_frame(), source_request_frame(), and start_frame().

AVFilterBufferRef* avfilter_get_video_buffer_ref_from_arrays ( uint8_t *const   data[4],
const int  linesize[4],
int  perms,
int  w,
int  h,
enum PixelFormat  format 
)

Create a buffer reference wrapped around an already allocated image buffer.

Parameters:
data pointers to the planes of the image to reference
linesize linesizes for the planes of the image to reference
perms the required access permissions
w the width of the image specified by the data and linesize arrays
h the height of the image specified by the data and linesize arrays
format the pixel format of the image specified by the data and linesize arrays

Definition at line 417 of file avfilter.c.

Referenced by avfilter_default_get_video_buffer(), and avfilter_get_video_buffer_ref_from_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 850 of file avfilter.c.

Referenced by av_vsrc_buffer_add_video_buffer_ref(), avfilter_graph_create_filter(), create_filter(), and main().

int avfilter_insert_filter ( AVFilterLink link,
AVFilterContext filt,
unsigned  filt_srcpad_idx,
unsigned  filt_dstpad_idx 
)

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
filt_srcpad_idx the input pad on the filter to connect
filt_dstpad_idx the output pad on the filter to connect
Returns:
zero on success

Definition at line 204 of file avfilter.c.

Referenced by av_vsrc_buffer_add_video_buffer_ref(), and insert_conv_filter().

static void avfilter_insert_inpad ( AVFilterContext f,
unsigned  index,
AVFilterPad p 
) [inline, static]

Insert a new input pad for the filter.

Definition at line 941 of file avfilter.h.

static void avfilter_insert_outpad ( AVFilterContext f,
unsigned  index,
AVFilterPad p 
) [inline, static]

Insert a new output pad for the filter.

Definition at line 949 of file avfilter.h.

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 127 of file avfilter.c.

Referenced by avfilter_insert_inpad(), and avfilter_insert_outpad().

const char* avfilter_license ( void   ) 

Return the libavfilter license.

Definition at line 42 of file avfilter.c.

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 148 of file avfilter.c.

Referenced by avfilter_insert_filter(), insert_filter(), lavfi_read_header(), and link_filter().

void avfilter_link_free ( AVFilterLink **  link  ) 

Free the link in *link, and set its pointer to NULL.

Definition at line 178 of file avfilter.c.

Referenced by avfilter_free().

AVFilterFormats* avfilter_make_all_channel_layouts ( void   ) 

Return a list of all channel layouts supported by FFmpeg.

Definition at line 175 of file formats.c.

Referenced by avfilter_default_query_formats(), init(), and query_formats().

AVFilterFormats* avfilter_make_all_formats ( enum AVMediaType  type  ) 

Return a list of all formats supported by FFmpeg for the given media type.

Definition at line 155 of file formats.c.

Referenced by avfilter_all_formats(), avfilter_default_query_formats(), init(), and query_formats().

AVFilterFormats* avfilter_make_all_packing_formats ( void   ) 

Return a list of all audio packing formats.

Definition at line 180 of file formats.c.

Referenced by avfilter_default_query_formats(), init(), and query_formats().

AVFilterFormats* avfilter_make_format64_list ( const int64_t *  fmts  ) 

Definition at line 122 of file formats.c.

Referenced by avfilter_make_all_channel_layouts(), and query_formats().

AVFilterFormats* avfilter_make_format_list ( const int *  fmts  ) 

Create a list of supported formats.

This is intended for use in AVFilter->query_formats().

Parameters:
fmts list of media formats, terminated by -1. If NULL an empty list is created.
Returns:
the format list, with no existing references

Definition at line 113 of file formats.c.

Referenced by avfilter_make_all_packing_formats(), and query_formats().

AVFilterFormats* avfilter_merge_formats ( AVFilterFormats a,
AVFilterFormats b 
)

Return a format list which contains the intersection of the formats of a and b.

Also, all the references of a, all the references of b, and a and b themselves will be deallocated.

If a and b do not share any common formats, neither is modified, and NULL is returned.

Definition at line 45 of file formats.c.

Referenced by insert_conv_filter(), and query_formats().

void avfilter_null_draw_slice ( AVFilterLink link,
int  y,
int  h,
int  slice_dir 
)

draw_slice() handler for filters which simply pass video along

Definition at line 238 of file defaults.c.

void avfilter_null_end_frame ( AVFilterLink link  ) 

end_frame() handler for filters which simply pass video along

Definition at line 243 of file defaults.c.

void avfilter_null_filter_samples ( AVFilterLink link,
AVFilterBufferRef samplesref 
)

filter_samples() handler for filters which simply pass audio along

Definition at line 248 of file defaults.c.

AVFilterBufferRef* avfilter_null_get_audio_buffer ( AVFilterLink link,
int  perms,
int  nb_samples 
)

get_audio_buffer() handler for filters which simply pass audio along

Definition at line 258 of file defaults.c.

AVFilterBufferRef* avfilter_null_get_video_buffer ( AVFilterLink link,
int  perms,
int  w,
int  h 
)

get_video_buffer() handler for filters which simply pass video along

Definition at line 253 of file defaults.c.

void avfilter_null_start_frame ( AVFilterLink link,
AVFilterBufferRef picref 
)

start_frame() handler for filters which simply pass video along

Definition at line 233 of file defaults.c.

int avfilter_open ( AVFilterContext **  filter_ctx,
AVFilter filter,
const char *  inst_name 
)

Create a filter instance.

Parameters:
filter_ctx put here a pointer to the created filter context on success, NULL on failure
filter the filter to create an instance of
inst_name Name to give to the new instance. Can be NULL for none.
Returns:
>= 0 in case of success, a negative error code otherwise

Definition at line 753 of file avfilter.c.

Referenced by av_vsrc_buffer_add_video_buffer_ref(), avfilter_graph_create_filter(), create_filter(), insert_filter(), and main().

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 526 of file avfilter.c.

Referenced by av_buffersink_poll_frame(), avfilter_poll_frame(), main(), poll_frame(), and transcode_video().

int avfilter_process_command ( AVFilterContext filter,
const char *  cmd,
const char *  arg,
char *  res,
int  res_len,
int  flags 
)

Make the filter instance process a command.

It is recommended to use avfilter_graph_send_command().

Definition at line 644 of file avfilter.c.

Referenced by avfilter_graph_send_command(), and avfilter_start_frame().

AVFilterBufferRef* avfilter_ref_buffer ( AVFilterBufferRef ref,
int  pmask 
)

Add a new reference to a buffer.

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

Definition at line 57 of file avfilter.c.

Referenced by avfilter_default_filter_samples(), avfilter_default_start_frame(), color_request_frame(), filter_samples(), request_frame(), source_request_frame(), start_frame(), and vf_next_put_image().

int 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
Returns:
0 if the registration was successful, a negative value otherwise

Definition at line 707 of file avfilter.c.

void avfilter_register_all ( void   ) 

Initialize the filter system.

Register all built-in filters.

Definition at line 29 of file allfilters.c.

Referenced by lavfi_read_header(), and main().

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 515 of file avfilter.c.

Referenced by av_buffersink_get_buffer_ref(), avfilter_request_frame(), poll_frame(), request_frame(), and start_frame().

void avfilter_set_common_channel_layouts ( AVFilterContext ctx,
AVFilterFormats formats 
)

Definition at line 209 of file defaults.c.

Referenced by avfilter_default_query_formats(), and query_formats().

void avfilter_set_common_packing_formats ( AVFilterContext ctx,
AVFilterFormats formats 
)

Definition at line 216 of file defaults.c.

Referenced by avfilter_default_query_formats(), and query_formats().

void avfilter_set_common_pixel_formats ( AVFilterContext ctx,
AVFilterFormats formats 
)

Helpers for query_formats() which set all links to the same list of formats/layouts.

If there are no links hooked to this filter, the list of formats is freed.

Definition at line 195 of file defaults.c.

Referenced by avfilter_default_query_formats(), and query_formats().

void avfilter_set_common_sample_formats ( AVFilterContext ctx,
AVFilterFormats formats 
)

Definition at line 202 of file defaults.c.

Referenced by avfilter_default_query_formats(), and query_formats().

void avfilter_start_frame ( AVFilterLink link,
AVFilterBufferRef 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 546 of file avfilter.c.

Referenced by avfilter_default_start_frame(), avfilter_null_start_frame(), color_request_frame(), request_frame(), return_frame(), source_request_frame(), start_frame(), and vf_next_put_image().

void avfilter_uninit ( void   ) 

Uninitialize the filter system.

Unregister all filters.

Definition at line 726 of file avfilter.c.

Referenced by do_exit(), and exit_program().

void avfilter_unref_buffer ( AVFilterBufferRef ref  ) 

Remove a reference to a buffer.

If this is the last reference to the buffer, the buffer itself is also automatically freed.

Parameters:
ref reference to the buffer, may be NULL

Definition at line 111 of file avfilter.c.

Referenced by alloc_picture(), av_vsrc_buffer_add_video_buffer_ref(), avfilter_default_end_frame(), avfilter_default_filter_samples(), avfilter_end_frame(), avfilter_filter_samples(), color_request_frame(), common_uninit(), end_frame(), filter_samples(), lavfi_read_packet(), main(), movie_common_uninit(), queue_picture(), request_frame(), start_frame(), stream_close(), transcode_video(), uninit(), and vf_next_put_image().

unsigned avfilter_version ( void   ) 

Return the LIBAVFILTER_VERSION_INT constant.

Definition at line 33 of file avfilter.c.


Variable Documentation

A list of all channel layouts supported by libavfilter.

Definition at line 170 of file formats.c.

Referenced by avfilter_make_all_channel_layouts(), and lavfi_read_header().


Generated on Fri Oct 26 02:43:51 2012 for FFmpeg by  doxygen 1.5.8