00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AVUTIL_AUDIOCONVERT_H
00023 #define AVUTIL_AUDIOCONVERT_H
00024
00025 #include <stdint.h>
00026
00041 #define AV_CH_FRONT_LEFT 0x00000001
00042 #define AV_CH_FRONT_RIGHT 0x00000002
00043 #define AV_CH_FRONT_CENTER 0x00000004
00044 #define AV_CH_LOW_FREQUENCY 0x00000008
00045 #define AV_CH_BACK_LEFT 0x00000010
00046 #define AV_CH_BACK_RIGHT 0x00000020
00047 #define AV_CH_FRONT_LEFT_OF_CENTER 0x00000040
00048 #define AV_CH_FRONT_RIGHT_OF_CENTER 0x00000080
00049 #define AV_CH_BACK_CENTER 0x00000100
00050 #define AV_CH_SIDE_LEFT 0x00000200
00051 #define AV_CH_SIDE_RIGHT 0x00000400
00052 #define AV_CH_TOP_CENTER 0x00000800
00053 #define AV_CH_TOP_FRONT_LEFT 0x00001000
00054 #define AV_CH_TOP_FRONT_CENTER 0x00002000
00055 #define AV_CH_TOP_FRONT_RIGHT 0x00004000
00056 #define AV_CH_TOP_BACK_LEFT 0x00008000
00057 #define AV_CH_TOP_BACK_CENTER 0x00010000
00058 #define AV_CH_TOP_BACK_RIGHT 0x00020000
00059 #define AV_CH_STEREO_LEFT 0x20000000
00060 #define AV_CH_STEREO_RIGHT 0x40000000
00061 #define AV_CH_WIDE_LEFT 0x0000000080000000ULL
00062 #define AV_CH_WIDE_RIGHT 0x0000000100000000ULL
00063 #define AV_CH_SURROUND_DIRECT_LEFT 0x0000000200000000ULL
00064 #define AV_CH_SURROUND_DIRECT_RIGHT 0x0000000400000000ULL
00065
00069 #define AV_CH_LAYOUT_NATIVE 0x8000000000000000ULL
00070
00076 #define AV_CH_LAYOUT_MONO (AV_CH_FRONT_CENTER)
00077 #define AV_CH_LAYOUT_STEREO (AV_CH_FRONT_LEFT|AV_CH_FRONT_RIGHT)
00078 #define AV_CH_LAYOUT_2POINT1 (AV_CH_LAYOUT_STEREO|AV_CH_LOW_FREQUENCY)
00079 #define AV_CH_LAYOUT_2_1 (AV_CH_LAYOUT_STEREO|AV_CH_BACK_CENTER)
00080 #define AV_CH_LAYOUT_SURROUND (AV_CH_LAYOUT_STEREO|AV_CH_FRONT_CENTER)
00081 #define AV_CH_LAYOUT_3POINT1 (AV_CH_LAYOUT_SURROUND|AV_CH_LOW_FREQUENCY)
00082 #define AV_CH_LAYOUT_4POINT0 (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_CENTER)
00083 #define AV_CH_LAYOUT_4POINT1 (AV_CH_LAYOUT_4POINT0|AV_CH_LOW_FREQUENCY)
00084 #define AV_CH_LAYOUT_2_2 (AV_CH_LAYOUT_STEREO|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)
00085 #define AV_CH_LAYOUT_QUAD (AV_CH_LAYOUT_STEREO|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
00086 #define AV_CH_LAYOUT_5POINT0 (AV_CH_LAYOUT_SURROUND|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT)
00087 #define AV_CH_LAYOUT_5POINT1 (AV_CH_LAYOUT_5POINT0|AV_CH_LOW_FREQUENCY)
00088 #define AV_CH_LAYOUT_5POINT0_BACK (AV_CH_LAYOUT_SURROUND|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
00089 #define AV_CH_LAYOUT_5POINT1_BACK (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_LOW_FREQUENCY)
00090 #define AV_CH_LAYOUT_6POINT0 (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_CENTER)
00091 #define AV_CH_LAYOUT_6POINT0_FRONT (AV_CH_LAYOUT_2_2|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
00092 #define AV_CH_LAYOUT_HEXAGONAL (AV_CH_LAYOUT_5POINT0_BACK|AV_CH_BACK_CENTER)
00093 #define AV_CH_LAYOUT_6POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_CENTER)
00094 #define AV_CH_LAYOUT_6POINT1_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_BACK_CENTER)
00095 #define AV_CH_LAYOUT_6POINT1_FRONT (AV_CH_LAYOUT_6POINT0_FRONT|AV_CH_LOW_FREQUENCY)
00096 #define AV_CH_LAYOUT_7POINT0 (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
00097 #define AV_CH_LAYOUT_7POINT0_FRONT (AV_CH_LAYOUT_5POINT0|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
00098 #define AV_CH_LAYOUT_7POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
00099 #define AV_CH_LAYOUT_7POINT1_WIDE (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
00100 #define AV_CH_LAYOUT_OCTAGONAL (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT)
00101 #define AV_CH_LAYOUT_STEREO_DOWNMIX (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)
00102
00122 uint64_t av_get_channel_layout(const char *name);
00123
00131 void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout);
00132
00136 int av_get_channel_layout_nb_channels(uint64_t channel_layout);
00137
00141 int64_t av_get_default_channel_layout(int nb_channels);
00142
00147 #endif