You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.2 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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. #ifndef TEST_MOCK_AUDIO_DECODER_H_
  11. #define TEST_MOCK_AUDIO_DECODER_H_
  12. #include "api/audio_codecs/audio_decoder.h"
  13. #include "test/gmock.h"
  14. namespace webrtc {
  15. class MockAudioDecoder : public AudioDecoder {
  16. public:
  17. MockAudioDecoder();
  18. ~MockAudioDecoder();
  19. MOCK_METHOD0(Die, void());
  20. MOCK_METHOD5(DecodeInternal,
  21. int(const uint8_t*, size_t, int, int16_t*, SpeechType*));
  22. MOCK_CONST_METHOD0(HasDecodePlc, bool());
  23. MOCK_METHOD2(DecodePlc, size_t(size_t, int16_t*));
  24. MOCK_METHOD0(Reset, void());
  25. MOCK_METHOD0(ErrorCode, int());
  26. MOCK_CONST_METHOD2(PacketDuration, int(const uint8_t*, size_t));
  27. MOCK_CONST_METHOD0(Channels, size_t());
  28. MOCK_CONST_METHOD0(SampleRateHz, int());
  29. };
  30. } // namespace webrtc
  31. #endif // TEST_MOCK_AUDIO_DECODER_H_