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

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: Rename VideoDecoder::Status to VideoDecoder::DecoderStatus since Status has been polluted by Xlib.h. 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
« no previous file with comments | « media/filters/video_frame_generator.cc ('k') | media/filters/video_renderer_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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::DecoderStatus status,
80 scoped_refptr<VideoFrame> frame);
79 81
80 // Helper method that schedules an asynchronous read from the decoder as long 82 // Helper method that schedules an asynchronous read from the decoder as long
81 // as there isn't a pending read and we have capacity. 83 // as there isn't a pending read and we have capacity.
82 void AttemptRead_Locked(); 84 void AttemptRead_Locked();
83 85
84 // Called when the VideoDecoder Flush() completes. 86 // Called when the VideoDecoder Flush() completes.
85 void OnDecoderFlushDone(); 87 void OnDecoderFlushDone();
86 88
87 // Attempts to complete flushing and transition into the flushed state. 89 // Attempts to complete flushing and transition into the flushed state.
88 void AttemptFlush_Locked(); 90 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 206 // Callback to execute to inform the player if the video decoder's output is
205 // opaque. 207 // opaque.
206 SetOpaqueCB set_opaque_cb_; 208 SetOpaqueCB set_opaque_cb_;
207 209
208 DISALLOW_COPY_AND_ASSIGN(VideoRendererBase); 210 DISALLOW_COPY_AND_ASSIGN(VideoRendererBase);
209 }; 211 };
210 212
211 } // namespace media 213 } // namespace media
212 214
213 #endif // MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ 215 #endif // MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_
OLDNEW
« no previous file with comments | « media/filters/video_frame_generator.cc ('k') | media/filters/video_renderer_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698