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