henrik.lundin@webrtc.org | d94659d | 2013-01-29 12:09:21 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2012 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 TEST_MOCK_AUDIO_DECODER_H_ |
| 12 | #define TEST_MOCK_AUDIO_DECODER_H_ |
henrik.lundin@webrtc.org | d94659d | 2013-01-29 12:09:21 +0000 | [diff] [blame] | 13 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 14 | #include "api/audio_codecs/audio_decoder.h" |
| 15 | #include "test/gmock.h" |
henrik.lundin@webrtc.org | d94659d | 2013-01-29 12:09:21 +0000 | [diff] [blame] | 16 | |
| 17 | namespace webrtc { |
| 18 | |
| 19 | class MockAudioDecoder : public AudioDecoder { |
| 20 | public: |
kwiberg | 2b3aa14 | 2017-06-14 03:31:17 -0700 | [diff] [blame] | 21 | MockAudioDecoder(); |
| 22 | ~MockAudioDecoder(); |
henrik.lundin@webrtc.org | d94659d | 2013-01-29 12:09:21 +0000 | [diff] [blame] | 23 | MOCK_METHOD0(Die, void()); |
Peter Boström | d7b7ae8 | 2015-12-08 13:41:35 +0100 | [diff] [blame] | 24 | MOCK_METHOD5(DecodeInternal, |
| 25 | int(const uint8_t*, size_t, int, int16_t*, SpeechType*)); |
henrik.lundin@webrtc.org | d94659d | 2013-01-29 12:09:21 +0000 | [diff] [blame] | 26 | MOCK_CONST_METHOD0(HasDecodePlc, bool()); |
Peter Kasting | dce40cf | 2015-08-24 14:52:23 -0700 | [diff] [blame] | 27 | MOCK_METHOD2(DecodePlc, size_t(size_t, int16_t*)); |
Karl Wiberg | 4376648 | 2015-08-27 15:22:11 +0200 | [diff] [blame] | 28 | MOCK_METHOD0(Reset, void()); |
kwiberg | 37e99fd | 2017-04-10 05:15:48 -0700 | [diff] [blame] | 29 | MOCK_METHOD5(IncomingPacket, |
| 30 | int(const uint8_t*, size_t, uint16_t, uint32_t, uint32_t)); |
henrik.lundin@webrtc.org | d94659d | 2013-01-29 12:09:21 +0000 | [diff] [blame] | 31 | MOCK_METHOD0(ErrorCode, int()); |
Henrik Lundin | 05f71fc | 2015-09-01 11:51:58 +0200 | [diff] [blame] | 32 | MOCK_CONST_METHOD2(PacketDuration, int(const uint8_t*, size_t)); |
henrik.lundin@webrtc.org | 6dba1eb | 2015-03-18 09:47:08 +0000 | [diff] [blame] | 33 | MOCK_CONST_METHOD0(Channels, size_t()); |
kwiberg | c0f2dcf | 2016-05-31 06:28:03 -0700 | [diff] [blame] | 34 | MOCK_CONST_METHOD0(SampleRateHz, int()); |
henrik.lundin@webrtc.org | d94659d | 2013-01-29 12:09:21 +0000 | [diff] [blame] | 35 | }; |
| 36 | |
| 37 | } // namespace webrtc |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 38 | #endif // TEST_MOCK_AUDIO_DECODER_H_ |