Index: media/base/audio_decoder.h |
diff --git a/media/base/audio_decoder.h b/media/base/audio_decoder.h |
index e435a1cf9f3993b164a2d5c3fde4b26921947252..f8da889d309be3a453e9dce4db33cf5a606485eb 100644 |
--- a/media/base/audio_decoder.h |
+++ b/media/base/audio_decoder.h |
@@ -19,6 +19,13 @@ class DemuxerStream; |
class MEDIA_EXPORT AudioDecoder |
: public base::RefCountedThreadSafe<AudioDecoder> { |
public: |
+ // Status codes for read operations. |
+ enum Status { |
+ kOk, // Everything went as planned. |
+ kAborted, // Read was aborted early. |
+ kDecodeError, // Decoding error happened. |
Ami GONE FROM CHROMIUM
2012/06/26 00:33:21
These comments aren't adding much value.
acolwell GONE FROM CHROMIUM
2012/07/12 01:19:38
Done.
|
+ }; |
+ |
// Initialize an AudioDecoder with the given DemuxerStream, executing the |
// callback upon completion. |
// statistics_cb is used to update global pipeline statistics. |
@@ -36,7 +43,7 @@ class MEDIA_EXPORT AudioDecoder |
// indicate the end of the stream. A NULL buffer pointer indicates an aborted |
// Read(). This can happen if the DemuxerStream gets flushed and doesn't have |
// any more data to return. |
- typedef base::Callback<void(scoped_refptr<Buffer>)> ReadCB; |
+ typedef base::Callback<void(Status, const scoped_refptr<Buffer>&)> ReadCB; |
virtual void Read(const ReadCB& read_cb) = 0; |
// Reset decoder state, dropping any queued encoded data. |