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

Unified Diff: webrtc/modules/audio_coding/neteq/neteq_impl.cc

Issue 1424083002: Make an enum class out of NetEqDecoder, and hide the neteq_decoders_ table (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/neteq/neteq_impl.cc
diff --git a/webrtc/modules/audio_coding/neteq/neteq_impl.cc b/webrtc/modules/audio_coding/neteq/neteq_impl.cc
index ead08f12fb1bb0665ae140d06eaa9d19b2ad00b2..4e7000f7be031f49bb65da492ea32385ffb1f35d 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_impl.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_impl.cc
@@ -174,11 +174,12 @@ int NetEqImpl::GetAudio(size_t max_length, int16_t* output_audio,
return kOK;
}
-int NetEqImpl::RegisterPayloadType(enum NetEqDecoder codec,
+int NetEqImpl::RegisterPayloadType(NetEqDecoder codec,
uint8_t rtp_payload_type) {
CriticalSectionScoped lock(crit_sect_.get());
LOG(LS_VERBOSE) << "RegisterPayloadType "
- << static_cast<int>(rtp_payload_type) << " " << codec;
+ << static_cast<int>(rtp_payload_type) << " "
+ << static_cast<int>(codec);
int ret = decoder_database_->RegisterPayload(rtp_payload_type, codec);
if (ret != DecoderDatabase::kOK) {
switch (ret) {
@@ -200,12 +201,13 @@ int NetEqImpl::RegisterPayloadType(enum NetEqDecoder codec,
}
int NetEqImpl::RegisterExternalDecoder(AudioDecoder* decoder,
- enum NetEqDecoder codec,
+ NetEqDecoder codec,
uint8_t rtp_payload_type,
int sample_rate_hz) {
CriticalSectionScoped lock(crit_sect_.get());
LOG(LS_VERBOSE) << "RegisterExternalDecoder "
- << static_cast<int>(rtp_payload_type) << " " << codec;
+ << static_cast<int>(rtp_payload_type) << " "
+ << static_cast<int>(codec);
if (!decoder) {
LOG(LS_ERROR) << "Cannot register external decoder with NULL pointer";
assert(false);
@@ -1645,16 +1647,16 @@ int NetEqImpl::DoRfc3389Cng(PacketList* packet_list, bool play_dtmf) {
// Clearly wrong, but will maintain bit-exactness with legacy.
if (fs_hz_ == 8000) {
packet->header.payloadType =
- decoder_database_->GetRtpPayloadType(kDecoderCNGnb);
+ decoder_database_->GetRtpPayloadType(NetEqDecoder::kDecoderCNGnb);
} else if (fs_hz_ == 16000) {
packet->header.payloadType =
- decoder_database_->GetRtpPayloadType(kDecoderCNGwb);
+ decoder_database_->GetRtpPayloadType(NetEqDecoder::kDecoderCNGwb);
} else if (fs_hz_ == 32000) {
- packet->header.payloadType =
- decoder_database_->GetRtpPayloadType(kDecoderCNGswb32kHz);
+ packet->header.payloadType = decoder_database_->GetRtpPayloadType(
+ NetEqDecoder::kDecoderCNGswb32kHz);
} else if (fs_hz_ == 48000) {
- packet->header.payloadType =
- decoder_database_->GetRtpPayloadType(kDecoderCNGswb48kHz);
+ packet->header.payloadType = decoder_database_->GetRtpPayloadType(
+ NetEqDecoder::kDecoderCNGswb48kHz);
}
assert(decoder_database_->IsComfortNoise(packet->header.payloadType));
#else
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_impl.h ('k') | webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698