Mercurial > libavcodec.hg
comparison audioconvert.c @ 12425:d23e48091c51 libavcodec
Implement avcodec_get_channel_layout().
Patch by S.N. Hemanth Meenakshisundaram smeenaks:ucsd+edu.
author | stefano |
---|---|
date | Thu, 26 Aug 2010 00:38:25 +0000 |
parents | b37112450ec0 |
children |
comparison
equal
deleted
inserted
replaced
12424:fbdc4391dedc | 12425:d23e48091c51 |
---|---|
118 { "7.1", 8, CH_LAYOUT_7POINT1 }, | 118 { "7.1", 8, CH_LAYOUT_7POINT1 }, |
119 { "7.1(wide)", 8, CH_LAYOUT_7POINT1_WIDE }, | 119 { "7.1(wide)", 8, CH_LAYOUT_7POINT1_WIDE }, |
120 { "7.1+downmix", 10, CH_LAYOUT_7POINT1|CH_LAYOUT_STEREO_DOWNMIX, }, | 120 { "7.1+downmix", 10, CH_LAYOUT_7POINT1|CH_LAYOUT_STEREO_DOWNMIX, }, |
121 { 0 } | 121 { 0 } |
122 }; | 122 }; |
123 | |
124 int64_t avcodec_get_channel_layout(const char *name) | |
125 { | |
126 int i = 0; | |
127 do { | |
128 if (!strcmp(channel_layout_map[i].name, name)) | |
129 return channel_layout_map[i].layout; | |
130 i++; | |
131 } while (channel_layout_map[i].name); | |
132 | |
133 return 0; | |
134 } | |
123 | 135 |
124 void avcodec_get_channel_layout_string(char *buf, int buf_size, int nb_channels, int64_t channel_layout) | 136 void avcodec_get_channel_layout_string(char *buf, int buf_size, int nb_channels, int64_t channel_layout) |
125 { | 137 { |
126 int i; | 138 int i; |
127 | 139 |