FFmpeg
Data Structures | Macros | Functions
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...
 
  A list of supported channel layouts. More...
 

Macros

#define  FF_COUNT2LAYOUT(c)   (0x8000000000000000ULL | (c))
  Encode a channel count as a channel layout. More...
 
#define  FF_LAYOUT2COUNT(l)
  Decode a channel count encoded as a channel layout. More...
 

Functions

  Return a channel layouts/samplerates list which contains the intersection of the layouts/samplerates of a and b. More...
 
 
  Construct an empty AVFilterChannelLayouts/AVFilterFormats struct – representing any channel layout (with known disposition)/sample rate. More...
 
 
  Construct an AVFilterChannelLayouts coding for any channel layout, with known or unknown disposition. More...
 
 
 
  A helper for query_formats() which sets all links to the same list of channel layouts/sample rates. More...
 
 
  A helper for query_formats() which sets all links to the same list of formats. More...
 
 
  Add *ref as a new reference to f. More...
 
  Remove a reference to a channel layouts list. More...
 
 
 
  Set the formats list to all existing formats. More...
 
  Create a list of supported formats. More...
 
  Add fmt to the list of media formats contained in *avff. More...
 
  Return a list of all formats supported by FFmpeg for the given media type. More...
 
  Construct a formats list containing all planar sample formats. More...
 
  Return a format list which contains the intersection of the formats of a and b. More...
 
  Add *ref as a new reference to formats. More...
 
  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. More...
 
  Before After


|formats |<------—. More...

 

Macro Definition Documentation

#define FF_COUNT2LAYOUT (   c )    (0x8000000000000000ULL | (c))

Encode a channel count as a channel layout.

FF_COUNT2LAYOUT(c) means any channel layout with c channels, with a known or unknown disposition. The result is only valid inside AVFilterChannelLayouts and immediately related functions.

Definition at line 102 of file formats.h.

Referenced by aeval_query_formats(), asink_query_formats(), ff_merge_channel_layouts(), and query_formats().

#define FF_LAYOUT2COUNT (   l )
Value:
(((l) & 0x8000000000000000ULL) ? \
(int)((l) & 0x7FFFFFFF) : 0)

Decode a channel count encoded as a channel layout.

Return 0 if the channel layout was a real one.

Definition at line 108 of file formats.h.

Referenced by pick_format(), reduce_formats_on_filter(), and swap_channel_layouts_on_filter().

Function Documentation

AVFilterChannelLayouts* ff_merge_channel_layouts ( AVFilterChannelLayoutsa,
)

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

Referenced by query_formats().

AVFilterFormats* ff_merge_samplerates ( AVFilterFormatsa,
AVFilterFormatsb 
)

Definition at line 139 of file formats.c.

Referenced by can_merge_formats(), and query_formats().

av_warn_unused_result AVFilterChannelLayouts* ff_all_channel_layouts ( void  )

Construct an empty AVFilterChannelLayouts/AVFilterFormats struct – representing any channel layout (with known disposition)/sample rate.

Definition at line 401 of file formats.c.

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

av_warn_unused_result AVFilterFormats* ff_all_samplerates ( void  )

Definition at line 395 of file formats.c.

Referenced by aeval_query_formats(), channelmap_query_formats(), default_query_formats_common(), filter_query_formats(), join_query_formats(), and query_formats().

av_warn_unused_result AVFilterChannelLayouts* ff_all_channel_counts ( void  )

Construct an AVFilterChannelLayouts coding for any channel layout, with known or unknown disposition.

Definition at line 410 of file formats.c.

Referenced by aeval_query_formats(), asink_query_formats(), ff_query_formats_all(), and query_formats().

av_warn_unused_result AVFilterChannelLayouts* avfilter_make_format64_list ( const int64_t *  fmts )

Definition at line 303 of file formats.c.

Referenced by movie_query_formats(), and query_formats().

av_warn_unused_result AVFilterChannelLayouts* ff_make_formatu64_list ( const uint64_t *  fmts )

Definition at line 292 of file formats.c.

av_warn_unused_result int ff_set_common_channel_layouts ( AVFilterContextctx,
AVFilterChannelLayoutslayouts 
)

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

Referenced by aeval_query_formats(), asink_query_formats(), default_query_formats_common(), filter_query_formats(), and query_formats().

av_warn_unused_result int ff_set_common_samplerates ( AVFilterContextctx,
AVFilterFormatssamplerates 
)

Definition at line 556 of file formats.c.

Referenced by aeval_query_formats(), asink_query_formats(), channelmap_query_formats(), default_query_formats_common(), filter_query_formats(), join_query_formats(), and query_formats().

av_warn_unused_result int ff_set_common_formats ( AVFilterContextctx,
AVFilterFormatsformats 
)

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

Referenced by aeval_query_formats(), asink_query_formats(), channelmap_query_formats(), default_query_formats_common(), filter_query_formats(), geq_query_formats(), join_query_formats(), pp_query_formats(), query_formats(), and vsink_query_formats().

av_warn_unused_result int ff_add_channel_layout ( AVFilterChannelLayouts **  l,
uint64_t  channel_layout 
)

Definition at line 343 of file formats.c.

Referenced by aeval_query_formats(), asink_query_formats(), channelmap_query_formats(), init(), join_query_formats(), query_formats(), and reduce_formats_on_filter().

av_warn_unused_result int ff_channel_layouts_ref ( AVFilterChannelLayoutsf,
)

Add *ref as a new reference to f.

Definition at line 435 of file formats.c.

Referenced by aeval_query_formats(), 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 481 of file formats.c.

Referenced by ff_add_channel_layout(), ff_channel_layouts_ref(), ff_set_common_channel_layouts(), free_link(), init(), and pick_format().

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

Definition at line 499 of file formats.c.

Referenced by avfilter_insert_filter().

av_warn_unused_result int ff_default_query_formats ( AVFilterContextctx )

Definition at line 597 of file formats.c.

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

av_warn_unused_result int ff_query_formats_all ( AVFilterContextctx )

Set the formats list to all existing formats.

This function behaves like ff_default_query_formats(), except it also accepts channel layouts with unknown disposition. It should only be used with audio filters.

Definition at line 602 of file formats.c.

av_warn_unused_result 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 283 of file formats.c.

Referenced by aeval_query_formats(), geq_query_formats(), movie_query_formats(), pp_query_formats(), and query_formats().

av_warn_unused_result 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 337 of file formats.c.

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

av_warn_unused_result AVFilterFormats* ff_all_formats ( enum AVMediaType  type )

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

Definition at line 350 of file formats.c.

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

av_warn_unused_result AVFilterFormats* ff_planar_sample_fmts ( void  )

Construct a formats list containing all planar sample formats.

Definition at line 382 of file formats.c.

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

AVFilterFormats* ff_merge_formats ( AVFilterFormatsa,
enum AVMediaType  type 
)

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

Referenced by can_merge_formats(), and query_formats().

av_warn_unused_result int ff_formats_ref ( AVFilterFormatsformats,
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 440 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 476 of file formats.c.

Referenced by ff_add_format(), ff_formats_ref(), ff_set_common_formats(), ff_set_common_samplerates(), free_link(), init(), pick_format(), and reduce_formats_on_filter().

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

Before After


|formats |<------—.

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

Definition at line 505 of file formats.c.

Referenced by avfilter_insert_filter().


Generated on Mon Feb 15 2016 15:20:52 for FFmpeg by   doxygen 1.8.6

AltStyle によって変換されたページ (->オリジナル) /