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

Unified Diff: media/base/video_decoder.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 | « no previous file | media/base/video_decoder.cc » ('j') | media/filters/decoder_stream.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_decoder.h
diff --git a/media/base/video_decoder.h b/media/base/video_decoder.h
index 81b93f7778ba8dd0869aeb9bd777849dc17a3ddc..3e89fdf787a475c87013a39859d28f3bd51fc4b9 100644
--- a/media/base/video_decoder.h
+++ b/media/base/video_decoder.h
@@ -46,8 +46,10 @@ class MEDIA_EXPORT VideoDecoder {
const PipelineStatusCB& status_cb) = 0;
// Requests a |buffer| to be decoded. The status of the decoder and decoded
- // frame are returned via the provided callback. Only one decode may be in
- // flight at any given time.
+ // frame are returned via the provided callback. Some decoders may allow
+ // decoding multiple frames in parallel. Callers should call
+ // GetMaxDecodeRequests() to get number of frames that may be decoded in
xhwang 2014/04/25 00:36:03 s/frames/buffers
Sergey Ulanov 2014/04/26 00:59:29 Done.
+ // parallel.
//
// Implementations guarantee that the callback will not be called from within
// this method.
@@ -64,6 +66,8 @@ class MEDIA_EXPORT VideoDecoder {
// Some VideoDecoders may queue up multiple VideoFrames from a single
// DecoderBuffer, if we have any such queued frames this will return the next
// one. Otherwise we return a NULL VideoFrame.
+ //
+ // TODO(xhwang): Remove this method.
xhwang 2014/04/25 00:36:03 s/Remove/Revisit Since we still have 1:1 mapping
Sergey Ulanov 2014/04/26 00:59:29 Done. I think the right way to fix it is to pass m
virtual scoped_refptr<VideoFrame> GetDecodeOutput();
// Resets decoder state, fulfilling all pending DecodeCB and dropping extra
@@ -88,6 +92,9 @@ class MEDIA_EXPORT VideoDecoder {
// use a fixed set of VideoFrames for decoding.
virtual bool CanReadWithoutStalling() const;
+ // Returns how many frames that may be decoded in parallel.
xhwang 2014/04/25 00:36:03 s/frame/buffer
Sergey Ulanov 2014/04/26 00:59:29 Done.
+ virtual int GetMaxDecodeRequests() const;
+
private:
DISALLOW_COPY_AND_ASSIGN(VideoDecoder);
};
« no previous file with comments | « no previous file | media/base/video_decoder.cc » ('j') | media/filters/decoder_stream.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698