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

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

Issue 2342443005: Moved Opus-specific payload splitting into AudioDecoderOpus. (Closed)
Patch Set: Priority levels are ints, kHighestPriority is gone. Also small cleanups. 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 d5d5d3e4752b8e054d6ddd0ead76c92943e3abd4..5728c84f62a4c8f18eb1191c4241881445cb9867 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,18 +79,17 @@ std::vector<AudioDecoder::ParseResult> AudioDecoderIlbc::ParsePayload(
RTC_DCHECK_EQ(0u, payload.size() % bytes_per_frame);
if (payload.size() == bytes_per_frame) {
std::unique_ptr<EncodedAudioFrame> frame(
- new LegacyEncodedAudioFrame(this, std::move(payload), is_primary));
- results.emplace_back(timestamp, is_primary, std::move(frame));
+ new LegacyEncodedAudioFrame(this, std::move(payload)));
+ results.emplace_back(timestamp, 0, std::move(frame));
} else {
for (size_t byte_offset = 0, timestamp_offset = 0;
byte_offset < payload.size();
byte_offset += bytes_per_frame,
timestamp_offset += timestamps_per_frame) {
rtc::Buffer new_payload(payload.data() + byte_offset, bytes_per_frame);
- std::unique_ptr<EncodedAudioFrame> frame(new LegacyEncodedAudioFrame(
- this, std::move(new_payload), is_primary));
- results.emplace_back(timestamp + timestamp_offset, is_primary,
- std::move(frame));
+ std::unique_ptr<EncodedAudioFrame> frame(
+ new LegacyEncodedAudioFrame(this, std::move(new_payload)));
kwiberg-webrtc 2016/09/20 09:14:45 Arguably, new_payload doesn't have to be a named v
ossu 2016/09/20 13:51:56 Acknowledged.
+ results.emplace_back(timestamp + timestamp_offset, 0, std::move(frame));
}
}

Powered by Google App Engine
This is Rietveld 408576698