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

Unified Diff: media/filters/decoder_stream.h

Issue 239893002: Allow multiple concurrent Decode() requests in VideoDecoder interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/base/video_decoder.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 62caca56112d512a5b508ecb6cc2a0ba1fff4982..2856f8536e2cf7f931819f4f09a1fc2841ce5c9d 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 true if one more decode request can be submitted to the decoder.
+ bool CanDecodeMore() const;
+
// Allows callers to register for notification of splice buffers from the
// demuxer. I.e., DecoderBuffer::splice_timestamp() is not kNoTimestamp().
//
@@ -130,9 +133,6 @@ class MEDIA_EXPORT DecoderStream {
void SatisfyRead(Status status,
const scoped_refptr<Output>& output);
- // Abort pending |read_cb_|.
- void AbortRead();
-
// Decodes |buffer| and returns the result via OnDecodeOutputReady().
void Decode(const scoped_refptr<DecoderBuffer>& buffer);
@@ -189,6 +189,13 @@ class MEDIA_EXPORT DecoderStream {
// splice_timestamp() of kNoTimestamp() is encountered.
bool active_splice_;
+ // Decoded buffers that haven't been read yet. Used when the decoder supports
+ // parallel decoding.
+ std::list<scoped_refptr<Output> > ready_outputs_;
+
+ // Number of outstanding decode requests sent to the |decoder_|.
+ int pending_decode_requests_;
+
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<DecoderStream<StreamType> > weak_factory_;
@@ -200,6 +207,9 @@ class MEDIA_EXPORT DecoderStream {
template <>
bool DecoderStream<DemuxerStream::AUDIO>::CanReadWithoutStalling() const;
+template <>
+bool DecoderStream<DemuxerStream::AUDIO>::CanDecodeMore() const;
+
typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream;
typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream;
« no previous file with comments | « media/base/video_decoder.cc ('k') | media/filters/decoder_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698