From c3b7a5072025b48497e4861985ec83850cd7fd93 Mon Sep 17 00:00:00 2001 From: Tommi Date: Sat, 28 Oct 2023 18:24:41 +0200 Subject: [PATCH] Use webrtc::TaskQueueBase type instead of rtc::Thread ...for signaling and worker thread members in BaseChannel classes. Bug: webrtc:15099 Change-Id: I83611ed2564e143aca19d0f12ce060b77eb9d2a7 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325260 Commit-Queue: Tomas Gunnarsson Reviewed-by: Harald Alvestrand Cr-Commit-Position: refs/heads/main@{#41041} --- pc/channel.cc | 12 ++++++------ pc/channel.h | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pc/channel.cc b/pc/channel.cc index b72f843b6b..0024ba0e35 100644 --- a/pc/channel.cc +++ b/pc/channel.cc @@ -112,9 +112,9 @@ void RtpSendParametersFromMediaDescription( } BaseChannel::BaseChannel( - rtc::Thread* worker_thread, + webrtc::TaskQueueBase* worker_thread, rtc::Thread* network_thread, - rtc::Thread* signaling_thread, + webrtc::TaskQueueBase* signaling_thread, std::unique_ptr send_media_channel_impl, std::unique_ptr receive_media_channel_impl, absl::string_view mid, @@ -819,9 +819,9 @@ void BaseChannel::SignalSentPacket_n(const rtc::SentPacket& sent_packet) { } VoiceChannel::VoiceChannel( - rtc::Thread* worker_thread, + webrtc::TaskQueueBase* worker_thread, rtc::Thread* network_thread, - rtc::Thread* signaling_thread, + webrtc::TaskQueueBase* signaling_thread, std::unique_ptr media_send_channel, std::unique_ptr media_receive_channel, absl::string_view mid, @@ -952,9 +952,9 @@ bool VoiceChannel::SetRemoteContent_w(const MediaContentDescription* content, } VideoChannel::VideoChannel( - rtc::Thread* worker_thread, + webrtc::TaskQueueBase* worker_thread, rtc::Thread* network_thread, - rtc::Thread* signaling_thread, + webrtc::TaskQueueBase* signaling_thread, std::unique_ptr media_send_channel, std::unique_ptr media_receive_channel, absl::string_view mid, diff --git a/pc/channel.h b/pc/channel.h index 877c628f4c..c933091e92 100644 --- a/pc/channel.h +++ b/pc/channel.h @@ -82,9 +82,9 @@ class BaseChannel : public ChannelInterface, // Constructor for use when the MediaChannels are split BaseChannel( - rtc::Thread* worker_thread, + webrtc::TaskQueueBase* worker_thread, rtc::Thread* network_thread, - rtc::Thread* signaling_thread, + webrtc::TaskQueueBase* signaling_thread, std::unique_ptr media_send_channel, std::unique_ptr media_receive_channel, absl::string_view mid, @@ -93,7 +93,7 @@ class BaseChannel : public ChannelInterface, rtc::UniqueRandomIdGenerator* ssrc_generator); virtual ~BaseChannel(); - rtc::Thread* worker_thread() const { return worker_thread_; } + webrtc::TaskQueueBase* worker_thread() const { return worker_thread_; } rtc::Thread* network_thread() const { return network_thread_; } const std::string& mid() const override { return demuxer_criteria_.mid(); } // TODO(deadbeef): This is redundant; remove this. @@ -206,7 +206,7 @@ class BaseChannel : public ChannelInterface, } bool enabled() const RTC_RUN_ON(worker_thread()) { return enabled_; } - rtc::Thread* signaling_thread() const { return signaling_thread_; } + webrtc::TaskQueueBase* signaling_thread() const { return signaling_thread_; } // Call to verify that: // * The required content description directions have been set. @@ -311,9 +311,9 @@ class BaseChannel : public ChannelInterface, void DisconnectFromRtpTransport_n() RTC_RUN_ON(network_thread()); void SignalSentPacket_n(const rtc::SentPacket& sent_packet); - rtc::Thread* const worker_thread_; + webrtc::TaskQueueBase* const worker_thread_; rtc::Thread* const network_thread_; - rtc::Thread* const signaling_thread_; + webrtc::TaskQueueBase* const signaling_thread_; rtc::scoped_refptr alive_; std::function on_first_packet_received_ @@ -367,9 +367,9 @@ class BaseChannel : public ChannelInterface, class VoiceChannel : public BaseChannel { public: VoiceChannel( - rtc::Thread* worker_thread, + webrtc::TaskQueueBase* worker_thread, rtc::Thread* network_thread, - rtc::Thread* signaling_thread, + webrtc::TaskQueueBase* signaling_thread, std::unique_ptr send_channel_impl, std::unique_ptr receive_channel_impl, absl::string_view mid, @@ -437,9 +437,9 @@ class VoiceChannel : public BaseChannel { class VideoChannel : public BaseChannel { public: VideoChannel( - rtc::Thread* worker_thread, + webrtc::TaskQueueBase* worker_thread, rtc::Thread* network_thread, - rtc::Thread* signaling_thread, + webrtc::TaskQueueBase* signaling_thread, std::unique_ptr media_send_channel, std::unique_ptr media_receive_channel, absl::string_view mid,