OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2016 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 |
| 11 #ifndef WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_MOCK_AUDIO_TRANSPORT_H_ |
| 12 #define WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_MOCK_AUDIO_TRANSPORT_H_ |
| 13 |
| 14 #include "webrtc/modules/audio_device/include/audio_device_defines.h" |
| 15 #include "webrtc/test/gmock.h" |
| 16 |
| 17 namespace webrtc { |
| 18 namespace test { |
| 19 |
| 20 class MockAudioTransport : public AudioTransport { |
| 21 public: |
| 22 MockAudioTransport() {} |
| 23 ~MockAudioTransport() {} |
| 24 |
| 25 MOCK_METHOD10(RecordedDataIsAvailable, |
| 26 int32_t(const void* audioSamples, |
| 27 const size_t nSamples, |
| 28 const size_t nBytesPerSample, |
| 29 const size_t nChannels, |
| 30 const uint32_t samplesPerSec, |
| 31 const uint32_t totalDelayMS, |
| 32 const int32_t clockDrift, |
| 33 const uint32_t currentMicLevel, |
| 34 const bool keyPressed, |
| 35 uint32_t& newMicLevel)); |
| 36 |
| 37 MOCK_METHOD8(NeedMorePlayData, |
| 38 int32_t(const size_t nSamples, |
| 39 const size_t nBytesPerSample, |
| 40 const size_t nChannels, |
| 41 const uint32_t samplesPerSec, |
| 42 void* audioSamples, |
| 43 size_t& nSamplesOut, |
| 44 int64_t* elapsed_time_ms, |
| 45 int64_t* ntp_time_ms)); |
| 46 |
| 47 MOCK_METHOD6(PushCaptureData, |
| 48 void(int voe_channel, |
| 49 const void* audio_data, |
| 50 int bits_per_sample, |
| 51 int sample_rate, |
| 52 size_t number_of_channels, |
| 53 size_t number_of_frames)); |
| 54 |
| 55 MOCK_METHOD7(PullRenderData, |
| 56 void(int bits_per_sample, |
| 57 int sample_rate, |
| 58 size_t number_of_channels, |
| 59 size_t number_of_frames, |
| 60 void* audio_data, |
| 61 int64_t* elapsed_time_ms, |
| 62 int64_t* ntp_time_ms)); |
| 63 }; |
| 64 |
| 65 } // namespace test |
| 66 } // namespace webrtc |
| 67 |
| 68 #endif // WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_MOCK_AUDIO_TRANSPORT_H_ |
OLD | NEW |