Go to the documentation of this file.
324 static const struct {
364 return bitmap < 0x40000 ? bitmap : 0;
373 for (
i = 0; layout_map[
i].
tag != 0;
i++) {
385 return 1
U << (label - 1);
421 uint32_t **pchannel_desc)
449 for (j = 0; layout_map[j].
tag != 0; j++) {
455 if (layout_map[j].
tag)
463 *pchannel_desc =
NULL;
467 uint32_t *channel_desc;
484 if (channel_desc[
i] == 0) {
490 *pchannel_desc = channel_desc;
499 uint32_t layout_tag, bitmap, num_descr;
500 uint64_t label_mask,
mask = 0;
511 "bitmap=%"PRIu32
" num_descr=%"PRIu32
"\n",
512 layout_tag, bitmap, num_descr);
514 if (
size < 12ULL + num_descr * 20ULL)
518 for (
i = 0;
i < num_descr;
i++) {
522 "reached EOF while reading channel layout\n");
531 if (layout_tag == 0) {
533 if (mask_incr == 0 || mask_incr <= label_mask) {
537 label_mask |= mask_incr;
540 if (layout_tag == 0) {
551 av_log(
s,
AV_LOG_WARNING,
"ignoring channel layout with %d channels because the real number of channels is %d\n",
770 uint8_t *position,
int position_num)
774 if (position_num < layout->nb_channels)
777 for (
int i = 0;
i <
layout->nb_channels;
i++) {
789 if (position[
i] == 127)
804 if (position_num <= 63) {
806 layout->nb_channels = position_num;
807 for (
int i = 0;
i < position_num;
i++) {
824 layout->nb_channels = position_num;
831 for (
int i = 0;
i < position_num;
i++) {
static void error(const char *err)
@ MOV_CH_LAYOUT_QUADRAPHONIC
#define AV_CH_LAYOUT_7POINT0
@ MOV_CH_LAYOUT_EAC3_7_1_D
#define AV_CH_LAYOUT_6POINT1
@ MOV_CH_LAYOUT_MPEG_4_0_A
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_CHANNEL_LAYOUT_STEREO_DOWNMIX
@ MOV_CH_LAYOUT_EAC3_7_1_H
#define AV_CH_LAYOUT_5POINT0_BACK
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
@ MOV_CH_LAYOUT_MPEG_5_1_A
#define AV_CH_TOP_FRONT_CENTER
#define AV_CHANNEL_LAYOUT_STEREO
This struct describes the properties of an encoded stream.
#define AV_CH_LOW_FREQUENCY_2
enum MovChannelLayoutTag * layouts
@ MOV_CH_LAYOUT_DTS_6_1_D
#define AV_CH_LAYOUT_MONO
@ MOV_CH_LAYOUT_DTS_8_0_A
#define AV_CHANNEL_LAYOUT_2_2
#define AV_CH_TOP_FRONT_RIGHT
@ MOV_CH_LAYOUT_AUDIOUNIT_7_0_FRONT
@ MOV_CH_LAYOUT_AC3_3_0_1
enum AVChannel av_channel_layout_channel_from_index(const AVChannelLayout *channel_layout, unsigned int idx)
Get the channel with the given index in a channel layout.
@ MOV_CH_LAYOUT_AUDIOUNIT_7_0
#define AV_CH_LAYOUT_HEXAGONAL
@ MOV_CH_LAYOUT_EAC3_7_1_B
#define AV_CH_LAYOUT_6POINT0_FRONT
#define AV_CH_LAYOUT_6POINT1_FRONT
#define AV_CH_TOP_FRONT_LEFT
@ MOV_CH_LAYOUT_AMBISONIC_B_FORMAT
enum AVChannelOrder order
Channel order used in this layout.
uint64_t mask
This member must be used for AV_CHANNEL_ORDER_NATIVE, and may be used for AV_CHANNEL_ORDER_AMBISONIC ...
int nb_channels
Number of channels in this layout.
int ff_mov_get_channel_layout_tag(const AVCodecParameters *par, uint32_t *layout, uint32_t *bitmap, uint32_t **pchannel_desc)
Get the channel layout tag for the specified codec id and channel layout.
#define AV_CH_SURROUND_DIRECT_RIGHT
@ MOV_CH_LAYOUT_DTS_6_0_A
@ MOV_CH_LAYOUT_MATRIXSTEREO
#define AV_CH_LAYOUT_6POINT0
#define AV_CHANNEL_LAYOUT_7POINT1_WIDE
int ff_mov_get_channel_layout_from_config(int config, AVChannelLayout *layout)
Get AVChannelLayout from ISO/IEC 23001-8 ChannelConfiguration.
@ AV_CHAN_SURROUND_DIRECT_LEFT
@ MOV_CH_LAYOUT_MPEG_5_0_A
@ MOV_CH_LAYOUT_EAC3_7_1_C
@ MOV_CH_LAYOUT_MPEG_5_1_D
#define AV_CHANNEL_LAYOUT_7POINT1_TOP_BACK
static uint64_t mov_get_channel_layout(uint32_t tag, uint32_t bitmap)
Get the channel layout for the specified channel layout tag.
static enum MovChannelLayoutTag mov_ch_layouts_alac[]
@ MOV_CH_LAYOUT_DTS_6_0_B
union AVChannelLayout::@332 u
Details about which channels are present in this layout.
#define AV_CH_LAYOUT_STEREO
#define AV_CHANNEL_LAYOUT_SURROUND
#define AV_CH_LAYOUT_QUAD
@ AV_CHAN_STEREO_RIGHT
See above.
@ MOV_CH_LAYOUT_DTS_8_0_B
@ AV_CHAN_BOTTOM_FRONT_LEFT
@ MOV_CH_LAYOUT_EAC3_7_1_G
unsigned int avio_rb32(AVIOContext *s)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define FF_ARRAY_ELEMS(a)
@ MOV_CH_LAYOUT_AC3_1_0_1
#define AV_CH_LOW_FREQUENCY
@ MOV_CH_LAYOUT_HEXAGONAL
@ MOV_CH_LAYOUT_MPEG_5_1_C
static const uint16_t mask[17]
#define AV_CHANNEL_LAYOUT_4POINT0
#define AV_CHANNEL_LAYOUT_7POINT1
@ MOV_CH_LAYOUT_EAC3_6_1_A
@ AV_CHANNEL_ORDER_UNSPEC
Only the channel count is specified, without any further information about the channel order.
static const struct MovChannelLayoutMap mov_ch_layout_map_7ch[]
FF_ENABLE_DEPRECATION_WARNINGS int av_channel_layout_from_mask(AVChannelLayout *channel_layout, uint64_t mask)
Initialize a native channel layout from a bitmask indicating which channels are present.
int ff_mov_get_layout_from_channel_positions(const uint8_t *position, int position_num, AVChannelLayout *layout)
Get AVChannelLayout from ISO/IEC 23001-8 OutputChannelPosition.
@ MOV_CH_LAYOUT_DTS_8_1_A
#define AV_CH_LAYOUT_7POINT0_FRONT
#define AV_CH_LAYOUT_STEREO_DOWNMIX
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
@ MOV_CH_LAYOUT_DTS_8_1_B
@ MOV_CH_LAYOUT_MPEG_7_1_B
@ MOV_CH_LAYOUT_PENTAGONAL
static const AVChannelLayout iso_channel_configuration[]
#define AV_CH_STEREO_RIGHT
@ MOV_CH_LAYOUT_SMPTE_DTV
AVCodecParameters * codecpar
Codec parameters associated with this stream.
MovChannelLayoutTag
mov 'chan' tag reading/writing.
static const struct MovChannelLayoutMap mov_ch_layout_map_1ch[]
static uint64_t mov_get_channel_mask(uint32_t label)
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
@ AV_CHAN_TOP_BACK_CENTER
#define MOV_CH_LAYOUT_UNKNOWN
@ MOV_CH_LAYOUT_EAC3_6_0_A
@ MOV_CH_LAYOUT_DTS_6_1_C
#define AV_CH_LAYOUT_5POINT1
@ AV_CHAN_BOTTOM_FRONT_RIGHT
@ MOV_CH_LAYOUT_MPEG_3_0_B
int ff_mov_get_channel_positions_from_layout(const AVChannelLayout *layout, uint8_t *position, int position_num)
Get ISO/IEC 23001-8 OutputChannelPosition from AVChannelLayout.
AVChannelLayout ch_layout
Audio only.
#define AV_CH_FRONT_LEFT_OF_CENTER
mov 'chan' tag reading/writing.
@ AV_CHAN_FRONT_RIGHT_OF_CENTER
#define AV_CHANNEL_LAYOUT_22POINT2
AVCodecID
Identify the syntax and semantics of the bitstream.
int ff_mov_get_channel_config_from_layout(const AVChannelLayout *layout, int *config)
Get ISO/IEC 23001-8 ChannelConfiguration from AVChannelLayout.
@ MOV_CH_LAYOUT_EAC3_6_1_C
unsigned int avio_rl32(AVIOContext *s)
An AVChannelLayout holds information about the channel layout of audio data.
@ MOV_CH_LAYOUT_STEREOHEADPHONES
@ MOV_CH_LAYOUT_DISCRETEINORDER
@ MOV_CH_LAYOUT_MPEG_5_1_B
@ MOV_CH_LAYOUT_MPEG_7_1_A
@ MOV_CH_LAYOUT_DTS_6_1_A
#define AV_CH_LAYOUT_5POINT1_BACK
@ MOV_CH_LAYOUT_MPEG_3_0_A
@ AV_CHAN_TOP_FRONT_RIGHT
@ AV_CHANNEL_ORDER_NATIVE
The native channel order, i.e.
#define AV_CH_FRONT_RIGHT_OF_CENTER
@ AV_CHAN_FRONT_LEFT_OF_CENTER
int av_channel_layout_compare(const AVChannelLayout *chl, const AVChannelLayout *chl1)
Check whether two channel layouts are semantically the same, i.e.
#define AV_CH_LAYOUT_3POINT1
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel layout
static const struct MovChannelLayoutMap mov_ch_layout_map_5ch[]
#define AV_CH_LAYOUT_OCTAGONAL
#define AV_CH_LAYOUT_5POINT0
@ MOV_CH_LAYOUT_MPEG_5_0_D
@ MOV_CH_LAYOUT_EMAGIC_DEFAULT_7_1
static const struct MovChannelLayoutMap mov_ch_layout_map_9ch[]
static const struct MovChannelLayoutMap mov_ch_layout_map_8ch[]
@ AV_CHAN_SURROUND_DIRECT_RIGHT
#define i(width, name, range_min, range_max)
#define AV_CH_LAYOUT_2POINT1
#define av_malloc_array(a, b)
#define AV_CH_LAYOUT_7POINT1
#define AV_CH_LAYOUT_4POINT1
#define AV_CH_BACK_CENTER
@ MOV_CH_LAYOUT_MPEG_6_1_A
#define AV_CH_LAYOUT_7POINT1_WIDE
@ MOV_CH_LAYOUT_AUDIOUNIT_6_0
static const struct MovChannelLayoutMap *const mov_ch_layout_map[]
@ MOV_CH_LAYOUT_AC3_2_1_1
@ AV_CHAN_STEREO_LEFT
Stereo downmix.
void * av_calloc(size_t nmemb, size_t size)
@ MOV_CH_LAYOUT_MPEG_4_0_B
@ MOV_CH_LAYOUT_MPEG_5_0_C
#define AV_CH_LAYOUT_SURROUND
@ MOV_CH_LAYOUT_TMH_10_2_FULL
#define AV_CHANNEL_LAYOUT_2_1
@ AV_CHAN_NONE
Invalid channel index.
static const struct MovChannelLayoutMap mov_ch_layout_map_6ch[]
@ AV_CHANNEL_ORDER_CUSTOM
The channel order does not correspond to any other predefined order and is stored as an explicit map.
@ AV_CHAN_LOW_FREQUENCY_2
@ MOV_CH_LAYOUT_OCTAGONAL
@ MOV_CH_LAYOUT_EAC3_7_1_A
void av_channel_layout_uninit(AVChannelLayout *channel_layout)
Free any allocated data in the channel layout and reset the channel count to 0.
@ MOV_CH_LAYOUT_EAC3_7_0_A
int eof_reached
true if was unable to read due to error or eof
static const struct @309 mov_codec_ch_layouts[]
#define AV_CH_SURROUND_DIRECT_LEFT
@ MOV_CH_LAYOUT_MPEG_7_1_C
@ AV_CHAN_BOTTOM_FRONT_CENTER
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
int av_channel_layout_copy(AVChannelLayout *dst, const AVChannelLayout *src)
Make a copy of a channel layout.
static enum MovChannelLayoutTag mov_ch_layouts_aac[]
@ MOV_CH_LAYOUT_AAC_OCTAGONAL
@ MOV_CH_LAYOUT_DTS_6_0_C
static enum AVChannel iso_channel_position[]
@ AV_CHAN_TOP_FRONT_CENTER
static uint32_t mov_get_channel_label(enum AVChannel channel)
static const struct MovChannelLayoutMap mov_ch_layout_map_2ch[]
@ MOV_CH_LAYOUT_EAC3_7_1_E
#define AV_CHANNEL_LAYOUT_MONO
@ MOV_CH_LAYOUT_AC3_3_1_1
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
@ MOV_CH_LAYOUT_MPEG_5_0_B
@ MOV_CH_LAYOUT_DTS_6_1_B
#define AV_CH_LAYOUT_4POINT0
#define AV_CH_LAYOUT_6POINT1_BACK
static const struct MovChannelLayoutMap mov_ch_layout_map_3ch[]
#define AV_CHANNEL_LAYOUT_6POINT1
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_CH_LAYOUT_CUBE
static const struct MovChannelLayoutMap mov_ch_layout_map_misc[]
#define AV_CHANNEL_LAYOUT_5POINT0
#define AV_CH_STEREO_LEFT
#define AV_CHANNEL_LAYOUT_5POINT1
@ MOV_CH_LAYOUT_TMH_10_2_STD
static enum MovChannelLayoutTag mov_ch_layouts_wav[]
@ MOV_CH_LAYOUT_EAC3_7_1_F
static enum MovChannelLayoutTag mov_ch_layouts_ac3[]
@ MOV_CH_LAYOUT_EAC3_6_1_B
static const struct MovChannelLayoutMap mov_ch_layout_map_4ch[]
@ MOV_CH_LAYOUT_USE_BITMAP
@ MOV_CH_LAYOUT_USE_DESCRIPTIONS
int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st, int64_t size)
Read 'chan' tag from the input stream.