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

Unified Diff: webrtc/modules/audio_coding/codecs/audio_decoder.h

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/audio_decoder.h
diff --git a/webrtc/modules/audio_coding/codecs/audio_decoder.h b/webrtc/modules/audio_coding/codecs/audio_decoder.h
index b28f77739cf3da7372b1b1836a6c016877c0f935..97dbb109aaefce2b07b3dfa4ef515bd2ce628dae 100644
--- a/webrtc/modules/audio_coding/codecs/audio_decoder.h
+++ b/webrtc/modules/audio_coding/codecs/audio_decoder.h
@@ -61,7 +61,7 @@ class AudioDecoder {
struct ParseResult {
ParseResult();
ParseResult(uint32_t timestamp,
- bool primary,
+ uint8_t priority,
hlundin-webrtc 2016/09/15 09:33:29 "You should not use the unsigned integer types suc
ossu 2016/09/15 12:22:53 You are technically correct - the best kind of cor
hlundin-webrtc 2016/09/16 07:51:27 Once upon a time, in an office building (not so) f
kwiberg-webrtc 2016/09/19 11:07:49 Function arguments and local variables are stored
ossu 2016/09/19 11:41:01 I've thought about this change as also applying to
kwiberg-webrtc 2016/09/19 11:55:16 I also thought about this change as applying to Pa
ossu 2016/09/19 14:07:33 If we want some priority level to correspond to "n
kwiberg-webrtc 2016/09/20 09:14:44 Ah, yes, for stats I can see why we'd care about t
std::unique_ptr<EncodedAudioFrame> frame);
ParseResult(ParseResult&& b);
~ParseResult();
@@ -70,7 +70,9 @@ class AudioDecoder {
// The timestamp of the frame is in samples per channel.
uint32_t timestamp;
- bool primary;
+ // The relative priority of the frame compared to other frames of the same
+ // payload and the same timeframe. A higher value means a lower priority.
+ uint8_t priority;
std::unique_ptr<EncodedAudioFrame> frame;
};
@@ -78,8 +80,7 @@ class AudioDecoder {
// frames. Each frame must be at most 120 ms long. The decoder is free to swap
// or move the data from the |payload| buffer.
virtual std::vector<ParseResult> ParsePayload(rtc::Buffer* payload,
- uint32_t timestamp,
- bool is_primary);
+ uint32_t timestamp);
// Decodes |encode_len| bytes from |encoded| and writes the result in
// |decoded|. The maximum bytes allowed to be written into |decoded| is

Powered by Google App Engine
This is Rietveld 408576698