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:
parent
b61ad3ac22
commit
2c6f373a27
@ -20,11 +20,6 @@ EchoCanceller3Factory::EchoCanceller3Factory() {}
|
|||||||
EchoCanceller3Factory::EchoCanceller3Factory(const EchoCanceller3Config& config)
|
EchoCanceller3Factory::EchoCanceller3Factory(const EchoCanceller3Config& config)
|
||||||
: config_(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(
|
std::unique_ptr<EchoControl> EchoCanceller3Factory::Create(
|
||||||
int sample_rate_hz,
|
int sample_rate_hz,
|
||||||
int num_render_channels,
|
int num_render_channels,
|
||||||
|
|||||||
@ -28,12 +28,7 @@ class RTC_EXPORT EchoCanceller3Factory : public EchoControlFactory {
|
|||||||
// configuration.
|
// configuration.
|
||||||
explicit EchoCanceller3Factory(const EchoCanceller3Config& config);
|
explicit EchoCanceller3Factory(const EchoCanceller3Config& config);
|
||||||
|
|
||||||
// Creates an EchoCanceller3 running at the specified sampling rate using a
|
// Creates an EchoCanceller3 with a specified channel count and sampling rate.
|
||||||
// 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.
|
|
||||||
std::unique_ptr<EchoControl> Create(int sample_rate_hz,
|
std::unique_ptr<EchoControl> Create(int sample_rate_hz,
|
||||||
int num_render_channels,
|
int num_render_channels,
|
||||||
int num_capture_channels) override;
|
int num_capture_channels) override;
|
||||||
|
|||||||
@ -52,14 +52,9 @@ class EchoControl {
|
|||||||
// Interface for a factory that creates EchoControllers.
|
// Interface for a factory that creates EchoControllers.
|
||||||
class EchoControlFactory {
|
class EchoControlFactory {
|
||||||
public:
|
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,
|
virtual std::unique_ptr<EchoControl> Create(int sample_rate_hz,
|
||||||
int num_render_channels,
|
int num_render_channels,
|
||||||
int num_capture_channels) {
|
int num_capture_channels) = 0;
|
||||||
RTC_NOTREACHED();
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ~EchoControlFactory() = default;
|
virtual ~EchoControlFactory() = default;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1783,6 +1783,7 @@ void AudioProcessingImpl::InitializeEchoController() {
|
|||||||
if (echo_control_factory_) {
|
if (echo_control_factory_) {
|
||||||
submodules_.echo_controller = echo_control_factory_->Create(
|
submodules_.echo_controller = echo_control_factory_->Create(
|
||||||
proc_sample_rate_hz(), num_reverse_channels(), num_proc_channels());
|
proc_sample_rate_hz(), num_reverse_channels(), num_proc_channels());
|
||||||
|
RTC_DCHECK(submodules_.echo_controller);
|
||||||
} else {
|
} else {
|
||||||
submodules_.echo_controller = std::make_unique<EchoCanceller3>(
|
submodules_.echo_controller = std::make_unique<EchoCanceller3>(
|
||||||
EchoCanceller3Config(), proc_sample_rate_hz(), num_reverse_channels(),
|
EchoCanceller3Config(), proc_sample_rate_hz(), num_reverse_channels(),
|
||||||
|
|||||||
@ -53,10 +53,6 @@ class MockEchoControlFactory : public EchoControlFactory {
|
|||||||
MockEchoControlFactory() : next_mock_(std::make_unique<MockEchoControl>()) {}
|
MockEchoControlFactory() : next_mock_(std::make_unique<MockEchoControl>()) {}
|
||||||
// Returns a pointer to the next MockEchoControl that this factory creates.
|
// Returns a pointer to the next MockEchoControl that this factory creates.
|
||||||
MockEchoControl* GetNext() const { return next_mock_.get(); }
|
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,
|
std::unique_ptr<EchoControl> Create(int sample_rate_hz,
|
||||||
int num_render_channels,
|
int num_render_channels,
|
||||||
int num_capture_channels) override {
|
int num_capture_channels) override {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user