call_config.cc (1357B)
1 /* 2 * Copyright (c) 2018 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 11 #include "call/call_config.h" 12 13 #include "api/environment/environment.h" 14 #include "api/task_queue/task_queue_base.h" 15 #include "call/rtp_transport_config.h" 16 17 namespace webrtc { 18 19 CallConfig::CallConfig(const Environment& env, 20 TaskQueueBase* network_task_queue) 21 : env(env), network_task_queue_(network_task_queue) {} 22 23 RtpTransportConfig CallConfig::ExtractTransportConfig() const { 24 RtpTransportConfig transport_config = {.env = env}; 25 transport_config.bitrate_config = bitrate_config; 26 transport_config.network_controller_factory = 27 per_call_network_controller_factory 28 ? per_call_network_controller_factory.get() 29 : network_controller_factory; 30 transport_config.network_state_predictor_factory = 31 network_state_predictor_factory; 32 transport_config.pacer_burst_interval = pacer_burst_interval; 33 34 return transport_config; 35 } 36 37 CallConfig::~CallConfig() = default; 38 39 } // namespace webrtc