webrtc_m130/call/create_call.cc
Per K b4c1f2f6fc Remove DegradedCall - To be submitted after 2024-07-01
Bug: webrtc:343801362
Change-Id: Icae19ab2f4c87521483d25ae8d44c849c5f8ed2e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/353140
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42892}
2024-08-30 08:08:39 +00:00

38 lines
1.2 KiB
C++

/*
* Copyright 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.
*/
#include "call/create_call.h"
#include <memory>
#include "call/call.h"
namespace webrtc {
std::unique_ptr<Call> CreateCall(CallConfig config) {
std::vector<DegradedCall::TimeScopedNetworkConfig> send_degradation_configs =
GetNetworkConfigs(config.env.field_trials(), /*send=*/true);
std::vector<DegradedCall::TimeScopedNetworkConfig>
receive_degradation_configs =
GetNetworkConfigs(config.env.field_trials(), /*send=*/false);
std::unique_ptr<Call> call = Call::Create(std::move(config));
if (!send_degradation_configs.empty() ||
!receive_degradation_configs.empty()) {
return std::make_unique<DegradedCall>(
std::move(call), send_degradation_configs, receive_degradation_configs);
}
return call;
}
} // namespace webrtc