Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: media/base/feedback_signal_accumulator.h

Issue 2149793003: Move media/capture/content/feedback_signal_accumulator{.h,_unittest.cc} to media/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/base/BUILD.gn ('k') | media/base/feedback_signal_accumulator_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_BASE_FEEDBACK_SIGNAL_ACCUMULATOR_H_
6 #define MEDIA_CAPTURE_CONTENT_FEEDBACK_SIGNAL_ACCUMULATOR_H_ 6 #define MEDIA_BASE_FEEDBACK_SIGNAL_ACCUMULATOR_H_
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "media/capture/capture_export.h"
10 9
11 namespace media { 10 namespace media {
12 11
13 // Utility class for maintaining an exponentially-decaying average of feedback 12 // Utility class for maintaining an exponentially-decaying average of feedback
14 // signal values whose updates occur at undetermined, possibly irregular time 13 // signal values whose updates occur at undetermined, possibly irregular time
15 // intervals. 14 // intervals.
16 // 15 //
17 // Feedback signals can be made by multiple sources. Meaning, there can be 16 // 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 17 // 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 18 // value is retained and used to re-compute the average. Therefore, the values
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 TimeType reset_time_; // |timestamp| passed in last call to Reset(). 98 TimeType reset_time_; // |timestamp| passed in last call to Reset().
100 double average_; // Current accumulated average. 99 double average_; // Current accumulated average.
101 double update_value_; // Latest |value| accepted by Update(). 100 double update_value_; // Latest |value| accepted by Update().
102 TimeType update_time_; // Latest |timestamp| accepted by Update(). 101 TimeType update_time_; // Latest |timestamp| accepted by Update().
103 double prior_average_; // Accumulated average before last call to Update(). 102 double prior_average_; // Accumulated average before last call to Update().
104 TimeType prior_update_time_; // |timestamp| in prior call to Update(). 103 TimeType prior_update_time_; // |timestamp| in prior call to Update().
105 }; 104 };
106 105
107 } // namespace media 106 } // namespace media
108 107
109 #endif // MEDIA_CAPTURE_CONTENT_FEEDBACK_SIGNAL_ACCUMULATOR_H_ 108 #endif // MEDIA_BASE_FEEDBACK_SIGNAL_ACCUMULATOR_H_
OLDNEW
« no previous file with comments | « media/base/BUILD.gn ('k') | media/base/feedback_signal_accumulator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698