Move AudioDecoderOpus next to AudioEncoderOpus
All AudioDecoder subclasses have historically lived in NetEq, but they fit better with the codec they wrap. BUG=webrtc:4557 R=henrik.lundin@webrtc.org Review URL: https://codereview.webrtc.org/1342933005 . Cr-Commit-Position: refs/heads/master@{#9944}
This commit is contained in:
@ -27,9 +27,6 @@
|
||||
#ifdef WEBRTC_CODEC_ILBC
|
||||
#include "webrtc/modules/audio_coding/codecs/ilbc/interface/ilbc.h"
|
||||
#endif
|
||||
#ifdef WEBRTC_CODEC_OPUS
|
||||
#include "webrtc/modules/audio_coding/codecs/opus/interface/opus_interface.h"
|
||||
#endif
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -206,38 +203,6 @@ class AudioDecoderG722Stereo : public AudioDecoder {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef WEBRTC_CODEC_OPUS
|
||||
class AudioDecoderOpus : public AudioDecoder {
|
||||
public:
|
||||
explicit AudioDecoderOpus(size_t num_channels);
|
||||
~AudioDecoderOpus() override;
|
||||
|
||||
void Reset() override;
|
||||
int PacketDuration(const uint8_t* encoded, size_t encoded_len) const override;
|
||||
int PacketDurationRedundant(const uint8_t* encoded,
|
||||
size_t encoded_len) const override;
|
||||
bool PacketHasFec(const uint8_t* encoded, size_t encoded_len) const override;
|
||||
size_t Channels() const override;
|
||||
|
||||
protected:
|
||||
int DecodeInternal(const uint8_t* encoded,
|
||||
size_t encoded_len,
|
||||
int sample_rate_hz,
|
||||
int16_t* decoded,
|
||||
SpeechType* speech_type) override;
|
||||
int DecodeRedundantInternal(const uint8_t* encoded,
|
||||
size_t encoded_len,
|
||||
int sample_rate_hz,
|
||||
int16_t* decoded,
|
||||
SpeechType* speech_type) override;
|
||||
|
||||
private:
|
||||
OpusDecInst* dec_state_;
|
||||
const size_t channels_;
|
||||
DISALLOW_COPY_AND_ASSIGN(AudioDecoderOpus);
|
||||
};
|
||||
#endif
|
||||
|
||||
// AudioDecoderCng is a special type of AudioDecoder. It inherits from
|
||||
// AudioDecoder just to fit in the DecoderDatabase. None of the class methods
|
||||
// should be used, except constructor, destructor, and accessors.
|
||||
|
Reference in New Issue
Block a user