mock_audio_decoder.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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_METHOD(void, Die, ());
  20. MOCK_METHOD(int,
  21. DecodeInternal,
  22. (const uint8_t*, size_t, int, int16_t*, SpeechType*),
  23. (override));
  24. MOCK_METHOD(bool, HasDecodePlc, (), (const, override));
  25. MOCK_METHOD(size_t, DecodePlc, (size_t, int16_t*), (override));
  26. MOCK_METHOD(void, Reset, (), (override));
  27. MOCK_METHOD(int, ErrorCode, (), (override));
  28. MOCK_METHOD(int, PacketDuration, (const uint8_t*, size_t), (const, override));
  29. MOCK_METHOD(size_t, Channels, (), (const, override));
  30. MOCK_METHOD(int, SampleRateHz, (), (const, override));
  31. };
  32. } // namespace webrtc
  33. #endif // TEST_MOCK_AUDIO_DECODER_H_