From 86da94ea699fc72ba0624e6b923fd85676fe3454 Mon Sep 17 00:00:00 2001 From: "tina.legrand@webrtc.org" Date: Wed, 16 May 2012 07:11:53 +0000 Subject: [PATCH] Remove functions for unregistering decoder This cl removes unused functions in the ACMGenericCodec class. BUG= TEST= Review URL: https://webrtc-codereview.appspot.com/568005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2245 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../audio_coding/main/source/acm_amr.cc | 21 +------- .../audio_coding/main/source/acm_amr.h | 5 +- .../audio_coding/main/source/acm_amrwb.cc | 20 +------- .../audio_coding/main/source/acm_amrwb.h | 5 +- .../audio_coding/main/source/acm_celt.cc | 20 -------- .../audio_coding/main/source/acm_celt.h | 2 - .../audio_coding/main/source/acm_cng.cc | 18 +------ .../audio_coding/main/source/acm_cng.h | 5 +- .../main/source/acm_dtmf_playout.cc | 23 +-------- .../main/source/acm_dtmf_playout.h | 5 +- .../audio_coding/main/source/acm_g722.cc | 21 -------- .../audio_coding/main/source/acm_g722.h | 3 -- .../audio_coding/main/source/acm_g7221.cc | 37 +------------- .../audio_coding/main/source/acm_g7221.h | 5 +- .../audio_coding/main/source/acm_g7221c.cc | 39 +-------------- .../audio_coding/main/source/acm_g7221c.h | 6 +-- .../audio_coding/main/source/acm_g729.cc | 32 +------------ .../audio_coding/main/source/acm_g729.h | 6 +-- .../audio_coding/main/source/acm_g7291.cc | 28 ----------- .../audio_coding/main/source/acm_g7291.h | 10 +--- .../main/source/acm_generic_codec.cc | 24 ---------- .../main/source/acm_generic_codec.h | 28 ----------- .../audio_coding/main/source/acm_gsmfr.cc | 31 +----------- .../audio_coding/main/source/acm_gsmfr.h | 6 +-- .../audio_coding/main/source/acm_ilbc.cc | 30 +----------- .../audio_coding/main/source/acm_ilbc.h | 6 +-- .../audio_coding/main/source/acm_isac.cc | 39 --------------- .../audio_coding/main/source/acm_isac.h | 6 +-- .../audio_coding/main/source/acm_opus.cc | 30 +----------- .../audio_coding/main/source/acm_opus.h | 6 +-- .../audio_coding/main/source/acm_pcm16b.cc | 48 ------------------- .../audio_coding/main/source/acm_pcm16b.h | 4 -- .../audio_coding/main/source/acm_pcma.cc | 20 -------- .../audio_coding/main/source/acm_pcma.h | 4 -- .../audio_coding/main/source/acm_pcmu.cc | 21 -------- .../audio_coding/main/source/acm_pcmu.h | 4 -- .../audio_coding/main/source/acm_red.cc | 22 +-------- .../audio_coding/main/source/acm_red.h | 6 +-- .../audio_coding/main/source/acm_speex.cc | 46 ------------------ .../audio_coding/main/source/acm_speex.h | 6 +-- 40 files changed, 25 insertions(+), 673 deletions(-) diff --git a/src/modules/audio_coding/main/source/acm_amr.cc b/src/modules/audio_coding/main/source/acm_amr.cc index 71cf603b3..2aaa42d11 100644 --- a/src/modules/audio_coding/main/source/acm_amr.cc +++ b/src/modules/audio_coding/main/source/acm_amr.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -146,12 +146,6 @@ ACMAMRPackingFormat ACMAMR::AMRDecoderPackingFormat() const { return AMRUndefined; } -WebRtc_Word16 ACMAMR::UnregisterFromNetEqSafe(ACMNetEQ* /* netEq */, - WebRtc_Word16 /* payloadType */) { - return -1; -} - - #else //===================== Actual Implementation ======================= #define WEBRTC_AMR_MR475 0 @@ -426,19 +420,6 @@ ACMAMRPackingFormat ACMAMR::AMRDecoderPackingFormat() const { return _decoderPackingFormat; } -WebRtc_Word16 ACMAMR::UnregisterFromNetEqSafe(ACMNetEQ* netEq, - WebRtc_Word16 payloadType) { - if (payloadType != _decoderParams.codecInstant.pltype) { - WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, - "Cannot unregister codec %s given payload-type %d does not " - "match the stored payload type", - _decoderParams.codecInstant.plname, payloadType, - _decoderParams.codecInstant.pltype); - return -1; - } - return netEq->RemoveCodec(kDecoderAMR); -} - #endif } diff --git a/src/modules/audio_coding/main/source/acm_amr.h b/src/modules/audio_coding/main/source/acm_amr.h index cc342e72d..d3c175c8c 100644 --- a/src/modules/audio_coding/main/source/acm_amr.h +++ b/src/modules/audio_coding/main/source/acm_amr.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -70,9 +70,6 @@ class ACMAMR: public ACMGenericCodec { WebRtc_Word16 DisableDTX(); - WebRtc_Word16 UnregisterFromNetEqSafe(ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - AMR_encinst_t_* _encoderInstPtr; AMR_decinst_t_* _decoderInstPtr; WebRtc_Word16 _encodingMode; diff --git a/src/modules/audio_coding/main/source/acm_amrwb.cc b/src/modules/audio_coding/main/source/acm_amrwb.cc index fed2e3f5a..4b7dfc145 100644 --- a/src/modules/audio_coding/main/source/acm_amrwb.cc +++ b/src/modules/audio_coding/main/source/acm_amrwb.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -144,12 +144,6 @@ ACMAMRPackingFormat ACMAMRwb::AMRwbDecoderPackingFormat() const { return AMRUndefined; } -WebRtc_Word16 ACMAMRwb::UnregisterFromNetEqSafe( - ACMNetEQ* /* netEq */, - WebRtc_Word16 /* payloadType */) { - return -1; -} - #else //===================== Actual Implementation ======================= #define AMRWB_MODE_7k 0 @@ -433,18 +427,6 @@ ACMAMRPackingFormat ACMAMRwb::AMRwbDecoderPackingFormat() const { return _decoderPackingFormat; } -WebRtc_Word16 ACMAMRwb::UnregisterFromNetEqSafe(ACMNetEQ* netEq, - WebRtc_Word16 payloadType) { - if (payloadType != _decoderParams.codecInstant.pltype) { - WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, - "Cannot unregister codec %s given payload-type %d does not" - "match the stored payload type", - _decoderParams.codecInstant.plname, payloadType, - _decoderParams.codecInstant.pltype); - return -1; - } - return netEq->RemoveCodec(kDecoderAMRWB); -} #endif } // namespace webrtc diff --git a/src/modules/audio_coding/main/source/acm_amrwb.h b/src/modules/audio_coding/main/source/acm_amrwb.h index 775f07f1f..126302c86 100644 --- a/src/modules/audio_coding/main/source/acm_amrwb.h +++ b/src/modules/audio_coding/main/source/acm_amrwb.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -70,9 +70,6 @@ class ACMAMRwb: public ACMGenericCodec { WebRtc_Word16 DisableDTX(); - WebRtc_Word16 UnregisterFromNetEqSafe(ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - AMRWB_encinst_t_* _encoderInstPtr; AMRWB_decinst_t_* _decoderInstPtr; diff --git a/src/modules/audio_coding/main/source/acm_celt.cc b/src/modules/audio_coding/main/source/acm_celt.cc index 1c505ad93..de347c5f7 100644 --- a/src/modules/audio_coding/main/source/acm_celt.cc +++ b/src/modules/audio_coding/main/source/acm_celt.cc @@ -90,11 +90,6 @@ void ACMCELT::InternalDestructEncoderInst(void* /* ptrInst */) { return; } -int16_t ACMCELT::UnregisterFromNetEqSafe(ACMNetEQ* /* netEq */, - int16_t /* payloadType */) { - return -1; -} - bool ACMCELT::IsTrueStereoCodec() { return true; } @@ -289,21 +284,6 @@ void ACMCELT::InternalDestructEncoderInst(void* ptrInst) { return; } -int16_t ACMCELT::UnregisterFromNetEqSafe(ACMNetEQ* netEq, int16_t payloadType) { - if (payloadType != _decoderParams.codecInstant.pltype) { - WEBRTC_TRACE( - webrtc::kTraceError, - webrtc::kTraceAudioCoding, - _uniqueID, - "Cannot unregister codec: given payload-type does not match the stored " - "payload type", - _decoderParams.codecInstant.plname, payloadType, - _decoderParams.codecInstant.pltype); - return -1; - } - return netEq->RemoveCodec(kDecoderCELT_32); -} - bool ACMCELT::IsTrueStereoCodec() { return true; } diff --git a/src/modules/audio_coding/main/source/acm_celt.h b/src/modules/audio_coding/main/source/acm_celt.h index f6fd0e460..18e36ddeb 100644 --- a/src/modules/audio_coding/main/source/acm_celt.h +++ b/src/modules/audio_coding/main/source/acm_celt.h @@ -55,8 +55,6 @@ class ACMCELT : public ACMGenericCodec { void InternalDestructEncoderInst(void* ptrInst); - int16_t UnregisterFromNetEqSafe(ACMNetEQ* netEq, int16_t payloadType); - bool IsTrueStereoCodec(); int16_t SetBitRateSafe(const int32_t rate); diff --git a/src/modules/audio_coding/main/source/acm_cng.cc b/src/modules/audio_coding/main/source/acm_cng.cc index 1bda752e3..2393346a7 100644 --- a/src/modules/audio_coding/main/source/acm_cng.cc +++ b/src/modules/audio_coding/main/source/acm_cng.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -138,20 +138,4 @@ void ACMCNG::InternalDestructEncoderInst(void* ptrInst) { return; } -WebRtc_Word16 ACMCNG::UnregisterFromNetEqSafe(ACMNetEQ* netEq, - WebRtc_Word16 payloadType) { - if (payloadType != _decoderParams.codecInstant.pltype) { - WEBRTC_TRACE( - webrtc::kTraceError, - webrtc::kTraceAudioCoding, - _uniqueID, - "Cannot unregister codec %s given payload-type %d does not " - "match the stored payload type", - _decoderParams.codecInstant.plname, payloadType, - _decoderParams.codecInstant.pltype); - return -1; - } - return netEq->RemoveCodec(kDecoderCNG); -} - } // namespace webrtc diff --git a/src/modules/audio_coding/main/source/acm_cng.h b/src/modules/audio_coding/main/source/acm_cng.h index 1781b2be9..6276c44d2 100644 --- a/src/modules/audio_coding/main/source/acm_cng.h +++ b/src/modules/audio_coding/main/source/acm_cng.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -60,9 +60,6 @@ protected: return -1; } - WebRtc_Word16 UnregisterFromNetEqSafe(ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - WebRtcCngEncInst* _encoderInstPtr; WebRtcCngDecInst* _decoderInstPtr; WebRtc_Word16 _sampFreqHz; diff --git a/src/modules/audio_coding/main/source/acm_dtmf_playout.cc b/src/modules/audio_coding/main/source/acm_dtmf_playout.cc index e748f8a51..de69f1073 100644 --- a/src/modules/audio_coding/main/source/acm_dtmf_playout.cc +++ b/src/modules/audio_coding/main/source/acm_dtmf_playout.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -81,12 +81,6 @@ void ACMDTMFPlayout::DestructDecoderSafe() { return; } -WebRtc_Word16 ACMDTMFPlayout::UnregisterFromNetEqSafe( - ACMNetEQ* /* netEq */, - WebRtc_Word16 /* payloadType */) { - return -1; -} - #else //===================== Actual Implementation ======================= ACMDTMFPlayout::ACMDTMFPlayout(WebRtc_Word16 codecID) { @@ -165,21 +159,6 @@ void ACMDTMFPlayout::DestructDecoderSafe() { return; } -WebRtc_Word16 ACMDTMFPlayout::UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType) { - if (payloadType != _decoderParams.codecInstant.pltype) { - WEBRTC_TRACE(webrtc::kTraceError, - webrtc::kTraceAudioCoding, - _uniqueID, - "Cannot unregister codec %s given payload-type %d does not " - "match the stored payload type", - _decoderParams.codecInstant.plname, payloadType, - _decoderParams.codecInstant.pltype); - return -1; - } - return netEq->RemoveCodec(kDecoderAVT); -} #endif } // namespace webrtc diff --git a/src/modules/audio_coding/main/source/acm_dtmf_playout.h b/src/modules/audio_coding/main/source/acm_dtmf_playout.h index a75d6918c..62b1501b1 100644 --- a/src/modules/audio_coding/main/source/acm_dtmf_playout.h +++ b/src/modules/audio_coding/main/source/acm_dtmf_playout.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -46,9 +46,6 @@ class ACMDTMFPlayout: public ACMGenericCodec { WebRtc_Word16 InternalCreateDecoder(); - WebRtc_Word16 UnregisterFromNetEqSafe(ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - void InternalDestructEncoderInst(void* ptrInst); }; diff --git a/src/modules/audio_coding/main/source/acm_g722.cc b/src/modules/audio_coding/main/source/acm_g722.cc index c13a59e5f..5fda199aa 100644 --- a/src/modules/audio_coding/main/source/acm_g722.cc +++ b/src/modules/audio_coding/main/source/acm_g722.cc @@ -93,12 +93,6 @@ void ACMG722::InternalDestructEncoderInst(void* /* ptrInst */) { return; } -WebRtc_Word16 ACMG722::UnregisterFromNetEqSafe( - ACMNetEQ* /* netEq */, - WebRtc_Word16 /* payloadType */) { - return -1; -} - void ACMG722::SplitStereoPacket(uint8_t* /*payload*/, int32_t* /*payload_length*/) {} @@ -320,21 +314,6 @@ void ACMG722::InternalDestructEncoderInst(void* ptrInst) { return; } -WebRtc_Word16 ACMG722::UnregisterFromNetEqSafe(ACMNetEQ* netEq, - WebRtc_Word16 payloadType) { - if (payloadType != _decoderParams.codecInstant.pltype) { - WEBRTC_TRACE(webrtc::kTraceError, - webrtc::kTraceAudioCoding, - _uniqueID, - "Cannot unregister codec %s given payload-type %d does not " - "match the stored payload type", - _decoderParams.codecInstant.plname, payloadType, - _decoderParams.codecInstant.pltype); - return -1; - } - return netEq->RemoveCodec(kDecoderG722); -} - // Split the stereo packet and place left and right channel after each other // in the payload vector. void ACMG722::SplitStereoPacket(uint8_t* payload, int32_t* payload_length) { diff --git a/src/modules/audio_coding/main/source/acm_g722.h b/src/modules/audio_coding/main/source/acm_g722.h index 122ccf3ac..d718cdb94 100644 --- a/src/modules/audio_coding/main/source/acm_g722.h +++ b/src/modules/audio_coding/main/source/acm_g722.h @@ -60,9 +60,6 @@ class ACMG722: public ACMGenericCodec { void InternalDestructEncoderInst(void* ptrInst); - WebRtc_Word16 UnregisterFromNetEqSafe(ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - void SplitStereoPacket(uint8_t* payload, int32_t* payload_length); ACMG722EncStr* _ptrEncStr; diff --git a/src/modules/audio_coding/main/source/acm_g7221.cc b/src/modules/audio_coding/main/source/acm_g7221.cc index b82d93121..00595ebb7 100644 --- a/src/modules/audio_coding/main/source/acm_g7221.cc +++ b/src/modules/audio_coding/main/source/acm_g7221.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -161,11 +161,6 @@ void ACMG722_1::InternalDestructEncoderInst(void* /* ptrInst */) { return; } -WebRtc_Word16 ACMG722_1::UnregisterFromNetEqSafe( - ACMNetEQ* /* netEq */, WebRtc_Word16 /* payloadType */) { - return -1; -} - #else //===================== Actual Implementation ======================= ACMG722_1::ACMG722_1( WebRtc_Word16 codecID): @@ -493,36 +488,6 @@ void ACMG722_1::InternalDestructEncoderInst(void* ptrInst) { return; } -WebRtc_Word16 ACMG722_1::UnregisterFromNetEqSafe(ACMNetEQ* netEq, - WebRtc_Word16 payloadType) { - if (payloadType != _decoderParams.codecInstant.pltype) { - WEBRTC_TRACE(webrtc::kTraceError, - webrtc::kTraceAudioCoding, - _uniqueID, - "Cannot unregister codec %s given payload-type %d does not " - "match the stored payload type", - _decoderParams.codecInstant.plname, payloadType, - _decoderParams.codecInstant.pltype); - return -1; - } - switch (_operationalRate) { - case 16000: { - return netEq->RemoveCodec(kDecoderG722_1_16); - } - case 24000: { - return netEq->RemoveCodec(kDecoderG722_1_24); - } - case 32000: { - return netEq->RemoveCodec(kDecoderG722_1_32); - } - default: { - WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, - "UnregisterFromNetEqSafe: Wrong rate for G722_1."); - return -1; - } - } -} - #endif } // namespace webrtc diff --git a/src/modules/audio_coding/main/source/acm_g7221.h b/src/modules/audio_coding/main/source/acm_g7221.h index 3130afde9..af124753f 100644 --- a/src/modules/audio_coding/main/source/acm_g7221.h +++ b/src/modules/audio_coding/main/source/acm_g7221.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -57,9 +57,6 @@ class ACMG722_1: public ACMGenericCodec { void InternalDestructEncoderInst(void* ptrInst); - WebRtc_Word16 UnregisterFromNetEqSafe(ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - WebRtc_Word32 _operationalRate; G722_1_Inst_t_* _encoderInstPtr; diff --git a/src/modules/audio_coding/main/source/acm_g7221c.cc b/src/modules/audio_coding/main/source/acm_g7221c.cc index 920965e27..92712d531 100644 --- a/src/modules/audio_coding/main/source/acm_g7221c.cc +++ b/src/modules/audio_coding/main/source/acm_g7221c.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -162,12 +162,6 @@ void ACMG722_1C::InternalDestructEncoderInst(void* /* ptrInst */) { return; } -WebRtc_Word16 ACMG722_1C::UnregisterFromNetEqSafe( - ACMNetEQ* /* netEq */, - WebRtc_Word16 /* payloadType */) { - return -1; -} - #else //===================== Actual Implementation ======================= ACMG722_1C::ACMG722_1C(WebRtc_Word16 codecID) : _encoderInstPtr(NULL), _encoderInstPtrRight(NULL), _decoderInstPtr(NULL), @@ -496,37 +490,6 @@ void ACMG722_1C::InternalDestructEncoderInst(void* ptrInst) { return; } -WebRtc_Word16 ACMG722_1C::UnregisterFromNetEqSafe(ACMNetEQ* netEq, - WebRtc_Word16 payloadType) { - if (payloadType != _decoderParams.codecInstant.pltype) { - WEBRTC_TRACE(webrtc::kTraceError, - webrtc::kTraceAudioCoding, - _uniqueID, - "Cannot unregister codec %s given payload-type %d does not" - "match the stored payload type", - _decoderParams.codecInstant.plname, payloadType, - _decoderParams.codecInstant.pltype); - return -1; - } - switch (_operationalRate) { - case 24000: { - return netEq->RemoveCodec(kDecoderG722_1C_24); - } - case 32000: { - return netEq->RemoveCodec(kDecoderG722_1C_32); - } - case 48000: { - return netEq->RemoveCodec(kDecoderG722_1C_48); - } - default: { - WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, - "Could not remove codec from NetEQ for G722_1c." - "Sampling frequency doesn't match"); - return -1; - } - } -} - #endif } // namespace webrtc diff --git a/src/modules/audio_coding/main/source/acm_g7221c.h b/src/modules/audio_coding/main/source/acm_g7221c.h index 5129e4c5a..ef573dc9a 100644 --- a/src/modules/audio_coding/main/source/acm_g7221c.h +++ b/src/modules/audio_coding/main/source/acm_g7221c.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -65,10 +65,6 @@ protected: void InternalDestructEncoderInst( void* ptrInst); - WebRtc_Word16 UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - WebRtc_Word32 _operationalRate; G722_1_Inst_t_* _encoderInstPtr; diff --git a/src/modules/audio_coding/main/source/acm_g729.cc b/src/modules/audio_coding/main/source/acm_g729.cc index bca2d7272..79e99d41b 100644 --- a/src/modules/audio_coding/main/source/acm_g729.cc +++ b/src/modules/audio_coding/main/source/acm_g729.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -171,16 +171,6 @@ ACMG729::InternalDestructEncoderInst( return; } - -WebRtc_Word16 -ACMG729::UnregisterFromNetEqSafe( - ACMNetEQ* /* netEq */, - WebRtc_Word16 /* payloadType */) -{ - return -1; -} - - #else //===================== Actual Implementation ======================= ACMG729::ACMG729( @@ -521,26 +511,6 @@ ACMG729::InternalDestructEncoderInst( return; } - -WebRtc_Word16 -ACMG729::UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType) -{ - // Remove codec from the NetEQ database - if(payloadType != _decoderParams.codecInstant.pltype) - { - WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, - "Cannot unregister codec %s given payload-type %d does not match \ -the stored payload type", - _decoderParams.codecInstant.plname, - payloadType, - _decoderParams.codecInstant.pltype); - return -1; - } - return netEq->RemoveCodec(kDecoderG729); -} - #endif } // namespace webrtc diff --git a/src/modules/audio_coding/main/source/acm_g729.h b/src/modules/audio_coding/main/source/acm_g729.h index 50b648aaa..474dabd37 100644 --- a/src/modules/audio_coding/main/source/acm_g729.h +++ b/src/modules/audio_coding/main/source/acm_g729.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -70,10 +70,6 @@ protected: WebRtc_Word32 IsInternalDTXReplacedSafe( bool* internalDTXReplaced); - WebRtc_Word16 UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - G729_encinst_t_* _encoderInstPtr; G729_decinst_t_* _decoderInstPtr; diff --git a/src/modules/audio_coding/main/source/acm_g7291.cc b/src/modules/audio_coding/main/source/acm_g7291.cc index d832e9c7a..38b92ca28 100644 --- a/src/modules/audio_coding/main/source/acm_g7291.cc +++ b/src/modules/audio_coding/main/source/acm_g7291.cc @@ -146,15 +146,6 @@ ACMG729_1::InternalDestructEncoderInst( return; } - -WebRtc_Word16 -ACMG729_1::UnregisterFromNetEqSafe( - ACMNetEQ* /* netEq */, - WebRtc_Word16 /* payloadType */) -{ - return -1; -} - WebRtc_Word16 ACMG729_1::SetBitRateSafe( const WebRtc_Word32 /*rate*/ ) @@ -385,25 +376,6 @@ ACMG729_1::InternalDestructEncoderInst( return; } - -WebRtc_Word16 -ACMG729_1::UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType) -{ - if(payloadType != _decoderParams.codecInstant.pltype) - { - WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, - "Cannot unregister codec: given payload-type does not match \ -the stored payload type", - _decoderParams.codecInstant.plname, - payloadType, - _decoderParams.codecInstant.pltype); - return -1; - } - return netEq->RemoveCodec(kDecoderG729_1); -} - WebRtc_Word16 ACMG729_1::SetBitRateSafe( const WebRtc_Word32 rate) diff --git a/src/modules/audio_coding/main/source/acm_g7291.h b/src/modules/audio_coding/main/source/acm_g7291.h index cb27dc978..1d03250e3 100644 --- a/src/modules/audio_coding/main/source/acm_g7291.h +++ b/src/modules/audio_coding/main/source/acm_g7291.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -60,14 +60,6 @@ protected: void InternalDestructEncoderInst( void* ptrInst); - //WebRtc_Word16 EnableDTX(); - // - //WebRtc_Word16 DisableDTX(); - - WebRtc_Word16 UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - WebRtc_Word16 SetBitRateSafe( const WebRtc_Word32 rate); diff --git a/src/modules/audio_coding/main/source/acm_generic_codec.cc b/src/modules/audio_coding/main/source/acm_generic_codec.cc index 0e212fb29..210837379 100644 --- a/src/modules/audio_coding/main/source/acm_generic_codec.cc +++ b/src/modules/audio_coding/main/source/acm_generic_codec.cc @@ -1414,30 +1414,6 @@ ACMGenericCodec::SamplesLeftToEncode() 0:(_frameLenSmpl - _inAudioIxWrite); } -WebRtc_Word32 -ACMGenericCodec::UnregisterFromNetEq( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType) -{ - WriteLockScoped wl(_codecWrapperLock); - if(!_registeredInNetEq) - { - return 0; - } - if(UnregisterFromNetEqSafe(netEq, payloadType) < 0) - { - WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, - "UnregisterFromNetEq: error, cannot unregister from NetEq"); - _registeredInNetEq = true; - return -1; - } - else - { - _registeredInNetEq = false; - return 0; - } -} - void ACMGenericCodec::SetUniqueID( const WebRtc_UWord32 id) diff --git a/src/modules/audio_coding/main/source/acm_generic_codec.h b/src/modules/audio_coding/main/source/acm_generic_codec.h index 36edbcb1d..e26a291ca 100644 --- a/src/modules/audio_coding/main/source/acm_generic_codec.h +++ b/src/modules/audio_coding/main/source/acm_generic_codec.h @@ -599,25 +599,6 @@ public: WebRtc_UWord32 LastEncodedTimestamp() const; - /////////////////////////////////////////////////////////////////////////// - // WebRtc_Word32 UnregisterFromNetEq() - // To remove the codec from NetEQ. If the codec (or the decoder instance) - // is going to be deleted, first the codec has to be removed from NetEq - // by calling this function. - // - // Input: - // -netEq : pointer to a NetEq instance that the codec - // has to be unregistered from. - // - // Output: - // -1 if failed to unregister the codec, - // 0 if the codec is successfully unregistered. - // - WebRtc_Word32 UnregisterFromNetEq( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - - /////////////////////////////////////////////////////////////////////////// // SetUniqueID() // Set a unique ID for the codec to be used for tracing and debuging @@ -1006,15 +987,6 @@ protected: virtual WebRtc_Word32 IsInternalDTXReplacedSafe( bool* internalDTXReplaced); - /////////////////////////////////////////////////////////////////////////// - // See UnregisterFromNetEq() for the description of function, - // input(s)/output(s) and return value. - // - virtual WebRtc_Word16 UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType) = 0; - - /////////////////////////////////////////////////////////////////////////// // WebRtc_Word16 CreateEncoder() // Creates the encoder instance. diff --git a/src/modules/audio_coding/main/source/acm_gsmfr.cc b/src/modules/audio_coding/main/source/acm_gsmfr.cc index c1f817c61..693930f5c 100644 --- a/src/modules/audio_coding/main/source/acm_gsmfr.cc +++ b/src/modules/audio_coding/main/source/acm_gsmfr.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -157,16 +157,6 @@ ACMGSMFR::InternalDestructEncoderInst( return; } - -WebRtc_Word16 -ACMGSMFR::UnregisterFromNetEqSafe( - ACMNetEQ* /* netEq */, - WebRtc_Word16 /* payloadType */) -{ - return -1; -} - - #else //===================== Actual Implementation ======================= ACMGSMFR::ACMGSMFR( @@ -392,25 +382,6 @@ ACMGSMFR::InternalDestructEncoderInst( return; } - -WebRtc_Word16 -ACMGSMFR::UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType) -{ - if(payloadType != _decoderParams.codecInstant.pltype) - { - WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, - "Cannot unregister codec: payload-type does not match \ -the stored payload type", - _decoderParams.codecInstant.plname, - payloadType, - _decoderParams.codecInstant.pltype); - return -1; - } - return netEq->RemoveCodec(kDecoderGSMFR); -} - #endif } // namespace webrtc diff --git a/src/modules/audio_coding/main/source/acm_gsmfr.h b/src/modules/audio_coding/main/source/acm_gsmfr.h index 43e05fc08..8991de888 100644 --- a/src/modules/audio_coding/main/source/acm_gsmfr.h +++ b/src/modules/audio_coding/main/source/acm_gsmfr.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -64,10 +64,6 @@ protected: WebRtc_Word16 DisableDTX(); - WebRtc_Word16 UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - GSMFR_encinst_t_* _encoderInstPtr; GSMFR_decinst_t_* _decoderInstPtr; }; diff --git a/src/modules/audio_coding/main/source/acm_ilbc.cc b/src/modules/audio_coding/main/source/acm_ilbc.cc index f16e2f8cf..0721619b2 100644 --- a/src/modules/audio_coding/main/source/acm_ilbc.cc +++ b/src/modules/audio_coding/main/source/acm_ilbc.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -131,16 +131,6 @@ ACMILBC::SetBitRateSafe(const WebRtc_Word32 /* rate */) return -1; } - -WebRtc_Word16 -ACMILBC::UnregisterFromNetEqSafe( - ACMNetEQ* /* netEq */, - WebRtc_Word16 /* payloadType */) -{ - return -1; -} - - #else //===================== Actual Implementation ======================= @@ -367,24 +357,6 @@ ACMILBC::SetBitRateSafe(const WebRtc_Word32 rate) return 0; } -WebRtc_Word16 -ACMILBC::UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType) -{ - if(payloadType != _decoderParams.codecInstant.pltype) - { - WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, - "Cannot unregister codec: given payload-type does not match \ -the stored payload type", - _decoderParams.codecInstant.plname, - payloadType, - _decoderParams.codecInstant.pltype); - return -1; - } - return netEq->RemoveCodec(kDecoderILBC); -} - #endif } // namespace webrtc diff --git a/src/modules/audio_coding/main/source/acm_ilbc.h b/src/modules/audio_coding/main/source/acm_ilbc.h index 2d3e42022..02eb6f1c5 100644 --- a/src/modules/audio_coding/main/source/acm_ilbc.h +++ b/src/modules/audio_coding/main/source/acm_ilbc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -65,10 +65,6 @@ protected: void InternalDestructEncoderInst( void* ptrInst); - WebRtc_Word16 UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - iLBC_encinst_t_* _encoderInstPtr; iLBC_decinst_t_* _decoderInstPtr; }; diff --git a/src/modules/audio_coding/main/source/acm_isac.cc b/src/modules/audio_coding/main/source/acm_isac.cc index b4a66d574..b5ec6d211 100644 --- a/src/modules/audio_coding/main/source/acm_isac.cc +++ b/src/modules/audio_coding/main/source/acm_isac.cc @@ -247,16 +247,6 @@ ACMISAC::GetRedPayloadSafe( return -1; } - -WebRtc_Word16 -ACMISAC::UnregisterFromNetEqSafe( - ACMNetEQ* /* netEq */, - WebRtc_Word16 /* payloadType */) -{ - return -1; -} - - WebRtc_Word16 ACMISAC::UpdateDecoderSampFreq( WebRtc_Word16 /* codecId */) @@ -997,35 +987,6 @@ ACMISAC::GetRedPayloadSafe( #endif } - -WebRtc_Word16 -ACMISAC::UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType) -{ - if(payloadType == _decoderParams.codecInstant.pltype) - { - return netEq->RemoveCodec(kDecoderISAC); - } - else if(payloadType == _decoderParams32kHz.codecInstant.pltype) - { - return netEq->RemoveCodec(kDecoderISACswb); - } - else - { - WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, - "Cannot unregister codec %s given payload-type %d does not match \ -the stored payload type %d or %d", - _decoderParams.codecInstant.plname, - payloadType, - _decoderParams.codecInstant.pltype, - _decoderParams32kHz.codecInstant.pltype); - - return -1; - } -} - - WebRtc_Word16 ACMISAC::UpdateDecoderSampFreq( #ifdef WEBRTC_CODEC_ISAC diff --git a/src/modules/audio_coding/main/source/acm_isac.h b/src/modules/audio_coding/main/source/acm_isac.h index 6013c61ad..ee56a6eca 100644 --- a/src/modules/audio_coding/main/source/acm_isac.h +++ b/src/modules/audio_coding/main/source/acm_isac.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -123,10 +123,6 @@ protected: WebRtc_Word32 rate, bool isRED); - WebRtc_Word16 UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - void CurrentRate(WebRtc_Word32& rateBitPerSec); void UpdateFrameLen(); diff --git a/src/modules/audio_coding/main/source/acm_opus.cc b/src/modules/audio_coding/main/source/acm_opus.cc index ebdf971a4..87bdd8bcb 100644 --- a/src/modules/audio_coding/main/source/acm_opus.cc +++ b/src/modules/audio_coding/main/source/acm_opus.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -131,15 +131,6 @@ ACMOPUS::InternalDestructEncoderInst( return; } - -WebRtc_Word16 -ACMOPUS::UnregisterFromNetEqSafe( - ACMNetEQ* /* netEq */, - WebRtc_Word16 /* payloadType */) -{ - return -1; -} - WebRtc_Word16 ACMOPUS::SetBitRateSafe( const WebRtc_Word32 /*rate*/ ) @@ -365,25 +356,6 @@ ACMOPUS::InternalDestructEncoderInst( return; } - -WebRtc_Word16 -ACMOPUS::UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType) -{ - if(payloadType != _decoderParams.codecInstant.pltype) - { - WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, - "Cannot unregister codec: given payload-type does not match \ -the stored payload type", - _decoderParams.codecInstant.plname, - payloadType, - _decoderParams.codecInstant.pltype); - return -1; - } - return netEq->RemoveCodec(kDecoderOpus); -} - WebRtc_Word16 ACMOPUS::SetBitRateSafe( const WebRtc_Word32 rate) diff --git a/src/modules/audio_coding/main/source/acm_opus.h b/src/modules/audio_coding/main/source/acm_opus.h index 278c36919..c6832fa8b 100644 --- a/src/modules/audio_coding/main/source/acm_opus.h +++ b/src/modules/audio_coding/main/source/acm_opus.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -61,10 +61,6 @@ protected: void InternalDestructEncoderInst( void* ptrInst); - WebRtc_Word16 UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - WebRtc_Word16 SetBitRateSafe( const WebRtc_Word32 rate); diff --git a/src/modules/audio_coding/main/source/acm_pcm16b.cc b/src/modules/audio_coding/main/source/acm_pcm16b.cc index 78c71780c..971709c63 100644 --- a/src/modules/audio_coding/main/source/acm_pcm16b.cc +++ b/src/modules/audio_coding/main/source/acm_pcm16b.cc @@ -125,16 +125,6 @@ ACMPCM16B::DestructDecoderSafe() return; } - -WebRtc_Word16 -ACMPCM16B::UnregisterFromNetEqSafe( - ACMNetEQ* /* netEq */, - WebRtc_Word16 /* payloadType */) -{ - return -1; -} - - void ACMPCM16B::SplitStereoPacket(uint8_t* /*payload*/, int32_t* /*payload_length*/) {} @@ -293,44 +283,6 @@ ACMPCM16B::DestructDecoderSafe() return; } - -WebRtc_Word16 -ACMPCM16B::UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType) -{ - if(payloadType != _decoderParams.codecInstant.pltype) - { - WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, - "Cannot unregister codec %s given payload-type %d does not match \ -the stored payload type", - _decoderParams.codecInstant.plname, - payloadType, - _decoderParams.codecInstant.pltype); - return -1; - } - - switch(_samplingFreqHz) - { - case 8000: - { - return netEq->RemoveCodec(kDecoderPCM16B); - } - case 16000: - { - return netEq->RemoveCodec(kDecoderPCM16Bwb); - } - case 32000: - { - return netEq->RemoveCodec(kDecoderPCM16Bswb32kHz); - } - default: - { - return -1; - } - } -} - // Split the stereo packet and place left and right channel after each other // in the payload vector. void ACMPCM16B::SplitStereoPacket(uint8_t* payload, int32_t* payload_length) { diff --git a/src/modules/audio_coding/main/source/acm_pcm16b.h b/src/modules/audio_coding/main/source/acm_pcm16b.h index 495934beb..09fbb0562 100644 --- a/src/modules/audio_coding/main/source/acm_pcm16b.h +++ b/src/modules/audio_coding/main/source/acm_pcm16b.h @@ -54,10 +54,6 @@ protected: WebRtc_Word16 InternalCreateDecoder(); - WebRtc_Word16 UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - void InternalDestructEncoderInst( void* ptrInst); diff --git a/src/modules/audio_coding/main/source/acm_pcma.cc b/src/modules/audio_coding/main/source/acm_pcma.cc index 9d2de204c..6d13a5fcf 100644 --- a/src/modules/audio_coding/main/source/acm_pcma.cc +++ b/src/modules/audio_coding/main/source/acm_pcma.cc @@ -142,26 +142,6 @@ ACMPCMA::DestructDecoderSafe() return; } - -WebRtc_Word16 -ACMPCMA::UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType) -{ - if(payloadType != _decoderParams.codecInstant.pltype) - { - WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, - "Cannot unregister codec %s given payload-type %d does not match \ -the stored payload type", - _decoderParams.codecInstant.plname, - payloadType, - _decoderParams.codecInstant.pltype); - return -1; - } - - return netEq->RemoveCodec(kDecoderPCMa); -} - // Split the stereo packet and place left and right channel after each other // in the payload vector. void ACMPCMA::SplitStereoPacket(uint8_t* payload, int32_t* payload_length) { diff --git a/src/modules/audio_coding/main/source/acm_pcma.h b/src/modules/audio_coding/main/source/acm_pcma.h index 1a970c740..a3cf22052 100644 --- a/src/modules/audio_coding/main/source/acm_pcma.h +++ b/src/modules/audio_coding/main/source/acm_pcma.h @@ -54,10 +54,6 @@ protected: WebRtc_Word16 InternalCreateDecoder(); - WebRtc_Word16 UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - void InternalDestructEncoderInst( void* ptrInst); diff --git a/src/modules/audio_coding/main/source/acm_pcmu.cc b/src/modules/audio_coding/main/source/acm_pcmu.cc index 332888d1e..f1173f8b1 100644 --- a/src/modules/audio_coding/main/source/acm_pcmu.cc +++ b/src/modules/audio_coding/main/source/acm_pcmu.cc @@ -143,27 +143,6 @@ void ACMPCMU::DestructDecoderSafe() return; } - -WebRtc_Word16 -ACMPCMU::UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType) -{ - - if(payloadType != _decoderParams.codecInstant.pltype) - { - WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, - "Cannot unregister codec %s given payload-type %d does not match \ -the stored payload type", - _decoderParams.codecInstant.plname, - payloadType, - _decoderParams.codecInstant.pltype); - return -1; - } - - return netEq->RemoveCodec(kDecoderPCMu); -} - // Split the stereo packet and place left and right channel after each other // in the payload vector. void ACMPCMU::SplitStereoPacket(uint8_t* payload, int32_t* payload_length) { diff --git a/src/modules/audio_coding/main/source/acm_pcmu.h b/src/modules/audio_coding/main/source/acm_pcmu.h index 751be86bd..716ac407f 100644 --- a/src/modules/audio_coding/main/source/acm_pcmu.h +++ b/src/modules/audio_coding/main/source/acm_pcmu.h @@ -54,10 +54,6 @@ protected: WebRtc_Word16 InternalCreateDecoder(); - WebRtc_Word16 UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - void InternalDestructEncoderInst( void* ptrInst); diff --git a/src/modules/audio_coding/main/source/acm_red.cc b/src/modules/audio_coding/main/source/acm_red.cc index 88dbc247d..232142d9d 100644 --- a/src/modules/audio_coding/main/source/acm_red.cc +++ b/src/modules/audio_coding/main/source/acm_red.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -140,24 +140,4 @@ void ACMRED::DestructDecoderSafe() return; } - -WebRtc_Word16 -ACMRED::UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType) -{ - if(payloadType != _decoderParams.codecInstant.pltype) - { - WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, - "Cannot unregister codec %s given payload-type %d does not match \ -the stored payload type", - _decoderParams.codecInstant.plname, - payloadType, - _decoderParams.codecInstant.pltype); - return -1; - } - - return netEq->RemoveCodec(kDecoderRED); -} - } // namespace webrtc diff --git a/src/modules/audio_coding/main/source/acm_red.h b/src/modules/audio_coding/main/source/acm_red.h index d22cb8cde..3aaae4795 100644 --- a/src/modules/audio_coding/main/source/acm_red.h +++ b/src/modules/audio_coding/main/source/acm_red.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -54,10 +54,6 @@ protected: WebRtc_Word16 InternalCreateDecoder(); - WebRtc_Word16 UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - void InternalDestructEncoderInst( void* ptrInst); }; diff --git a/src/modules/audio_coding/main/source/acm_speex.cc b/src/modules/audio_coding/main/source/acm_speex.cc index acb2a3b27..d3e108275 100644 --- a/src/modules/audio_coding/main/source/acm_speex.cc +++ b/src/modules/audio_coding/main/source/acm_speex.cc @@ -166,14 +166,6 @@ ACMSPEEX::InternalDestructEncoderInst( return; } -WebRtc_Word16 -ACMSPEEX::UnregisterFromNetEqSafe( - ACMNetEQ* /* netEq */, - WebRtc_Word16 /* payloadType */) -{ - return -1; -} - #ifdef UNUSEDSPEEX WebRtc_Word16 ACMSPEEX::EnableVBR() @@ -534,44 +526,6 @@ ACMSPEEX::InternalDestructEncoderInst( return; } - -WebRtc_Word16 -ACMSPEEX::UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType) -{ - if(payloadType != _decoderParams.codecInstant.pltype) - { - WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, - "Cannot unregister codec %s given payload-type %d does not match \ -the stored payload type", - _decoderParams.codecInstant.plname, - payloadType, - _decoderParams.codecInstant.pltype); - return -1; - } - - - switch(_samplingFrequency) - { - case 8000: - { - return netEq->RemoveCodec(kDecoderSPEEX_8); - } - case 16000: - { - return netEq->RemoveCodec(kDecoderSPEEX_16); - } - default: - { - WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, _uniqueID, - "Could not unregister Speex from NetEQ. Sampling frequency doesn't match"); - return -1; - } - } -} - - #ifdef UNUSEDSPEEX // This API is currently not in use. If requested to be able to enable/disable VBR diff --git a/src/modules/audio_coding/main/source/acm_speex.h b/src/modules/audio_coding/main/source/acm_speex.h index 7988e45b6..aabcec171 100644 --- a/src/modules/audio_coding/main/source/acm_speex.h +++ b/src/modules/audio_coding/main/source/acm_speex.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -76,10 +76,6 @@ protected: WebRtc_Word16 mode); #endif - WebRtc_Word16 UnregisterFromNetEqSafe( - ACMNetEQ* netEq, - WebRtc_Word16 payloadType); - SPEEX_encinst_t_* _encoderInstPtr; SPEEX_decinst_t_* _decoderInstPtr; WebRtc_Word16 _complMode;