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

Side by Side Diff: media/renderers/video_renderer_impl.h

Issue 1034233002: Move underflow threshold limits out of the video renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@frame_time
Patch Set: Wait for frame duration. Created 5 years, 8 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
« no previous file with comments | « media/renderers/renderer_impl_unittest.cc ('k') | media/renderers/video_renderer_impl.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 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
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 200 // Equivalent to |last_media_time_| + the estimated duration of the frame.
201 // during flushing. 201 base::TimeTicks latest_possible_paint_time_;
202 base::TimeTicks last_painted_time_;
203 202
204 // Keeps track of the number of frames decoded and dropped since the 203 // Keeps track of the number of frames decoded and dropped since the
205 // last call to |statistics_cb_|. These must be accessed under lock. 204 // last call to |statistics_cb_|. These must be accessed under lock.
206 int frames_decoded_; 205 int frames_decoded_;
207 int frames_dropped_; 206 int frames_dropped_;
208 207
209 bool is_shutting_down_; 208 bool is_shutting_down_;
210 209
211 scoped_ptr<base::TickClock> tick_clock_; 210 scoped_ptr<base::TickClock> tick_clock_;
212 211
213 // NOTE: Weak pointers must be invalidated before all other member variables. 212 // NOTE: Weak pointers must be invalidated before all other member variables.
214 base::WeakPtrFactory<VideoRendererImpl> weak_factory_; 213 base::WeakPtrFactory<VideoRendererImpl> weak_factory_;
215 214
216 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); 215 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl);
217 }; 216 };
218 217
219 } // namespace media 218 } // namespace media
220 219
221 #endif // MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ 220 #endif // MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_
OLDNEW
« no previous file with comments | « media/renderers/renderer_impl_unittest.cc ('k') | media/renderers/video_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698