audio_bwe_integration_test.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. #include <memory>
  13. #include <string>
  14. #include "api/task_queue/task_queue_base.h"
  15. #include "api/test/simulated_network.h"
  16. #include "test/call_test.h"
  17. namespace webrtc {
  18. namespace test {
  19. class AudioBweTest : public test::EndToEndTest {
  20. public:
  21. AudioBweTest();
  22. protected:
  23. virtual std::string AudioInputFile() = 0;
  24. virtual BuiltInNetworkBehaviorConfig GetNetworkPipeConfig() = 0;
  25. size_t GetNumVideoStreams() const override;
  26. size_t GetNumAudioStreams() const override;
  27. size_t GetNumFlexfecStreams() const override;
  28. std::unique_ptr<TestAudioDeviceModule::Capturer> CreateCapturer() override;
  29. void OnFakeAudioDevicesCreated(
  30. TestAudioDeviceModule* send_audio_device,
  31. TestAudioDeviceModule* recv_audio_device) override;
  32. std::unique_ptr<test::PacketTransport> CreateSendTransport(
  33. TaskQueueBase* task_queue,
  34. Call* sender_call) override;
  35. std::unique_ptr<test::PacketTransport> CreateReceiveTransport(
  36. TaskQueueBase* task_queue) override;
  37. void PerformTest() override;
  38. private:
  39. TestAudioDeviceModule* send_audio_device_;
  40. };
  41. } // namespace test
  42. } // namespace webrtc
  43. #endif // AUDIO_TEST_AUDIO_BWE_INTEGRATION_TEST_H_