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 CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <queue> | 9 #include <queue> |
10 #include <vector> | 10 #include <vector> |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // True if the last (and the only one) frame in pending_frames has | 127 // True if the last (and the only one) frame in pending_frames has |
128 // been rendered. We keep the last remaining frame in pending_frames even | 128 // been rendered. We keep the last remaining frame in pending_frames even |
129 // after it has been rendered, so that we have something to display if the | 129 // after it has been rendered, so that we have something to display if the |
130 // client is falling behind on providing us with new frames during | 130 // client is falling behind on providing us with new frames during |
131 // timer-driven playback. | 131 // timer-driven playback. |
132 bool last_frame_rendered; | 132 bool last_frame_rendered; |
133 | 133 |
134 // True if there won't be any new video frames comming. | 134 // True if there won't be any new video frames comming. |
135 bool is_flushing; | 135 bool is_flushing; |
136 | 136 |
| 137 // The number of frames need to be dropped to catch up the rendering. |
| 138 int frames_to_drop; |
| 139 |
137 // The video frames pending for rendering. | 140 // The video frames pending for rendering. |
138 std::queue<scoped_refptr<VideoFrameTexture> > pending_frames; | 141 std::queue<scoped_refptr<VideoFrameTexture> > pending_frames; |
139 | 142 |
140 RenderedVideo(); | 143 RenderedVideo(); |
141 ~RenderedVideo(); | 144 ~RenderedVideo(); |
142 }; | 145 }; |
143 | 146 |
144 void Clear(); | 147 void Clear(); |
145 | 148 |
146 void RenderContent(); | 149 void RenderContent(); |
(...skipping 25 matching lines...) Expand all Loading... |
172 gfx::Size thumbnail_size_; | 175 gfx::Size thumbnail_size_; |
173 GLuint program_; | 176 GLuint program_; |
174 base::TimeDelta frame_duration_; | 177 base::TimeDelta frame_duration_; |
175 | 178 |
176 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); | 179 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); |
177 }; | 180 }; |
178 | 181 |
179 } // namespace content | 182 } // namespace content |
180 | 183 |
181 #endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ | 184 #endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ |
OLD | NEW |