48 #define MOV_CH_LAYOUT_UNKNOWN 0xFFFF0000
432 static const struct {
465 return bitmap < 0x40000 ? bitmap : 0;
474 for (
i = 0; layout_map[
i].
tag != 0;
i++) {
486 return 1U << (label - 1);
495 uint64_t channel_layout,
524 for (j = 0; layout_map[j].
tag != 0; j++) {
526 layout_map[j].
layout == channel_layout)
529 if (layout_map[j].
tag)
536 if (
tag == 0 && channel_layout > 0 && channel_layout < 0x40000) {
538 *bitmap = (uint32_t)channel_layout;
550 uint32_t layout_tag, bitmap, num_descr, label_mask;
561 "bitmap=%"PRIu32
" num_descr=%"PRIu32
"\n",
562 layout_tag, bitmap, num_descr);
564 if (
size < 12ULL + num_descr * 20ULL)
568 for (
i = 0;
i < num_descr;
i++) {
572 "reached EOF while reading channel layout\n");
581 if (layout_tag == 0) {
583 if (mask_incr == 0) {
587 label_mask |= mask_incr;
590 if (layout_tag == 0) {
Libavcodec external API header.
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
unsigned int avio_rl32(AVIOContext *s)
unsigned int avio_rb32(AVIOContext *s)
audio channel layout utility functions
#define AV_CH_LAYOUT_2POINT1
#define AV_CH_LAYOUT_QUAD
#define AV_CH_LAYOUT_6POINT1
#define AV_CH_LAYOUT_4POINT0
#define AV_CH_LAYOUT_6POINT0
#define AV_CH_LAYOUT_5POINT0
#define AV_CH_LAYOUT_7POINT1
#define AV_CH_LAYOUT_STEREO_DOWNMIX
#define AV_CH_LAYOUT_HEXAGONAL
#define AV_CH_LAYOUT_MONO
#define AV_CH_LAYOUT_SURROUND
#define AV_CH_LAYOUT_6POINT0_FRONT
#define AV_CH_LAYOUT_7POINT1_WIDE
#define AV_CH_LAYOUT_6POINT1_FRONT
#define AV_CH_LAYOUT_7POINT0_FRONT
#define AV_CH_LAYOUT_OCTAGONAL
#define AV_CH_LAYOUT_6POINT1_BACK
#define AV_CH_LAYOUT_5POINT0_BACK
#define AV_CH_LAYOUT_7POINT0
#define AV_CH_LAYOUT_STEREO
#define AV_CH_LAYOUT_5POINT1
int av_get_channel_layout_nb_channels(uint64_t channel_layout)
Return the number of channels in the channel layout.
#define AV_CH_LAYOUT_4POINT1
#define AV_CH_LAYOUT_3POINT1
#define AV_CH_LAYOUT_5POINT1_BACK
#define AV_CH_SURROUND_DIRECT_RIGHT
#define AV_CH_TOP_FRONT_LEFT
#define AV_CH_FRONT_RIGHT_OF_CENTER
#define AV_CH_BACK_CENTER
#define AV_CH_TOP_FRONT_CENTER
#define AV_CH_FRONT_LEFT_OF_CENTER
#define AV_CH_TOP_BACK_RIGHT
#define AV_CH_TOP_BACK_LEFT
#define AV_CH_LOW_FREQUENCY
#define AV_CH_STEREO_RIGHT
See AV_CH_STEREO_LEFT.
#define AV_CH_TOP_FRONT_RIGHT
#define AV_CH_STEREO_LEFT
Stereo downmix.
#define AV_CH_SURROUND_DIRECT_LEFT
AVCodecID
Identify the syntax and semantics of the bitstream.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
enum MovChannelLayoutTag * layouts
static enum MovChannelLayoutTag mov_ch_layouts_ac3[]
static const struct MovChannelLayoutMap mov_ch_layout_map_4ch[]
int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st, int64_t size)
Read 'chan' tag from the input stream.
uint32_t ff_mov_get_channel_layout_tag(enum AVCodecID codec_id, uint64_t channel_layout, uint32_t *bitmap)
Get the channel layout tag for the specified codec id and channel layout.
MovChannelLayoutTag
mov 'chan' tag reading/writing.
@ MOV_CH_LAYOUT_EAC3_7_1_C
@ MOV_CH_LAYOUT_EMAGIC_DEFAULT_7_1
@ MOV_CH_LAYOUT_MPEG_7_1_A
@ MOV_CH_LAYOUT_QUADRAPHONIC
@ MOV_CH_LAYOUT_DTS_6_1_C
@ MOV_CH_LAYOUT_STEREOHEADPHONES
@ MOV_CH_LAYOUT_DTS_6_0_B
@ MOV_CH_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MOV_CH_LAYOUT_MPEG_5_0_D
@ MOV_CH_LAYOUT_AC3_2_1_1
@ MOV_CH_LAYOUT_MPEG_3_0_B
@ MOV_CH_LAYOUT_DTS_6_0_A
@ MOV_CH_LAYOUT_AUDIOUNIT_7_0
@ MOV_CH_LAYOUT_USE_BITMAP
@ MOV_CH_LAYOUT_MPEG_4_0_A
@ MOV_CH_LAYOUT_EAC3_7_1_D
@ MOV_CH_LAYOUT_HEXAGONAL
@ MOV_CH_LAYOUT_MPEG_7_1_C
@ MOV_CH_LAYOUT_DTS_8_1_B
@ MOV_CH_LAYOUT_MPEG_5_1_D
@ MOV_CH_LAYOUT_SMPTE_DTV
@ MOV_CH_LAYOUT_OCTAGONAL
@ MOV_CH_LAYOUT_EAC3_7_1_F
@ MOV_CH_LAYOUT_MPEG_6_1_A
@ MOV_CH_LAYOUT_AMBISONIC_B_FORMAT
static const struct MovChannelLayoutMap mov_ch_layout_map_5ch[]
static const struct MovChannelLayoutMap mov_ch_layout_map_1ch[]
static enum MovChannelLayoutTag mov_ch_layouts_wav[]
static const struct @266 mov_codec_ch_layouts[]
static const struct MovChannelLayoutMap *const mov_ch_layout_map[]
static const struct MovChannelLayoutMap mov_ch_layout_map_7ch[]
static const struct MovChannelLayoutMap mov_ch_layout_map_6ch[]
uint64_t ff_mov_get_channel_layout(uint32_t tag, uint32_t bitmap)
mov 'chan' tag reading/writing.
static const struct MovChannelLayoutMap mov_ch_layout_map_3ch[]
static const struct MovChannelLayoutMap mov_ch_layout_map_9ch[]
#define MOV_CH_LAYOUT_UNKNOWN
static uint32_t mov_get_channel_label(uint32_t label)
static const struct MovChannelLayoutMap mov_ch_layout_map_misc[]
static const struct MovChannelLayoutMap mov_ch_layout_map_8ch[]
static enum MovChannelLayoutTag mov_ch_layouts_aac[]
static const struct MovChannelLayoutMap mov_ch_layout_map_2ch[]
static enum MovChannelLayoutTag mov_ch_layouts_alac[]
uint64_t channel_layout
Audio only.
int eof_reached
true if was unable to read due to error or eof
AVCodecParameters * codecpar
Codec parameters associated with this stream.