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

Unified Diff: media/base/audio_decoder.h

Issue 10669022: Add status parameter to DemuxerStream::ReadCB (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix seek_tester build buster Created 8 years, 5 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
« no previous file with comments | « no previous file | media/base/demuxer_stream.h » ('j') | media/base/demuxer_stream.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_decoder.h
diff --git a/media/base/audio_decoder.h b/media/base/audio_decoder.h
index e435a1cf9f3993b164a2d5c3fde4b26921947252..e6f09ed24ede4df6cd649a86cfbe951e57ee0b5b 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,
+ kAborted,
+ kDecodeError,
+ };
+
// 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.
« no previous file with comments | « no previous file | media/base/demuxer_stream.h » ('j') | media/base/demuxer_stream.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698