Index: webrtc/modules/audio_processing/echo_cancellation_impl.h |
diff --git a/webrtc/modules/audio_processing/echo_cancellation_impl.h b/webrtc/modules/audio_processing/echo_cancellation_impl.h |
index 2ef6d52fe6b35504f7c42823f4c90b3603df4dea..ff7c3ae319eb67eb603504f53f8709b4278cbef8 100644 |
--- a/webrtc/modules/audio_processing/echo_cancellation_impl.h |
+++ b/webrtc/modules/audio_processing/echo_cancellation_impl.h |
@@ -13,6 +13,7 @@ |
#include <memory> |
+#include "webrtc/base/constructormagic.h" |
#include "webrtc/base/criticalsection.h" |
#include "webrtc/common_audio/swap_queue.h" |
#include "webrtc/modules/audio_processing/include/audio_processing.h" |
@@ -22,8 +23,7 @@ namespace webrtc { |
class AudioBuffer; |
-class EchoCancellationImpl : public EchoCancellation, |
- public ProcessingComponent { |
+class EchoCancellationImpl : public EchoCancellation { |
public: |
EchoCancellationImpl(const AudioProcessing* apm, |
rtc::CriticalSection* crit_render, |
@@ -39,9 +39,8 @@ class EchoCancellationImpl : public EchoCancellation, |
SuppressionLevel suppression_level() const override; |
bool is_drift_compensation_enabled() const override; |
- // ProcessingComponent implementation. |
- int Initialize() override; |
- void SetExtraOptions(const Config& config) override; |
+ void Initialize(); |
+ void SetExtraOptions(const Config& config); |
bool is_delay_agnostic_enabled() const; |
bool is_extended_filter_enabled() const; |
bool is_next_generation_aec_enabled() const; |
@@ -54,6 +53,8 @@ class EchoCancellationImpl : public EchoCancellation, |
int GetSystemDelayInSamples() const; |
private: |
+ class Canceller; |
+ |
// EchoCancellation implementation. |
int Enable(bool enable) override; |
int enable_drift_compensation(bool enable) override; |
@@ -72,15 +73,10 @@ class EchoCancellationImpl : public EchoCancellation, |
struct AecCore* aec_core() const override; |
- // ProcessingComponent implementation. |
- void* CreateHandle() const override; |
- int InitializeHandle(void* handle) const override; |
- int ConfigureHandle(void* handle) const override; |
- void DestroyHandle(void* handle) const override; |
- size_t num_handles_required() const override; |
- int GetHandleError(void* handle) const override; |
+ size_t num_handles_required() const; |
void AllocateRenderQueue(); |
+ int Configure(); |
// Not guarded as its public API is thread safe. |
const AudioProcessing* apm_; |
@@ -88,6 +84,7 @@ class EchoCancellationImpl : public EchoCancellation, |
rtc::CriticalSection* const crit_render_ ACQUIRED_BEFORE(crit_capture_); |
rtc::CriticalSection* const crit_capture_; |
+ bool enabled_ = false; |
bool drift_compensation_enabled_ GUARDED_BY(crit_capture_); |
bool metrics_enabled_ GUARDED_BY(crit_capture_); |
SuppressionLevel suppression_level_ GUARDED_BY(crit_capture_); |
@@ -107,6 +104,9 @@ class EchoCancellationImpl : public EchoCancellation, |
// Lock protection not needed. |
std::unique_ptr<SwapQueue<std::vector<float>, RenderQueueItemVerifier<float>>> |
render_signal_queue_; |
+ |
+ std::vector<std::unique_ptr<Canceller>> cancellers_; |
+ RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(EchoCancellationImpl); |
}; |
} // namespace webrtc |