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

Unified Diff: media/base/demuxer_stream.h

Issue 8351045: Change DemuxerStream::ReadCallback to use ref-counted buffers. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: forgot some &s Created 9 years, 2 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/mock_reader.h » ('j') | media/filters/ffmpeg_video_decoder.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/demuxer_stream.h
diff --git a/media/base/demuxer_stream.h b/media/base/demuxer_stream.h
index 07dfe7119647b493b33bbed23269c7355d80bef5..9ba496064c17afbde40b59fecfb8e27a00a91c0e 100644
--- a/media/base/demuxer_stream.h
+++ b/media/base/demuxer_stream.h
@@ -20,8 +20,6 @@ class VideoDecoderConfig;
class MEDIA_EXPORT DemuxerStream
: public base::RefCountedThreadSafe<DemuxerStream> {
public:
- typedef base::Callback<void(Buffer*)> ReadCallback;
-
enum Type {
UNKNOWN,
AUDIO,
@@ -29,8 +27,10 @@ class MEDIA_EXPORT DemuxerStream
NUM_TYPES, // Always keep this entry as the last one!
};
- // Schedules a read. When the |read_callback| is called, the downstream
- // object takes ownership of the buffer by AddRef()'ing the buffer.
+ // Request a buffer to returned via the provided callback.
+ //
+ // Buffers will be non-NULL yet may be end of stream buffers.
+ typedef base::Callback<void(scoped_refptr<Buffer>)> ReadCallback;
virtual void Read(const ReadCallback& read_callback) = 0;
// Returns the audio decoder configuration. It is an error to call this method
« no previous file with comments | « no previous file | media/base/mock_reader.h » ('j') | media/filters/ffmpeg_video_decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698