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

Side by Side Diff: webrtc/common_audio/smoothing_filter.h

Issue 2532523002: Move smoothing filter to common audio and exp_filter to base/analytics. (Closed)
Patch Set: typo Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_SMOOTHING_FILTER_H_ 11 #ifndef WEBRTC_COMMON_AUDIO_SMOOTHING_FILTER_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_SMOOTHING_FILTER_H_ 12 #define WEBRTC_COMMON_AUDIO_SMOOTHING_FILTER_H_
13 13
14 #include "webrtc/base/analytics/exp_filter.h"
14 #include "webrtc/base/constructormagic.h" 15 #include "webrtc/base/constructormagic.h"
15 #include "webrtc/base/exp_filter.h"
16 #include "webrtc/base/optional.h" 16 #include "webrtc/base/optional.h"
17 #include "webrtc/system_wrappers/include/clock.h" 17 #include "webrtc/system_wrappers/include/clock.h"
18 18
19 namespace webrtc { 19 namespace webrtc {
20 20
21 class SmoothingFilter { 21 class SmoothingFilter {
22 public: 22 public:
23 virtual ~SmoothingFilter() = default; 23 virtual ~SmoothingFilter() = default;
24 virtual void AddSample(float sample) = 0; 24 virtual void AddSample(float sample) = 0;
25 virtual rtc::Optional<float> GetAverage() const = 0; 25 virtual rtc::Optional<float> GetAverage() const = 0;
(...skipping 13 matching lines...) Expand all
39 private: 39 private:
40 const int time_constant_ms_; 40 const int time_constant_ms_;
41 const Clock* const clock_; 41 const Clock* const clock_;
42 42
43 bool first_sample_received_; 43 bool first_sample_received_;
44 bool initialized_; 44 bool initialized_;
45 int64_t first_sample_time_ms_; 45 int64_t first_sample_time_ms_;
46 int64_t last_sample_time_ms_; 46 int64_t last_sample_time_ms_;
47 rtc::ExpFilter filter_; 47 rtc::ExpFilter filter_;
48 48
49 RTC_DISALLOW_COPY_AND_ASSIGN(SmoothingFilterImpl); 49 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(SmoothingFilterImpl);
50 }; 50 };
51 51
52 } // namespace webrtc 52 } // namespace webrtc
53 53
54 #endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_SMOOTHING_FILTER_H_ 54 #endif // WEBRTC_COMMON_AUDIO_SMOOTHING_FILTER_H_
OLDNEW
« no previous file with comments | « webrtc/common_audio/mocks/mock_smoothing_filter.h ('k') | webrtc/common_audio/smoothing_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698