diff --git a/webrtc/modules/audio_coding/main/acm2/acm_amr.cc b/webrtc/modules/audio_coding/main/acm2/acm_amr.cc index ab4003abb..64e323c0e 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_amr.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_amr.cc @@ -43,6 +43,8 @@ namespace webrtc { +namespace acm2 { + #ifndef WEBRTC_CODEC_AMR ACMAMR::ACMAMR(int16_t /* codec_id */) : encoder_inst_ptr_(NULL), @@ -307,4 +309,6 @@ ACMAMRPackingFormat ACMAMR::AMRDecoderPackingFormat() const { } #endif +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_amr.h b/webrtc/modules/audio_coding/main/acm2/acm_amr.h index 4471e6bca..efa568740 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_amr.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_amr.h @@ -21,6 +21,8 @@ namespace webrtc { enum ACMAMRPackingFormat; +namespace acm2 { + class ACMAMR : public ACMGenericCodec { public: explicit ACMAMR(int16_t codec_id); @@ -60,6 +62,8 @@ class ACMAMR : public ACMGenericCodec { ACMAMRPackingFormat encoder_packing_format_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_AMR_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_amrwb.cc b/webrtc/modules/audio_coding/main/acm2/acm_amrwb.cc index 849353a93..4dd4e97b2 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_amrwb.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_amrwb.cc @@ -40,6 +40,8 @@ namespace webrtc { +namespace acm2 { + #ifndef WEBRTC_CODEC_AMRWB ACMAMRwb::ACMAMRwb(int16_t /* codec_id */) : encoder_inst_ptr_(NULL), @@ -313,4 +315,6 @@ ACMAMRPackingFormat ACMAMRwb::AMRwbDecoderPackingFormat() const { #endif +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_amrwb.h b/webrtc/modules/audio_coding/main/acm2/acm_amrwb.h index e5bd99d9b..c8db65933 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_amrwb.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_amrwb.h @@ -19,6 +19,8 @@ struct AMRWB_decinst_t_; namespace webrtc { +namespace acm2 { + class ACMAMRwb : public ACMGenericCodec { public: explicit ACMAMRwb(int16_t codec_id); @@ -61,6 +63,8 @@ class ACMAMRwb : public ACMGenericCodec { ACMAMRPackingFormat encoder_packing_format_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_AMRWB_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_celt.cc b/webrtc/modules/audio_coding/main/acm2/acm_celt.cc index 21fa3a9d0..3cd6e84d4 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_celt.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_celt.cc @@ -20,6 +20,8 @@ namespace webrtc { +namespace acm2 { + #ifndef WEBRTC_CODEC_CELT ACMCELT::ACMCELT(int16_t /* codec_id */) @@ -188,4 +190,6 @@ int16_t ACMCELT::SetBitRateSafe(const int32_t rate) { #endif +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_celt.h b/webrtc/modules/audio_coding/main/acm2/acm_celt.h index 4b40f799e..dc8d3ee0f 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_celt.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_celt.h @@ -19,6 +19,8 @@ struct CELT_decinst_t_; namespace webrtc { +namespace acm2 { + class ACMCELT : public ACMGenericCodec { public: explicit ACMCELT(int16_t codec_id); @@ -45,6 +47,8 @@ class ACMCELT : public ACMGenericCodec { uint16_t channels_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_CELT_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_cng.cc b/webrtc/modules/audio_coding/main/acm2/acm_cng.cc index 9e658bdad..7f0adf819 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_cng.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_cng.cc @@ -17,6 +17,8 @@ namespace webrtc { +namespace acm2 { + ACMCNG::ACMCNG(int16_t codec_id) { encoder_inst_ptr_ = NULL; codec_id_ = codec_id; @@ -76,4 +78,6 @@ void ACMCNG::InternalDestructEncoderInst(void* ptr_inst) { return; } +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_cng.h b/webrtc/modules/audio_coding/main/acm2/acm_cng.h index 3816fa2a8..a0c1c5544 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_cng.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_cng.h @@ -19,6 +19,8 @@ struct WebRtcCngDecInst; namespace webrtc { +namespace acm2 { + class ACMCNG: public ACMGenericCodec { public: explicit ACMCNG(int16_t codec_id); @@ -51,6 +53,8 @@ class ACMCNG: public ACMGenericCodec { uint16_t samp_freq_hz_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_CNG_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_codec_database.cc b/webrtc/modules/audio_coding/main/acm2/acm_codec_database.cc index 225098aad..fd30a137a 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_codec_database.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_codec_database.cc @@ -102,6 +102,8 @@ namespace webrtc { +namespace acm2 { + // Not yet used payload-types. // 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, // 67, 66, 65 @@ -954,4 +956,6 @@ bool ACMCodecDB::OwnsDecoder(int codec_id) { return ACMCodecDB::codec_settings_[codec_id].owns_decoder; } +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_codec_database.h b/webrtc/modules/audio_coding/main/acm2/acm_codec_database.h index b992b7d27..98869efee 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_codec_database.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_codec_database.h @@ -22,6 +22,8 @@ namespace webrtc { +namespace acm2 { + // TODO(tlegrand): replace class ACMCodecDB with a namespace. class ACMCodecDB { public: @@ -350,6 +352,8 @@ class ACMCodecDB { static const NetEqDecoder neteq_decoders_[kMaxNumCodecs]; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_CODEC_DATABASE_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_dtmf_playout.cc b/webrtc/modules/audio_coding/main/acm2/acm_dtmf_playout.cc index ca7e86fd8..07bab6520 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_dtmf_playout.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_dtmf_playout.cc @@ -18,6 +18,8 @@ namespace webrtc { +namespace acm2 { + #ifndef WEBRTC_CODEC_AVT ACMDTMFPlayout::ACMDTMFPlayout(int16_t /* codec_id */) { return; } @@ -83,4 +85,6 @@ void ACMDTMFPlayout::DestructEncoderSafe() { #endif +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_dtmf_playout.h b/webrtc/modules/audio_coding/main/acm2/acm_dtmf_playout.h index 4c3154ca9..5adb0ddc1 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_dtmf_playout.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_dtmf_playout.h @@ -15,6 +15,8 @@ namespace webrtc { +namespace acm2 { + class ACMDTMFPlayout : public ACMGenericCodec { public: explicit ACMDTMFPlayout(int16_t codec_id); @@ -35,6 +37,8 @@ class ACMDTMFPlayout : public ACMGenericCodec { void InternalDestructEncoderInst(void* ptr_inst); }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_DTMF_PLAYOUT_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_g722.cc b/webrtc/modules/audio_coding/main/acm2/acm_g722.cc index fe2bd6cb9..8d457723b 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_g722.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_g722.cc @@ -19,6 +19,8 @@ namespace webrtc { +namespace acm2 { + #ifndef WEBRTC_CODEC_G722 ACMG722::ACMG722(int16_t /* codec_id */) @@ -194,4 +196,6 @@ void ACMG722::InternalDestructEncoderInst(void* ptr_inst) { #endif +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_g722.h b/webrtc/modules/audio_coding/main/acm2/acm_g722.h index 34b6c8516..7216a574a 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_g722.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_g722.h @@ -18,6 +18,8 @@ typedef struct WebRtcG722DecInst G722DecInst; namespace webrtc { +namespace acm2 { + // Forward declaration. struct ACMG722EncStr; struct ACMG722DecStr; @@ -52,6 +54,8 @@ class ACMG722 : public ACMGenericCodec { G722EncInst* encoder_inst_ptr_right_; // Prepared for stereo }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_G722_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_g7221.cc b/webrtc/modules/audio_coding/main/acm2/acm_g7221.cc index 0cba71084..3609f072b 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_g7221.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_g7221.cc @@ -80,6 +80,8 @@ namespace webrtc { +namespace acm2 { + #ifndef WEBRTC_CODEC_G722_1 ACMG722_1::ACMG722_1(int16_t /* codec_id */) @@ -323,4 +325,6 @@ void ACMG722_1::InternalDestructEncoderInst(void* ptr_inst) { #endif +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_g7221.h b/webrtc/modules/audio_coding/main/acm2/acm_g7221.h index 4a0bd480d..74d9b2709 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_g7221.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_g7221.h @@ -24,6 +24,8 @@ struct G722_1_Inst_t_; namespace webrtc { +namespace acm2 { + class ACMG722_1 : public ACMGenericCodec { public: explicit ACMG722_1(int16_t codec_id); @@ -57,6 +59,8 @@ class ACMG722_1 : public ACMGenericCodec { G722_1_32_encinst_t_* encoder_inst32_ptr_right_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_G7221_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_g7221c.cc b/webrtc/modules/audio_coding/main/acm2/acm_g7221c.cc index 531008af2..f6555f5db 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_g7221c.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_g7221c.cc @@ -80,6 +80,8 @@ namespace webrtc { +namespace acm2 { + #ifndef WEBRTC_CODEC_G722_1C ACMG722_1C::ACMG722_1C(int16_t /* codec_id */) @@ -329,4 +331,6 @@ void ACMG722_1C::InternalDestructEncoderInst(void* ptr_inst) { #endif +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_g7221c.h b/webrtc/modules/audio_coding/main/acm2/acm_g7221c.h index 961ed4e17..66b0f54a3 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_g7221c.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_g7221c.h @@ -24,6 +24,8 @@ struct G722_1_Inst_t_; namespace webrtc { +namespace acm2 { + class ACMG722_1C : public ACMGenericCodec { public: explicit ACMG722_1C(int16_t codec_id); @@ -57,6 +59,8 @@ class ACMG722_1C : public ACMGenericCodec { G722_1C_48_encinst_t_* encoder_inst48_ptr_right_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_G7221C_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_g729.cc b/webrtc/modules/audio_coding/main/acm2/acm_g729.cc index 91dbb43ee..6f95f3685 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_g729.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_g729.cc @@ -22,6 +22,8 @@ namespace webrtc { +namespace acm2 { + #ifndef WEBRTC_CODEC_G729 ACMG729::ACMG729(int16_t /* codec_id */) : encoder_inst_ptr_(NULL) {} @@ -252,4 +254,6 @@ void ACMG729::InternalDestructEncoderInst(void* ptr_inst) { #endif +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_g729.h b/webrtc/modules/audio_coding/main/acm2/acm_g729.h index f7e762cba..88b1bf7c4 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_g729.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_g729.h @@ -19,6 +19,8 @@ struct G729_decinst_t_; namespace webrtc { +namespace acm2 { + class ACMG729 : public ACMGenericCodec { public: explicit ACMG729(int16_t codec_id); @@ -49,6 +51,8 @@ class ACMG729 : public ACMGenericCodec { G729_encinst_t_* encoder_inst_ptr_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_G729_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_g7291.cc b/webrtc/modules/audio_coding/main/acm2/acm_g7291.cc index f16eec89b..3cf9f22fc 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_g7291.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_g7291.cc @@ -21,6 +21,8 @@ namespace webrtc { +namespace acm2 { + #ifndef WEBRTC_CODEC_G729_1 ACMG729_1::ACMG729_1(int16_t /* codec_id */) @@ -237,4 +239,6 @@ int16_t ACMG729_1::SetBitRateSafe(const int32_t rate) { #endif +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_g7291.h b/webrtc/modules/audio_coding/main/acm2/acm_g7291.h index 5a38e59a3..38c8fe176 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_g7291.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_g7291.h @@ -19,6 +19,8 @@ struct G729_1_inst_t_; namespace webrtc { +namespace acm2 { + class ACMG729_1 : public ACMGenericCodec { public: explicit ACMG729_1(int16_t codec_id); @@ -47,6 +49,8 @@ class ACMG729_1 : public ACMGenericCodec { int16_t flag_g729_mode_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_G7291_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_generic_codec.cc b/webrtc/modules/audio_coding/main/acm2/acm_generic_codec.cc index 9754251a5..aa8e8be06 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_generic_codec.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_generic_codec.cc @@ -21,6 +21,8 @@ namespace webrtc { +namespace acm2 { + // Enum for CNG enum { kMaxPLCParamsCNG = WEBRTC_CNG_MAX_LPC_ORDER, @@ -1002,4 +1004,6 @@ int16_t ACMGenericCodec::REDPayloadISAC(const int32_t /* isac_rate */, return -1; } +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_generic_codec.h b/webrtc/modules/audio_coding/main/acm2/acm_generic_codec.h index 78feb99f0..d41580fff 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_generic_codec.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_generic_codec.h @@ -26,8 +26,12 @@ struct WebRtcCngEncInst; namespace webrtc { -// forward declaration +struct WebRtcACMCodecParams; struct CodecInst; + +namespace acm2 { + +// forward declaration class AcmReceiver; class ACMGenericCodec { @@ -909,6 +913,8 @@ class ACMGenericCodec { uint32_t unique_id_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_GENERIC_CODEC_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_gsmfr.cc b/webrtc/modules/audio_coding/main/acm2/acm_gsmfr.cc index 44e6e3d91..90f9fce7d 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_gsmfr.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_gsmfr.cc @@ -21,6 +21,8 @@ namespace webrtc { +namespace acm2 { + #ifndef WEBRTC_CODEC_GSMFR ACMGSMFR::ACMGSMFR(int16_t /* codec_id */) : encoder_inst_ptr_(NULL) {} @@ -154,4 +156,6 @@ void ACMGSMFR::InternalDestructEncoderInst(void* ptr_inst) { #endif +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_gsmfr.h b/webrtc/modules/audio_coding/main/acm2/acm_gsmfr.h index 51c29eea4..79c3a180b 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_gsmfr.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_gsmfr.h @@ -19,6 +19,8 @@ struct GSMFR_decinst_t_; namespace webrtc { +namespace acm2 { + class ACMGSMFR : public ACMGenericCodec { public: explicit ACMGSMFR(int16_t codec_id); @@ -45,6 +47,8 @@ class ACMGSMFR : public ACMGenericCodec { GSMFR_encinst_t_* encoder_inst_ptr_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_GSMFR_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_ilbc.cc b/webrtc/modules/audio_coding/main/acm2/acm_ilbc.cc index 14fbbd450..eaa079c46 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_ilbc.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_ilbc.cc @@ -17,6 +17,8 @@ namespace webrtc { +namespace acm2 { + #ifndef WEBRTC_CODEC_ILBC ACMILBC::ACMILBC(int16_t /* codec_id */) : encoder_inst_ptr_(NULL) {} @@ -138,4 +140,6 @@ int16_t ACMILBC::SetBitRateSafe(const int32_t rate) { #endif +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_ilbc.h b/webrtc/modules/audio_coding/main/acm2/acm_ilbc.h index e02c789d3..fd6e85379 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_ilbc.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_ilbc.h @@ -19,6 +19,8 @@ struct iLBC_decinst_t_; namespace webrtc { +namespace acm2 { + class ACMILBC : public ACMGenericCodec { public: explicit ACMILBC(int16_t codec_id); @@ -43,6 +45,8 @@ class ACMILBC : public ACMGenericCodec { iLBC_encinst_t_* encoder_inst_ptr_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_ILBC_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_isac.cc b/webrtc/modules/audio_coding/main/acm2/acm_isac.cc index 7957fd3dc..e27284212 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_isac.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_isac.cc @@ -31,6 +31,8 @@ namespace webrtc { +namespace acm2 { + // we need this otherwise we cannot use forward declaration // in the header file #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) @@ -826,4 +828,6 @@ AudioDecoder* ACMISAC::Decoder(int codec_id) { #endif +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_isac.h b/webrtc/modules/audio_coding/main/acm2/acm_isac.h index 2e6657fb4..a3227d5d0 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_isac.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_isac.h @@ -15,6 +15,8 @@ namespace webrtc { +namespace acm2 { + struct ACMISACInst; class AcmAudioDecoderIsac; @@ -93,6 +95,8 @@ class ACMISAC : public ACMGenericCodec { bool decoder_initialized_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_ISAC_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_isac_macros.h b/webrtc/modules/audio_coding/main/acm2/acm_isac_macros.h index c2a782095..df0309769 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_isac_macros.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_isac_macros.h @@ -15,6 +15,8 @@ namespace webrtc { +namespace acm2 { + #ifdef WEBRTC_CODEC_ISAC #define ACM_ISAC_CREATE WebRtcIsac_Create #define ACM_ISAC_FREE WebRtcIsac_Free @@ -70,6 +72,8 @@ namespace webrtc { // decoder #endif +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_ISAC_MACROS_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_neteq_unittest.cc b/webrtc/modules/audio_coding/main/acm2/acm_neteq_unittest.cc index 3f5a200bf..607b933de 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_neteq_unittest.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_neteq_unittest.cc @@ -10,4 +10,6 @@ // This file contains unit tests for ACM's NetEQ wrapper (class ACMNetEQ). -namespace webrtc {} // namespace +namespace webrtc { + +namespace acm2 {} // namespace diff --git a/webrtc/modules/audio_coding/main/acm2/acm_opus.cc b/webrtc/modules/audio_coding/main/acm2/acm_opus.cc index d627fad8d..c00a9203a 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_opus.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_opus.cc @@ -19,6 +19,8 @@ namespace webrtc { +namespace acm2 { + #ifndef WEBRTC_CODEC_OPUS ACMOpus::ACMOpus(int16_t /* codec_id */) @@ -184,4 +186,6 @@ int16_t ACMOpus::SetBitRateSafe(const int32_t rate) { #endif // WEBRTC_CODEC_OPUS +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_opus.h b/webrtc/modules/audio_coding/main/acm2/acm_opus.h index caac01093..a346e3c8f 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_opus.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_opus.h @@ -19,6 +19,8 @@ struct WebRtcOpusDecInst; namespace webrtc { +namespace acm2 { + class ACMOpus : public ACMGenericCodec { public: explicit ACMOpus(int16_t codec_id); @@ -45,6 +47,8 @@ class ACMOpus : public ACMGenericCodec { int channels_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_OPUS_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_pcm16b.cc b/webrtc/modules/audio_coding/main/acm2/acm_pcm16b.cc index 7c5b0bd32..89688a874 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_pcm16b.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_pcm16b.cc @@ -19,6 +19,8 @@ namespace webrtc { +namespace acm2 { + #ifndef WEBRTC_CODEC_PCM16 ACMPCM16B::ACMPCM16B(int16_t /* codec_id */) { return; } @@ -89,4 +91,6 @@ void ACMPCM16B::DestructEncoderSafe() { #endif +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_pcm16b.h b/webrtc/modules/audio_coding/main/acm2/acm_pcm16b.h index 32490209a..23b8c121e 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_pcm16b.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_pcm16b.h @@ -15,6 +15,8 @@ namespace webrtc { +namespace acm2 { + class ACMPCM16B : public ACMGenericCodec { public: explicit ACMPCM16B(int16_t codec_id); @@ -37,6 +39,8 @@ class ACMPCM16B : public ACMGenericCodec { int32_t sampling_freq_hz_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_PCM16B_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_pcma.cc b/webrtc/modules/audio_coding/main/acm2/acm_pcma.cc index cb5ebccfd..1dd6e48fb 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_pcma.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_pcma.cc @@ -18,6 +18,8 @@ namespace webrtc { +namespace acm2 { + ACMPCMA::ACMPCMA(int16_t codec_id) { codec_id_ = codec_id; } ACMPCMA::~ACMPCMA() { return; } @@ -55,4 +57,6 @@ void ACMPCMA::DestructEncoderSafe() { return; } +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_pcma.h b/webrtc/modules/audio_coding/main/acm2/acm_pcma.h index 4102e17d9..2da873cb7 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_pcma.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_pcma.h @@ -15,6 +15,8 @@ namespace webrtc { +namespace acm2 { + class ACMPCMA : public ACMGenericCodec { public: explicit ACMPCMA(int16_t codec_id); @@ -35,6 +37,8 @@ class ACMPCMA : public ACMGenericCodec { void InternalDestructEncoderInst(void* ptr_inst); }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_PCMA_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_pcmu.cc b/webrtc/modules/audio_coding/main/acm2/acm_pcmu.cc index 6f479ed21..7d2536fc0 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_pcmu.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_pcmu.cc @@ -18,6 +18,8 @@ namespace webrtc { +namespace acm2 { + ACMPCMU::ACMPCMU(int16_t codec_id) { codec_id_ = codec_id; } ACMPCMU::~ACMPCMU() {} @@ -56,4 +58,6 @@ void ACMPCMU::DestructEncoderSafe() { encoder_initialized_ = false; } +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_pcmu.h b/webrtc/modules/audio_coding/main/acm2/acm_pcmu.h index 2898df637..18d8279dc 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_pcmu.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_pcmu.h @@ -15,6 +15,8 @@ namespace webrtc { +namespace acm2 { + class ACMPCMU : public ACMGenericCodec { public: explicit ACMPCMU(int16_t codec_id); @@ -35,6 +37,8 @@ class ACMPCMU : public ACMGenericCodec { void InternalDestructEncoderInst(void* ptr_inst); }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_PCMU_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_receiver.cc b/webrtc/modules/audio_coding/main/acm2/acm_receiver.cc index 9c9f05d9b..6d4a8dfe0 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_receiver.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_receiver.cc @@ -30,6 +30,8 @@ namespace webrtc { +namespace acm2 { + namespace { const int kNeteqInitSampleRateHz = 16000; @@ -829,4 +831,6 @@ void AcmReceiver::InsertStreamOfSyncPackets( } } +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_receiver.h b/webrtc/modules/audio_coding/main/acm2/acm_receiver.h index 5f6d684b0..9267c1e68 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_receiver.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_receiver.h @@ -26,11 +26,14 @@ namespace webrtc { +struct CodecInst; class CriticalSectionWrapper; class RWLockWrapper; class NetEq; + +namespace acm2 { + class Nack; -struct CodecInst; class AcmReceiver { public: @@ -360,6 +363,8 @@ class AcmReceiver { scoped_ptr late_packets_sync_stream_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RECEIVER_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_receiver_unittest.cc b/webrtc/modules/audio_coding/main/acm2/acm_receiver_unittest.cc index a00db9278..7d85d15d8 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_receiver_unittest.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_receiver_unittest.cc @@ -23,6 +23,8 @@ #include "webrtc/test/testsupport/gtest_disable.h" namespace webrtc { + +namespace acm2 { namespace { bool CodecsEqual(const CodecInst& codec_a, const CodecInst& codec_b) { @@ -418,4 +420,6 @@ TEST_F(AcmReceiverTest, DISABLED_ON_ANDROID(LastAudioCodec)) { } } +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_red.cc b/webrtc/modules/audio_coding/main/acm2/acm_red.cc index f4a1f6f2a..4f2c70cfd 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_red.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_red.cc @@ -15,6 +15,8 @@ namespace webrtc { +namespace acm2 { + ACMRED::ACMRED(int16_t codec_id) { codec_id_ = codec_id; } ACMRED::~ACMRED() {} @@ -47,4 +49,6 @@ void ACMRED::DestructEncoderSafe() { // RED has no instance } +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_red.h b/webrtc/modules/audio_coding/main/acm2/acm_red.h index ab8d913fa..ac381709d 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_red.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_red.h @@ -15,6 +15,8 @@ namespace webrtc { +namespace acm2 { + class ACMRED : public ACMGenericCodec { public: explicit ACMRED(int16_t codec_id); @@ -35,6 +37,8 @@ class ACMRED : public ACMGenericCodec { void InternalDestructEncoderInst(void* ptr_inst); }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RED_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_resampler.cc b/webrtc/modules/audio_coding/main/acm2/acm_resampler.cc index 13eed0ba6..3abe4f1ec 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_resampler.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_resampler.cc @@ -19,6 +19,8 @@ namespace webrtc { +namespace acm2 { + ACMResampler::ACMResampler() : resampler_crit_sect_(CriticalSectionWrapper::CreateCriticalSection()) { } @@ -63,4 +65,6 @@ int ACMResampler::Resample10Msec(const int16_t* in_audio, return out_len / num_audio_channels; } +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_resampler.h b/webrtc/modules/audio_coding/main/acm2/acm_resampler.h index 8abb2f4f7..e992955f5 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_resampler.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_resampler.h @@ -18,6 +18,8 @@ namespace webrtc { class CriticalSectionWrapper; +namespace acm2 { + class ACMResampler { public: ACMResampler(); @@ -35,6 +37,8 @@ class ACMResampler { CriticalSectionWrapper* resampler_crit_sect_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_RESAMPLER_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/acm_speex.cc b/webrtc/modules/audio_coding/main/acm2/acm_speex.cc index 829026549..84a0592a4 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_speex.cc +++ b/webrtc/modules/audio_coding/main/acm2/acm_speex.cc @@ -21,6 +21,8 @@ namespace webrtc { +namespace acm2 { + #ifndef WEBRTC_CODEC_SPEEX ACMSPEEX::ACMSPEEX(int16_t /* codec_id */) : encoder_inst_ptr_(NULL), @@ -326,4 +328,6 @@ int16_t ACMSPEEX::SetComplMode(int16_t mode) { #endif +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/acm_speex.h b/webrtc/modules/audio_coding/main/acm2/acm_speex.h index 2fac8fd2e..f9cf78706 100644 --- a/webrtc/modules/audio_coding/main/acm2/acm_speex.h +++ b/webrtc/modules/audio_coding/main/acm2/acm_speex.h @@ -19,6 +19,8 @@ struct SPEEX_decinst_t_; namespace webrtc { +namespace acm2 { + class ACMSPEEX : public ACMGenericCodec { public: explicit ACMSPEEX(int16_t codec_id); @@ -60,6 +62,8 @@ class ACMSPEEX : public ACMGenericCodec { uint16_t samples_in_20ms_audio_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_ACM_SPEEX_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module.cc b/webrtc/modules/audio_coding/main/acm2/audio_coding_module.cc index 7acd49bdf..c7fe9fa9a 100644 --- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module.cc +++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module.cc @@ -30,13 +30,13 @@ AudioCodingModule* AudioCodingModule::Create(int id, Clock* clock) { // Get number of supported codecs int AudioCodingModule::NumberOfCodecs() { - return ACMCodecDB::kNumCodecs; + return acm2::ACMCodecDB::kNumCodecs; } // Get supported codec parameters with id int AudioCodingModule::Codec(int list_id, CodecInst* codec) { // Get the codec settings for the codec with the given list ID - return ACMCodecDB::Codec(list_id, codec); + return acm2::ACMCodecDB::Codec(list_id, codec); } // Get supported codec parameters with name, frequency and number of channels. @@ -47,7 +47,8 @@ int AudioCodingModule::Codec(const char* payload_name, int codec_id; // Get the id of the codec from the database. - codec_id = ACMCodecDB::CodecId(payload_name, sampling_freq_hz, channels); + codec_id = acm2::ACMCodecDB::CodecId( + payload_name, sampling_freq_hz, channels); if (codec_id < 0) { // We couldn't find a matching codec, set the parameters to unacceptable // values and return. @@ -60,7 +61,7 @@ int AudioCodingModule::Codec(const char* payload_name, } // Get default codec settings. - ACMCodecDB::Codec(codec_id, codec); + acm2::ACMCodecDB::Codec(codec_id, codec); // Keep the number of channels from the function call. For most codecs it // will be the same value as in default codec settings, but not for all. @@ -73,14 +74,14 @@ int AudioCodingModule::Codec(const char* payload_name, int AudioCodingModule::Codec(const char* payload_name, int sampling_freq_hz, int channels) { - return ACMCodecDB::CodecId(payload_name, sampling_freq_hz, channels); + return acm2::ACMCodecDB::CodecId(payload_name, sampling_freq_hz, channels); } // Checks the validity of the parameters of the given codec bool AudioCodingModule::IsCodecValid(const CodecInst& codec) { int mirror_id; - int codec_number = ACMCodecDB::CodecNumber(codec, &mirror_id); + int codec_number = acm2::ACMCodecDB::CodecNumber(codec, &mirror_id); if (codec_number < 0) { WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, -1, @@ -97,7 +98,7 @@ AudioCodingModule* AudioCodingModuleFactory::Create(int id) const { } AudioCodingModule* NewAudioCodingModuleFactory::Create(int id) const { - return new AudioCodingModuleImpl(id); + return new acm2::AudioCodingModuleImpl(id); } } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc index fb6fe39a8..911605e8e 100644 --- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc +++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc @@ -27,6 +27,8 @@ namespace webrtc { +namespace acm2 { + enum { kACMToneEnd = 999 }; @@ -1974,4 +1976,6 @@ int AudioCodingModuleImpl::LeastRequiredDelayMs() const { return receiver_.LeastRequiredDelayMs(); } +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h index 435c7aeab..6bf90cf26 100644 --- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h +++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h @@ -22,11 +22,14 @@ namespace webrtc { -class ACMDTMFDetection; -class ACMGenericCodec; class CriticalSectionWrapper; class RWLockWrapper; +namespace acm2 { + +class ACMDTMFDetection; +class ACMGenericCodec; + class AudioCodingModuleImpl : public AudioCodingModule { public: // Constructor @@ -349,6 +352,8 @@ class AudioCodingModuleImpl : public AudioCodingModule { bool first_10ms_data_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_AUDIO_CODING_MODULE_IMPL_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.cc b/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.cc index 0dccb1129..c2b218cb6 100644 --- a/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.cc +++ b/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.cc @@ -12,6 +12,8 @@ namespace webrtc { +namespace acm2 { + InitialDelayManager::InitialDelayManager(int initial_delay_ms, int late_packet_threshold) : last_packet_type_(kUndefinedPacket), @@ -227,4 +229,6 @@ void InitialDelayManager::UpdatePlayoutTimestamp( initial_delay_ms_ * sample_rate_hz / 1000); } +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.h b/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.h index da08f8bd8..3c5ba3c01 100644 --- a/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.h +++ b/webrtc/modules/audio_coding/main/acm2/initial_delay_manager.h @@ -16,6 +16,8 @@ namespace webrtc { +namespace acm2 { + class InitialDelayManager { public: enum PacketType { @@ -110,6 +112,8 @@ class InitialDelayManager { const int late_packet_threshold_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_INITIAL_DELAY_MANAGER_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/initial_delay_manager_unittest.cc b/webrtc/modules/audio_coding/main/acm2/initial_delay_manager_unittest.cc index 7e3bda5b5..1e129f37e 100644 --- a/webrtc/modules/audio_coding/main/acm2/initial_delay_manager_unittest.cc +++ b/webrtc/modules/audio_coding/main/acm2/initial_delay_manager_unittest.cc @@ -15,6 +15,8 @@ namespace webrtc { +namespace acm2 { + namespace { const uint8_t kAudioPayloadType = 0; @@ -368,4 +370,6 @@ TEST_F(InitialDelayManagerTest, BufferingAudio) { EXPECT_FALSE(manager_->buffering()); } +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/nack.cc b/webrtc/modules/audio_coding/main/acm2/nack.cc index e26ad611f..7265fe63c 100644 --- a/webrtc/modules/audio_coding/main/acm2/nack.cc +++ b/webrtc/modules/audio_coding/main/acm2/nack.cc @@ -19,6 +19,8 @@ namespace webrtc { +namespace acm2 { + namespace { const int kDefaultSampleRateKhz = 48; @@ -222,4 +224,6 @@ std::vector Nack::GetNackList(int round_trip_time_ms) const { return sequence_numbers; } +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/acm2/nack.h b/webrtc/modules/audio_coding/main/acm2/nack.h index 490c03818..380932719 100644 --- a/webrtc/modules/audio_coding/main/acm2/nack.h +++ b/webrtc/modules/audio_coding/main/acm2/nack.h @@ -49,6 +49,8 @@ // namespace webrtc { +namespace acm2 { + class Nack { public: // A limit for the size of the NACK list. @@ -204,6 +206,8 @@ class Nack { size_t max_nack_list_size_; }; +} // namespace acm2 + } // namespace webrtc #endif // WEBRTC_MODULES_AUDIO_CODING_MAIN_ACM2_NACK_H_ diff --git a/webrtc/modules/audio_coding/main/acm2/nack_unittest.cc b/webrtc/modules/audio_coding/main/acm2/nack_unittest.cc index b047fd6d0..8011d8856 100644 --- a/webrtc/modules/audio_coding/main/acm2/nack_unittest.cc +++ b/webrtc/modules/audio_coding/main/acm2/nack_unittest.cc @@ -21,6 +21,8 @@ namespace webrtc { +namespace acm2 { + namespace { const int kNackThreshold = 3; @@ -479,4 +481,6 @@ TEST(NackTest, RoudTripTimeIsApplied) { EXPECT_EQ(5, nack_list[1]); } +} // namespace acm2 + } // namespace webrtc diff --git a/webrtc/modules/audio_coding/main/source/acm_generic_codec.h b/webrtc/modules/audio_coding/main/source/acm_generic_codec.h index d6403f5c6..c1f9cdc55 100644 --- a/webrtc/modules/audio_coding/main/source/acm_generic_codec.h +++ b/webrtc/modules/audio_coding/main/source/acm_generic_codec.h @@ -27,6 +27,7 @@ namespace webrtc { // forward declaration struct CodecInst; +struct WebRtcACMCodecParams; namespace acm1 { diff --git a/webrtc/modules/audio_coding/main/source/audio_coding_module_impl.cc b/webrtc/modules/audio_coding/main/source/audio_coding_module_impl.cc index c6ef8843f..62a13c572 100644 --- a/webrtc/modules/audio_coding/main/source/audio_coding_module_impl.cc +++ b/webrtc/modules/audio_coding/main/source/audio_coding_module_impl.cc @@ -3002,12 +3002,13 @@ int AudioCodingModuleImpl::LeastRequiredDelayMs() const { int AudioCodingModuleImpl::EnableNack(size_t max_nack_list_size) { // Don't do anything if |max_nack_list_size| is out of range. - if (max_nack_list_size == 0 || max_nack_list_size > Nack::kNackListSizeLimit) + if (max_nack_list_size == 0 || + max_nack_list_size > acm2::Nack::kNackListSizeLimit) return -1; CriticalSectionScoped lock(acm_crit_sect_); if (!nack_enabled_) { - nack_.reset(Nack::Create(kNackThresholdPackets)); + nack_.reset(acm2::Nack::Create(kNackThresholdPackets)); nack_enabled_ = true; // Sampling rate might need to be updated if we change from disable to diff --git a/webrtc/modules/audio_coding/main/source/audio_coding_module_impl.h b/webrtc/modules/audio_coding/main/source/audio_coding_module_impl.h index 7b179901e..7d58f375a 100644 --- a/webrtc/modules/audio_coding/main/source/audio_coding_module_impl.h +++ b/webrtc/modules/audio_coding/main/source/audio_coding_module_impl.h @@ -28,7 +28,10 @@ struct WebRtcACMCodecParams; class CriticalSectionWrapper; class RWLockWrapper; class Clock; + +namespace acm2 { class Nack; +} namespace acm1 { @@ -437,7 +440,7 @@ class AudioCodingModuleImpl : public AudioCodingModule { int64_t last_receive_timestamp_; Clock* clock_; - scoped_ptr nack_; + scoped_ptr nack_; bool nack_enabled_; };