2019-03-15 15:00:37 +01:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2019 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.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "api/test/create_network_emulation_manager.h"
|
|
|
|
|
|
2019-09-17 17:06:18 +02:00
|
|
|
#include <memory>
|
2024-05-08 13:38:00 +02:00
|
|
|
#include <utility>
|
2019-09-17 17:06:18 +02:00
|
|
|
|
2023-12-05 14:47:22 +01:00
|
|
|
#include "api/field_trials_view.h"
|
2024-08-13 05:43:47 -07:00
|
|
|
#include "api/test/network_emulation_manager.h"
|
2019-07-05 10:48:17 +02:00
|
|
|
#include "test/network/network_emulation_manager.h"
|
2019-03-15 15:00:37 +01:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
2024-05-08 13:38:00 +02:00
|
|
|
std::unique_ptr<NetworkEmulationManager> CreateNetworkEmulationManager(
|
|
|
|
|
NetworkEmulationManagerConfig config) {
|
|
|
|
|
return std::make_unique<test::NetworkEmulationManagerImpl>(std::move(config));
|
|
|
|
|
}
|
|
|
|
|
|
2020-01-22 10:12:56 +01:00
|
|
|
std::unique_ptr<NetworkEmulationManager> CreateNetworkEmulationManager(
|
2022-11-11 23:14:30 +01:00
|
|
|
TimeMode time_mode,
|
2023-12-05 14:47:22 +01:00
|
|
|
EmulatedNetworkStatsGatheringMode stats_gathering_mode,
|
|
|
|
|
const FieldTrialsView* field_trials) {
|
2024-05-08 13:38:00 +02:00
|
|
|
return CreateNetworkEmulationManager(
|
|
|
|
|
{.time_mode = time_mode,
|
|
|
|
|
.stats_gathering_mode = stats_gathering_mode,
|
|
|
|
|
.field_trials = field_trials});
|
2019-03-15 15:00:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|