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

Unified Diff: webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.cc

Issue 2342443005: Moved Opus-specific payload splitting into AudioDecoderOpus. (Closed)
Patch Set: Created 4 years, 3 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/ilbc/audio_decoder_ilbc.cc
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.cc b/webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.cc
index d9a452a0876b497c53c3fedb44384430af289e6c..837942cdba1681e80925fd3e18485d3377d05736 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.cc
+++ b/webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.cc
@@ -10,6 +10,8 @@
#include "webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.h"
+#include <utility>
+
#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
#include "webrtc/modules/audio_coding/codecs/ilbc/ilbc.h"
@@ -53,8 +55,7 @@ void AudioDecoderIlbc::Reset() {
std::vector<AudioDecoder::ParseResult> AudioDecoderIlbc::ParsePayload(
rtc::Buffer* payload,
- uint32_t timestamp,
- bool is_primary) {
+ uint32_t timestamp) {
std::vector<ParseResult> results;
size_t bytes_per_frame;
int timestamps_per_frame;
@@ -78,8 +79,8 @@ std::vector<AudioDecoder::ParseResult> AudioDecoderIlbc::ParsePayload(
RTC_DCHECK(payload->size() % bytes_per_frame == 0);
if (payload->size() == bytes_per_frame) {
std::unique_ptr<EncodedAudioFrame> frame(
- new LegacyEncodedAudioFrame(this, payload, is_primary));
- results.emplace_back(timestamp, is_primary, std::move(frame));
+ new LegacyEncodedAudioFrame(this, payload));
+ results.emplace_back(timestamp, 0, std::move(frame));
} else {
for (size_t byte_offset = 0, timestamp_offset = 0;
byte_offset < payload->size();
@@ -87,9 +88,8 @@ std::vector<AudioDecoder::ParseResult> AudioDecoderIlbc::ParsePayload(
timestamp_offset += timestamps_per_frame) {
rtc::Buffer new_payload(payload->data() + byte_offset, bytes_per_frame);
std::unique_ptr<EncodedAudioFrame> frame(
- new LegacyEncodedAudioFrame(this, &new_payload, is_primary));
- results.emplace_back(timestamp + timestamp_offset, is_primary,
- std::move(frame));
+ new LegacyEncodedAudioFrame(this, &new_payload));
+ results.emplace_back(timestamp + timestamp_offset, 0, std::move(frame));
}
}

Powered by Google App Engine
This is Rietveld 408576698