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}
diff --git a/webrtc/modules/audio_coding/neteq/decoder_database.cc b/webrtc/modules/audio_coding/neteq/decoder_database.cc
index 97dc00d..41803f7 100644
--- a/webrtc/modules/audio_coding/neteq/decoder_database.cc
+++ b/webrtc/modules/audio_coding/neteq/decoder_database.cc
@@ -150,10 +150,10 @@
}
bool DecoderDatabase::IsComfortNoise(uint8_t rtp_payload_type) const {
- if (IsType(rtp_payload_type, kDecoderCNGnb) ||
- IsType(rtp_payload_type, kDecoderCNGwb) ||
- IsType(rtp_payload_type, kDecoderCNGswb32kHz) ||
- IsType(rtp_payload_type, kDecoderCNGswb48kHz)) {
+ if (IsType(rtp_payload_type, NetEqDecoder::kDecoderCNGnb) ||
+ IsType(rtp_payload_type, NetEqDecoder::kDecoderCNGwb) ||
+ IsType(rtp_payload_type, NetEqDecoder::kDecoderCNGswb32kHz) ||
+ IsType(rtp_payload_type, NetEqDecoder::kDecoderCNGswb48kHz)) {
return true;
} else {
return false;
@@ -161,11 +161,11 @@
}
bool DecoderDatabase::IsDtmf(uint8_t rtp_payload_type) const {
- return IsType(rtp_payload_type, kDecoderAVT);
+ return IsType(rtp_payload_type, NetEqDecoder::kDecoderAVT);
}
bool DecoderDatabase::IsRed(uint8_t rtp_payload_type) const {
- return IsType(rtp_payload_type, kDecoderRED);
+ return IsType(rtp_payload_type, NetEqDecoder::kDecoderRED);
}
int DecoderDatabase::SetActiveDecoder(uint8_t rtp_payload_type,