libavfilter/formats.c File Reference

#include "avfilter.h"

Go to the source code of this file.

Functions

static void merge_ref (AVFilterFormats *ret, AVFilterFormats *a)
 Add all refs from a to ret and destroy a.
AVFilterFormatsavfilter_merge_formats (AVFilterFormats *a, AVFilterFormats *b)
 Returns a format list which contains the intersection of the formats of a and b.
AVFilterFormatsavfilter_make_format_list (int len,...)
 Helper function to create a list of supported formats.
AVFilterFormatsavfilter_all_colorspaces (void)
 Returns a list of all colorspaces supported by FFmpeg.
void avfilter_formats_ref (AVFilterFormats *f, AVFilterFormats **ref)
 Adds *ref as a new reference to formats.
static int find_ref_index (AVFilterFormats **ref)
void avfilter_formats_unref (AVFilterFormats **ref)
 Remove *ref as a reference to the format list it currently points to, deallocate that list if this was the last reference, and set *ref to NULL.
void avfilter_formats_changeref (AVFilterFormats **oldref, AVFilterFormats **newref)
 Before After ________ ________ |formats |<---------.


Function Documentation

AVFilterFormats* avfilter_all_colorspaces ( void   ) 

Returns a list of all colorspaces supported by FFmpeg.

Definition at line 93 of file formats.c.

Referenced by avfilter_default_query_formats().

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

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

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

Definition at line 140 of file formats.c.

Referenced by avfilter_insert_filter().

void avfilter_formats_ref ( AVFilterFormats formats,
AVFilterFormats **  ref 
)

Adds *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 108 of file formats.c.

Referenced by avfilter_set_common_formats().

void avfilter_formats_unref ( AVFilterFormats **  ref  ) 

Remove *ref as a reference to the format list it currently points to, deallocate that list if this was the last reference, and set *ref to NULL.

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

Definition at line 124 of file formats.c.

Referenced by pick_format().

AVFilterFormats* avfilter_make_format_list ( int  len,
  ... 
)

Helper function to create a list of supported formats.

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

Parameters:
len the number of formats supported
... a list of the supported formats
Returns:
the format list, with no existing references

Definition at line 75 of file formats.c.

AVFilterFormats* avfilter_merge_formats ( AVFilterFormats a,
AVFilterFormats b 
)

Returns 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 41 of file formats.c.

Referenced by query_formats().

static int find_ref_index ( AVFilterFormats **  ref  )  [static]

Definition at line 115 of file formats.c.

Referenced by avfilter_formats_changeref(), and avfilter_formats_unref().

static void merge_ref ( AVFilterFormats ret,
AVFilterFormats a 
) [static]

Add all refs from a to ret and destroy a.

Definition at line 27 of file formats.c.

Referenced by avfilter_merge_formats().


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