Make an enum class out of NetEqDecoder, and hide the neteq_decoders_ table
This operation was relatively simple, since no one was doing anything fishy with this enum. A large number of lines had to be changed because the enum values now live in their own namespace, but this is arguably worth it since it is now much clearer what sort of constant they are. BUG=webrtc:5028 Review URL: https://codereview.webrtc.org/1424083002 Cr-Commit-Position: refs/heads/master@{#10449}
This commit is contained in:
@ -44,15 +44,15 @@ uint32_t TimestampScaler::ToInternal(uint32_t external_timestamp,
|
||||
return external_timestamp;
|
||||
}
|
||||
switch (info->codec_type) {
|
||||
case kDecoderG722:
|
||||
case kDecoderG722_2ch: {
|
||||
case NetEqDecoder::kDecoderG722:
|
||||
case NetEqDecoder::kDecoderG722_2ch: {
|
||||
// Use timestamp scaling with factor 2 (two output samples per RTP
|
||||
// timestamp).
|
||||
numerator_ = 2;
|
||||
denominator_ = 1;
|
||||
break;
|
||||
}
|
||||
case kDecoderCNGswb48kHz: {
|
||||
case NetEqDecoder::kDecoderCNGswb48kHz: {
|
||||
// Use timestamp scaling with factor 2/3 (32 kHz sample rate, but RTP
|
||||
// timestamps run on 48 kHz).
|
||||
// TODO(tlegrand): Remove scaling for kDecoderCNGswb48kHz once ACM has
|
||||
@ -61,10 +61,10 @@ uint32_t TimestampScaler::ToInternal(uint32_t external_timestamp,
|
||||
denominator_ = 3;
|
||||
break;
|
||||
}
|
||||
case kDecoderAVT:
|
||||
case kDecoderCNGnb:
|
||||
case kDecoderCNGwb:
|
||||
case kDecoderCNGswb32kHz: {
|
||||
case NetEqDecoder::kDecoderAVT:
|
||||
case NetEqDecoder::kDecoderCNGnb:
|
||||
case NetEqDecoder::kDecoderCNGwb:
|
||||
case NetEqDecoder::kDecoderCNGswb32kHz: {
|
||||
// Do not change the timestamp scaling settings for DTMF or CNG.
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user