Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Unified Diff: webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.cc

Issue 2281453002: Moved codec-specific audio packet splitting into decoders. (Closed)
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.cc
diff --git a/webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.cc b/webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.cc
index af164c4bb72b0b25525b3999f3e6887390a0b802..0863533c5df1a5b2f968f8224fe908d8ec44e40f 100644
--- a/webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.cc
+++ b/webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.cc
@@ -16,6 +16,12 @@ namespace webrtc {
void AudioDecoderPcmU::Reset() {}
+AudioDecoder::PacketSplits AudioDecoderPcmU::SplitPacket(
+ const uint8_t* payload,
+ size_t payload_len) const {
+ return SplitBySamples(payload, payload_len, 8 * num_channels_, 8);
+}
+
int AudioDecoderPcmU::SampleRateHz() const {
return 8000;
}
@@ -44,6 +50,12 @@ int AudioDecoderPcmU::PacketDuration(const uint8_t* encoded,
void AudioDecoderPcmA::Reset() {}
+AudioDecoder::PacketSplits AudioDecoderPcmA::SplitPacket(
+ const uint8_t* payload,
+ size_t payload_len) const {
+ return SplitBySamples(payload, payload_len, 8 * num_channels_, 8);
+}
+
int AudioDecoderPcmA::SampleRateHz() const {
return 8000;
}

Powered by Google App Engine
This is Rietveld 408576698