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

Unified Diff: media/filters/gpu_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
Index: media/filters/gpu_video_decoder.h
diff --git a/media/filters/gpu_video_decoder.h b/media/filters/gpu_video_decoder.h
index e8f5f756facf1162f7dfce94e97b47c78555c44d..53cc153eafeb0e873ffe45b417ef5350a3104ed0 100644
--- a/media/filters/gpu_video_decoder.h
+++ b/media/filters/gpu_video_decoder.h
@@ -50,6 +50,7 @@ class MEDIA_EXPORT GpuVideoDecoder
virtual void Stop() OVERRIDE;
virtual bool NeedsBitstreamConversion() const OVERRIDE;
virtual bool CanReadWithoutStalling() const OVERRIDE;
+ virtual int GetMaxDecodeRequests() const OVERRIDE;
// VideoDecodeAccelerator::Client implementation.
virtual void ProvidePictureBuffers(uint32 count,
@@ -91,16 +92,7 @@ class MEDIA_EXPORT GpuVideoDecoder
typedef std::map<int32, PictureBuffer> PictureBufferMap;
- // Return true if more decode work can be piled on to the VDA.
- bool CanMoreDecodeWorkBeDone();
-
- // Enqueue a frame for later delivery (or drop it on the floor if a
- // vda->Reset() is in progress) and trigger out-of-line delivery of the oldest
- // ready frame to the client if there is a pending read. A NULL |frame|
- // merely triggers delivery, and requires the ready_video_frames_ queue not be
- // empty.
- void EnqueueFrameAndTriggerFrameDelivery(
- const scoped_refptr<VideoFrame>& frame);
+ void DeliverFrame( const scoped_refptr<VideoFrame>& frame);
// Static method is to allow it to run even after GVD is deleted.
static void ReleaseMailbox(
@@ -140,9 +132,11 @@ class MEDIA_EXPORT GpuVideoDecoder
// occurs.
scoped_ptr<VideoDecodeAccelerator> vda_;
- // Callbacks that are !is_null() only during their respective operation being
- // asynchronously executed.
- DecodeCB pending_decode_cb_;
+ // Callbacks for the pending Decode requests (not more than
+ // GetMaxDecodeRequests()).
+ std::list<DecodeCB> pending_decode_callbacks_;
+
+ // Not null only during reset.
base::Closure pending_reset_cb_;
State state_;
@@ -181,7 +175,6 @@ class MEDIA_EXPORT GpuVideoDecoder
// picture_buffer_id and the frame wrapping the corresponding Picture, for
// frames that have been decoded but haven't been requested by a Decode() yet.
- std::list<scoped_refptr<VideoFrame> > ready_video_frames_;
int32 next_picture_buffer_id_;
int32 next_bitstream_buffer_id_;

Powered by Google App Engine
This is Rietveld 408576698