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

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

Issue 2024633002: AudioDecoder: New method SampleRateHz, + implementations for our codecs (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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 580ddbf74ffe43807fdab2204d7cb1b92f345283..822d616aa60d32fc3eb31c4e1190273112f474e6 100644
--- a/webrtc/modules/audio_coding/codecs/audio_decoder.h
+++ b/webrtc/modules/audio_coding/codecs/audio_decoder.h
@@ -93,6 +93,13 @@ class AudioDecoder {
// Returns true if the packet has FEC and false otherwise.
virtual bool PacketHasFec(const uint8_t* encoded, size_t encoded_len) const;
+ // Returns the actual sample rate of the decoder's output.
+ // NOTE: For now, this has a default implementation that returns an unusable
+ // value (-1). That default implementation will go away soon, and at the same
+ // time callers will start relying on the return value, so make sure you
+ // override it with something that returns a correct value!
+ virtual int SampleRateHz() const;
+
virtual size_t Channels() const = 0;
protected:

Powered by Google App Engine
This is Rietveld 408576698