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

Unified Diff: media/filters/decoder_stream.h

Issue 297553002: Add callback in VideoDecoder and AudioDecoder to return decoded frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « media/filters/decoder_selector.cc ('k') | media/filters/decoder_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decoder_stream.h
diff --git a/media/filters/decoder_stream.h b/media/filters/decoder_stream.h
index 2856f8536e2cf7f931819f4f09a1fc2841ce5c9d..1a36558674e054e4e995de8e262e49799746e86f 100644
--- a/media/filters/decoder_stream.h
+++ b/media/filters/decoder_stream.h
@@ -88,6 +88,9 @@ class MEDIA_EXPORT DecoderStream {
// behavior.
bool CanReadWithoutStalling() const;
+ // Returns maximum concurrent decode requests for the current |decoder_|.
+ int GetMaxDecodeRequests() const;
+
// Returns true if one more decode request can be submitted to the decoder.
bool CanDecodeMore() const;
@@ -141,9 +144,10 @@ class MEDIA_EXPORT DecoderStream {
void FlushDecoder();
// Callback for Decoder::Decode().
- void OnDecodeOutputReady(int buffer_size,
- DecoderStatus status,
- const scoped_refptr<Output>& output);
+ void OnDecodeDone(int buffer_size, bool end_of_stream, DecoderStatus status);
+
+ // Output callback passed to Decoder::Initialize().
+ void OnDecodeOutputReady(const scoped_refptr<Output>& output);
// Reads a buffer from |stream_| and returns the result via OnBufferReady().
void ReadFromDemuxerStream();
@@ -208,7 +212,7 @@ template <>
bool DecoderStream<DemuxerStream::AUDIO>::CanReadWithoutStalling() const;
template <>
-bool DecoderStream<DemuxerStream::AUDIO>::CanDecodeMore() const;
+int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const;
typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream;
typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream;
« no previous file with comments | « media/filters/decoder_selector.cc ('k') | media/filters/decoder_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698