| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_RENDERERS_VIDEO_RENDERER_IMPL_H_ | 5 #ifndef MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ |
| 6 #define MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ | 6 #define MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 base::TimeDelta start_timestamp_; | 190 base::TimeDelta start_timestamp_; |
| 191 | 191 |
| 192 // Embedder callback for notifying a new frame is available for painting. | 192 // Embedder callback for notifying a new frame is available for painting. |
| 193 PaintCB paint_cb_; | 193 PaintCB paint_cb_; |
| 194 | 194 |
| 195 // The wallclock times of the last frame removed from the |ready_frames_| | 195 // The wallclock times of the last frame removed from the |ready_frames_| |
| 196 // queue, either for calling |paint_cb_| or for dropping. Set to null during | 196 // queue, either for calling |paint_cb_| or for dropping. Set to null during |
| 197 // flushing. | 197 // flushing. |
| 198 base::TimeTicks last_media_time_; | 198 base::TimeTicks last_media_time_; |
| 199 | 199 |
| 200 // The wallclock time of the last successfully painted frame. Set to null | |
| 201 // during flushing. | |
| 202 base::TimeTicks last_painted_time_; | |
| 203 | |
| 204 // Keeps track of the number of frames decoded and dropped since the | 200 // Keeps track of the number of frames decoded and dropped since the |
| 205 // last call to |statistics_cb_|. These must be accessed under lock. | 201 // last call to |statistics_cb_|. These must be accessed under lock. |
| 206 int frames_decoded_; | 202 int frames_decoded_; |
| 207 int frames_dropped_; | 203 int frames_dropped_; |
| 208 | 204 |
| 209 bool is_shutting_down_; | 205 bool is_shutting_down_; |
| 210 | 206 |
| 211 scoped_ptr<base::TickClock> tick_clock_; | 207 scoped_ptr<base::TickClock> tick_clock_; |
| 212 | 208 |
| 213 // NOTE: Weak pointers must be invalidated before all other member variables. | 209 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 214 base::WeakPtrFactory<VideoRendererImpl> weak_factory_; | 210 base::WeakPtrFactory<VideoRendererImpl> weak_factory_; |
| 215 | 211 |
| 216 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); | 212 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); |
| 217 }; | 213 }; |
| 218 | 214 |
| 219 } // namespace media | 215 } // namespace media |
| 220 | 216 |
| 221 #endif // MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ | 217 #endif // MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ |
| OLD | NEW |