ModuleRtcRtcpImpl2: remove Module inheritance.
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}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
6e65f6a428
commit
eb61b7f620
@ -199,25 +199,20 @@ class RtpRtcpModule : public RtcpPacketTypeCounterObserver,
|
||||
};
|
||||
|
||||
RtpRtcpModule(GlobalSimulatedTimeController* time_controller,
|
||||
ProcessThread* process_thread,
|
||||
bool is_sender,
|
||||
const FieldTrialConfig& trials)
|
||||
: time_controller_(time_controller),
|
||||
is_sender_(is_sender),
|
||||
trials_(trials),
|
||||
process_thread_(process_thread),
|
||||
receive_statistics_(
|
||||
ReceiveStatistics::Create(time_controller->GetClock())),
|
||||
transport_(kOneWayNetworkDelay, time_controller) {
|
||||
CreateModuleImpl();
|
||||
}
|
||||
|
||||
~RtpRtcpModule() { process_thread_->DeRegisterModule(impl_.get()); }
|
||||
|
||||
TimeController* const time_controller_;
|
||||
const bool is_sender_;
|
||||
const FieldTrialConfig& trials_;
|
||||
ProcessThread* const process_thread_;
|
||||
RtcpPacketTypeCounter packets_sent_;
|
||||
RtcpPacketTypeCounter packets_received_;
|
||||
std::unique_ptr<ReceiveStatistics> receive_statistics_;
|
||||
@ -286,10 +281,7 @@ class RtpRtcpModule : public RtcpPacketTypeCounterObserver,
|
||||
config.field_trials = &trials_;
|
||||
config.send_packet_observer = this;
|
||||
config.fec_generator = fec_generator_;
|
||||
if (impl_)
|
||||
process_thread_->DeRegisterModule(impl_.get());
|
||||
impl_.reset(new ModuleRtpRtcpImpl2(config));
|
||||
process_thread_->RegisterModule(impl_.get(), RTC_FROM_HERE);
|
||||
impl_->SetRemoteSSRC(is_sender_ ? kReceiverSsrc : kSenderSsrc);
|
||||
impl_->SetRTCPStatus(RtcpMode::kCompound);
|
||||
}
|
||||
@ -306,20 +298,12 @@ class RtpRtcpImpl2Test : public ::testing::TestWithParam<TestConfig> {
|
||||
RtpRtcpImpl2Test()
|
||||
: time_controller_(Timestamp::Micros(133590000000000)),
|
||||
field_trials_(FieldTrialConfig::GetFromTestConfig(GetParam())),
|
||||
process_thread_(
|
||||
time_controller_.CreateProcessThread("RtpRtcpImpl2Test")),
|
||||
sender_(&time_controller_,
|
||||
process_thread_.get(),
|
||||
/*is_sender=*/true,
|
||||
field_trials_),
|
||||
receiver_(&time_controller_,
|
||||
process_thread_.get(),
|
||||
/*is_sender=*/false,
|
||||
field_trials_) {
|
||||
process_thread_->Start();
|
||||
}
|
||||
|
||||
~RtpRtcpImpl2Test() { process_thread_->Stop(); }
|
||||
field_trials_) {}
|
||||
|
||||
void SetUp() override {
|
||||
// Send module.
|
||||
@ -367,7 +351,6 @@ class RtpRtcpImpl2Test : public ::testing::TestWithParam<TestConfig> {
|
||||
|
||||
GlobalSimulatedTimeController time_controller_;
|
||||
FieldTrialConfig field_trials_;
|
||||
std::unique_ptr<ProcessThread> process_thread_;
|
||||
RtpRtcpModule sender_;
|
||||
std::unique_ptr<RTPSenderVideo> sender_video_;
|
||||
RtpRtcpModule receiver_;
|
||||
|
||||
Reference in New Issue
Block a user