Expose TaskQueueFactory for webrtc::Call in peer connection api

making a step for GlobalTaskQueueFactory to be optional way
to provide TaskQueueFactory

Bug: webrtc:10284
Change-Id: Ife838b3691c256820973118bc5b3cb372dea09cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130488
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27423}
This commit is contained in:
Danil Chapovalov 2019-04-01 10:33:16 +02:00 committed by Commit Bot
parent 13943b7b7f
commit 9435c61021
5 changed files with 7 additions and 0 deletions

View File

@ -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",

View File

@ -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<TaskQueueFactory> task_queue_factory;
std::unique_ptr<cricket::MediaEngineInterface> media_engine;
std::unique_ptr<CallFactoryInterface> call_factory;
std::unique_ptr<RtcEventLogFactoryInterface> event_log_factory;

View File

@ -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",

View File

@ -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<Call> 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";

View File

@ -113,6 +113,7 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface {
rtc::Thread* signaling_thread_;
std::unique_ptr<rtc::Thread> owned_network_thread_;
std::unique_ptr<rtc::Thread> owned_worker_thread_;
const std::unique_ptr<TaskQueueFactory> task_queue_factory_;
Options options_;
std::unique_ptr<cricket::ChannelManager> channel_manager_;
std::unique_ptr<rtc::BasicNetworkManager> default_network_manager_;