Remove DestructEncoderInst and its codec-specific implementations.
This method is seemingly never called. BUG=none TEST=none R=henrik.lundin@webrtc.org Review URL: https://webrtc-codereview.appspot.com/24539004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7131 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
a2e6a52563
commit
23a5e3c3b0
@ -77,8 +77,6 @@ void ACMAMR::DestructEncoderSafe() { return; }
|
||||
|
||||
int16_t ACMAMR::SetBitRateSafe(const int32_t /* rate */) { return -1; }
|
||||
|
||||
void ACMAMR::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
|
||||
|
||||
int16_t ACMAMR::SetAMREncoderPackingFormat(
|
||||
ACMAMRPackingFormat /* packing_format */) {
|
||||
return -1;
|
||||
@ -268,14 +266,6 @@ int16_t ACMAMR::SetBitRateSafe(const int32_t rate) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ACMAMR::InternalDestructEncoderInst(void* ptr_inst) {
|
||||
// Free the memory where ptr_inst is pointing to
|
||||
if (ptr_inst != NULL) {
|
||||
WebRtcAmr_FreeEnc(static_cast<AMR_encinst_t_*>(ptr_inst));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
int16_t ACMAMR::SetAMREncoderPackingFormat(ACMAMRPackingFormat packing_format) {
|
||||
if ((packing_format != AMRBandwidthEfficient) &&
|
||||
(packing_format != AMROctetAlligned) &&
|
||||
|
@ -48,8 +48,6 @@ class ACMAMR : public ACMGenericCodec {
|
||||
|
||||
int16_t InternalCreateEncoder();
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst);
|
||||
|
||||
int16_t SetBitRateSafe(const int32_t rate);
|
||||
|
||||
int16_t EnableDTX();
|
||||
|
@ -73,8 +73,6 @@ void ACMAMRwb::DestructEncoderSafe() { return; }
|
||||
|
||||
int16_t ACMAMRwb::SetBitRateSafe(const int32_t /* rate */) { return -1; }
|
||||
|
||||
void ACMAMRwb::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
|
||||
|
||||
int16_t ACMAMRwb::SetAMRwbEncoderPackingFormat(
|
||||
ACMAMRPackingFormat /* packing_format */) {
|
||||
return -1;
|
||||
@ -273,13 +271,6 @@ int16_t ACMAMRwb::SetBitRateSafe(const int32_t rate) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ACMAMRwb::InternalDestructEncoderInst(void* ptr_inst) {
|
||||
if (ptr_inst != NULL) {
|
||||
WebRtcAmrWb_FreeEnc(static_cast<AMRWB_encinst_t_*>(ptr_inst));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
int16_t ACMAMRwb::SetAMRwbEncoderPackingFormat(
|
||||
ACMAMRPackingFormat packing_format) {
|
||||
if ((packing_format != AMRBandwidthEfficient) &&
|
||||
|
@ -48,8 +48,6 @@ class ACMAMRwb : public ACMGenericCodec {
|
||||
|
||||
int16_t InternalCreateEncoder();
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst);
|
||||
|
||||
int16_t SetBitRateSafe(const int32_t rate);
|
||||
|
||||
int16_t EnableDTX();
|
||||
|
@ -57,10 +57,6 @@ void ACMCELT::DestructEncoderSafe() {
|
||||
return;
|
||||
}
|
||||
|
||||
void ACMCELT::InternalDestructEncoderInst(void* /* ptr_inst */) {
|
||||
return;
|
||||
}
|
||||
|
||||
int16_t ACMCELT::SetBitRateSafe(const int32_t /*rate*/) {
|
||||
return -1;
|
||||
}
|
||||
@ -159,13 +155,6 @@ void ACMCELT::DestructEncoderSafe() {
|
||||
}
|
||||
}
|
||||
|
||||
void ACMCELT::InternalDestructEncoderInst(void* ptr_inst) {
|
||||
if (ptr_inst != NULL) {
|
||||
WebRtcCelt_FreeEnc(static_cast<CELT_encinst_t*>(ptr_inst));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
int16_t ACMCELT::SetBitRateSafe(const int32_t rate) {
|
||||
// Check that rate is in the valid range.
|
||||
if ((rate >= 48000) && (rate <= 128000)) {
|
||||
|
@ -37,8 +37,6 @@ class ACMCELT : public ACMGenericCodec {
|
||||
|
||||
int16_t InternalCreateEncoder();
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst);
|
||||
|
||||
int16_t SetBitRateSafe(const int32_t rate);
|
||||
|
||||
CELT_encinst_t_* enc_inst_ptr_;
|
||||
|
@ -71,13 +71,6 @@ void ACMCNG::DestructEncoderSafe() {
|
||||
encoder_initialized_ = false;
|
||||
}
|
||||
|
||||
void ACMCNG::InternalDestructEncoderInst(void* ptr_inst) {
|
||||
if (ptr_inst != NULL) {
|
||||
WebRtcCng_FreeEnc(static_cast<CNG_enc_inst*>(ptr_inst));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
} // namespace acm2
|
||||
|
||||
} // namespace webrtc
|
||||
|
@ -40,8 +40,6 @@ class ACMCNG: public ACMGenericCodec {
|
||||
|
||||
int16_t InternalCreateEncoder();
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst);
|
||||
|
||||
int16_t EnableDTX() {
|
||||
return -1;
|
||||
}
|
||||
|
@ -40,10 +40,6 @@ ACMGenericCodec* ACMDTMFPlayout::CreateInstance(void) { return NULL; }
|
||||
|
||||
int16_t ACMDTMFPlayout::InternalCreateEncoder() { return -1; }
|
||||
|
||||
void ACMDTMFPlayout::InternalDestructEncoderInst(void* /* ptr_inst */) {
|
||||
return;
|
||||
}
|
||||
|
||||
void ACMDTMFPlayout::DestructEncoderSafe() {
|
||||
return;
|
||||
}
|
||||
@ -73,11 +69,6 @@ int16_t ACMDTMFPlayout::InternalCreateEncoder() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ACMDTMFPlayout::InternalDestructEncoderInst(void* /* ptr_inst */) {
|
||||
// DTMFPlayout has no instance
|
||||
return;
|
||||
}
|
||||
|
||||
void ACMDTMFPlayout::DestructEncoderSafe() {
|
||||
// DTMFPlayout has no instance
|
||||
return;
|
||||
|
@ -33,8 +33,6 @@ class ACMDTMFPlayout : public ACMGenericCodec {
|
||||
void DestructEncoderSafe();
|
||||
|
||||
int16_t InternalCreateEncoder();
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst);
|
||||
};
|
||||
|
||||
} // namespace acm2
|
||||
|
@ -52,8 +52,6 @@ int16_t ACMG722::InternalCreateEncoder() { return -1; }
|
||||
|
||||
void ACMG722::DestructEncoderSafe() { return; }
|
||||
|
||||
void ACMG722::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
|
||||
|
||||
#else //===================== Actual Implementation =======================
|
||||
|
||||
// Encoder and decoder memory
|
||||
@ -187,13 +185,6 @@ void ACMG722::DestructEncoderSafe() {
|
||||
encoder_initialized_ = false;
|
||||
}
|
||||
|
||||
void ACMG722::InternalDestructEncoderInst(void* ptr_inst) {
|
||||
if (ptr_inst != NULL) {
|
||||
WebRtcG722_FreeEncoder(static_cast<G722EncInst*>(ptr_inst));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace acm2
|
||||
|
@ -51,8 +51,6 @@ class ACMG722 : public ACMGenericCodec {
|
||||
|
||||
int16_t InternalCreateEncoder();
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst);
|
||||
|
||||
ACMG722EncStr* ptr_enc_str_;
|
||||
|
||||
G722EncInst* encoder_inst_ptr_;
|
||||
|
@ -115,8 +115,6 @@ int16_t ACMG722_1::InternalCreateEncoder() { return -1; }
|
||||
|
||||
void ACMG722_1::DestructEncoderSafe() { return; }
|
||||
|
||||
void ACMG722_1::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
|
||||
|
||||
#else //===================== Actual Implementation =======================
|
||||
ACMG722_1::ACMG722_1(int16_t codec_id)
|
||||
: encoder_inst_ptr_(NULL),
|
||||
@ -316,13 +314,6 @@ void ACMG722_1::DestructEncoderSafe() {
|
||||
encoder_inst32_ptr_ = NULL;
|
||||
}
|
||||
|
||||
void ACMG722_1::InternalDestructEncoderInst(void* ptr_inst) {
|
||||
if (ptr_inst != NULL) {
|
||||
delete ptr_inst;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace acm2
|
||||
|
@ -43,8 +43,6 @@ class ACMG722_1 : public ACMGenericCodec {
|
||||
|
||||
int16_t InternalCreateEncoder();
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst);
|
||||
|
||||
int32_t operational_rate_;
|
||||
|
||||
G722_1_Inst_t_* encoder_inst_ptr_;
|
||||
|
@ -115,8 +115,6 @@ int16_t ACMG722_1C::InternalCreateEncoder() { return -1; }
|
||||
|
||||
void ACMG722_1C::DestructEncoderSafe() { return; }
|
||||
|
||||
void ACMG722_1C::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
|
||||
|
||||
#else //===================== Actual Implementation =======================
|
||||
ACMG722_1C::ACMG722_1C(int16_t codec_id)
|
||||
: encoder_inst_ptr_(NULL),
|
||||
@ -322,13 +320,6 @@ void ACMG722_1C::DestructEncoderSafe() {
|
||||
encoder_inst48_ptr_ = NULL;
|
||||
}
|
||||
|
||||
void ACMG722_1C::InternalDestructEncoderInst(void* ptr_inst) {
|
||||
if (ptr_inst != NULL) {
|
||||
delete ptr_inst;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace acm2
|
||||
|
@ -43,8 +43,6 @@ class ACMG722_1C : public ACMGenericCodec {
|
||||
|
||||
int16_t InternalCreateEncoder();
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst);
|
||||
|
||||
int32_t operational_rate_;
|
||||
|
||||
G722_1_Inst_t_* encoder_inst_ptr_;
|
||||
|
@ -57,8 +57,6 @@ int16_t ACMG729::InternalCreateEncoder() { return -1; }
|
||||
|
||||
void ACMG729::DestructEncoderSafe() { return; }
|
||||
|
||||
void ACMG729::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
|
||||
|
||||
#else //===================== Actual Implementation =======================
|
||||
ACMG729::ACMG729(int16_t codec_id)
|
||||
: codec_id_(codec_id),
|
||||
@ -245,13 +243,6 @@ void ACMG729::DestructEncoderSafe() {
|
||||
}
|
||||
}
|
||||
|
||||
void ACMG729::InternalDestructEncoderInst(void* ptr_inst) {
|
||||
if (ptr_inst != NULL) {
|
||||
WebRtcG729_FreeEnc(static_cast<G729_encinst_t_*>(ptr_inst));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace acm2
|
||||
|
@ -38,8 +38,6 @@ class ACMG729 : public ACMGenericCodec {
|
||||
|
||||
int16_t InternalCreateEncoder();
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst);
|
||||
|
||||
int16_t EnableDTX();
|
||||
|
||||
int16_t DisableDTX();
|
||||
|
@ -51,8 +51,6 @@ int16_t ACMG729_1::InternalCreateEncoder() { return -1; }
|
||||
|
||||
void ACMG729_1::DestructEncoderSafe() { return; }
|
||||
|
||||
void ACMG729_1::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
|
||||
|
||||
int16_t ACMG729_1::SetBitRateSafe(const int32_t /*rate*/) { return -1; }
|
||||
|
||||
#else //===================== Actual Implementation =======================
|
||||
@ -159,13 +157,6 @@ void ACMG729_1::DestructEncoderSafe() {
|
||||
}
|
||||
}
|
||||
|
||||
void ACMG729_1::InternalDestructEncoderInst(void* ptr_inst) {
|
||||
if (ptr_inst != NULL) {
|
||||
// WebRtcG7291_Free((G729_1_inst_t*)ptrInst);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
int16_t ACMG729_1::SetBitRateSafe(const int32_t rate) {
|
||||
// allowed rates: { 8000, 12000, 14000, 16000, 18000, 20000,
|
||||
// 22000, 24000, 26000, 28000, 30000, 32000};
|
||||
|
@ -38,8 +38,6 @@ class ACMG729_1 : public ACMGenericCodec {
|
||||
|
||||
int16_t InternalCreateEncoder();
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst);
|
||||
|
||||
int16_t SetBitRateSafe(const int32_t rate);
|
||||
|
||||
G729_1_inst_t_* encoder_inst_ptr_;
|
||||
|
@ -622,13 +622,6 @@ int16_t ACMGenericCodec::CreateEncoder() {
|
||||
return status;
|
||||
}
|
||||
|
||||
void ACMGenericCodec::DestructEncoderInst(void* ptr_inst) {
|
||||
if (ptr_inst != NULL) {
|
||||
WriteLockScoped lockCodec(codec_wrapper_lock_);
|
||||
InternalDestructEncoderInst(ptr_inst);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t ACMGenericCodec::EarliestTimestamp() const {
|
||||
ReadLockScoped cs(codec_wrapper_lock_);
|
||||
return in_timestamp_[0];
|
||||
|
@ -212,18 +212,6 @@ class ACMGenericCodec {
|
||||
//
|
||||
int16_t SetBitRate(const int32_t bitrate_bps);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// DestructEncoderInst()
|
||||
// This API is used in conferencing. It will free the memory that is pointed
|
||||
// by |ptr_inst|. |ptr_inst| is a pointer to encoder instance, created and
|
||||
// filled up by calling EncoderInst(...).
|
||||
//
|
||||
// Inputs:
|
||||
// -ptr_inst : pointer to an encoder instance to be deleted.
|
||||
//
|
||||
//
|
||||
void DestructEncoderInst(void* ptr_inst);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// uint32_t EarliestTimestamp()
|
||||
// Returns the timestamp of the first 10 ms in audio buffer. This is used
|
||||
@ -836,23 +824,6 @@ class ACMGenericCodec {
|
||||
//
|
||||
virtual int16_t InternalCreateEncoder() = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// void InternalDestructEncoderInst()
|
||||
// This is a codec-specific method, used in conferencing, called from
|
||||
// DestructEncoderInst(). The input argument is pointer to encoder instance
|
||||
// (codec instance for codecs that encoder and decoder share the same
|
||||
// instance). This method is called to free the memory that |ptr_inst| is
|
||||
// pointing to.
|
||||
//
|
||||
// Input:
|
||||
// -ptr_inst : pointer to encoder instance.
|
||||
//
|
||||
// Return value:
|
||||
// -1 if failed,
|
||||
// 0 if succeeded.
|
||||
//
|
||||
virtual void InternalDestructEncoderInst(void* ptr_inst) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// int16_t InternalResetEncoder()
|
||||
// This method is called to reset the states of encoder. However, the
|
||||
|
@ -49,10 +49,6 @@ int16_t ACMGSMFR::InternalCreateEncoder() { return -1; }
|
||||
|
||||
void ACMGSMFR::DestructEncoderSafe() { return; }
|
||||
|
||||
void ACMGSMFR::InternalDestructEncoderInst(void* /* ptr_inst */) {
|
||||
return;
|
||||
}
|
||||
|
||||
#else //===================== Actual Implementation =======================
|
||||
|
||||
ACMGSMFR::ACMGSMFR(int16_t codec_id)
|
||||
@ -147,13 +143,6 @@ void ACMGSMFR::DestructEncoderSafe() {
|
||||
encoder_initialized_ = false;
|
||||
}
|
||||
|
||||
void ACMGSMFR::InternalDestructEncoderInst(void* ptr_inst) {
|
||||
if (ptr_inst != NULL) {
|
||||
WebRtcGSMFR_FreeEnc(static_cast<GSMFR_encinst_t_*>(ptr_inst));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace acm2
|
||||
|
@ -38,8 +38,6 @@ class ACMGSMFR : public ACMGenericCodec {
|
||||
|
||||
int16_t InternalCreateEncoder();
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst);
|
||||
|
||||
int16_t EnableDTX();
|
||||
|
||||
int16_t DisableDTX();
|
||||
|
@ -40,8 +40,6 @@ int16_t ACMILBC::InternalCreateEncoder() { return -1; }
|
||||
|
||||
void ACMILBC::DestructEncoderSafe() { return; }
|
||||
|
||||
void ACMILBC::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
|
||||
|
||||
int16_t ACMILBC::SetBitRateSafe(const int32_t /* rate */) { return -1; }
|
||||
|
||||
#else //===================== Actual Implementation =======================
|
||||
@ -117,13 +115,6 @@ void ACMILBC::DestructEncoderSafe() {
|
||||
}
|
||||
}
|
||||
|
||||
void ACMILBC::InternalDestructEncoderInst(void* ptr_inst) {
|
||||
if (ptr_inst != NULL) {
|
||||
WebRtcIlbcfix_EncoderFree(static_cast<iLBC_encinst_t_*>(ptr_inst));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
int16_t ACMILBC::SetBitRateSafe(const int32_t rate) {
|
||||
// Check that rate is valid. No need to store the value
|
||||
if (rate == 13300) {
|
||||
|
@ -44,8 +44,6 @@ class ACMILBC : public ACMGenericCodec {
|
||||
|
||||
int16_t InternalCreateEncoder();
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst);
|
||||
|
||||
iLBC_encinst_t_* encoder_inst_ptr_;
|
||||
};
|
||||
|
||||
|
@ -93,8 +93,6 @@ int16_t ACMISAC::InternalCreateEncoder() { return -1; }
|
||||
|
||||
void ACMISAC::DestructEncoderSafe() { return; }
|
||||
|
||||
void ACMISAC::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
|
||||
|
||||
int16_t ACMISAC::Transcode(uint8_t* /* bitstream */,
|
||||
int16_t* /* bitstream_len_byte */,
|
||||
int16_t /* q_bwe */,
|
||||
@ -461,13 +459,6 @@ void ACMISAC::DestructEncoderSafe() {
|
||||
return;
|
||||
}
|
||||
|
||||
void ACMISAC::InternalDestructEncoderInst(void* ptr_inst) {
|
||||
if (ptr_inst != NULL) {
|
||||
ACM_ISAC_FREE(static_cast<ACM_ISAC_STRUCT *>(ptr_inst));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
int16_t ACMISAC::SetBitRateSafe(int32_t bit_rate) {
|
||||
CriticalSectionScoped lock(codec_inst_crit_sect_.get());
|
||||
if (codec_inst_ptr_ == NULL) {
|
||||
|
@ -117,8 +117,6 @@ class ACMISAC : public ACMGenericCodec, AudioDecoder {
|
||||
|
||||
int16_t InternalCreateEncoder() OVERRIDE;
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst) OVERRIDE;
|
||||
|
||||
void CurrentRate(int32_t* rate_bit_per_sec) OVERRIDE;
|
||||
|
||||
virtual AudioDecoder* Decoder(int codec_id) OVERRIDE;
|
||||
|
@ -57,10 +57,6 @@ void ACMOpus::DestructEncoderSafe() {
|
||||
return;
|
||||
}
|
||||
|
||||
void ACMOpus::InternalDestructEncoderInst(void* /* ptr_inst */) {
|
||||
return;
|
||||
}
|
||||
|
||||
int16_t ACMOpus::SetBitRateSafe(const int32_t /*rate*/) {
|
||||
return -1;
|
||||
}
|
||||
@ -177,13 +173,6 @@ void ACMOpus::DestructEncoderSafe() {
|
||||
}
|
||||
}
|
||||
|
||||
void ACMOpus::InternalDestructEncoderInst(void* ptr_inst) {
|
||||
if (ptr_inst != NULL) {
|
||||
WebRtcOpus_EncoderFree(static_cast<OpusEncInst*>(ptr_inst));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
int16_t ACMOpus::SetBitRateSafe(const int32_t rate) {
|
||||
if (rate < 6000 || rate > 510000) {
|
||||
WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, unique_id_,
|
||||
|
@ -45,8 +45,6 @@ class ACMOpus : public ACMGenericCodec {
|
||||
|
||||
int16_t InternalCreateEncoder();
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst);
|
||||
|
||||
int16_t SetBitRateSafe(const int32_t rate) OVERRIDE
|
||||
EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
|
||||
|
||||
|
@ -41,8 +41,6 @@ ACMGenericCodec* ACMPCM16B::CreateInstance(void) { return NULL; }
|
||||
|
||||
int16_t ACMPCM16B::InternalCreateEncoder() { return -1; }
|
||||
|
||||
void ACMPCM16B::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
|
||||
|
||||
void ACMPCM16B::DestructEncoderSafe() { return; }
|
||||
|
||||
#else //===================== Actual Implementation =======================
|
||||
@ -77,11 +75,6 @@ int16_t ACMPCM16B::InternalCreateEncoder() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ACMPCM16B::InternalDestructEncoderInst(void* /* ptr_inst */) {
|
||||
// PCM has no instance.
|
||||
return;
|
||||
}
|
||||
|
||||
void ACMPCM16B::DestructEncoderSafe() {
|
||||
// PCM has no instance.
|
||||
encoder_exist_ = false;
|
||||
|
@ -37,8 +37,6 @@ class ACMPCM16B : public ACMGenericCodec {
|
||||
|
||||
int16_t InternalCreateEncoder();
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst);
|
||||
|
||||
int32_t sampling_freq_hz_;
|
||||
};
|
||||
|
||||
|
@ -47,11 +47,6 @@ int16_t ACMPCMA::InternalCreateEncoder() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ACMPCMA::InternalDestructEncoderInst(void* /* ptr_inst */) {
|
||||
// PCM has no instance.
|
||||
return;
|
||||
}
|
||||
|
||||
void ACMPCMA::DestructEncoderSafe() {
|
||||
// PCM has no instance.
|
||||
return;
|
||||
|
@ -35,8 +35,6 @@ class ACMPCMA : public ACMGenericCodec {
|
||||
void DestructEncoderSafe();
|
||||
|
||||
int16_t InternalCreateEncoder();
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst);
|
||||
};
|
||||
|
||||
} // namespace acm2
|
||||
|
@ -48,10 +48,6 @@ int16_t ACMPCMU::InternalCreateEncoder() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ACMPCMU::InternalDestructEncoderInst(void* /* ptr_inst */) {
|
||||
// PCM has no instance.
|
||||
}
|
||||
|
||||
void ACMPCMU::DestructEncoderSafe() {
|
||||
// PCM has no instance.
|
||||
encoder_exist_ = false;
|
||||
|
@ -36,8 +36,6 @@ class ACMPCMU : public ACMGenericCodec {
|
||||
EXCLUSIVE_LOCKS_REQUIRED(codec_wrapper_lock_);
|
||||
|
||||
int16_t InternalCreateEncoder();
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst);
|
||||
};
|
||||
|
||||
} // namespace acm2
|
||||
|
@ -41,10 +41,6 @@ int16_t ACMRED::InternalCreateEncoder() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ACMRED::InternalDestructEncoderInst(void* /* ptr_inst */) {
|
||||
// RED has no instance
|
||||
}
|
||||
|
||||
void ACMRED::DestructEncoderSafe() {
|
||||
// RED has no instance
|
||||
}
|
||||
|
@ -33,8 +33,6 @@ class ACMRED : public ACMGenericCodec {
|
||||
void DestructEncoderSafe();
|
||||
|
||||
int16_t InternalCreateEncoder();
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst);
|
||||
};
|
||||
|
||||
} // namespace acm2
|
||||
|
@ -58,8 +58,6 @@ void ACMSPEEX::DestructEncoderSafe() { return; }
|
||||
|
||||
int16_t ACMSPEEX::SetBitRateSafe(const int32_t /* rate */) { return -1; }
|
||||
|
||||
void ACMSPEEX::InternalDestructEncoderInst(void* /* ptr_inst */) { return; }
|
||||
|
||||
#ifdef UNUSEDSPEEX
|
||||
int16_t ACMSPEEX::EnableVBR() { return -1; }
|
||||
|
||||
@ -250,13 +248,6 @@ int16_t ACMSPEEX::SetBitRateSafe(const int32_t rate) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ACMSPEEX::InternalDestructEncoderInst(void* ptr_inst) {
|
||||
if (ptr_inst != NULL) {
|
||||
WebRtcSpeex_FreeEnc(static_cast<SPEEX_encinst_t_*>(ptr_inst));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef UNUSEDSPEEX
|
||||
|
||||
// This API is currently not in use. If requested to be able to enable/disable
|
||||
|
@ -38,8 +38,6 @@ class ACMSPEEX : public ACMGenericCodec {
|
||||
|
||||
int16_t InternalCreateEncoder();
|
||||
|
||||
void InternalDestructEncoderInst(void* ptr_inst);
|
||||
|
||||
int16_t SetBitRateSafe(const int32_t rate);
|
||||
|
||||
int16_t EnableDTX();
|
||||
|
@ -1787,15 +1787,6 @@ int AudioCodingModuleImpl::NetworkStatistics(ACMNetworkStatistics* statistics) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void AudioCodingModuleImpl::DestructEncoderInst(void* inst) {
|
||||
CriticalSectionScoped lock(acm_crit_sect_);
|
||||
WEBRTC_TRACE(webrtc::kTraceDebug, webrtc::kTraceAudioCoding, id_,
|
||||
"DestructEncoderInst()");
|
||||
if (!HaveValidEncoder("DestructEncoderInst"))
|
||||
return;
|
||||
codecs_[current_send_codec_idx_]->DestructEncoderInst(inst);
|
||||
}
|
||||
|
||||
int AudioCodingModuleImpl::RegisterVADCallback(ACMVADCallback* vad_callback) {
|
||||
WEBRTC_TRACE(webrtc::kTraceDebug, webrtc::kTraceAudioCoding, id_,
|
||||
"RegisterVADCallback()");
|
||||
|
@ -210,8 +210,6 @@ class AudioCodingModuleImpl : public AudioCodingModule {
|
||||
|
||||
int NetworkStatistics(ACMNetworkStatistics* statistics);
|
||||
|
||||
void DestructEncoderInst(void* inst);
|
||||
|
||||
// GET RED payload for iSAC. The method id called when 'this' ACM is
|
||||
// the default ACM.
|
||||
// TODO(henrik.lundin) Not used. Remove?
|
||||
|
Loading…
x
Reference in New Issue
Block a user