OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_ORACLE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_ORACLE_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_ORACLE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_ORACLE_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/time.h" | 10 #include "base/time/time.h" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 // Filters a sequence of events to achieve a target frequency. | 15 // Filters a sequence of events to achieve a target frequency. |
16 class CONTENT_EXPORT SmoothEventSampler { | 16 class CONTENT_EXPORT SmoothEventSampler { |
17 public: | 17 public: |
18 explicit SmoothEventSampler(base::TimeDelta capture_period, | 18 explicit SmoothEventSampler(base::TimeDelta capture_period, |
19 bool events_are_reliable, | 19 bool events_are_reliable, |
20 int redundant_capture_goal); | 20 int redundant_capture_goal); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // Stores the timestamp of the last delivered frame. | 98 // Stores the timestamp of the last delivered frame. |
99 base::Time last_delivered_frame_timestamp_; | 99 base::Time last_delivered_frame_timestamp_; |
100 | 100 |
101 // Tracks present/paint history. | 101 // Tracks present/paint history. |
102 SmoothEventSampler sampler_; | 102 SmoothEventSampler sampler_; |
103 }; | 103 }; |
104 | 104 |
105 } // namespace content | 105 } // namespace content |
106 | 106 |
107 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_ORACLE_H_ | 107 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_ORACLE_H_ |
OLD | NEW |