blob: 883002112024b7a51ee71810d0e14f696ed44662 [file] [log] [blame]
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +00001/*
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
kwiberg37e99fd2017-04-10 05:15:48 -070011#ifndef WEBRTC_TEST_MOCK_AUDIO_DECODER_H_
12#define WEBRTC_TEST_MOCK_AUDIO_DECODER_H_
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000013
kwiberg087bd342017-02-10 08:15:44 -080014#include "webrtc/api/audio_codecs/audio_decoder.h"
kwiberg77eab702016-09-28 17:42:01 -070015#include "webrtc/test/gmock.h"
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000016
17namespace webrtc {
18
19class MockAudioDecoder : public AudioDecoder {
20 public:
kwiberg@webrtc.org721ef632014-11-04 11:51:46 +000021 MockAudioDecoder() {}
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000022 virtual ~MockAudioDecoder() { Die(); }
23 MOCK_METHOD0(Die, void());
Peter Boströmd7b7ae82015-12-08 13:41:35 +010024 MOCK_METHOD5(DecodeInternal,
25 int(const uint8_t*, size_t, int, int16_t*, SpeechType*));
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000026 MOCK_CONST_METHOD0(HasDecodePlc, bool());
Peter Kastingdce40cf2015-08-24 14:52:23 -070027 MOCK_METHOD2(DecodePlc, size_t(size_t, int16_t*));
Karl Wiberg43766482015-08-27 15:22:11 +020028 MOCK_METHOD0(Reset, void());
kwiberg37e99fd2017-04-10 05:15:48 -070029 MOCK_METHOD5(IncomingPacket,
30 int(const uint8_t*, size_t, uint16_t, uint32_t, uint32_t));
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000031 MOCK_METHOD0(ErrorCode, int());
Henrik Lundin05f71fc2015-09-01 11:51:58 +020032 MOCK_CONST_METHOD2(PacketDuration, int(const uint8_t*, size_t));
henrik.lundin@webrtc.org6dba1eb2015-03-18 09:47:08 +000033 MOCK_CONST_METHOD0(Channels, size_t());
kwibergc0f2dcf2016-05-31 06:28:03 -070034 MOCK_CONST_METHOD0(SampleRateHz, int());
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000035};
36
37} // namespace webrtc
kwiberg37e99fd2017-04-10 05:15:48 -070038#endif // WEBRTC_TEST_MOCK_AUDIO_DECODER_H_