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_BASE_MOVING_AVERAGE_H_ | 5 #ifndef MEDIA_BASE_MOVING_AVERAGE_H_ |
6 #define MEDIA_BASE_MOVING_AVERAGE_H_ | 6 #define MEDIA_BASE_MOVING_AVERAGE_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
8 #include <vector> | 11 #include <vector> |
9 | 12 |
10 #include "base/macros.h" | 13 #include "base/macros.h" |
11 #include "base/time/time.h" | 14 #include "base/time/time.h" |
12 #include "media/base/media_export.h" | 15 #include "media/base/media_export.h" |
13 | 16 |
14 namespace media { | 17 namespace media { |
15 | 18 |
16 // Simple class for calculating a moving average of fixed size. | 19 // Simple class for calculating a moving average of fixed size. |
17 class MEDIA_EXPORT MovingAverage { | 20 class MEDIA_EXPORT MovingAverage { |
(...skipping 27 matching lines...) Expand all Loading... |
45 std::vector<base::TimeDelta> samples_; | 48 std::vector<base::TimeDelta> samples_; |
46 base::TimeDelta total_; | 49 base::TimeDelta total_; |
47 uint64_t square_sum_us_; | 50 uint64_t square_sum_us_; |
48 | 51 |
49 DISALLOW_COPY_AND_ASSIGN(MovingAverage); | 52 DISALLOW_COPY_AND_ASSIGN(MovingAverage); |
50 }; | 53 }; |
51 | 54 |
52 } // namespace media | 55 } // namespace media |
53 | 56 |
54 #endif // MEDIA_BASE_MOVING_AVERAGE_H_ | 57 #endif // MEDIA_BASE_MOVING_AVERAGE_H_ |
OLD | NEW |