Revert 7807 "Removing unused opus wrapper APIs."

> Removing unused opus wrapper APIs.
> 
> WebRtcOpus_DecodeNew(), WebRtcOpus_DecoderInitNew() have become the APIs and are ready to replace old WebRtcOpus_Decode() and WebRtcOpus_DecoderInit().
> 
> WebRtcOpus_DecodePlcMaster/Slave() are also removed.
> 
> BUG=
> R=henrik.lundin@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/28139004

TBR=minyue@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7809 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
minyue@webrtc.org
2014-12-04 11:00:50 +00:00
parent c0991fe606
commit 52bc4f4797
8 changed files with 342 additions and 41 deletions

View File

@ -404,9 +404,9 @@ AudioDecoderOpus::~AudioDecoderOpus() {
int AudioDecoderOpus::Decode(const uint8_t* encoded, size_t encoded_len,
int16_t* decoded, SpeechType* speech_type) {
int16_t temp_type = 1; // Default is speech.
int16_t ret = WebRtcOpus_Decode(dec_state_, encoded,
static_cast<int16_t>(encoded_len), decoded,
&temp_type);
int16_t ret = WebRtcOpus_DecodeNew(dec_state_, encoded,
static_cast<int16_t>(encoded_len), decoded,
&temp_type);
if (ret > 0)
ret *= static_cast<int16_t>(channels_); // Return total number of samples.
*speech_type = ConvertSpeechType(temp_type);
@ -427,7 +427,7 @@ int AudioDecoderOpus::DecodeRedundant(const uint8_t* encoded,
}
int AudioDecoderOpus::Init() {
return WebRtcOpus_DecoderInit(dec_state_);
return WebRtcOpus_DecoderInitNew(dec_state_);
}
int AudioDecoderOpus::PacketDuration(const uint8_t* encoded,