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

Unified Diff: webrtc/modules/audio_processing/echo_cancellation_impl.h

Issue 1764293002: Revert of Removed the inheritance from ProcessingComponent for EchoCancellerImpl. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
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 194819984efad6c33941b839b65e0d9ab4016be2..fbc2bcc465383a99941a517788c11fea02058d0a 100644
--- a/webrtc/modules/audio_processing/echo_cancellation_impl.h
+++ b/webrtc/modules/audio_processing/echo_cancellation_impl.h
@@ -13,7 +13,6 @@
#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"
@@ -23,7 +22,8 @@
class AudioBuffer;
-class EchoCancellationImpl : public EchoCancellation {
+class EchoCancellationImpl : public EchoCancellation,
+ public ProcessingComponent {
public:
EchoCancellationImpl(const AudioProcessing* apm,
rtc::CriticalSection* crit_render,
@@ -39,8 +39,9 @@
SuppressionLevel suppression_level() const override;
bool is_drift_compensation_enabled() const override;
- void Initialize();
- void SetExtraOptions(const Config& config);
+ // ProcessingComponent implementation.
+ int Initialize() override;
+ void SetExtraOptions(const Config& config) override;
bool is_delay_agnostic_enabled() const;
bool is_extended_filter_enabled() const;
bool is_next_generation_aec_enabled() const;
@@ -50,8 +51,6 @@
void ReadQueuedRenderData();
private:
- class Canceller;
-
// EchoCancellation implementation.
int Enable(bool enable) override;
int enable_drift_compensation(bool enable) override;
@@ -70,10 +69,15 @@
struct AecCore* aec_core() const override;
- size_t num_handles_required() const;
+ // 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;
void AllocateRenderQueue();
- int Configure();
// Not guarded as its public API is thread safe.
const AudioProcessing* apm_;
@@ -81,7 +85,6 @@
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_);
@@ -101,9 +104,6 @@
// 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
« no previous file with comments | « webrtc/modules/audio_processing/audio_processing_impl.cc ('k') | webrtc/modules/audio_processing/echo_cancellation_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698