aboutsummaryrefslogtreecommitdiff
path: root/audio/channel_receive.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_receive.cc
parent6e65f6a4288674ff33614f557c33c9dc871fa2e2 (diff)
downloadwebrtc-eb61b7f620c1f84cb9d34c7752cea65fe5d1d721.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_receive.cc')
-rw-r--r--audio/channel_receive.cc27
1 files changed, 5 insertions, 22 deletions
diff --git a/audio/channel_receive.cc b/audio/channel_receive.cc
index 150e2074e4..acab1467f4 100644
--- a/audio/channel_receive.cc
+++ b/audio/channel_receive.cc
@@ -86,7 +86,6 @@ class ChannelReceive : public ChannelReceiveInterface {
// Used for receive streams.
ChannelReceive(
Clock* clock,
- ProcessThread* module_process_thread,
NetEqFactory* neteq_factory,
AudioDeviceModule* audio_device_module,
Transport* rtcp_send_transport,
@@ -269,7 +268,6 @@ class ChannelReceive : public ChannelReceiveInterface {
// frame.
int64_t capture_start_ntp_time_ms_ RTC_GUARDED_BY(ts_stats_lock_);
- ProcessThread* const module_process_thread_;
AudioDeviceModule* _audioDeviceModulePtr;
float _outputGain RTC_GUARDED_BY(volume_settings_mutex_);
@@ -507,7 +505,6 @@ void ChannelReceive::SetSourceTracker(SourceTracker* source_tracker) {
ChannelReceive::ChannelReceive(
Clock* clock,
- ProcessThread* module_process_thread,
NetEqFactory* neteq_factory,
AudioDeviceModule* audio_device_module,
Transport* rtcp_send_transport,
@@ -540,15 +537,12 @@ ChannelReceive::ChannelReceive(
rtp_ts_wraparound_handler_(new rtc::TimestampWrapAroundHandler()),
capture_start_rtp_time_stamp_(-1),
capture_start_ntp_time_ms_(-1),
- module_process_thread_(module_process_thread),
_audioDeviceModulePtr(audio_device_module),
_outputGain(1.0f),
associated_send_channel_(nullptr),
frame_decryptor_(frame_decryptor),
crypto_options_(crypto_options),
absolute_capture_time_interpolator_(clock) {
- RTC_DCHECK(worker_thread_);
- RTC_DCHECK(module_process_thread_);
RTC_DCHECK(audio_device_module);
network_thread_checker_.Detach();
@@ -579,20 +573,11 @@ ChannelReceive::ChannelReceive(
// Ensure that RTCP is enabled for the created channel.
rtp_rtcp_->SetRTCPStatus(RtcpMode::kCompound);
-
- // TODO(tommi): This should be an implementation detail of ModuleRtpRtcpImpl2
- // and the pointer to the process thread should be there (which also localizes
- // the problem of getting rid of that dependency).
- module_process_thread_->RegisterModule(rtp_rtcp_.get(), RTC_FROM_HERE);
}
ChannelReceive::~ChannelReceive() {
RTC_DCHECK_RUN_ON(&construction_thread_);
- // Unregister the module before stopping playout etc, to match the order
- // things were set up in the ctor.
- module_process_thread_->DeRegisterModule(rtp_rtcp_.get());
-
// Resets the delegate's callback to ChannelReceive::OnReceivedPayloadData.
if (frame_transformer_delegate_)
frame_transformer_delegate_->Reset();
@@ -1090,7 +1075,6 @@ int64_t ChannelReceive::GetRTT() const {
std::unique_ptr<ChannelReceiveInterface> CreateChannelReceive(
Clock* clock,
- ProcessThread* module_process_thread,
NetEqFactory* neteq_factory,
AudioDeviceModule* audio_device_module,
Transport* rtcp_send_transport,
@@ -1107,12 +1091,11 @@ std::unique_ptr<ChannelReceiveInterface> CreateChannelReceive(
const webrtc::CryptoOptions& crypto_options,
rtc::scoped_refptr<FrameTransformerInterface> frame_transformer) {
return std::make_unique<ChannelReceive>(
- clock, module_process_thread, neteq_factory, audio_device_module,
- rtcp_send_transport, rtc_event_log, local_ssrc, remote_ssrc,
- jitter_buffer_max_packets, jitter_buffer_fast_playout,
- jitter_buffer_min_delay_ms, jitter_buffer_enable_rtx_handling,
- decoder_factory, codec_pair_id, std::move(frame_decryptor),
- crypto_options, std::move(frame_transformer));
+ clock, neteq_factory, audio_device_module, rtcp_send_transport,
+ rtc_event_log, local_ssrc, remote_ssrc, jitter_buffer_max_packets,
+ jitter_buffer_fast_playout, jitter_buffer_min_delay_ms,
+ jitter_buffer_enable_rtx_handling, decoder_factory, codec_pair_id,
+ std::move(frame_decryptor), crypto_options, std::move(frame_transformer));
}
} // namespace voe