NetEq decoder database: Don't keep track of sample rate for builtin decoders

This allows us to get rid of the function that computes it, which gets
us one step closer to getting rid of the NetEqDecoder type.

BUG=webrtc:5801

Review-Url: https://codereview.webrtc.org/2021063002
Cr-Commit-Position: refs/heads/master@{#12974}
This commit is contained in:
kwiberg
2016-05-31 06:28:03 -07:00
committed by Commit bot
parent 799467d753
commit c0f2dcf9ed
15 changed files with 157 additions and 198 deletions

View File

@ -82,59 +82,4 @@ bool CodecSupported(NetEqDecoder codec_type) {
}
}
int CodecSampleRateHz(NetEqDecoder codec_type) {
switch (codec_type) {
case NetEqDecoder::kDecoderPCMu:
case NetEqDecoder::kDecoderPCMa:
case NetEqDecoder::kDecoderPCMu_2ch:
case NetEqDecoder::kDecoderPCMa_2ch:
#ifdef WEBRTC_CODEC_ILBC
case NetEqDecoder::kDecoderILBC:
#endif
case NetEqDecoder::kDecoderPCM16B:
case NetEqDecoder::kDecoderPCM16B_2ch:
case NetEqDecoder::kDecoderPCM16B_5ch:
case NetEqDecoder::kDecoderCNGnb: {
return 8000;
}
#if defined(WEBRTC_CODEC_ISACFX) || defined(WEBRTC_CODEC_ISAC)
case NetEqDecoder::kDecoderISAC:
#endif
case NetEqDecoder::kDecoderPCM16Bwb:
case NetEqDecoder::kDecoderPCM16Bwb_2ch:
#ifdef WEBRTC_CODEC_G722
case NetEqDecoder::kDecoderG722:
case NetEqDecoder::kDecoderG722_2ch:
#endif
case NetEqDecoder::kDecoderCNGwb: {
return 16000;
}
#ifdef WEBRTC_CODEC_ISAC
case NetEqDecoder::kDecoderISACswb:
#endif
case NetEqDecoder::kDecoderPCM16Bswb32kHz:
case NetEqDecoder::kDecoderPCM16Bswb32kHz_2ch:
case NetEqDecoder::kDecoderCNGswb32kHz: {
return 32000;
}
case NetEqDecoder::kDecoderPCM16Bswb48kHz:
case NetEqDecoder::kDecoderPCM16Bswb48kHz_2ch: {
return 48000;
}
#ifdef WEBRTC_CODEC_OPUS
case NetEqDecoder::kDecoderOpus:
case NetEqDecoder::kDecoderOpus_2ch: {
return 48000;
}
#endif
case NetEqDecoder::kDecoderCNGswb48kHz: {
// TODO(tlegrand): Remove limitation once ACM has full 48 kHz support.
return 32000;
}
default: {
return -1; // Undefined sample rate.
}
}
}
} // namespace webrtc