| Index: webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.cc
|
| diff --git a/webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.cc b/webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.cc
|
| index d38888f53e634995ed2e954e77c65262e499cd07..f092e516edfe20b345e3fd38cee9208b15b61716 100644
|
| --- a/webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.cc
|
| +++ b/webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.cc
|
| @@ -69,23 +69,23 @@ size_t AudioDecoderG722Impl::Channels() const {
|
| return 1;
|
| }
|
|
|
| -AudioDecoderG722Stereo::AudioDecoderG722Stereo() {
|
| +AudioDecoderG722StereoImpl::AudioDecoderG722StereoImpl() {
|
| WebRtcG722_CreateDecoder(&dec_state_left_);
|
| WebRtcG722_CreateDecoder(&dec_state_right_);
|
| WebRtcG722_DecoderInit(dec_state_left_);
|
| WebRtcG722_DecoderInit(dec_state_right_);
|
| }
|
|
|
| -AudioDecoderG722Stereo::~AudioDecoderG722Stereo() {
|
| +AudioDecoderG722StereoImpl::~AudioDecoderG722StereoImpl() {
|
| WebRtcG722_FreeDecoder(dec_state_left_);
|
| WebRtcG722_FreeDecoder(dec_state_right_);
|
| }
|
|
|
| -int AudioDecoderG722Stereo::DecodeInternal(const uint8_t* encoded,
|
| - size_t encoded_len,
|
| - int sample_rate_hz,
|
| - int16_t* decoded,
|
| - SpeechType* speech_type) {
|
| +int AudioDecoderG722StereoImpl::DecodeInternal(const uint8_t* encoded,
|
| + size_t encoded_len,
|
| + int sample_rate_hz,
|
| + int16_t* decoded,
|
| + SpeechType* speech_type) {
|
| RTC_DCHECK_EQ(SampleRateHz(), sample_rate_hz);
|
| int16_t temp_type = 1; // Default is speech.
|
| // De-interleave the bit-stream into two separate payloads.
|
| @@ -112,20 +112,20 @@ int AudioDecoderG722Stereo::DecodeInternal(const uint8_t* encoded,
|
| return static_cast<int>(ret);
|
| }
|
|
|
| -int AudioDecoderG722Stereo::SampleRateHz() const {
|
| +int AudioDecoderG722StereoImpl::SampleRateHz() const {
|
| return 16000;
|
| }
|
|
|
| -size_t AudioDecoderG722Stereo::Channels() const {
|
| +size_t AudioDecoderG722StereoImpl::Channels() const {
|
| return 2;
|
| }
|
|
|
| -void AudioDecoderG722Stereo::Reset() {
|
| +void AudioDecoderG722StereoImpl::Reset() {
|
| WebRtcG722_DecoderInit(dec_state_left_);
|
| WebRtcG722_DecoderInit(dec_state_right_);
|
| }
|
|
|
| -std::vector<AudioDecoder::ParseResult> AudioDecoderG722Stereo::ParsePayload(
|
| +std::vector<AudioDecoder::ParseResult> AudioDecoderG722StereoImpl::ParsePayload(
|
| rtc::Buffer&& payload,
|
| uint32_t timestamp) {
|
| return LegacyEncodedAudioFrame::SplitBySamples(this, std::move(payload),
|
| @@ -134,9 +134,10 @@ std::vector<AudioDecoder::ParseResult> AudioDecoderG722Stereo::ParsePayload(
|
|
|
| // Split the stereo packet and place left and right channel after each other
|
| // in the output array.
|
| -void AudioDecoderG722Stereo::SplitStereoPacket(const uint8_t* encoded,
|
| - size_t encoded_len,
|
| - uint8_t* encoded_deinterleaved) {
|
| +void AudioDecoderG722StereoImpl::SplitStereoPacket(
|
| + const uint8_t* encoded,
|
| + size_t encoded_len,
|
| + uint8_t* encoded_deinterleaved) {
|
| // Regroup the 4 bits/sample so |l1 l2| |r1 r2| |l3 l4| |r3 r4| ...,
|
| // where "lx" is 4 bits representing left sample number x, and "rx" right
|
| // sample. Two samples fit in one byte, represented with |...|.
|
|
|