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 379293b748b043985488e180934c2dd5c9baf060..5dc110b63f0f07b4ab58789b27f8b4f61ae97431 100644 |
--- a/webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.cc |
+++ b/webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.cc |
@@ -13,6 +13,7 @@ |
#include <string.h> |
#include "webrtc/base/checks.h" |
+#include "webrtc/modules/audio_coding/codecs/split_by_samples.h" |
#include "webrtc/modules/audio_coding/codecs/g722/g722_interface.h" |
namespace webrtc { |
@@ -47,6 +48,11 @@ void AudioDecoderG722::Reset() { |
WebRtcG722_DecoderInit(dec_state_); |
} |
+std::vector<AudioDecoder::PacketSplit> AudioDecoderG722::SplitPacket( |
+ rtc::ArrayView<const uint8_t> payload) const { |
+ return internal::SplitBySamples(payload, 8, 16); |
+} |
+ |
int AudioDecoderG722::PacketDuration(const uint8_t* encoded, |
size_t encoded_len) const { |
// 1/2 encoded byte per sample per channel. |
@@ -117,6 +123,11 @@ void AudioDecoderG722Stereo::Reset() { |
WebRtcG722_DecoderInit(dec_state_right_); |
} |
+std::vector<AudioDecoder::PacketSplit> AudioDecoderG722Stereo::SplitPacket( |
+ rtc::ArrayView<const uint8_t> payload) const { |
+ return internal::SplitBySamples(payload, 2 * 8, 16); |
+} |
+ |
// Split the stereo packet and place left and right channel after each other |
// in the output array. |
void AudioDecoderG722Stereo::SplitStereoPacket(const uint8_t* encoded, |