48 #define MOV_CH_LAYOUT_UNKNOWN 0xFFFF0000
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 "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) {
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.
#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[]
uint64_t channel_layout
Audio only.
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[]
#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
static const struct @213 mov_codec_ch_layouts[]
#define AV_CH_FRONT_RIGHT_OF_CENTER
static const struct MovChannelLayoutMap mov_ch_layout_map_4ch[]
Libavcodec external API header.
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
#define MOV_CH_LAYOUT_UNKNOWN
static const struct MovChannelLayoutMap *const mov_ch_layout_map[]
AVCodecParameters * codecpar
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.