1 /* 2 * Copyright (c) 2019 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_CODING_NETEQ_MOCK_MOCK_NETEQ_CONTROLLER_H_ 12 #define MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_NETEQ_CONTROLLER_H_ 13 14 #include "api/neteq/neteq_controller.h" 15 #include "test/gmock.h" 16 17 namespace webrtc { 18 19 class MockNetEqController : public NetEqController { 20 public: 21 MockNetEqController() = default; ~MockNetEqController()22 ~MockNetEqController() override { Die(); } 23 MOCK_METHOD(void, Die, ()); 24 MOCK_METHOD(void, Reset, (), (override)); 25 MOCK_METHOD(void, SoftReset, (), (override)); 26 MOCK_METHOD(NetEq::Operation, 27 GetDecision, 28 (const NetEqStatus& neteq_status, bool* reset_decoder), 29 (override)); 30 MOCK_METHOD(void, RegisterEmptyPacket, (), (override)); 31 MOCK_METHOD(void, 32 SetSampleRate, 33 (int fs_hz, size_t output_size_samples), 34 (override)); 35 MOCK_METHOD(bool, SetMaximumDelay, (int delay_ms), (override)); 36 MOCK_METHOD(bool, SetMinimumDelay, (int delay_ms), (override)); 37 MOCK_METHOD(bool, SetBaseMinimumDelay, (int delay_ms), (override)); 38 MOCK_METHOD(int, GetBaseMinimumDelay, (), (const, override)); 39 MOCK_METHOD(bool, CngRfc3389On, (), (const, override)); 40 MOCK_METHOD(bool, CngOff, (), (const, override)); 41 MOCK_METHOD(void, SetCngOff, (), (override)); 42 MOCK_METHOD(void, ExpandDecision, (NetEq::Operation operation), (override)); 43 MOCK_METHOD(void, AddSampleMemory, (int32_t value), (override)); 44 MOCK_METHOD(int, TargetLevelMs, (), (const, override)); 45 MOCK_METHOD(absl::optional<int>, 46 PacketArrived, 47 (int fs_hz, 48 bool should_update_stats, 49 const PacketArrivedInfo& info), 50 (override)); 51 MOCK_METHOD(void, NotifyMutedState, (), (override)); 52 MOCK_METHOD(bool, PeakFound, (), (const, override)); 53 MOCK_METHOD(int, GetFilteredBufferLevel, (), (const, override)); 54 MOCK_METHOD(void, set_sample_memory, (int32_t value), (override)); 55 MOCK_METHOD(size_t, noise_fast_forward, (), (const, override)); 56 MOCK_METHOD(size_t, packet_length_samples, (), (const, override)); 57 MOCK_METHOD(void, set_packet_length_samples, (size_t value), (override)); 58 MOCK_METHOD(void, set_prev_time_scale, (bool value), (override)); 59 }; 60 61 } // namespace webrtc 62 #endif // MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_NETEQ_CONTROLLER_H_ 63