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

Side by Side Diff: webrtc/modules/audio_processing/echo_cancellation_impl.h

Issue 2456333002: Revert of New statistics interface for APM (Closed)
Patch Set: Created 4 years, 1 month 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // Returns the system delay of the first AEC component. 51 // Returns the system delay of the first AEC component.
52 int GetSystemDelayInSamples() const; 52 int GetSystemDelayInSamples() const;
53 53
54 static void PackRenderAudioBuffer(const AudioBuffer* audio, 54 static void PackRenderAudioBuffer(const AudioBuffer* audio,
55 size_t num_output_channels, 55 size_t num_output_channels,
56 size_t num_channels, 56 size_t num_channels,
57 std::vector<float>* packed_buffer); 57 std::vector<float>* packed_buffer);
58 static size_t NumCancellersRequired(size_t num_output_channels, 58 static size_t NumCancellersRequired(size_t num_output_channels,
59 size_t num_reverse_channels); 59 size_t num_reverse_channels);
60 60
61 // Enable logging of various AEC statistics.
62 int enable_metrics(bool enable) override;
63
64 // Provides various statistics about the AEC.
65 int GetMetrics(Metrics* metrics) override;
66
67 // Enable logging of delay metrics.
68 int enable_delay_logging(bool enable) override;
69
70 // Provides delay metrics.
71 int GetDelayMetrics(int* median,
72 int* std,
73 float* fraction_poor_delays) override;
74
75 private: 61 private:
76 class Canceller; 62 class Canceller;
77 struct StreamProperties; 63 struct StreamProperties;
78 64
79 // EchoCancellation implementation. 65 // EchoCancellation implementation.
80 int Enable(bool enable) override; 66 int Enable(bool enable) override;
81 int enable_drift_compensation(bool enable) override; 67 int enable_drift_compensation(bool enable) override;
82 void set_stream_drift_samples(int drift) override; 68 void set_stream_drift_samples(int drift) override;
83 int set_suppression_level(SuppressionLevel level) override; 69 int set_suppression_level(SuppressionLevel level) override;
70 int enable_metrics(bool enable) override;
84 bool are_metrics_enabled() const override; 71 bool are_metrics_enabled() const override;
85 bool stream_has_echo() const override; 72 bool stream_has_echo() const override;
73 int GetMetrics(Metrics* metrics) override;
74 int enable_delay_logging(bool enable) override;
86 bool is_delay_logging_enabled() const override; 75 bool is_delay_logging_enabled() const override;
87 int GetDelayMetrics(int* median, int* std) override; 76 int GetDelayMetrics(int* median, int* std) override;
77 int GetDelayMetrics(int* median,
78 int* std,
79 float* fraction_poor_delays) override;
88 80
89 struct AecCore* aec_core() const override; 81 struct AecCore* aec_core() const override;
90 82
91 void AllocateRenderQueue(); 83 void AllocateRenderQueue();
92 int Configure(); 84 int Configure();
93 85
94 rtc::CriticalSection* const crit_render_ ACQUIRED_BEFORE(crit_capture_); 86 rtc::CriticalSection* const crit_render_ ACQUIRED_BEFORE(crit_capture_);
95 rtc::CriticalSection* const crit_capture_; 87 rtc::CriticalSection* const crit_capture_;
96 88
97 bool enabled_ = false; 89 bool enabled_ = false;
(...skipping 11 matching lines...) Expand all
109 101
110 std::vector<std::unique_ptr<Canceller>> cancellers_; 102 std::vector<std::unique_ptr<Canceller>> cancellers_;
111 std::unique_ptr<StreamProperties> stream_properties_; 103 std::unique_ptr<StreamProperties> stream_properties_;
112 104
113 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(EchoCancellationImpl); 105 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(EchoCancellationImpl);
114 }; 106 };
115 107
116 } // namespace webrtc 108 } // namespace webrtc
117 109
118 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_ 110 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698