| 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 <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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |