tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017 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 | */ |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 10 | #ifndef AUDIO_TEST_AUDIO_BWE_INTEGRATION_TEST_H_ |
| 11 | #define AUDIO_TEST_AUDIO_BWE_INTEGRATION_TEST_H_ |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 12 | |
| 13 | #include <memory> |
| 14 | #include <string> |
| 15 | |
Danil Chapovalov | 44db436 | 2019-09-30 04:16:28 +0200 | [diff] [blame^] | 16 | #include "api/task_queue/task_queue_base.h" |
Artem Titov | 46c4e60 | 2018-08-17 14:26:54 +0200 | [diff] [blame] | 17 | #include "api/test/simulated_network.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 18 | #include "test/call_test.h" |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 19 | |
| 20 | namespace webrtc { |
| 21 | namespace test { |
| 22 | |
| 23 | class AudioBweTest : public test::EndToEndTest { |
| 24 | public: |
| 25 | AudioBweTest(); |
| 26 | |
| 27 | protected: |
| 28 | virtual std::string AudioInputFile() = 0; |
| 29 | |
Artem Titov | 75e3647 | 2018-10-08 12:28:56 +0200 | [diff] [blame] | 30 | virtual BuiltInNetworkBehaviorConfig GetNetworkPipeConfig() = 0; |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 31 | |
| 32 | size_t GetNumVideoStreams() const override; |
| 33 | size_t GetNumAudioStreams() const override; |
| 34 | size_t GetNumFlexfecStreams() const override; |
| 35 | |
Artem Titov | 3faa832 | 2018-03-07 14:44:00 +0100 | [diff] [blame] | 36 | std::unique_ptr<TestAudioDeviceModule::Capturer> CreateCapturer() override; |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 37 | |
| 38 | void OnFakeAudioDevicesCreated( |
Artem Titov | 3faa832 | 2018-03-07 14:44:00 +0100 | [diff] [blame] | 39 | TestAudioDeviceModule* send_audio_device, |
| 40 | TestAudioDeviceModule* recv_audio_device) override; |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 41 | |
Danil Chapovalov | 44db436 | 2019-09-30 04:16:28 +0200 | [diff] [blame^] | 42 | std::unique_ptr<test::PacketTransport> CreateSendTransport( |
| 43 | TaskQueueBase* task_queue, |
eladalon | 413ee9a | 2017-08-22 04:02:52 -0700 | [diff] [blame] | 44 | Call* sender_call) override; |
Danil Chapovalov | 44db436 | 2019-09-30 04:16:28 +0200 | [diff] [blame^] | 45 | std::unique_ptr<test::PacketTransport> CreateReceiveTransport( |
| 46 | TaskQueueBase* task_queue) override; |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 47 | |
| 48 | void PerformTest() override; |
| 49 | |
| 50 | private: |
Artem Titov | 3faa832 | 2018-03-07 14:44:00 +0100 | [diff] [blame] | 51 | TestAudioDeviceModule* send_audio_device_; |
tschumim | 9d11764 | 2017-07-17 01:41:41 -0700 | [diff] [blame] | 52 | }; |
| 53 | |
| 54 | } // namespace test |
| 55 | } // namespace webrtc |
| 56 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 57 | #endif // AUDIO_TEST_AUDIO_BWE_INTEGRATION_TEST_H_ |