Make GetConfig() part of the AudioProcessing interface
BUG=chromium:708475 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng Review-Url: https://codereview.webrtc.org/2802603003 Cr-Commit-Position: refs/heads/master@{#17540}
This commit is contained in:
committed by
Commit bot
parent
368f5cf27e
commit
adf0635ed5
@ -134,9 +134,9 @@ class AudioProcessingImpl : public AudioProcessing {
|
||||
NoiseSuppression* noise_suppression() const override;
|
||||
VoiceDetection* voice_detection() const override;
|
||||
|
||||
// TODO(peah): Remove these two methods once the new API allows that.
|
||||
// TODO(peah): Remove MutateConfig once the new API allows that.
|
||||
void MutateConfig(rtc::FunctionView<void(AudioProcessing::Config*)> mutator);
|
||||
AudioProcessing::Config GetConfig() const;
|
||||
AudioProcessing::Config GetConfig() const override;
|
||||
|
||||
protected:
|
||||
// Overridden in a mock.
|
||||
|
||||
@ -31,5 +31,8 @@ Beamforming::Beamforming(bool enabled,
|
||||
|
||||
Beamforming::~Beamforming() {}
|
||||
|
||||
AudioProcessing::Config AudioProcessing::GetConfig() const {
|
||||
return AudioProcessing::Config();
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -559,6 +559,11 @@ class AudioProcessing {
|
||||
virtual NoiseSuppression* noise_suppression() const = 0;
|
||||
virtual VoiceDetection* voice_detection() const = 0;
|
||||
|
||||
// Returns the last applied configuration.
|
||||
// TODO(henrik.lundin) Make this method pure virtual when downstream
|
||||
// dependencies have been fixed.
|
||||
virtual AudioProcessing::Config GetConfig() const;
|
||||
|
||||
enum Error {
|
||||
// Fatal errors.
|
||||
kNoError = 0,
|
||||
|
||||
@ -206,6 +206,8 @@ class MockAudioProcessing : public AudioProcessing {
|
||||
return voice_detection_.get();
|
||||
}
|
||||
|
||||
MOCK_CONST_METHOD0(GetConfig, AudioProcessing::Config());
|
||||
|
||||
private:
|
||||
std::unique_ptr<MockEchoCancellation> echo_cancellation_;
|
||||
std::unique_ptr<MockEchoControlMobile> echo_control_mobile_;
|
||||
|
||||
Reference in New Issue
Block a user