AudioEncoder subclass for iSACfix

This patch refactors AudioEncoderDecoderIsac so that it can share
almost all code with the very similar AudioEncoderDecoderIsacFix.

BUG=3926
R=henrik.lundin@webrtc.org, kjellander@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/29259004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7912 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kwiberg@webrtc.org
2014-12-16 12:49:37 +00:00
parent 0198933b3d
commit 88bdec8c3a
12 changed files with 586 additions and 369 deletions

View File

@ -27,12 +27,6 @@
#ifdef WEBRTC_CODEC_ILBC
#include "webrtc/modules/audio_coding/codecs/ilbc/interface/ilbc.h"
#endif
#ifdef WEBRTC_CODEC_ISACFX
#include "webrtc/modules/audio_coding/codecs/isac/fix/interface/isacfix.h"
#endif
#ifdef WEBRTC_CODEC_ISAC
#include "webrtc/modules/audio_coding/codecs/isac/main/interface/isac.h"
#endif
#ifdef WEBRTC_CODEC_OPUS
#include "webrtc/modules/audio_coding/codecs/opus/interface/opus_interface.h"
#endif
@ -130,27 +124,6 @@ class AudioDecoderIlbc : public AudioDecoder {
};
#endif
#ifdef WEBRTC_CODEC_ISACFX
class AudioDecoderIsacFix : public AudioDecoder {
public:
AudioDecoderIsacFix();
virtual ~AudioDecoderIsacFix();
virtual int Decode(const uint8_t* encoded, size_t encoded_len,
int16_t* decoded, SpeechType* speech_type);
virtual int Init();
virtual int IncomingPacket(const uint8_t* payload,
size_t payload_len,
uint16_t rtp_sequence_number,
uint32_t rtp_timestamp,
uint32_t arrival_timestamp);
virtual int ErrorCode();
private:
ISACFIX_MainStruct* isac_state_;
DISALLOW_COPY_AND_ASSIGN(AudioDecoderIsacFix);
};
#endif
#ifdef WEBRTC_CODEC_G722
class AudioDecoderG722 : public AudioDecoder {
public: