libavfilter/formats.h File Reference

#include "avfilter.h"

Go to the source code of this file.

Data Structures

struct  AVFilterFormats
 A list of supported formats for one end of a filter link. More...
struct  AVFilterChannelLayouts

Functions

AVFilterChannelLayoutsff_merge_channel_layouts (AVFilterChannelLayouts *a, AVFilterChannelLayouts *b)
 Return a channel layouts/samplerates list which contains the intersection of the layouts/samplerates of a and b.
AVFilterFormatsff_merge_samplerates (AVFilterFormats *a, AVFilterFormats *b)
AVFilterChannelLayoutsff_all_channel_layouts (void)
 Construct an empty AVFilterChannelLayouts/AVFilterFormats struct -- representing any channel layout/sample rate.
AVFilterFormatsff_all_samplerates (void)
AVFilterChannelLayoutsavfilter_make_format64_list (const int64_t *fmts)
void ff_set_common_channel_layouts (AVFilterContext *ctx, AVFilterChannelLayouts *layouts)
 A helper for query_formats() which sets all links to the same list of channel layouts/sample rates.
void ff_set_common_samplerates (AVFilterContext *ctx, AVFilterFormats *samplerates)
void ff_set_common_formats (AVFilterContext *ctx, AVFilterFormats *formats)
 A helper for query_formats() which sets all links to the same list of formats.
int ff_add_channel_layout (AVFilterChannelLayouts **l, uint64_t channel_layout)
void ff_channel_layouts_ref (AVFilterChannelLayouts *f, AVFilterChannelLayouts **ref)
 Add *ref as a new reference to f.
void ff_channel_layouts_unref (AVFilterChannelLayouts **ref)
 Remove a reference to a channel layouts list.
void ff_channel_layouts_changeref (AVFilterChannelLayouts **oldref, AVFilterChannelLayouts **newref)
int ff_default_query_formats (AVFilterContext *ctx)
AVFilterFormatsff_make_format_list (const int *fmts)
 Create a list of supported formats.
int ff_add_format (AVFilterFormats **avff, int64_t fmt)
 Add fmt to the list of media formats contained in *avff.
AVFilterFormatsff_all_formats (enum AVMediaType type)
 Return a list of all formats supported by FFmpeg for the given media type.
AVFilterFormatsff_planar_sample_fmts (void)
 Construct a formats list containing all planar sample formats.
AVFilterFormatsff_merge_formats (AVFilterFormats *a, AVFilterFormats *b)
 Return a format list which contains the intersection of the formats of a and b.
void ff_formats_ref (AVFilterFormats *formats, AVFilterFormats **ref)
 Add *ref as a new reference to formats.
void ff_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 ff_formats_changeref (AVFilterFormats **oldref, AVFilterFormats **newref)
 Before After ________ ________ |formats |<---------.


Function Documentation

AVFilterChannelLayouts* avfilter_make_format64_list ( const int64_t *  fmts  ) 

Definition at line 226 of file formats.c.

Referenced by asink_query_formats(), movie_query_formats(), and query_formats().

int ff_add_channel_layout ( AVFilterChannelLayouts **  l,
uint64_t  channel_layout 
)

int ff_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 254 of file formats.c.

Referenced by ff_all_formats(), ff_planar_sample_fmts(), init(), query_formats(), and reduce_formats_on_filter().

AVFilterChannelLayouts* ff_all_channel_layouts ( void   ) 

Construct an empty AVFilterChannelLayouts/AVFilterFormats struct -- representing any channel layout/sample rate.

Definition at line 307 of file formats.c.

Referenced by channelmap_query_formats(), ff_default_query_formats(), filter_query_formats(), join_query_formats(), and query_formats().

AVFilterFormats* ff_all_formats ( enum AVMediaType  type  ) 

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

Definition at line 264 of file formats.c.

Referenced by ff_default_query_formats(), filter_query_formats(), and query_formats().

AVFilterFormats* ff_all_samplerates ( void   ) 

void ff_channel_layouts_changeref ( AVFilterChannelLayouts **  oldref,
AVFilterChannelLayouts **  newref 
)

Definition at line 384 of file formats.c.

Referenced by avfilter_insert_filter().

void ff_channel_layouts_ref ( AVFilterChannelLayouts f,
AVFilterChannelLayouts **  ref 
)

Add *ref as a new reference to f.

Definition at line 320 of file formats.c.

Referenced by channelmap_query_formats(), ff_set_common_channel_layouts(), join_query_formats(), movie_query_formats(), and query_formats().

void ff_channel_layouts_unref ( AVFilterChannelLayouts **  ref  ) 

Remove a reference to a channel layouts list.

Definition at line 366 of file formats.c.

Referenced by avfilter_free(), and pick_format().

int ff_default_query_formats ( AVFilterContext ctx  ) 

Definition at line 444 of file formats.c.

Referenced by main(), query_formats(), and vsink_query_formats().

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

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

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

Definition at line 390 of file formats.c.

Referenced by avfilter_insert_filter().

void ff_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 325 of file formats.c.

Referenced by ff_set_common_formats(), ff_set_common_samplerates(), movie_query_formats(), and query_formats().

void ff_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 361 of file formats.c.

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

AVFilterFormats* ff_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
Returns:
the format list, with no existing references

Definition at line 217 of file formats.c.

Referenced by asink_query_formats(), ff_draw_supported_pixel_formats(), movie_query_formats(), query_formats(), and vsink_query_formats().

AVFilterChannelLayouts* ff_merge_channel_layouts ( AVFilterChannelLayouts a,
AVFilterChannelLayouts b 
)

Return a channel layouts/samplerates list which contains the intersection of the layouts/samplerates 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 elements, neither is modified, and NULL is returned.

Definition at line 135 of file formats.c.

Referenced by insert_conv_filter(), and query_formats().

AVFilterFormats* ff_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 89 of file formats.c.

Referenced by insert_conv_filter(), and query_formats().

AVFilterFormats* ff_merge_samplerates ( AVFilterFormats a,
AVFilterFormats b 
)

Definition at line 108 of file formats.c.

Referenced by query_formats().

AVFilterFormats* ff_planar_sample_fmts ( void   ) 

Construct a formats list containing all planar sample formats.

Definition at line 289 of file formats.c.

Referenced by channelmap_query_formats(), join_query_formats(), and query_formats().

void ff_set_common_channel_layouts ( AVFilterContext ctx,
AVFilterChannelLayouts layouts 
)

A helper for query_formats() which sets all links to the same list of channel layouts/sample rates.

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

Definition at line 419 of file formats.c.

Referenced by asink_query_formats(), ff_default_query_formats(), filter_query_formats(), and query_formats().

void ff_set_common_formats ( AVFilterContext ctx,
AVFilterFormats formats 
)

A helper for query_formats() which sets all links to the same list of formats.

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

Definition at line 438 of file formats.c.

Referenced by asink_query_formats(), channelmap_query_formats(), ff_default_query_formats(), filter_query_formats(), join_query_formats(), query_formats(), and vsink_query_formats().

void ff_set_common_samplerates ( AVFilterContext ctx,
AVFilterFormats samplerates 
)


Generated on Fri Oct 26 02:50:09 2012 for FFmpeg by  doxygen 1.5.8