| Index: webrtc/modules/audio_processing/aec_dumper/null_aec_dumper.h
|
| diff --git a/webrtc/modules/audio_processing/aec_dumper/null_aec_dumper.h b/webrtc/modules/audio_processing/aec_dumper/null_aec_dumper.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e0e02f24fe264c7a5b5dded7f638b1b5b636fb52
|
| --- /dev/null
|
| +++ b/webrtc/modules/audio_processing/aec_dumper/null_aec_dumper.h
|
| @@ -0,0 +1,67 @@
|
| +/*
|
| + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
|
| + *
|
| + * Use of this source code is governed by a BSD-style license
|
| + * that can be found in the LICENSE file in the root of the source
|
| + * tree. An additional intellectual property rights grant can be found
|
| + * in the file PATENTS. All contributing project authors may
|
| + * be found in the AUTHORS file in the root of the source tree.
|
| + */
|
| +
|
| +#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMPER_NULL_AEC_DUMPER_H_
|
| +#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMPER_NULL_AEC_DUMPER_H_
|
| +
|
| +#include <memory>
|
| +#include <vector>
|
| +
|
| +#include "webrtc/modules/audio_processing/aec_dumper/aec_dumper.h"
|
| +
|
| +namespace webrtc {
|
| +
|
| +class AudioFrame;
|
| +
|
| +class NullCaptureStreamInfo final : public AecDumper::CaptureStreamInfo {
|
| + void AddInput(const std::vector<rtc::ArrayView<const float>> src) override{};
|
| + void AddOutput(const std::vector<rtc::ArrayView<const float>> src) override{};
|
| +
|
| + void AddInput(const AudioFrame& frame) override{};
|
| + void AddOutput(const AudioFrame& frame) override{};
|
| + void set_delay(int delay) override{};
|
| + void set_drift(int drift) override{};
|
| + void set_level(int level) override{};
|
| + void set_keypress(bool keypress) override{};
|
| +};
|
| +
|
| +class NullAecDumper final : public AecDumper {
|
| + public:
|
| + ~NullAecDumper() override = default;
|
| +
|
| + std::unique_ptr<CaptureStreamInfo> GetCaptureStreamInfo() override;
|
| +
|
| + // TODO(aleloi): doc
|
| + void WriteInitMessage(const ProcessingConfig& api_format) override{};
|
| +
|
| + void WriteReverseStreamMessage(const AudioFrame& frame) override{};
|
| +
|
| + void WriteReverseStreamMessage(
|
| + const std::vector<rtc::ArrayView<const float>> src) override{};
|
| +
|
| + void WriteCaptureStreamMessage(
|
| + std::unique_ptr<CaptureStreamInfo> stream_info) override{};
|
| +
|
| + void WriteConfig(InternalAPMConfig config, bool forced) override{};
|
| +};
|
| +
|
| +inline std::unique_ptr<AecDumper::CaptureStreamInfo>
|
| +NullAecDumper::GetCaptureStreamInfo() {
|
| + return std::unique_ptr<AecDumper::CaptureStreamInfo>(
|
| + new NullCaptureStreamInfo());
|
| +}
|
| +
|
| +inline std::unique_ptr<AecDumper> AecDumper::CreateNullDumper() {
|
| + return std::unique_ptr<NullAecDumper>(new NullAecDumper());
|
| +}
|
| +
|
| +} // namespace webrtc
|
| +
|
| +#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMPER_NULL_AEC_DUMPER_H_
|
|
|