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

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

Issue 1878783002: Cache effective frame count. Make expired frame count useful. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clarify comment. Created 4 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
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 void StopSink(); 137 void StopSink();
138 138
139 // Fires |ended_cb_| if there are no remaining usable frames and 139 // Fires |ended_cb_| if there are no remaining usable frames and
140 // |received_end_of_stream_| is true. Sets |rendered_end_of_stream_| if it 140 // |received_end_of_stream_| is true. Sets |rendered_end_of_stream_| if it
141 // does so. 141 // does so.
142 // 142 //
143 // When called from the media thread, |time_progressing| should reflect the 143 // When called from the media thread, |time_progressing| should reflect the
144 // value of |time_progressing_|. When called from Render() on the sink 144 // value of |time_progressing_|. When called from Render() on the sink
145 // callback thread, the inverse of |render_first_frame_and_stop_| should be 145 // callback thread, the inverse of |render_first_frame_and_stop_| should be
146 // used as a proxy for |time_progressing_|. 146 // used as a proxy for |time_progressing_|.
147 // 147 void MaybeFireEndedCallback_Locked(bool time_progressing);
148 // Returns algorithm_->EffectiveFramesQueued().
149 size_t MaybeFireEndedCallback_Locked(bool time_progressing);
150 148
151 // Helper method for converting a single media timestamp to wall clock time. 149 // Helper method for converting a single media timestamp to wall clock time.
152 base::TimeTicks ConvertMediaTimestamp(base::TimeDelta media_timestamp); 150 base::TimeTicks ConvertMediaTimestamp(base::TimeDelta media_timestamp);
153 151
154 base::TimeTicks GetCurrentMediaTimeAsWallClockTime(); 152 base::TimeTicks GetCurrentMediaTimeAsWallClockTime();
155 153
156 // Helper method for checking if a frame timestamp plus the frame's expected 154 // Helper method for checking if a frame timestamp plus the frame's expected
157 // duration is before |start_timestamp_|. 155 // duration is before |start_timestamp_|.
158 bool IsBeforeStartTime(base::TimeDelta timestamp); 156 bool IsBeforeStartTime(base::TimeDelta timestamp);
159 157
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 269
272 // NOTE: Weak pointers must be invalidated before all other member variables. 270 // NOTE: Weak pointers must be invalidated before all other member variables.
273 base::WeakPtrFactory<VideoRendererImpl> weak_factory_; 271 base::WeakPtrFactory<VideoRendererImpl> weak_factory_;
274 272
275 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl); 273 DISALLOW_COPY_AND_ASSIGN(VideoRendererImpl);
276 }; 274 };
277 275
278 } // namespace media 276 } // namespace media
279 277
280 #endif // MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_ 278 #endif // MEDIA_RENDERERS_VIDEO_RENDERER_IMPL_H_
OLDNEW
« no previous file with comments | « media/filters/video_renderer_algorithm_unittest.cc ('k') | media/renderers/video_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698