2017-03-23 03:40:03 -07:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
2017-09-15 06:47:31 +02:00
|
|
|
#ifndef AUDIO_TEST_AUDIO_END_TO_END_TEST_H_
|
|
|
|
|
#define AUDIO_TEST_AUDIO_END_TO_END_TEST_H_
|
2017-03-23 03:40:03 -07:00
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
2019-09-30 04:16:28 +02:00
|
|
|
#include "api/task_queue/task_queue_base.h"
|
2018-08-17 14:26:54 +02:00
|
|
|
#include "api/test/simulated_network.h"
|
2023-04-11 16:37:38 +02:00
|
|
|
#include "modules/audio_device/include/audio_device.h"
|
|
|
|
|
#include "modules/audio_device/include/test_audio_device.h"
|
2017-09-15 06:47:31 +02:00
|
|
|
#include "test/call_test.h"
|
2017-03-23 03:40:03 -07:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
namespace test {
|
|
|
|
|
|
2017-09-14 14:46:47 +02:00
|
|
|
class AudioEndToEndTest : public test::EndToEndTest {
|
2017-03-23 03:40:03 -07:00
|
|
|
public:
|
2017-09-14 14:46:47 +02:00
|
|
|
AudioEndToEndTest();
|
2017-03-23 03:40:03 -07:00
|
|
|
|
|
|
|
|
protected:
|
2023-04-11 16:37:38 +02:00
|
|
|
AudioDeviceModule* send_audio_device() { return send_audio_device_; }
|
2017-09-14 14:46:47 +02:00
|
|
|
const AudioSendStream* send_stream() const { return send_stream_; }
|
2022-05-22 20:47:28 +02:00
|
|
|
const AudioReceiveStreamInterface* receive_stream() const {
|
|
|
|
|
return receive_stream_;
|
|
|
|
|
}
|
2017-03-23 03:40:03 -07:00
|
|
|
|
|
|
|
|
size_t GetNumVideoStreams() const override;
|
|
|
|
|
size_t GetNumAudioStreams() const override;
|
|
|
|
|
size_t GetNumFlexfecStreams() const override;
|
|
|
|
|
|
2018-03-07 14:44:00 +01:00
|
|
|
std::unique_ptr<TestAudioDeviceModule::Capturer> CreateCapturer() override;
|
|
|
|
|
std::unique_ptr<TestAudioDeviceModule::Renderer> CreateRenderer() override;
|
2017-03-23 03:40:03 -07:00
|
|
|
|
2023-04-11 16:37:38 +02:00
|
|
|
void OnFakeAudioDevicesCreated(AudioDeviceModule* send_audio_device,
|
|
|
|
|
AudioDeviceModule* recv_audio_device) override;
|
2017-03-23 03:40:03 -07:00
|
|
|
|
2022-05-22 20:47:28 +02:00
|
|
|
void ModifyAudioConfigs(AudioSendStream::Config* send_config,
|
|
|
|
|
std::vector<AudioReceiveStreamInterface::Config>*
|
|
|
|
|
receive_configs) override;
|
|
|
|
|
void OnAudioStreamsCreated(AudioSendStream* send_stream,
|
|
|
|
|
const std::vector<AudioReceiveStreamInterface*>&
|
|
|
|
|
receive_streams) override;
|
2017-03-23 03:40:03 -07:00
|
|
|
|
|
|
|
|
private:
|
2023-04-11 16:37:38 +02:00
|
|
|
AudioDeviceModule* send_audio_device_ = nullptr;
|
2017-09-14 14:46:47 +02:00
|
|
|
AudioSendStream* send_stream_ = nullptr;
|
2022-05-22 20:47:28 +02:00
|
|
|
AudioReceiveStreamInterface* receive_stream_ = nullptr;
|
2017-03-23 03:40:03 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace test
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#endif // AUDIO_TEST_AUDIO_END_TO_END_TEST_H_
|