Remove legacy EchoControlFactory::Create

Bug: webrtc:10913
Change-Id: I34af9abe76f5b08d7dc5c3e0281fafc14a71eed8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159031
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29741}
This commit is contained in:
Gustaf Ullberg 2019-11-07 17:15:12 +01:00 committed by Commit Bot
parent b61ad3ac22
commit 2c6f373a27
5 changed files with 3 additions and 21 deletions

View file

@ -20,11 +20,6 @@ EchoCanceller3Factory::EchoCanceller3Factory() {}
EchoCanceller3Factory::EchoCanceller3Factory(const EchoCanceller3Config& config)
: config_(config) {}
std::unique_ptr<EchoControl> EchoCanceller3Factory::Create(int sample_rate_hz) {
return Create(sample_rate_hz, /*num_render_channels=*/1,
/*num_capture_channels=*/1);
}
std::unique_ptr<EchoControl> EchoCanceller3Factory::Create(
int sample_rate_hz,
int num_render_channels,

View file

@ -28,12 +28,7 @@ class RTC_EXPORT EchoCanceller3Factory : public EchoControlFactory {
// configuration.
explicit EchoCanceller3Factory(const EchoCanceller3Config& config);
// Creates an EchoCanceller3 running at the specified sampling rate using a
// mono setup.
std::unique_ptr<EchoControl> Create(int sample_rate_hz) override;
// Creates an EchoCanceller3 running at the specified sampling rate using a
// multichannel setup.
// Creates an EchoCanceller3 with a specified channel count and sampling rate.
std::unique_ptr<EchoControl> Create(int sample_rate_hz,
int num_render_channels,
int num_capture_channels) override;

View file

@ -52,14 +52,9 @@ class EchoControl {
// Interface for a factory that creates EchoControllers.
class EchoControlFactory {
public:
virtual std::unique_ptr<EchoControl> Create(int sample_rate_hz) = 0;
// TODO(peah): Make pure virtual.
virtual std::unique_ptr<EchoControl> Create(int sample_rate_hz,
int num_render_channels,
int num_capture_channels) {
RTC_NOTREACHED();
return nullptr;
}
int num_capture_channels) = 0;
virtual ~EchoControlFactory() = default;
};

View file

@ -1783,6 +1783,7 @@ void AudioProcessingImpl::InitializeEchoController() {
if (echo_control_factory_) {
submodules_.echo_controller = echo_control_factory_->Create(
proc_sample_rate_hz(), num_reverse_channels(), num_proc_channels());
RTC_DCHECK(submodules_.echo_controller);
} else {
submodules_.echo_controller = std::make_unique<EchoCanceller3>(
EchoCanceller3Config(), proc_sample_rate_hz(), num_reverse_channels(),

View file

@ -53,10 +53,6 @@ class MockEchoControlFactory : public EchoControlFactory {
MockEchoControlFactory() : next_mock_(std::make_unique<MockEchoControl>()) {}
// Returns a pointer to the next MockEchoControl that this factory creates.
MockEchoControl* GetNext() const { return next_mock_.get(); }
std::unique_ptr<EchoControl> Create(int sample_rate_hz) override {
RTC_NOTREACHED();
return nullptr;
}
std::unique_ptr<EchoControl> Create(int sample_rate_hz,
int num_render_channels,
int num_capture_channels) override {