blob: 613efcc1ddedee9df879c5ce84ea4e842b3bb44b [file] [log] [blame]
tschumim9d117642017-07-17 01:41:41 -07001/*
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 Bonadei92ea95e2017-09-15 06:47:31 +020010#ifndef AUDIO_TEST_AUDIO_BWE_INTEGRATION_TEST_H_
11#define AUDIO_TEST_AUDIO_BWE_INTEGRATION_TEST_H_
tschumim9d117642017-07-17 01:41:41 -070012
13#include <memory>
14#include <string>
15
Danil Chapovalov44db4362019-09-30 04:16:28 +020016#include "api/task_queue/task_queue_base.h"
Artem Titov46c4e602018-08-17 14:26:54 +020017#include "api/test/simulated_network.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020018#include "test/call_test.h"
tschumim9d117642017-07-17 01:41:41 -070019
20namespace webrtc {
21namespace test {
22
23class AudioBweTest : public test::EndToEndTest {
24 public:
25 AudioBweTest();
26
27 protected:
28 virtual std::string AudioInputFile() = 0;
29
Artem Titov75e36472018-10-08 12:28:56 +020030 virtual BuiltInNetworkBehaviorConfig GetNetworkPipeConfig() = 0;
tschumim9d117642017-07-17 01:41:41 -070031
32 size_t GetNumVideoStreams() const override;
33 size_t GetNumAudioStreams() const override;
34 size_t GetNumFlexfecStreams() const override;
35
Artem Titov3faa8322018-03-07 14:44:00 +010036 std::unique_ptr<TestAudioDeviceModule::Capturer> CreateCapturer() override;
tschumim9d117642017-07-17 01:41:41 -070037
38 void OnFakeAudioDevicesCreated(
Artem Titov3faa8322018-03-07 14:44:00 +010039 TestAudioDeviceModule* send_audio_device,
40 TestAudioDeviceModule* recv_audio_device) override;
tschumim9d117642017-07-17 01:41:41 -070041
Danil Chapovalov44db4362019-09-30 04:16:28 +020042 std::unique_ptr<test::PacketTransport> CreateSendTransport(
43 TaskQueueBase* task_queue,
eladalon413ee9a2017-08-22 04:02:52 -070044 Call* sender_call) override;
Danil Chapovalov44db4362019-09-30 04:16:28 +020045 std::unique_ptr<test::PacketTransport> CreateReceiveTransport(
46 TaskQueueBase* task_queue) override;
tschumim9d117642017-07-17 01:41:41 -070047
48 void PerformTest() override;
49
50 private:
Artem Titov3faa8322018-03-07 14:44:00 +010051 TestAudioDeviceModule* send_audio_device_;
tschumim9d117642017-07-17 01:41:41 -070052};
53
54} // namespace test
55} // namespace webrtc
56
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020057#endif // AUDIO_TEST_AUDIO_BWE_INTEGRATION_TEST_H_