OLD | NEW |
---|---|
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 Loading... | |
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. If |status| is not VideoDecoder::kOk, |
79 // it means some error has occurred in video decoder. In this case, |frame| | |
80 // should be NULL. | |
scherkus (not reviewing)
2012/04/27 18:27:56
nit: this documentation should be in the definitio
xhwang
2012/04/27 23:22:30
Done.
| |
81 void FrameReady(scoped_refptr<VideoFrame> frame, VideoDecoder::Status status); | |
79 | 82 |
80 // Helper method that schedules an asynchronous read from the decoder as long | 83 // Helper method that schedules an asynchronous read from the decoder as long |
81 // as there isn't a pending read and we have capacity. | 84 // as there isn't a pending read and we have capacity. |
82 void AttemptRead_Locked(); | 85 void AttemptRead_Locked(); |
83 | 86 |
84 // Called when the VideoDecoder Flush() completes. | 87 // Called when the VideoDecoder Flush() completes. |
85 void OnDecoderFlushDone(); | 88 void OnDecoderFlushDone(); |
86 | 89 |
87 // Attempts to complete flushing and transition into the flushed state. | 90 // Attempts to complete flushing and transition into the flushed state. |
88 void AttemptFlush_Locked(); | 91 void AttemptFlush_Locked(); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
204 // Callback to execute to inform the player if the video decoder's output is | 207 // Callback to execute to inform the player if the video decoder's output is |
205 // opaque. | 208 // opaque. |
206 SetOpaqueCB set_opaque_cb_; | 209 SetOpaqueCB set_opaque_cb_; |
207 | 210 |
208 DISALLOW_COPY_AND_ASSIGN(VideoRendererBase); | 211 DISALLOW_COPY_AND_ASSIGN(VideoRendererBase); |
209 }; | 212 }; |
210 | 213 |
211 } // namespace media | 214 } // namespace media |
212 | 215 |
213 #endif // MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ | 216 #endif // MEDIA_FILTERS_VIDEO_RENDERER_BASE_H_ |
OLD | NEW |