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: webrtc/modules/audio_processing/echo_cancellation_impl.h

Issue 2458993002: Reland of New statistics interface for APM (Closed)
Patch Set: Added implementation of the new non-pure interface function. 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
61 private: 75 private:
62 class Canceller; 76 class Canceller;
63 struct StreamProperties; 77 struct StreamProperties;
64 78
65 // EchoCancellation implementation. 79 // EchoCancellation implementation.
66 int Enable(bool enable) override; 80 int Enable(bool enable) override;
67 int enable_drift_compensation(bool enable) override; 81 int enable_drift_compensation(bool enable) override;
68 void set_stream_drift_samples(int drift) override; 82 void set_stream_drift_samples(int drift) override;
69 int set_suppression_level(SuppressionLevel level) override; 83 int set_suppression_level(SuppressionLevel level) override;
70 int enable_metrics(bool enable) override;
71 bool are_metrics_enabled() const override; 84 bool are_metrics_enabled() const override;
72 bool stream_has_echo() const override; 85 bool stream_has_echo() const override;
73 int GetMetrics(Metrics* metrics) override;
74 int enable_delay_logging(bool enable) override;
75 bool is_delay_logging_enabled() const override; 86 bool is_delay_logging_enabled() const override;
76 int GetDelayMetrics(int* median, int* std) override; 87 int GetDelayMetrics(int* median, int* std) override;
77 int GetDelayMetrics(int* median,
78 int* std,
79 float* fraction_poor_delays) override;
80 88
81 struct AecCore* aec_core() const override; 89 struct AecCore* aec_core() const override;
82 90
83 void AllocateRenderQueue(); 91 void AllocateRenderQueue();
84 int Configure(); 92 int Configure();
85 93
86 rtc::CriticalSection* const crit_render_ ACQUIRED_BEFORE(crit_capture_); 94 rtc::CriticalSection* const crit_render_ ACQUIRED_BEFORE(crit_capture_);
87 rtc::CriticalSection* const crit_capture_; 95 rtc::CriticalSection* const crit_capture_;
88 96
89 bool enabled_ = false; 97 bool enabled_ = false;
(...skipping 11 matching lines...) Expand all
101 109
102 std::vector<std::unique_ptr<Canceller>> cancellers_; 110 std::vector<std::unique_ptr<Canceller>> cancellers_;
103 std::unique_ptr<StreamProperties> stream_properties_; 111 std::unique_ptr<StreamProperties> stream_properties_;
104 112
105 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(EchoCancellationImpl); 113 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(EchoCancellationImpl);
106 }; 114 };
107 115
108 } // namespace webrtc 116 } // namespace webrtc
109 117
110 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_ 118 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698