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  */
10 #ifndef AUDIO_TEST_AUDIO_BWE_INTEGRATION_TEST_H_
11 #define AUDIO_TEST_AUDIO_BWE_INTEGRATION_TEST_H_
12 
13 #include <memory>
14 #include <string>
15 
16 #include "api/task_queue/task_queue_base.h"
17 #include "api/test/simulated_network.h"
18 #include "test/call_test.h"
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 
30   virtual BuiltInNetworkBehaviorConfig GetNetworkPipeConfig() = 0;
31 
32   size_t GetNumVideoStreams() const override;
33   size_t GetNumAudioStreams() const override;
34   size_t GetNumFlexfecStreams() const override;
35 
36   std::unique_ptr<TestAudioDeviceModule::Capturer> CreateCapturer() override;
37 
38   void OnFakeAudioDevicesCreated(
39       TestAudioDeviceModule* send_audio_device,
40       TestAudioDeviceModule* recv_audio_device) override;
41 
42   std::unique_ptr<test::PacketTransport> CreateSendTransport(
43       TaskQueueBase* task_queue,
44       Call* sender_call) override;
45   std::unique_ptr<test::PacketTransport> CreateReceiveTransport(
46       TaskQueueBase* task_queue) override;
47 
48   void PerformTest() override;
49 
50  private:
51   TestAudioDeviceModule* send_audio_device_;
52 };
53 
54 }  // namespace test
55 }  // namespace webrtc
56 
57 #endif  // AUDIO_TEST_AUDIO_BWE_INTEGRATION_TEST_H_
58