mock_aec_dump.h (3086B)
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 MODULES_AUDIO_PROCESSING_AEC_DUMP_MOCK_AEC_DUMP_H_ 12 #define MODULES_AUDIO_PROCESSING_AEC_DUMP_MOCK_AEC_DUMP_H_ 13 14 #include <cstdint> 15 16 #include "api/audio/audio_processing.h" 17 #include "api/audio/audio_view.h" 18 #include "modules/audio_processing/include/aec_dump.h" 19 #include "modules/audio_processing/include/audio_frame_view.h" 20 #include "test/gmock.h" 21 22 namespace webrtc { 23 24 namespace test { 25 26 class MockAecDump : public AecDump { 27 public: 28 MockAecDump(); 29 virtual ~MockAecDump(); 30 31 MOCK_METHOD(void, 32 WriteInitMessage, 33 (const ProcessingConfig& api_format, int64_t time_now_ms), 34 (override)); 35 36 MOCK_METHOD(void, 37 AddCaptureStreamInput, 38 (const AudioFrameView<const float>& src), 39 (override)); 40 MOCK_METHOD(void, 41 AddCaptureStreamInput, 42 (MonoView<const float> channel), 43 (override)); 44 MOCK_METHOD(void, 45 AddCaptureStreamOutput, 46 (const AudioFrameView<const float>& src), 47 (override)); 48 MOCK_METHOD(void, 49 AddCaptureStreamOutput, 50 (MonoView<const float> channel), 51 (override)); 52 MOCK_METHOD(void, 53 AddCaptureStreamInput, 54 (const int16_t* const data, 55 int num_channels, 56 int samples_per_channel), 57 (override)); 58 MOCK_METHOD(void, 59 AddCaptureStreamOutput, 60 (const int16_t* const data, 61 int num_channels, 62 int samples_per_channel), 63 (override)); 64 MOCK_METHOD(void, 65 AddAudioProcessingState, 66 (const AudioProcessingState& state), 67 (override)); 68 MOCK_METHOD(void, WriteCaptureStreamMessage, (), (override)); 69 70 MOCK_METHOD(void, 71 WriteRenderStreamMessage, 72 (const int16_t* const data, 73 int num_channels, 74 int samples_per_channel), 75 (override)); 76 MOCK_METHOD(void, 77 WriteRenderStreamMessage, 78 (const AudioFrameView<const float>& src), 79 (override)); 80 MOCK_METHOD(void, 81 WriteRenderStreamMessage, 82 (const float* const* data, 83 int num_channels, 84 int samples_per_channel), 85 (override)); 86 87 MOCK_METHOD(void, WriteConfig, (const InternalAPMConfig& config), (override)); 88 89 MOCK_METHOD(void, 90 WriteRuntimeSetting, 91 (const AudioProcessing::RuntimeSetting& config), 92 (override)); 93 }; 94 95 } // namespace test 96 97 } // namespace webrtc 98 99 #endif // MODULES_AUDIO_PROCESSING_AEC_DUMP_MOCK_AEC_DUMP_H_