diff --git a/api/BUILD.gn b/api/BUILD.gn index 1a193d932a..0d26945fef 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -144,6 +144,7 @@ rtc_static_library("libjingle_peerconnection_api") { ":scoped_refptr", "audio:audio_mixer_api", "audio_codecs:audio_codecs_api", + "task_queue", "transport:bitrate_settings", "transport:network_control", "transport/media:audio_interfaces", diff --git a/api/peer_connection_interface.h b/api/peer_connection_interface.h index b925fe84e5..661c5aada0 100644 --- a/api/peer_connection_interface.h +++ b/api/peer_connection_interface.h @@ -91,6 +91,7 @@ #include "api/set_remote_description_observer_interface.h" #include "api/stats/rtc_stats_collector_callback.h" #include "api/stats_types.h" +#include "api/task_queue/task_queue_factory.h" #include "api/transport/bitrate_settings.h" #include "api/transport/network_control.h" #include "api/turn_customizer.h" @@ -1242,6 +1243,7 @@ struct PeerConnectionFactoryDependencies final { rtc::Thread* network_thread = nullptr; rtc::Thread* worker_thread = nullptr; rtc::Thread* signaling_thread = nullptr; + std::unique_ptr task_queue_factory; std::unique_ptr media_engine; std::unique_ptr call_factory; std::unique_ptr event_log_factory; diff --git a/pc/BUILD.gn b/pc/BUILD.gn index 1df3f63583..1089621507 100644 --- a/pc/BUILD.gn +++ b/pc/BUILD.gn @@ -198,6 +198,7 @@ rtc_static_library("peerconnection") { "../api:libjingle_peerconnection_api", "../api:rtc_stats_api", "../api:scoped_refptr", + "../api/task_queue", "../api/video:video_frame", "../api/video_codecs:video_codecs_api", "../call:call_interfaces", diff --git a/pc/peer_connection_factory.cc b/pc/peer_connection_factory.cc index 4c89120139..dd403ed7cf 100644 --- a/pc/peer_connection_factory.cc +++ b/pc/peer_connection_factory.cc @@ -106,6 +106,7 @@ PeerConnectionFactory::PeerConnectionFactory( network_thread_(dependencies.network_thread), worker_thread_(dependencies.worker_thread), signaling_thread_(dependencies.signaling_thread), + task_queue_factory_(std::move(dependencies.task_queue_factory)), media_engine_(std::move(dependencies.media_engine)), call_factory_(std::move(dependencies.call_factory)), event_log_factory_(std::move(dependencies.event_log_factory)), @@ -386,6 +387,7 @@ std::unique_ptr PeerConnectionFactory::CreateCall_w( call_config.bitrate_config.max_bitrate_bps = kMaxBandwidthBps; call_config.fec_controller_factory = fec_controller_factory_.get(); + call_config.task_queue_factory = task_queue_factory_.get(); if (field_trial::IsEnabled("WebRTC-Bwe-InjectedCongestionController")) { RTC_LOG(LS_INFO) << "Using injected network controller factory"; diff --git a/pc/peer_connection_factory.h b/pc/peer_connection_factory.h index 0ea309b5c5..fd9db278ea 100644 --- a/pc/peer_connection_factory.h +++ b/pc/peer_connection_factory.h @@ -113,6 +113,7 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface { rtc::Thread* signaling_thread_; std::unique_ptr owned_network_thread_; std::unique_ptr owned_worker_thread_; + const std::unique_ptr task_queue_factory_; Options options_; std::unique_ptr channel_manager_; std::unique_ptr default_network_manager_;