henrik.lundin@webrtc.org | ee0fb18 | 2014-09-02 13:22:11 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2014 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 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #ifndef MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_ |
| 12 | #define MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_ |
henrik.lundin@webrtc.org | ee0fb18 | 2014-09-02 13:22:11 +0000 | [diff] [blame] | 13 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 14 | #include "modules/audio_coding/neteq/expand.h" |
henrik.lundin@webrtc.org | ee0fb18 | 2014-09-02 13:22:11 +0000 | [diff] [blame] | 15 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 16 | #include "test/gmock.h" |
henrik.lundin@webrtc.org | ee0fb18 | 2014-09-02 13:22:11 +0000 | [diff] [blame] | 17 | |
| 18 | namespace webrtc { |
| 19 | |
| 20 | class MockExpand : public Expand { |
| 21 | public: |
| 22 | MockExpand(BackgroundNoise* background_noise, |
| 23 | SyncBuffer* sync_buffer, |
| 24 | RandomVector* random_vector, |
Henrik Lundin | bef77e2 | 2015-08-18 14:58:09 +0200 | [diff] [blame] | 25 | StatisticsCalculator* statistics, |
henrik.lundin@webrtc.org | ee0fb18 | 2014-09-02 13:22:11 +0000 | [diff] [blame] | 26 | int fs, |
| 27 | size_t num_channels) |
Henrik Lundin | bef77e2 | 2015-08-18 14:58:09 +0200 | [diff] [blame] | 28 | : Expand(background_noise, |
| 29 | sync_buffer, |
| 30 | random_vector, |
| 31 | statistics, |
| 32 | fs, |
| 33 | num_channels) {} |
henrik.lundin@webrtc.org | ee0fb18 | 2014-09-02 13:22:11 +0000 | [diff] [blame] | 34 | virtual ~MockExpand() { Die(); } |
| 35 | MOCK_METHOD0(Die, void()); |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 36 | MOCK_METHOD0(Reset, void()); |
| 37 | MOCK_METHOD1(Process, int(AudioMultiVector* output)); |
| 38 | MOCK_METHOD0(SetParametersForNormalAfterExpand, void()); |
| 39 | MOCK_METHOD0(SetParametersForMergeAfterExpand, void()); |
| 40 | MOCK_CONST_METHOD0(overlap_length, size_t()); |
henrik.lundin@webrtc.org | ee0fb18 | 2014-09-02 13:22:11 +0000 | [diff] [blame] | 41 | }; |
| 42 | |
| 43 | } // namespace webrtc |
| 44 | |
| 45 | namespace webrtc { |
| 46 | |
| 47 | class MockExpandFactory : public ExpandFactory { |
| 48 | public: |
Henrik Lundin | bef77e2 | 2015-08-18 14:58:09 +0200 | [diff] [blame] | 49 | MOCK_CONST_METHOD6(Create, |
henrik.lundin@webrtc.org | ee0fb18 | 2014-09-02 13:22:11 +0000 | [diff] [blame] | 50 | Expand*(BackgroundNoise* background_noise, |
| 51 | SyncBuffer* sync_buffer, |
| 52 | RandomVector* random_vector, |
Henrik Lundin | bef77e2 | 2015-08-18 14:58:09 +0200 | [diff] [blame] | 53 | StatisticsCalculator* statistics, |
henrik.lundin@webrtc.org | ee0fb18 | 2014-09-02 13:22:11 +0000 | [diff] [blame] | 54 | int fs, |
| 55 | size_t num_channels)); |
| 56 | }; |
| 57 | |
| 58 | } // namespace webrtc |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 59 | #endif // MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_ |