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

Side by Side Diff: media/filters/video_renderer_base.h

Issue 10248002: Report VideoDecoder status through ReadCB instead of through FilterHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revised on comments. Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ 5 #ifndef MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_
6 #define MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ 6 #define MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Clients of this class (painter/compositor) should use GetCurrentFrame() 67 // Clients of this class (painter/compositor) should use GetCurrentFrame()
68 // obtain ownership of VideoFrame, it should always relinquish the ownership 68 // obtain ownership of VideoFrame, it should always relinquish the ownership
69 // by use PutCurrentFrame(). Current frame is not guaranteed to be non-NULL. 69 // by use PutCurrentFrame(). Current frame is not guaranteed to be non-NULL.
70 // It expects clients to use color-fill the background if current frame 70 // It expects clients to use color-fill the background if current frame
71 // is NULL. This could happen before pipeline is pre-rolled or during 71 // is NULL. This could happen before pipeline is pre-rolled or during
72 // pause/flush/seek. 72 // pause/flush/seek.
73 void GetCurrentFrame(scoped_refptr<VideoFrame>* frame_out); 73 void GetCurrentFrame(scoped_refptr<VideoFrame>* frame_out);
74 void PutCurrentFrame(scoped_refptr<VideoFrame> frame); 74 void PutCurrentFrame(scoped_refptr<VideoFrame> frame);
75 75
76 private: 76 private:
77 // Callback from the video decoder delivering decoded video frames. 77 // Callback from the video decoder delivering decoded video frames and
78 void FrameReady(scoped_refptr<VideoFrame> frame); 78 // reporting video decoder status.
79 void FrameReady(VideoDecoder::Status status, scoped_refptr<VideoFrame> frame);
79 80
80 // Helper method that schedules an asynchronous read from the decoder as long 81 // Helper method that schedules an asynchronous read from the decoder as long
81 // as there isn't a pending read and we have capacity. 82 // as there isn't a pending read and we have capacity.
82 void AttemptRead_Locked(); 83 void AttemptRead_Locked();
83 84
84 // Called when the VideoDecoder Flush() completes. 85 // Called when the VideoDecoder Flush() completes.
85 void OnDecoderFlushDone(); 86 void OnDecoderFlushDone();
86 87
87 // Attempts to complete flushing and transition into the flushed state. 88 // Attempts to complete flushing and transition into the flushed state.
88 void AttemptFlush_Locked(); 89 void AttemptFlush_Locked();
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // Callback to execute to inform the player if the video decoder's output is 205 // Callback to execute to inform the player if the video decoder's output is
205 // opaque. 206 // opaque.
206 SetOpaqueCB set_opaque_cb_; 207 SetOpaqueCB set_opaque_cb_;
207 208
208 DISALLOW_COPY_AND_ASSIGN(VideoRendererBase); 209 DISALLOW_COPY_AND_ASSIGN(VideoRendererBase);
209 }; 210 };
210 211
211 } // namespace media 212 } // namespace media
212 213
213 #endif // MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ 214 #endif // MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698