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
This commit is contained in:
@@ -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
|
||||
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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);
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
};
|
||||
|
||||
|
@@ -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) {
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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.
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
};
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
};
|
||||
|
@@ -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
|
||||
|
@@ -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();
|
||||
|
@@ -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)
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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) {
|
||||
|
@@ -54,10 +54,6 @@ protected:
|
||||
|
||||
WebRtc_Word16 InternalCreateDecoder();
|
||||
|
||||
WebRtc_Word16 UnregisterFromNetEqSafe(
|
||||
ACMNetEQ* netEq,
|
||||
WebRtc_Word16 payloadType);
|
||||
|
||||
void InternalDestructEncoderInst(
|
||||
void* ptrInst);
|
||||
|
||||
|
@@ -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) {
|
||||
|
@@ -54,10 +54,6 @@ protected:
|
||||
|
||||
WebRtc_Word16 InternalCreateDecoder();
|
||||
|
||||
WebRtc_Word16 UnregisterFromNetEqSafe(
|
||||
ACMNetEQ* netEq,
|
||||
WebRtc_Word16 payloadType);
|
||||
|
||||
void InternalDestructEncoderInst(
|
||||
void* ptrInst);
|
||||
|
||||
|
@@ -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) {
|
||||
|
@@ -54,10 +54,6 @@ protected:
|
||||
|
||||
WebRtc_Word16 InternalCreateDecoder();
|
||||
|
||||
WebRtc_Word16 UnregisterFromNetEqSafe(
|
||||
ACMNetEQ* netEq,
|
||||
WebRtc_Word16 payloadType);
|
||||
|
||||
void InternalDestructEncoderInst(
|
||||
void* ptrInst);
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
};
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user