aboutsummaryrefslogtreecommitdiff
path: root/audio/channel_send.cc
diff options
context:
space:
mode:
authorMarkus Handell <handellm@webrtc.org>2021-06-22 10:46:48 +0200
committerWebRTC LUCI CQ <webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com>2021-06-22 14:51:04 +0000
commiteb61b7f620c1f84cb9d34c7752cea65fe5d1d721 (patch)
tree4240c7418e1c2a9fde352664bd6927b20fac07f9 /audio/channel_send.cc
parent6e65f6a4288674ff33614f557c33c9dc871fa2e2 (diff)
downloadwebrtc-upstream-master.tar.gz
ModuleRtcRtcpImpl2: remove Module inheritance.upstream-master
This change achieves an Idle Wakeup savings of 200 Hz. ModuleRtcRtcpImpl2 had Process() logic only active if TMMBR() is enabled in RtcpSender, which it never is. Hence the Module inheritance could be removed. The change removes all known dependencies of the module inheritance, and any related mentions of ProcessThread. Fixed: webrtc:11581 Change-Id: I440942f07187fdb9ac18186dab088633969b340e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222604 Reviewed-by: Tommi <tommi@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Markus Handell <handellm@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34358}
Diffstat (limited to 'audio/channel_send.cc')
-rw-r--r--audio/channel_send.cc23
1 files changed, 4 insertions, 19 deletions
diff --git a/audio/channel_send.cc b/audio/channel_send.cc
index 47afc7982b..52dd528504 100644
--- a/audio/channel_send.cc
+++ b/audio/channel_send.cc
@@ -69,7 +69,6 @@ class ChannelSend : public ChannelSendInterface,
ChannelSend(Clock* clock,
TaskQueueFactory* task_queue_factory,
- ProcessThread* module_process_thread,
Transport* rtp_transport,
RtcpRttStats* rtcp_rtt_stats,
RtcEventLog* rtc_event_log,
@@ -180,7 +179,6 @@ class ChannelSend : public ChannelSendInterface,
// voe::Channel into parts with single-threaded semantics, and thereby reduce
// the need for locks.
SequenceChecker worker_thread_checker_;
- SequenceChecker module_process_thread_checker_;
// Methods accessed from audio and video threads are checked for sequential-
// only access. We don't necessarily own and control these threads, so thread
// checkers cannot be used. E.g. Chromium may transfer "ownership" from one
@@ -200,7 +198,6 @@ class ChannelSend : public ChannelSendInterface,
uint32_t _timeStamp RTC_GUARDED_BY(encoder_queue_);
// uses
- ProcessThread* const _moduleProcessThreadPtr;
RmsLevel rms_level_ RTC_GUARDED_BY(encoder_queue_);
bool input_mute_ RTC_GUARDED_BY(volume_settings_mutex_);
bool previous_frame_muted_ RTC_GUARDED_BY(encoder_queue_);
@@ -445,7 +442,6 @@ int32_t ChannelSend::SendRtpAudio(AudioFrameType frameType,
ChannelSend::ChannelSend(
Clock* clock,
TaskQueueFactory* task_queue_factory,
- ProcessThread* module_process_thread,
Transport* rtp_transport,
RtcpRttStats* rtcp_rtt_stats,
RtcEventLog* rtc_event_log,
@@ -459,7 +455,6 @@ ChannelSend::ChannelSend(
: event_log_(rtc_event_log),
_timeStamp(0), // This is just an offset, RTP module will add it's own
// random offset
- _moduleProcessThreadPtr(module_process_thread),
input_mute_(false),
previous_frame_muted_(false),
_includeAudioLevelIndication(false),
@@ -475,9 +470,6 @@ ChannelSend::ChannelSend(
TaskQueueFactory::Priority::NORMAL)),
fixing_timestamp_stall_(
!field_trial::IsDisabled("WebRTC-Audio-FixTimestampStall")) {
- RTC_DCHECK(module_process_thread);
- module_process_thread_checker_.Detach();
-
audio_coding_.reset(AudioCodingModule::Create(AudioCodingModule::Config()));
RtpRtcpInterface::Configuration configuration;
@@ -504,8 +496,6 @@ ChannelSend::ChannelSend(
rtp_sender_audio_ = std::make_unique<RTPSenderAudio>(configuration.clock,
rtp_rtcp_->RtpSender());
- _moduleProcessThreadPtr->RegisterModule(rtp_rtcp_.get(), RTC_FROM_HERE);
-
// Ensure that RTCP is enabled by default for the created channel.
rtp_rtcp_->SetRTCPStatus(RtcpMode::kCompound);
@@ -525,9 +515,6 @@ ChannelSend::~ChannelSend() {
StopSend();
int error = audio_coding_->RegisterTransportCallback(NULL);
RTC_DCHECK_EQ(0, error);
-
- if (_moduleProcessThreadPtr)
- _moduleProcessThreadPtr->DeRegisterModule(rtp_rtcp_.get());
}
void ChannelSend::StartSend() {
@@ -858,7 +845,6 @@ ANAStats ChannelSend::GetANAStatistics() const {
}
RtpRtcpInterface* ChannelSend::GetRtpRtcp() const {
- RTC_DCHECK(module_process_thread_checker_.IsCurrent());
return rtp_rtcp_.get();
}
@@ -930,7 +916,6 @@ void ChannelSend::InitFrameTransformerDelegate(
std::unique_ptr<ChannelSendInterface> CreateChannelSend(
Clock* clock,
TaskQueueFactory* task_queue_factory,
- ProcessThread* module_process_thread,
Transport* rtp_transport,
RtcpRttStats* rtcp_rtt_stats,
RtcEventLog* rtc_event_log,
@@ -942,10 +927,10 @@ std::unique_ptr<ChannelSendInterface> CreateChannelSend(
rtc::scoped_refptr<FrameTransformerInterface> frame_transformer,
TransportFeedbackObserver* feedback_observer) {
return std::make_unique<ChannelSend>(
- clock, task_queue_factory, module_process_thread, rtp_transport,
- rtcp_rtt_stats, rtc_event_log, frame_encryptor, crypto_options,
- extmap_allow_mixed, rtcp_report_interval_ms, ssrc,
- std::move(frame_transformer), feedback_observer);
+ clock, task_queue_factory, rtp_transport, rtcp_rtt_stats, rtc_event_log,
+ frame_encryptor, crypto_options, extmap_allow_mixed,
+ rtcp_report_interval_ms, ssrc, std::move(frame_transformer),
+ feedback_observer);
}
} // namespace voe