OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | |
3 * | |
4 * Use of this source code is governed by a BSD-style license | |
5 * that can be found in the LICENSE file in the root of the source | |
6 * tree. An additional intellectual property rights grant can be found | |
7 * in the file PATENTS. All contributing project authors may | |
8 * be found in the AUTHORS file in the root of the source tree. | |
9 */ | |
10 | |
11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMPER_NULL_AEC_DUMPER_H_ | |
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMPER_NULL_AEC_DUMPER_H_ | |
13 | |
14 #include <memory> | |
15 #include <vector> | |
16 | |
17 #include "webrtc/modules/audio_processing/aec_dumper/aec_dumper.h" | |
18 | |
19 namespace webrtc { | |
20 | |
21 class AudioFrame; | |
22 | |
23 class NullCaptureStreamInfo final : public AecDumper::CaptureStreamInfo { | |
24 void AddInput(std::vector<rtc::ArrayView<const float>> src) override{}; | |
25 void AddOutput(std::vector<rtc::ArrayView<const float>> src) override{}; | |
26 | |
27 void AddInput(const AudioFrame& frame) override{}; | |
28 void AddOutput(const AudioFrame& frame) override{}; | |
29 void set_delay(int delay) override{}; | |
30 void set_drift(int drift) override{}; | |
31 void set_level(int level) override{}; | |
32 void set_keypress(bool keypress) override{}; | |
33 }; | |
34 | |
35 class NullAecDumper final : public AecDumper { | |
peah-webrtc
2017/03/31 07:24:43
What is the purpose of the NullAecDumper class? Co
aleloi
2017/04/06 15:46:11
Done.
| |
36 public: | |
37 ~NullAecDumper() override = default; | |
38 | |
39 std::unique_ptr<CaptureStreamInfo> GetCaptureStreamInfo() override; | |
40 | |
41 // TODO(aleloi): doc | |
42 void WriteInitMessage(const ProcessingConfig& api_format) override{}; | |
43 | |
44 void WriteReverseStreamMessage(const AudioFrame& frame) override{}; | |
45 | |
46 void WriteReverseStreamMessage( | |
47 std::vector<rtc::ArrayView<const float>> src) override{}; | |
48 | |
49 void WriteCaptureStreamMessage( | |
50 std::unique_ptr<CaptureStreamInfo> stream_info) override{}; | |
51 | |
52 void WriteConfig(const InternalAPMConfig& config, bool forced) override{}; | |
53 }; | |
54 | |
55 inline std::unique_ptr<AecDumper::CaptureStreamInfo> | |
56 NullAecDumper::GetCaptureStreamInfo() { | |
57 return std::unique_ptr<AecDumper::CaptureStreamInfo>( | |
58 new NullCaptureStreamInfo()); | |
59 } | |
60 | |
61 inline std::unique_ptr<AecDumper> AecDumper::CreateNullDumper() { | |
62 return std::unique_ptr<NullAecDumper>(new NullAecDumper()); | |
63 } | |
64 | |
65 } // namespace webrtc | |
66 | |
67 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMPER_NULL_AEC_DUMPER_H_ | |
OLD | NEW |