Revision 9d9b9d32 libavcodec/audioconvert.c

View differences:

libavcodec/audioconvert.c
89 89
int64_t avcodec_guess_channel_layout(int nb_channels, enum CodecID codec_id, const char *fmt_name)
90 90
{
91 91
    switch(nb_channels) {
92
    case 1: return CHANNEL_LAYOUT_MONO;
93
    case 2: return CHANNEL_LAYOUT_STEREO;
94
    case 3: return CHANNEL_LAYOUT_SURROUND;
95
    case 4: return CHANNEL_LAYOUT_QUAD;
96
    case 5: return CHANNEL_LAYOUT_5POINT0;
97
    case 6: return CHANNEL_LAYOUT_5POINT1;
98
    case 8: return CHANNEL_LAYOUT_7POINT1;
92
    case 1: return CH_LAYOUT_MONO;
93
    case 2: return CH_LAYOUT_STEREO;
94
    case 3: return CH_LAYOUT_SURROUND;
95
    case 4: return CH_LAYOUT_QUAD;
96
    case 5: return CH_LAYOUT_5POINT0;
97
    case 6: return CH_LAYOUT_5POINT1;
98
    case 8: return CH_LAYOUT_7POINT1;
99 99
    default: return 0;
100 100
    }
101 101
}
......
105 105
    int         nb_channels;
106 106
    int64_t     layout;
107 107
} const channel_layout_map[] = {
108
    { "mono",        1,  CHANNEL_LAYOUT_MONO },
109
    { "stereo",      2,  CHANNEL_LAYOUT_STEREO },
110
    { "surround",    3,  CHANNEL_LAYOUT_SURROUND },
111
    { "quad",        4,  CHANNEL_LAYOUT_QUAD },
112
    { "5.0",         5,  CHANNEL_LAYOUT_5POINT0 },
113
    { "5.1",         6,  CHANNEL_LAYOUT_5POINT1 },
114
    { "5.1+downmix", 8,  CHANNEL_LAYOUT_5POINT1|CHANNEL_LAYOUT_STEREO_DOWNMIX, },
115
    { "7.1",         8,  CHANNEL_LAYOUT_7POINT1 },
116
    { "7.1(wide)",   8,  CHANNEL_LAYOUT_7POINT1_WIDE },
117
    { "7.1+downmix", 10, CHANNEL_LAYOUT_7POINT1|CHANNEL_LAYOUT_STEREO_DOWNMIX, },
108
    { "mono",        1,  CH_LAYOUT_MONO },
109
    { "stereo",      2,  CH_LAYOUT_STEREO },
110
    { "surround",    3,  CH_LAYOUT_SURROUND },
111
    { "quad",        4,  CH_LAYOUT_QUAD },
112
    { "5.0",         5,  CH_LAYOUT_5POINT0 },
113
    { "5.1",         6,  CH_LAYOUT_5POINT1 },
114
    { "5.1+downmix", 8,  CH_LAYOUT_5POINT1|CH_LAYOUT_STEREO_DOWNMIX, },
115
    { "7.1",         8,  CH_LAYOUT_7POINT1 },
116
    { "7.1(wide)",   8,  CH_LAYOUT_7POINT1_WIDE },
117
    { "7.1+downmix", 10, CH_LAYOUT_7POINT1|CH_LAYOUT_STEREO_DOWNMIX, },
118 118
    { 0 }
119 119
};
120 120

  

Also available in: Unified diff