Chromium Code Reviews| 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..c46fa9dd8f5635a1188f22c7b3607775c346f6d3 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 that |
|
xhwang
2014/04/25 00:36:03
s/that/than
Sergey Ulanov
2014/04/26 00:59:29
Done.
|
| + // 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_; |