Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: webrtc/modules/audio_coding/acm2/acm_codec_database.cc

Issue 2337473002: Multi frequency DTMF support - receiver side (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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},
106 {115, "telephone-event", 32000, 240, 1, 0},
107 {116, "telephone-event", 48000, 240, 1, 0},
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 #ifdef WEBRTC_CODEC_OPUS 150 #ifdef WEBRTC_CODEC_OPUS
148 // Opus supports frames shorter than 10ms, 151 // Opus supports frames shorter than 10ms,
149 // but it doesn't help us to use them. 152 // but it doesn't help us to use them.
150 // Mono and stereo. 153 // Mono and stereo.
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},
160 // TODO(solenberg): What is this flag? It is never set in the build files.
157 #ifdef ENABLE_48000_HZ 161 #ifdef ENABLE_48000_HZ
158 {1, {1440}, 1440, 1}, 162 {1, {1440}, 1440, 1},
159 #endif 163 #endif
160 {1, {240}, 240, 1}, 164 {1, {240}, 240, 1},
165 {1, {240}, 240, 1},
166 {1, {240}, 240, 1},
167 {1, {240}, 240, 1},
161 #ifdef WEBRTC_CODEC_RED 168 #ifdef WEBRTC_CODEC_RED
162 {1, {0}, 0, 1}, 169 {1, {0}, 0, 1},
163 #endif 170 #endif
164 // To prevent compile errors due to trailing commas. 171 // To prevent compile errors due to trailing commas.
165 {-1, {-1}, -1, 0} 172 {-1, {-1}, -1, 0}
166 }; 173 };
167 174
168 // Create a database of all NetEQ decoders at compile time. 175 // Create a database of all NetEQ decoders at compile time.
169 const NetEqDecoder ACMCodecDB::neteq_decoders_[] = { 176 const NetEqDecoder ACMCodecDB::neteq_decoders_[] = {
170 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) 177 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX))
(...skipping 26 matching lines...) Expand all
197 // Mono and stereo. 204 // Mono and stereo.
198 NetEqDecoder::kDecoderOpus, 205 NetEqDecoder::kDecoderOpus,
199 #endif 206 #endif
200 // Comfort noise for three different sampling frequencies. 207 // Comfort noise for three different sampling frequencies.
201 NetEqDecoder::kDecoderCNGnb, NetEqDecoder::kDecoderCNGwb, 208 NetEqDecoder::kDecoderCNGnb, NetEqDecoder::kDecoderCNGwb,
202 NetEqDecoder::kDecoderCNGswb32kHz, 209 NetEqDecoder::kDecoderCNGswb32kHz,
203 #ifdef ENABLE_48000_HZ 210 #ifdef ENABLE_48000_HZ
204 NetEqDecoder::kDecoderCNGswb48kHz, 211 NetEqDecoder::kDecoderCNGswb48kHz,
205 #endif 212 #endif
206 NetEqDecoder::kDecoderAVT, 213 NetEqDecoder::kDecoderAVT,
214 NetEqDecoder::kDecoderAVT16kHz,
215 NetEqDecoder::kDecoderAVT32kHz,
216 NetEqDecoder::kDecoderAVT48kHz,
207 #ifdef WEBRTC_CODEC_RED 217 #ifdef WEBRTC_CODEC_RED
208 NetEqDecoder::kDecoderRED, 218 NetEqDecoder::kDecoderRED,
209 #endif 219 #endif
210 }; 220 };
211 221
212 // Enumerator for error codes when asking for codec database id. 222 // Enumerator for error codes when asking for codec database id.
213 enum { 223 enum {
214 kInvalidCodec = -10, 224 kInvalidCodec = -10,
215 kInvalidPayloadtype = -30, 225 kInvalidPayloadtype = -30,
216 kInvalidPacketSize = -40, 226 kInvalidPacketSize = -40,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 } 334 }
325 // Gets codec id number from database for the receiver. 335 // Gets codec id number from database for the receiver.
326 int ACMCodecDB::ReceiverCodecNumber(const CodecInst& codec_inst) { 336 int ACMCodecDB::ReceiverCodecNumber(const CodecInst& codec_inst) {
327 // Look for a matching codec in the database. 337 // Look for a matching codec in the database.
328 return CodecId(codec_inst); 338 return CodecId(codec_inst);
329 } 339 }
330 340
331 } // namespace acm2 341 } // namespace acm2
332 342
333 } // namespace webrtc 343 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvoiceengine_unittest.cc ('k') | webrtc/modules/audio_coding/acm2/acm_receive_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698