OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_CAPTURE_CONTENT_FEEDBACK_SIGNAL_ACCUMULATOR_H_ | 5 #ifndef MEDIA_CAPTURE_CONTENT_FEEDBACK_SIGNAL_ACCUMULATOR_H_ |
6 #define MEDIA_CAPTURE_CONTENT_FEEDBACK_SIGNAL_ACCUMULATOR_H_ | 6 #define MEDIA_CAPTURE_CONTENT_FEEDBACK_SIGNAL_ACCUMULATOR_H_ |
7 | 7 |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "media/base/media_export.h" | 9 #include "media/capture/capture_export.h" |
10 | 10 |
11 namespace media { | 11 namespace media { |
12 | 12 |
13 // Utility class for maintaining an exponentially-decaying average of feedback | 13 // Utility class for maintaining an exponentially-decaying average of feedback |
14 // signal values whose updates occur at undetermined, possibly irregular time | 14 // signal values whose updates occur at undetermined, possibly irregular time |
15 // intervals. | 15 // intervals. |
16 // | 16 // |
17 // Feedback signals can be made by multiple sources. Meaning, there can be | 17 // Feedback signals can be made by multiple sources. Meaning, there can be |
18 // several values provided for the same timestamp. In this case, the greatest | 18 // several values provided for the same timestamp. In this case, the greatest |
19 // value is retained and used to re-compute the average. Therefore, the values | 19 // value is retained and used to re-compute the average. Therefore, the values |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 double average_; // Current accumulated average. | 100 double average_; // Current accumulated average. |
101 double update_value_; // Latest |value| accepted by Update(). | 101 double update_value_; // Latest |value| accepted by Update(). |
102 TimeType update_time_; // Latest |timestamp| accepted by Update(). | 102 TimeType update_time_; // Latest |timestamp| accepted by Update(). |
103 double prior_average_; // Accumulated average before last call to Update(). | 103 double prior_average_; // Accumulated average before last call to Update(). |
104 TimeType prior_update_time_; // |timestamp| in prior call to Update(). | 104 TimeType prior_update_time_; // |timestamp| in prior call to Update(). |
105 }; | 105 }; |
106 | 106 |
107 } // namespace media | 107 } // namespace media |
108 | 108 |
109 #endif // MEDIA_CAPTURE_CONTENT_FEEDBACK_SIGNAL_ACCUMULATOR_H_ | 109 #endif // MEDIA_CAPTURE_CONTENT_FEEDBACK_SIGNAL_ACCUMULATOR_H_ |
OLD | NEW |