432 static const struct {
465 return bitmap < 0x40000 ? bitmap : 0;
468 channels = tag & 0xFFFF;
471 layout_map = mov_ch_layout_map[channels];
474 for (i = 0; layout_map[i].
tag != 0; i++) {
475 if (layout_map[i].tag == tag)
478 return layout_map[i].
layout;
486 return 1
U << (label - 1);
495 uint64_t channel_layout,
518 layout_map = mov_ch_layout_map[channels];
521 for (i = 0; layouts[i] != 0; i++) {
522 if ((layouts[i] & 0xFFFF) != channels)
524 for (j = 0; layout_map[j].
tag != 0; j++) {
525 if (layout_map[j].tag == layouts[i] &&
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 layout_tag, bitmap, num_descr);
563 if (size < 12ULL + num_descr * 20ULL)
567 for (i = 0; i < num_descr; i++) {
571 "reached EOF while reading channel layout\n");
580 if (layout_tag == 0) {
582 if (mask_incr == 0) {
586 label_mask |= mask_incr;
589 if (layout_tag == 0) {
static const struct MovChannelLayoutMap mov_ch_layout_map_8ch[]
#define AV_CH_LAYOUT_7POINT1
#define AV_CH_LAYOUT_4POINT1
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_CH_TOP_FRONT_RIGHT
#define AV_CH_LAYOUT_6POINT1
#define AV_CH_LAYOUT_6POINT0
#define AV_CH_LAYOUT_SURROUND
MovChannelLayoutTag
mov 'chan' tag reading/writing.
#define AV_CH_TOP_FRONT_LEFT
#define AV_CH_TOP_FRONT_CENTER
static const struct MovChannelLayoutMap mov_ch_layout_map_2ch[]
static const struct MovChannelLayoutMap mov_ch_layout_map_6ch[]
#define AV_CH_LAYOUT_7POINT0_FRONT
uint64_t ff_mov_get_channel_layout(uint32_t tag, uint32_t bitmap)
mov 'chan' tag reading/writing.
#define AV_CH_LAYOUT_4POINT0
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
#define AV_CH_LAYOUT_7POINT0
#define AV_CH_SURROUND_DIRECT_RIGHT
#define AV_CH_LAYOUT_STEREO
#define AV_CH_LAYOUT_5POINT0
int av_get_channel_layout_nb_channels(uint64_t channel_layout)
Return the number of channels in the channel layout.
static const struct @168 mov_codec_ch_layouts[]
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development.
unsigned int avio_rb32(AVIOContext *s)
#define AV_CH_TOP_BACK_LEFT
#define AV_CH_LAYOUT_HEXAGONAL
#define AV_CH_LOW_FREQUENCY
static enum MovChannelLayoutTag mov_ch_layouts_wav[]
static const struct MovChannelLayoutMap mov_ch_layout_map_9ch[]
#define AV_CH_LAYOUT_5POINT1
AVCodecID
Identify the syntax and semantics of the bitstream.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
unsigned int avio_rl32(AVIOContext *s)
#define AV_CH_LAYOUT_QUAD
static const struct MovChannelLayoutMap mov_ch_layout_map_3ch[]
Libavcodec external API header.
uint64_t channel_layout
Audio channel layout.
AVCodecContext * codec
Codec context associated with this stream.
#define AV_CH_LAYOUT_6POINT0_FRONT
#define AV_CH_STEREO_RIGHT
See AV_CH_STEREO_LEFT.
audio channel layout utility functions
#define AV_CH_LAYOUT_STEREO_DOWNMIX
#define AV_CH_LAYOUT_3POINT1
static enum MovChannelLayoutTag mov_ch_layouts_alac[]
#define AV_CH_FRONT_LEFT_OF_CENTER
#define AV_CH_LAYOUT_5POINT1_BACK
static enum MovChannelLayoutTag mov_ch_layouts_ac3[]
int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st, int64_t size)
Read 'chan' tag from the input stream.
#define AV_CH_LAYOUT_6POINT1_BACK
#define AV_CH_FRONT_RIGHT_OF_CENTER
static const struct MovChannelLayoutMap mov_ch_layout_map_4ch[]
static const struct MovChannelLayoutMap mov_ch_layout_map_1ch[]
static enum MovChannelLayoutTag mov_ch_layouts_aac[]
static uint32_t mov_get_channel_label(uint32_t label)
#define AV_CH_TOP_BACK_RIGHT
static const struct MovChannelLayoutMap mov_ch_layout_map_misc[]
#define AV_CH_LAYOUT_5POINT0_BACK
#define AV_CH_LAYOUT_OCTAGONAL
enum MovChannelLayoutTag * layouts
#define AV_CH_BACK_CENTER
#define AV_CH_LAYOUT_7POINT1_WIDE
static const struct MovChannelLayoutMap mov_ch_layout_map_7ch[]
#define AV_CH_LAYOUT_2POINT1
static const struct MovChannelLayoutMap mov_ch_layout_map_5ch[]
int eof_reached
true if eof reached
#define AV_CH_SURROUND_DIRECT_LEFT
#define AV_CH_LAYOUT_6POINT1_FRONT
static const struct MovChannelLayoutMap *const mov_ch_layout_map[]
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.
#define AV_CH_LAYOUT_MONO
#define AV_CH_STEREO_LEFT
Stereo downmix.