Add some virtual and OVERRIDEs in webrtc/modules/audio_coding/

BUG=163
TBR=turaj@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4447 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org
2013-07-31 15:54:00 +00:00
parent e72428442d
commit 2d1a55caed
33 changed files with 443 additions and 351 deletions

View File

@ -81,16 +81,14 @@ class AudioDecoder {
// Same as Decode(), but interfaces to the decoders redundant decode function.
// The default implementation simply calls the regular Decode() method.
virtual int DecodeRedundant(const uint8_t* encoded, size_t encoded_len,
int16_t* decoded, SpeechType* speech_type) {
return Decode(encoded, encoded_len, decoded, speech_type);
}
int16_t* decoded, SpeechType* speech_type);
// Indicates if the decoder implements the DecodePlc method.
virtual bool HasDecodePlc() const { return false; }
virtual bool HasDecodePlc() const;
// Calls the packet-loss concealment of the decoder to update the state after
// one or several lost packets.
virtual int DecodePlc(int num_frames, int16_t* decoded) { return -1; }
virtual int DecodePlc(int num_frames, int16_t* decoded);
// Initializes the decoder.
virtual int Init() = 0;
@ -100,19 +98,17 @@ class AudioDecoder {
size_t payload_len,
uint16_t rtp_sequence_number,
uint32_t rtp_timestamp,
uint32_t arrival_timestamp) { return 0; }
uint32_t arrival_timestamp);
// Returns the last error code from the decoder.
virtual int ErrorCode() { return 0; }
virtual int ErrorCode();
// Returns the duration in samples of the payload in |encoded| which is
// |encoded_len| bytes long. Returns kNotImplemented if no duration estimate
// is available, or -1 in case of an error.
virtual int PacketDuration(const uint8_t* encoded, size_t encoded_len) {
return kNotImplemented;
}
virtual int PacketDuration(const uint8_t* encoded, size_t encoded_len);
virtual NetEqDecoder codec_type() const { return codec_type_; }
virtual NetEqDecoder codec_type() const;
// Returns the underlying decoder state.
void* state() { return state_; }