diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /third_party/libwebrtc/call/call_factory.cc | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | third_party/libwebrtc/call/call_factory.cc | 119 |
1 files changed, 0 insertions, 119 deletions
diff --git a/third_party/libwebrtc/call/call_factory.cc b/third_party/libwebrtc/call/call_factory.cc deleted file mode 100644 index 78a4f1635f..0000000000 --- a/third_party/libwebrtc/call/call_factory.cc +++ /dev/null @@ -1,119 +0,0 @@ -/* - * 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/call_factory.h" - -#include <stdio.h> - -#include <memory> -#include <string> -#include <utility> -#include <vector> - -#include "absl/types/optional.h" -#include "api/test/simulated_network.h" -#include "api/units/time_delta.h" -#include "call/call.h" -#include "call/degraded_call.h" -#include "call/rtp_transport_config.h" -#include "rtc_base/checks.h" -#include "rtc_base/experiments/field_trial_list.h" -#include "rtc_base/experiments/field_trial_parser.h" - -namespace webrtc { -namespace { -using TimeScopedNetworkConfig = DegradedCall::TimeScopedNetworkConfig; - -std::vector<TimeScopedNetworkConfig> GetNetworkConfigs( - const FieldTrialsView& trials, - bool send) { - FieldTrialStructList<TimeScopedNetworkConfig> trials_list( - {FieldTrialStructMember("queue_length_packets", - [](TimeScopedNetworkConfig* p) { - // FieldTrialParser does not natively support - // size_t type, so use this ugly cast as - // workaround. - return reinterpret_cast<unsigned*>( - &p->queue_length_packets); - }), - FieldTrialStructMember( - "queue_delay_ms", - [](TimeScopedNetworkConfig* p) { return &p->queue_delay_ms; }), - FieldTrialStructMember("delay_standard_deviation_ms", - [](TimeScopedNetworkConfig* p) { - return &p->delay_standard_deviation_ms; - }), - FieldTrialStructMember( - "link_capacity_kbps", - [](TimeScopedNetworkConfig* p) { return &p->link_capacity_kbps; }), - FieldTrialStructMember( - "loss_percent", - [](TimeScopedNetworkConfig* p) { return &p->loss_percent; }), - FieldTrialStructMember( - "allow_reordering", - [](TimeScopedNetworkConfig* p) { return &p->allow_reordering; }), - FieldTrialStructMember("avg_burst_loss_length", - [](TimeScopedNetworkConfig* p) { - return &p->avg_burst_loss_length; - }), - FieldTrialStructMember( - "packet_overhead", - [](TimeScopedNetworkConfig* p) { return &p->packet_overhead; }), - FieldTrialStructMember( - "duration", - [](TimeScopedNetworkConfig* p) { return &p->duration; })}, - {}); - ParseFieldTrial({&trials_list}, - trials.Lookup(send ? "WebRTC-FakeNetworkSendConfig" - : "WebRTC-FakeNetworkReceiveConfig")); - return trials_list.Get(); -} - -} // namespace - -CallFactory::CallFactory() { - call_thread_.Detach(); -} - -std::unique_ptr<Call> CallFactory::CreateCall(const CallConfig& config) { - RTC_DCHECK_RUN_ON(&call_thread_); - RTC_DCHECK(config.trials); - - std::vector<DegradedCall::TimeScopedNetworkConfig> send_degradation_configs = - GetNetworkConfigs(*config.trials, /*send=*/true); - std::vector<DegradedCall::TimeScopedNetworkConfig> - receive_degradation_configs = - GetNetworkConfigs(*config.trials, /*send=*/false); - - RtpTransportConfig transportConfig = config.ExtractTransportConfig(); - - RTC_CHECK(false); - return nullptr; - /* Mozilla: Avoid this since it could use GetRealTimeClock(). - std::unique_ptr<Call> call = - Call::Create(config, Clock::GetRealTimeClock(), - config.rtp_transport_controller_send_factory->Create( - transportConfig, Clock::GetRealTimeClock())); - - 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; - */ -} - -std::unique_ptr<CallFactoryInterface> CreateCallFactory() { - return std::make_unique<CallFactory>(); -} - -} // namespace webrtc |