OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_FILTERS_VIDEO_RENDERER_ALGORITHM_H_ | 5 #ifndef MEDIA_FILTERS_VIDEO_RENDERER_ALGORITHM_H_ |
6 #define MEDIA_FILTERS_VIDEO_RENDERER_ALGORITHM_H_ | 6 #define MEDIA_FILTERS_VIDEO_RENDERER_ALGORITHM_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 // allows 29.9fps and 59.94fps in 60Hz and vice versa. | 152 // allows 29.9fps and 59.94fps in 60Hz and vice versa. |
153 // | 153 // |
154 // Most users will not be able to see a single frame repeated or dropped every | 154 // Most users will not be able to see a single frame repeated or dropped every |
155 // 8 seconds and certainly should notice it less than the randomly variable | 155 // 8 seconds and certainly should notice it less than the randomly variable |
156 // frame durations. | 156 // frame durations. |
157 static const int kMinimumAcceptableTimeBetweenGlitchesSecs = 8; | 157 static const int kMinimumAcceptableTimeBetweenGlitchesSecs = 8; |
158 | 158 |
159 // Metadata container for enqueued frames. See |frame_queue_| below. | 159 // Metadata container for enqueued frames. See |frame_queue_| below. |
160 struct ReadyFrame { | 160 struct ReadyFrame { |
161 ReadyFrame(const scoped_refptr<VideoFrame>& frame); | 161 ReadyFrame(const scoped_refptr<VideoFrame>& frame); |
| 162 ReadyFrame(const ReadyFrame& other); |
162 ~ReadyFrame(); | 163 ~ReadyFrame(); |
163 | 164 |
164 // For use with std::lower_bound. | 165 // For use with std::lower_bound. |
165 bool operator<(const ReadyFrame& other) const; | 166 bool operator<(const ReadyFrame& other) const; |
166 | 167 |
167 scoped_refptr<VideoFrame> frame; | 168 scoped_refptr<VideoFrame> frame; |
168 | 169 |
169 // |start_time| is only available after UpdateFrameStatistics() has been | 170 // |start_time| is only available after UpdateFrameStatistics() has been |
170 // called and |end_time| only after we have more than one frame. | 171 // called and |end_time| only after we have more than one frame. |
171 base::TimeTicks start_time; | 172 base::TimeTicks start_time; |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 // UpdateFrameStatistics() during Render() or externally by | 319 // UpdateFrameStatistics() during Render() or externally by |
319 // set_time_stopped(). | 320 // set_time_stopped(). |
320 bool was_time_moving_; | 321 bool was_time_moving_; |
321 | 322 |
322 DISALLOW_COPY_AND_ASSIGN(VideoRendererAlgorithm); | 323 DISALLOW_COPY_AND_ASSIGN(VideoRendererAlgorithm); |
323 }; | 324 }; |
324 | 325 |
325 } // namespace media | 326 } // namespace media |
326 | 327 |
327 #endif // MEDIA_FILTERS_VIDEO_RENDERER_ALGORITHM_H_ | 328 #endif // MEDIA_FILTERS_VIDEO_RENDERER_ALGORITHM_H_ |
OLD | NEW |