aboutsummaryrefslogtreecommitdiff
path: root/call/call.cc
diff options
context:
space:
mode:
authorVojin Ilic <vilic@nvidia.com>2021-05-31 14:02:28 +0200
committerWebRTC LUCI CQ <webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com>2021-06-01 06:57:31 +0000
commit504fc192d09c51c21777eeefe883827b9f6ed8ab (patch)
tree675a67f4545d8500036b3b6d12f6d68dee19e085 /call/call.cc
parent40f1a06ca7a4fd81666d6c7805d901847e3ae0e5 (diff)
downloadwebrtc-504fc192d09c51c21777eeefe883827b9f6ed8ab.tar.gz
Add ability to pass factory for RtpTransportControllerSend to PeerConnectionFactoryDependencies.
This way we can have custom implementation of RtpTransportControllerSendInterface and pass it properly to Call. Call relies on RtpTransportControllerSendInterface already so this is natural way to customize RTP related classes. If there is custom factory present in dependencies it will be used, otherwise default factory will be used. Intention behind this change is to have ability to have custom QoS with custom parameters. Bug: webrtc:12778 Change-Id: I5b88957025621ef4bcd63eaa98c218ad213da9c8 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217769 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Philipp Hancke <phancke@nvidia.com> Cr-Commit-Position: refs/heads/master@{#34181}
Diffstat (limited to 'call/call.cc')
-rw-r--r--call/call.cc27
1 files changed, 18 insertions, 9 deletions
diff --git a/call/call.cc b/call/call.cc
index b8eafdc923..aea03af8d3 100644
--- a/call/call.cc
+++ b/call/call.cc
@@ -33,6 +33,7 @@
#include "call/receive_time_calculator.h"
#include "call/rtp_stream_receiver_controller.h"
#include "call/rtp_transport_controller_send.h"
+#include "call/rtp_transport_controller_send_factory.h"
#include "call/version.h"
#include "logging/rtc_event_log/events/rtc_event_audio_receive_stream_config.h"
#include "logging/rtc_event_log/events/rtc_event_rtcp_packet_incoming.h"
@@ -519,11 +520,6 @@ Call* Call::Create(const Call::Config& config) {
rtc::scoped_refptr<SharedModuleThread> call_thread =
SharedModuleThread::Create(ProcessThread::Create("ModuleProcessThread"),
nullptr);
- return Create(config, std::move(call_thread));
-}
-
-Call* Call::Create(const Call::Config& config,
- rtc::scoped_refptr<SharedModuleThread> call_thread) {
return Create(config, Clock::GetRealTimeClock(), std::move(call_thread),
ProcessThread::Create("PacerThread"));
}
@@ -533,15 +529,28 @@ Call* Call::Create(const Call::Config& config,
rtc::scoped_refptr<SharedModuleThread> call_thread,
std::unique_ptr<ProcessThread> pacer_thread) {
RTC_DCHECK(config.task_queue_factory);
+
+ RtpTransportControllerSendFactory transport_controller_factory_;
+
+ RtpTransportConfig transportConfig = config.ExtractTransportConfig();
+
return new internal::Call(
clock, config,
- std::make_unique<RtpTransportControllerSend>(
- clock, config.event_log, config.network_state_predictor_factory,
- config.network_controller_factory, config.bitrate_config,
- std::move(pacer_thread), config.task_queue_factory, config.trials),
+ transport_controller_factory_.Create(transportConfig, clock,
+ std::move(pacer_thread)),
std::move(call_thread), config.task_queue_factory);
}
+Call* Call::Create(const Call::Config& config,
+ Clock* clock,
+ rtc::scoped_refptr<SharedModuleThread> call_thread,
+ std::unique_ptr<RtpTransportControllerSendInterface>
+ transportControllerSend) {
+ RTC_DCHECK(config.task_queue_factory);
+ return new internal::Call(clock, config, std::move(transportControllerSend),
+ std::move(call_thread), config.task_queue_factory);
+}
+
class SharedModuleThread::Impl {
public:
Impl(std::unique_ptr<ProcessThread> process_thread,