OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 {120, "opus", 48000, 960, 2, 64000}, | 95 {120, "opus", 48000, 960, 2, 64000}, |
96 #endif | 96 #endif |
97 // Comfort noise for four different sampling frequencies. | 97 // Comfort noise for four different sampling frequencies. |
98 {13, "CN", 8000, 240, 1, 0}, | 98 {13, "CN", 8000, 240, 1, 0}, |
99 {98, "CN", 16000, 480, 1, 0}, | 99 {98, "CN", 16000, 480, 1, 0}, |
100 {99, "CN", 32000, 960, 1, 0}, | 100 {99, "CN", 32000, 960, 1, 0}, |
101 #ifdef ENABLE_48000_HZ | 101 #ifdef ENABLE_48000_HZ |
102 {100, "CN", 48000, 1440, 1, 0}, | 102 {100, "CN", 48000, 1440, 1, 0}, |
103 #endif | 103 #endif |
104 {106, "telephone-event", 8000, 240, 1, 0}, | 104 {106, "telephone-event", 8000, 240, 1, 0}, |
| 105 {114, "telephone-event", 16000, 240, 1, 0}, // TODO: |
| 106 {115, "telephone-event", 32000, 240, 1, 0}, // TODO: |
| 107 {116, "telephone-event", 48000, 240, 1, 0}, // TODO: |
105 #ifdef WEBRTC_CODEC_RED | 108 #ifdef WEBRTC_CODEC_RED |
106 {127, "red", 8000, 0, 1, 0}, | 109 {127, "red", 8000, 0, 1, 0}, |
107 #endif | 110 #endif |
108 // To prevent compile errors due to trailing commas. | 111 // To prevent compile errors due to trailing commas. |
109 {-1, "Null", -1, -1, 0, -1} | 112 {-1, "Null", -1, -1, 0, -1} |
110 }; | 113 }; |
111 | 114 |
112 // Create database with all codec settings at compile time. | 115 // Create database with all codec settings at compile time. |
113 // Each entry needs the following parameters in the given order: | 116 // Each entry needs the following parameters in the given order: |
114 // Number of allowed packet sizes, a vector with the allowed packet sizes, | 117 // Number of allowed packet sizes, a vector with the allowed packet sizes, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 {4, {480, 960, 1920, 2880}, 0, 2}, | 154 {4, {480, 960, 1920, 2880}, 0, 2}, |
152 #endif | 155 #endif |
153 // Comfort noise for three different sampling frequencies. | 156 // Comfort noise for three different sampling frequencies. |
154 {1, {240}, 240, 1}, | 157 {1, {240}, 240, 1}, |
155 {1, {480}, 480, 1}, | 158 {1, {480}, 480, 1}, |
156 {1, {960}, 960, 1}, | 159 {1, {960}, 960, 1}, |
157 #ifdef ENABLE_48000_HZ | 160 #ifdef ENABLE_48000_HZ |
158 {1, {1440}, 1440, 1}, | 161 {1, {1440}, 1440, 1}, |
159 #endif | 162 #endif |
160 {1, {240}, 240, 1}, | 163 {1, {240}, 240, 1}, |
| 164 {1, {240}, 240, 1}, |
| 165 {1, {240}, 240, 1}, |
| 166 {1, {240}, 240, 1}, |
161 #ifdef WEBRTC_CODEC_RED | 167 #ifdef WEBRTC_CODEC_RED |
162 {1, {0}, 0, 1}, | 168 {1, {0}, 0, 1}, |
163 #endif | 169 #endif |
164 // To prevent compile errors due to trailing commas. | 170 // To prevent compile errors due to trailing commas. |
165 {-1, {-1}, -1, 0} | 171 {-1, {-1}, -1, 0} |
166 }; | 172 }; |
167 | 173 |
168 // Create a database of all NetEQ decoders at compile time. | 174 // Create a database of all NetEQ decoders at compile time. |
169 const NetEqDecoder ACMCodecDB::neteq_decoders_[] = { | 175 const NetEqDecoder ACMCodecDB::neteq_decoders_[] = { |
170 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) | 176 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) |
(...skipping 25 matching lines...) Expand all Loading... |
196 #ifdef WEBRTC_CODEC_OPUS | 202 #ifdef WEBRTC_CODEC_OPUS |
197 // Mono and stereo. | 203 // Mono and stereo. |
198 NetEqDecoder::kDecoderOpus, | 204 NetEqDecoder::kDecoderOpus, |
199 #endif | 205 #endif |
200 // Comfort noise for three different sampling frequencies. | 206 // Comfort noise for three different sampling frequencies. |
201 NetEqDecoder::kDecoderCNGnb, NetEqDecoder::kDecoderCNGwb, | 207 NetEqDecoder::kDecoderCNGnb, NetEqDecoder::kDecoderCNGwb, |
202 NetEqDecoder::kDecoderCNGswb32kHz, | 208 NetEqDecoder::kDecoderCNGswb32kHz, |
203 #ifdef ENABLE_48000_HZ | 209 #ifdef ENABLE_48000_HZ |
204 NetEqDecoder::kDecoderCNGswb48kHz, | 210 NetEqDecoder::kDecoderCNGswb48kHz, |
205 #endif | 211 #endif |
206 NetEqDecoder::kDecoderAVT, | 212 NetEqDecoder::kDecoderAVT8kHz, |
| 213 NetEqDecoder::kDecoderAVT16kHz, |
| 214 NetEqDecoder::kDecoderAVT32kHz, |
| 215 NetEqDecoder::kDecoderAVT48kHz, |
207 #ifdef WEBRTC_CODEC_RED | 216 #ifdef WEBRTC_CODEC_RED |
208 NetEqDecoder::kDecoderRED, | 217 NetEqDecoder::kDecoderRED, |
209 #endif | 218 #endif |
210 }; | 219 }; |
211 | 220 |
212 // Enumerator for error codes when asking for codec database id. | 221 // Enumerator for error codes when asking for codec database id. |
213 enum { | 222 enum { |
214 kInvalidCodec = -10, | 223 kInvalidCodec = -10, |
215 kInvalidPayloadtype = -30, | 224 kInvalidPayloadtype = -30, |
216 kInvalidPacketSize = -40, | 225 kInvalidPacketSize = -40, |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 } | 333 } |
325 // Gets codec id number from database for the receiver. | 334 // Gets codec id number from database for the receiver. |
326 int ACMCodecDB::ReceiverCodecNumber(const CodecInst& codec_inst) { | 335 int ACMCodecDB::ReceiverCodecNumber(const CodecInst& codec_inst) { |
327 // Look for a matching codec in the database. | 336 // Look for a matching codec in the database. |
328 return CodecId(codec_inst); | 337 return CodecId(codec_inst); |
329 } | 338 } |
330 | 339 |
331 } // namespace acm2 | 340 } // namespace acm2 |
332 | 341 |
333 } // namespace webrtc | 342 } // namespace webrtc |
OLD | NEW |