Remove nonlinear beamformer API from APM
This CL removes the remaining beamformer parts from the APM. Bug: webrtc:9402 Change-Id: I9ab2795bd2813d17166ed0925125257b82d98a74 Reviewed-on: https://webrtc-review.googlesource.com/83340 Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Reviewed-by: Minyue Li <minyue@webrtc.org> Commit-Queue: Sam Zackrisson <saza@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23694}
This commit is contained in:
committed by
Commit Bot
parent
7b55c73d31
commit
db38972eda
@ -22,7 +22,6 @@
|
||||
#include "modules/audio_processing/agc/agc_manager_direct.h"
|
||||
#include "modules/audio_processing/agc2/gain_applier.h"
|
||||
#include "modules/audio_processing/audio_buffer.h"
|
||||
#include "modules/audio_processing/beamformer/nonlinear_beamformer.h"
|
||||
#include "modules/audio_processing/common.h"
|
||||
#include "modules/audio_processing/echo_cancellation_impl.h"
|
||||
#include "modules/audio_processing/echo_control_mobile_impl.h"
|
||||
@ -278,16 +277,13 @@ struct AudioProcessingImpl::ApmPublicSubmodules {
|
||||
};
|
||||
|
||||
struct AudioProcessingImpl::ApmPrivateSubmodules {
|
||||
ApmPrivateSubmodules(NonlinearBeamformer* beamformer,
|
||||
std::unique_ptr<CustomProcessing> capture_post_processor,
|
||||
ApmPrivateSubmodules(std::unique_ptr<CustomProcessing> capture_post_processor,
|
||||
std::unique_ptr<CustomProcessing> render_pre_processor,
|
||||
rtc::scoped_refptr<EchoDetector> echo_detector)
|
||||
: beamformer(beamformer),
|
||||
echo_detector(std::move(echo_detector)),
|
||||
: echo_detector(std::move(echo_detector)),
|
||||
capture_post_processor(std::move(capture_post_processor)),
|
||||
render_pre_processor(std::move(render_pre_processor)) {}
|
||||
// Accessed internally from capture or during initialization
|
||||
std::unique_ptr<NonlinearBeamformer> beamformer;
|
||||
std::unique_ptr<AgcManagerDirect> agc_manager;
|
||||
std::unique_ptr<GainController2> gain_controller2;
|
||||
std::unique_ptr<LowCutFilter> low_cut_filter;
|
||||
@ -319,12 +315,6 @@ AudioProcessingBuilder& AudioProcessingBuilder::SetEchoControlFactory(
|
||||
return *this;
|
||||
}
|
||||
|
||||
AudioProcessingBuilder& AudioProcessingBuilder::SetNonlinearBeamformer(
|
||||
std::unique_ptr<NonlinearBeamformer> nonlinear_beamformer) {
|
||||
nonlinear_beamformer_ = std::move(nonlinear_beamformer);
|
||||
return *this;
|
||||
}
|
||||
|
||||
AudioProcessingBuilder& AudioProcessingBuilder::SetEchoDetector(
|
||||
rtc::scoped_refptr<EchoDetector> echo_detector) {
|
||||
echo_detector_ = std::move(echo_detector);
|
||||
@ -340,7 +330,7 @@ AudioProcessing* AudioProcessingBuilder::Create(const webrtc::Config& config) {
|
||||
AudioProcessingImpl* apm = new rtc::RefCountedObject<AudioProcessingImpl>(
|
||||
config, std::move(capture_post_processing_),
|
||||
std::move(render_pre_processing_), std::move(echo_control_factory_),
|
||||
std::move(echo_detector_), nonlinear_beamformer_.release());
|
||||
std::move(echo_detector_));
|
||||
if (apm->Initialize() != AudioProcessing::kNoError) {
|
||||
delete apm;
|
||||
apm = nullptr;
|
||||
@ -349,8 +339,7 @@ AudioProcessing* AudioProcessingBuilder::Create(const webrtc::Config& config) {
|
||||
}
|
||||
|
||||
AudioProcessingImpl::AudioProcessingImpl(const webrtc::Config& config)
|
||||
: AudioProcessingImpl(config, nullptr, nullptr, nullptr, nullptr, nullptr) {
|
||||
}
|
||||
: AudioProcessingImpl(config, nullptr, nullptr, nullptr, nullptr) {}
|
||||
|
||||
int AudioProcessingImpl::instance_count_ = 0;
|
||||
|
||||
@ -359,8 +348,7 @@ AudioProcessingImpl::AudioProcessingImpl(
|
||||
std::unique_ptr<CustomProcessing> capture_post_processor,
|
||||
std::unique_ptr<CustomProcessing> render_pre_processor,
|
||||
std::unique_ptr<EchoControlFactory> echo_control_factory,
|
||||
rtc::scoped_refptr<EchoDetector> echo_detector,
|
||||
NonlinearBeamformer* beamformer)
|
||||
rtc::scoped_refptr<EchoDetector> echo_detector)
|
||||
: data_dumper_(
|
||||
new ApmDataDumper(rtc::AtomicOps::Increment(&instance_count_))),
|
||||
capture_runtime_settings_(kRuntimeSettingQueueSize),
|
||||
@ -372,8 +360,7 @@ AudioProcessingImpl::AudioProcessingImpl(
|
||||
submodule_states_(!!capture_post_processor, !!render_pre_processor),
|
||||
public_submodules_(new ApmPublicSubmodules()),
|
||||
private_submodules_(
|
||||
new ApmPrivateSubmodules(beamformer,
|
||||
std::move(capture_post_processor),
|
||||
new ApmPrivateSubmodules(std::move(capture_post_processor),
|
||||
std::move(render_pre_processor),
|
||||
std::move(echo_detector))),
|
||||
constants_(config.Get<ExperimentalAgc>().startup_min_volume,
|
||||
|
||||
Reference in New Issue
Block a user