Florent Castelli | 2b4f513 | 2021-07-16 17:13:54 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2021 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 API_TEST_MOCK_AUDIO_SINK_H_ |
| 12 | #define API_TEST_MOCK_AUDIO_SINK_H_ |
| 13 | |
| 14 | #include "absl/types/optional.h" |
| 15 | #include "api/media_stream_interface.h" |
| 16 | #include "test/gmock.h" |
| 17 | |
| 18 | namespace webrtc { |
| 19 | |
Jack Smith | adf35a3 | 2022-11-29 14:42:38 +0000 | [diff] [blame^] | 20 | class MockAudioSink : public webrtc::AudioTrackSinkInterface { |
Florent Castelli | 2b4f513 | 2021-07-16 17:13:54 +0200 | [diff] [blame] | 21 | public: |
| 22 | MOCK_METHOD(void, |
| 23 | OnData, |
| 24 | (const void* audio_data, |
| 25 | int bits_per_sample, |
| 26 | int sample_rate, |
| 27 | size_t number_of_channels, |
| 28 | size_t number_of_frames), |
| 29 | (override)); |
| 30 | |
| 31 | MOCK_METHOD(void, |
| 32 | OnData, |
| 33 | (const void* audio_data, |
| 34 | int bits_per_sample, |
| 35 | int sample_rate, |
| 36 | size_t number_of_channels, |
| 37 | size_t number_of_frames, |
| 38 | absl::optional<int64_t> absolute_capture_timestamp_ms), |
| 39 | (override)); |
| 40 | }; |
| 41 | |
Florent Castelli | 2b4f513 | 2021-07-16 17:13:54 +0200 | [diff] [blame] | 42 | } // namespace webrtc |
| 43 | |
| 44 | #endif // API_TEST_MOCK_AUDIO_SINK_H_ |