FFmpeg
|
#include <stdint.h>
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavcodec/codec_id.h"
#include "mov_chan.h"
Go to the source code of this file.
Data Structures | |
struct | MovChannelLayoutMap |
Macros | |
#define | TAG(_0) {.tag = _0} |
#define | ID(_0) {.id = c_##_0} |
#define | CHLIST(_0, ...) TAG(_0), __VA_ARGS__ |
#define | CHLIST01(_0, _1) CHLIST(_0, ID(_1)) |
#define | CHLIST02(_0, _1, _2) CHLIST(_0, ID(_1), ID(_2)) |
#define | CHLIST03(_0, _1, _2, _3) CHLIST(_0, ID(_1), ID(_2), ID(_3)) |
#define | CHLIST04(_0, _1, _2, _3, _4) CHLIST(_0, ID(_1), ID(_2), ID(_3), ID(_4)) |
#define | CHLIST05(_0, _1, _2, _3, _4, _5) CHLIST(_0, ID(_1), ID(_2), ID(_3), ID(_4), ID(_5)) |
#define | CHLIST06(_0, _1, _2, _3, _4, _5, _6) CHLIST(_0, ID(_1), ID(_2), ID(_3), ID(_4), ID(_5), ID(_6)) |
#define | CHLIST07(_0, _1, _2, _3, _4, _5, _6, _7) CHLIST(_0, ID(_1), ID(_2), ID(_3), ID(_4), ID(_5), ID(_6), ID(_7)) |
#define | CHLIST08(_0, _1, _2, _3, _4, _5, _6, _7, _8) CHLIST(_0, ID(_1), ID(_2), ID(_3), ID(_4), ID(_5), ID(_6), ID(_7), ID(_8)) |
#define | CHLIST09(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) CHLIST(_0, ID(_1), ID(_2), ID(_3), ID(_4), ID(_5), ID(_6), ID(_7), ID(_8), ID(_9)) |
#define | CHLIST16(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) |
#define | CHLIST21(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21) |
Enumerations | |
enum | { c_L = AV_CHAN_FRONT_LEFT, c_R = AV_CHAN_FRONT_RIGHT, c_C = AV_CHAN_FRONT_CENTER, c_LFE = AV_CHAN_LOW_FREQUENCY, c_Rls = AV_CHAN_BACK_LEFT, c_Rrs = AV_CHAN_BACK_RIGHT, c_Lc = AV_CHAN_FRONT_LEFT_OF_CENTER, c_Rc = AV_CHAN_FRONT_RIGHT_OF_CENTER, c_Cs = AV_CHAN_BACK_CENTER, c_Ls = AV_CHAN_SIDE_LEFT, c_Rs = AV_CHAN_SIDE_RIGHT, c_Ts = AV_CHAN_TOP_CENTER, c_Vhl = AV_CHAN_TOP_FRONT_LEFT, c_Vhc = AV_CHAN_TOP_FRONT_CENTER, c_Vhr = AV_CHAN_TOP_FRONT_RIGHT, c_Rlt = AV_CHAN_TOP_BACK_LEFT, c_Rrt = AV_CHAN_TOP_BACK_RIGHT, c_Lt = AV_CHAN_STEREO_LEFT, c_Rt = AV_CHAN_STEREO_RIGHT, c_Lw = AV_CHAN_WIDE_LEFT, c_Rw = AV_CHAN_WIDE_RIGHT, c_Lsd = AV_CHAN_SURROUND_DIRECT_LEFT, c_Rsd = AV_CHAN_SURROUND_DIRECT_RIGHT, c_LFE2 = AV_CHAN_LOW_FREQUENCY_2, c_W = AV_CHAN_AMBISONIC_BASE, c_Y = AV_CHAN_AMBISONIC_BASE + 1, c_Z = AV_CHAN_AMBISONIC_BASE + 2, c_X = AV_CHAN_AMBISONIC_BASE + 3, c_LFE1 = AV_CHAN_LOW_FREQUENCY, c_Csd = AV_CHAN_NONE, c_HI = AV_CHAN_NONE, c_VI = AV_CHAN_NONE, c_Haptic = AV_CHAN_NONE } |
mov 'chan' tag reading/writing. More... | |
Functions | |
static const struct MovChannelLayoutMap * | find_layout_map (uint32_t tag) |
static int | mov_get_channel_layout (AVChannelLayout *ch_layout, uint32_t tag) |
Get the channel layout for the specified non-special channel layout tag if known. More... | |
static enum AVChannel | mov_get_channel_id (uint32_t label) |
static uint32_t | mov_get_channel_label (enum AVChannel channel) |
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. More... | |
int | ff_mov_read_chan (AVFormatContext *s, AVIOContext *pb, AVStream *st, int64_t size) |
Read 'chan' tag from the input stream. More... | |
int | ff_mov_get_channel_config_from_layout (const AVChannelLayout *layout, int *config) |
Get ISO/IEC 23001-8 ChannelConfiguration from AVChannelLayout. More... | |
int | ff_mov_get_channel_layout_from_config (int config, AVChannelLayout *layout) |
Get AVChannelLayout from ISO/IEC 23001-8 ChannelConfiguration. More... | |
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. More... | |
int | ff_mov_read_chnl (AVFormatContext *s, AVIOContext *pb, AVStream *st) |
Read 'chnl' tag from the input stream. More... | |
Variables | |
static const struct MovChannelLayoutMap | mov_ch_layout_map [] |
static enum MovChannelLayoutTag | mov_ch_layouts_aac [] |
static enum MovChannelLayoutTag | mov_ch_layouts_ac3 [] |
static enum MovChannelLayoutTag | mov_ch_layouts_alac [] |
static enum MovChannelLayoutTag | mov_ch_layouts_wav [] |
struct { | |
enum AVCodecID codec_id | |
enum MovChannelLayoutTag * layouts | |
} | mov_codec_ch_layouts [] |
static const AVChannelLayout | iso_channel_configuration [] |
static enum AVChannel | iso_channel_position [] |
#define TAG | ( | _0 | ) | {.tag = _0} |
Definition at line 83 of file mov_chan.c.
#define ID | ( | _0 | ) | {.id = c_##_0} |
Definition at line 84 of file mov_chan.c.
#define CHLIST | ( | _0, | |
... | |||
) | TAG(_0), __VA_ARGS__ |
Definition at line 85 of file mov_chan.c.
Definition at line 86 of file mov_chan.c.
Definition at line 87 of file mov_chan.c.
Definition at line 88 of file mov_chan.c.
Definition at line 89 of file mov_chan.c.
Definition at line 90 of file mov_chan.c.
#define CHLIST06 | ( | _0, | |
_1, | |||
_2, | |||
_3, | |||
_4, | |||
_5, | |||
_6 | |||
) | CHLIST(_0, ID(_1), ID(_2), ID(_3), ID(_4), ID(_5), ID(_6)) |
Definition at line 91 of file mov_chan.c.
#define CHLIST07 | ( | _0, | |
_1, | |||
_2, | |||
_3, | |||
_4, | |||
_5, | |||
_6, | |||
_7 | |||
) | CHLIST(_0, ID(_1), ID(_2), ID(_3), ID(_4), ID(_5), ID(_6), ID(_7)) |
Definition at line 92 of file mov_chan.c.
#define CHLIST08 | ( | _0, | |
_1, | |||
_2, | |||
_3, | |||
_4, | |||
_5, | |||
_6, | |||
_7, | |||
_8 | |||
) | CHLIST(_0, ID(_1), ID(_2), ID(_3), ID(_4), ID(_5), ID(_6), ID(_7), ID(_8)) |
Definition at line 93 of file mov_chan.c.
#define CHLIST09 | ( | _0, | |
_1, | |||
_2, | |||
_3, | |||
_4, | |||
_5, | |||
_6, | |||
_7, | |||
_8, | |||
_9 | |||
) | CHLIST(_0, ID(_1), ID(_2), ID(_3), ID(_4), ID(_5), ID(_6), ID(_7), ID(_8), ID(_9)) |
Definition at line 94 of file mov_chan.c.
#define CHLIST16 | ( | _0, | |
_1, | |||
_2, | |||
_3, | |||
_4, | |||
_5, | |||
_6, | |||
_7, | |||
_8, | |||
_9, | |||
_10, | |||
_11, | |||
_12, | |||
_13, | |||
_14, | |||
_15, | |||
_16 | |||
) |
#define CHLIST21 | ( | _0, | |
_1, | |||
_2, | |||
_3, | |||
_4, | |||
_5, | |||
_6, | |||
_7, | |||
_8, | |||
_9, | |||
_10, | |||
_11, | |||
_12, | |||
_13, | |||
_14, | |||
_15, | |||
_16, | |||
_17, | |||
_18, | |||
_19, | |||
_20, | |||
_21 | |||
) |
anonymous enum |
mov 'chan' tag reading/writing.
Enumerator | |
---|---|
c_L | |
c_R | |
c_C | |
c_LFE | |
c_Rls | |
c_Rrs | |
c_Lc | |
c_Rc | |
c_Cs | |
c_Ls | |
c_Rs | |
c_Ts | |
c_Vhl | |
c_Vhc | |
c_Vhr | |
c_Rlt | |
c_Rrt | |
c_Lt | |
c_Rt | |
c_Lw | |
c_Rw | |
c_Lsd | |
c_Rsd | |
c_LFE2 | |
c_W | |
c_Y | |
c_Z | |
c_X | |
c_LFE1 | |
c_Csd | |
c_HI | |
c_VI | |
c_Haptic |
Definition at line 33 of file mov_chan.c.
|
static |
Definition at line 281 of file mov_chan.c.
Referenced by ff_mov_get_channel_layout_tag(), and mov_get_channel_layout().
|
static |
Get the channel layout for the specified non-special channel layout tag if known.
[in,out] | ch_layout | channel layout |
[in] | tag | channel layout tag |
Definition at line 305 of file mov_chan.c.
Referenced by ff_mov_read_chan().
|
static |
Definition at line 329 of file mov_chan.c.
Referenced by ff_mov_read_chan().
|
static |
Definition at line 348 of file mov_chan.c.
Referenced by ff_mov_get_channel_layout_tag().
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.
If the layout tag was not found, use a channel bitmap if possible.
[in] | codec_id | codec id |
[in] | channel_layout | channel layout |
[out] | bitmap | channel bitmap |
Definition at line 367 of file mov_chan.c.
Referenced by mov_write_chan_tag().
int ff_mov_read_chan | ( | AVFormatContext * | s, |
AVIOContext * | pb, | ||
AVStream * | st, | ||
int64_t | size | ||
) |
Read 'chan' tag from the input stream.
s | AVFormatContext |
pb | AVIOContext |
st | The stream to set codec values for |
size | Remaining size in the 'chan' tag |
Definition at line 443 of file mov_chan.c.
Referenced by aiff_read_header(), mov_read_chan(), and read_header().
int ff_mov_get_channel_config_from_layout | ( | const AVChannelLayout * | layout, |
int * | config | ||
) |
Get ISO/IEC 23001-8 ChannelConfiguration from AVChannelLayout.
Definition at line 724 of file mov_chan.c.
Referenced by mov_write_chnl_tag().
int ff_mov_get_channel_layout_from_config | ( | int | config, |
AVChannelLayout * | layout | ||
) |
Get AVChannelLayout from ISO/IEC 23001-8 ChannelConfiguration.
Definition at line 738 of file mov_chan.c.
Referenced by ff_mov_read_chnl().
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.
Definition at line 748 of file mov_chan.c.
Referenced by mov_write_chnl_tag().
int ff_mov_read_chnl | ( | AVFormatContext * | s, |
AVIOContext * | pb, | ||
AVStream * | st | ||
) |
Read 'chnl' tag from the input stream.
s | AVFormatContext |
pb | AVIOContext |
st | The stream to set codec values for |
Definition at line 775 of file mov_chan.c.
Referenced by mov_read_chnl().
|
static |
Definition at line 102 of file mov_chan.c.
Referenced by find_layout_map().
|
static |
Definition at line 187 of file mov_chan.c.
|
static |
Definition at line 214 of file mov_chan.c.
|
static |
Definition at line 232 of file mov_chan.c.
|
static |
Definition at line 244 of file mov_chan.c.
enum AVCodecID codec_id |
Definition at line 260 of file mov_chan.c.
Referenced by ff_mov_get_channel_layout_tag().
enum MovChannelLayoutTag* layouts |
Definition at line 261 of file mov_chan.c.
Referenced by aeval_query_formats(), asink_query_formats(), ff_mov_get_channel_layout_tag(), ff_mov_write_chan(), join_query_formats(), main(), print_formats_internal(), and query_formats().
const { ... } mov_codec_ch_layouts[] |
Referenced by ff_mov_get_channel_layout_tag().
|
static |
Definition at line 540 of file mov_chan.c.
Referenced by ff_mov_get_channel_config_from_layout(), and ff_mov_get_channel_layout_from_config().
|
static |
Definition at line 594 of file mov_chan.c.
Referenced by ff_mov_get_channel_positions_from_layout(), and ff_mov_read_chnl().