diff options
Diffstat (limited to 'modules/rtp_rtcp/source/rtp_rtcp_impl2.cc')
-rw-r--r-- | modules/rtp_rtcp/source/rtp_rtcp_impl2.cc | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc index 77054576a8..7fae1e3bd0 100644 --- a/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc +++ b/modules/rtp_rtcp/source/rtp_rtcp_impl2.cc @@ -39,7 +39,6 @@ namespace webrtc { namespace { -const int64_t kRtpRtcpMaxIdleTimeProcessMs = 5; const int64_t kDefaultExpectedRetransmissionTimeMs = 125; constexpr TimeDelta kRttUpdateInterval = TimeDelta::Millis(1000); @@ -84,9 +83,6 @@ ModuleRtpRtcpImpl2::ModuleRtpRtcpImpl2(const Configuration& configuration) })), rtcp_receiver_(configuration, this), clock_(configuration.clock), - last_rtt_process_time_(clock_->TimeInMilliseconds()), - next_process_time_(clock_->TimeInMilliseconds() + - kRtpRtcpMaxIdleTimeProcessMs), packet_overhead_(28), // IPV4 UDP. nack_last_time_sent_full_ms_(0), nack_last_seq_number_sent_(0), @@ -94,7 +90,6 @@ ModuleRtpRtcpImpl2::ModuleRtpRtcpImpl2(const Configuration& configuration) rtt_stats_(configuration.rtt_stats), rtt_ms_(0) { RTC_DCHECK(worker_queue_); - process_thread_checker_.Detach(); packet_sequence_checker_.Detach(); if (!configuration.receiver_only) { rtp_sender_ = std::make_unique<RtpSenderContext>(configuration); @@ -131,39 +126,6 @@ std::unique_ptr<ModuleRtpRtcpImpl2> ModuleRtpRtcpImpl2::Create( return std::make_unique<ModuleRtpRtcpImpl2>(configuration); } -// Returns the number of milliseconds until the module want a worker thread -// to call Process. -int64_t ModuleRtpRtcpImpl2::TimeUntilNextProcess() { - RTC_DCHECK_RUN_ON(&process_thread_checker_); - return std::max<int64_t>(0, - next_process_time_ - clock_->TimeInMilliseconds()); -} - -// Process any pending tasks such as timeouts (non time critical events). -void ModuleRtpRtcpImpl2::Process() { - RTC_DCHECK_RUN_ON(&process_thread_checker_); - - const Timestamp now = clock_->CurrentTime(); - - // TODO(bugs.webrtc.org/11581): Figure out why we need to call Process() 200 - // times a second. - next_process_time_ = now.ms() + kRtpRtcpMaxIdleTimeProcessMs; - - // TODO(bugs.webrtc.org/11581): once we don't use Process() to trigger - // calls to SendRTCP(), the only remaining timer will require remote_bitrate_ - // to be not null. In that case, we can disable the timer when it is null. - if (remote_bitrate_ && rtcp_sender_.Sending() && rtcp_sender_.TMMBR()) { - unsigned int target_bitrate = 0; - std::vector<unsigned int> ssrcs; - if (remote_bitrate_->LatestEstimate(&ssrcs, &target_bitrate)) { - if (!ssrcs.empty()) { - target_bitrate = target_bitrate / ssrcs.size(); - } - rtcp_sender_.SetTargetBitrate(target_bitrate); - } - } -} - void ModuleRtpRtcpImpl2::SetRtxSendStatus(int mode) { rtp_sender_->packet_generator.SetRtxStatus(mode); } @@ -780,13 +742,6 @@ void ModuleRtpRtcpImpl2::PeriodicUpdate() { rtt_stats_->OnRttUpdate(rtt->ms()); set_rtt_ms(rtt->ms()); } - - // kTmmbrTimeoutIntervalMs is 25 seconds, so an order of seconds. - // Instead of this polling approach, consider having an optional timer in the - // RTCPReceiver class that is started/stopped based on the state of - // rtcp_sender_.TMMBR(). - if (rtcp_sender_.TMMBR() && rtcp_receiver_.UpdateTmmbrTimers()) - rtcp_receiver_.NotifyTmmbrUpdated(); } // RTC_RUN_ON(worker_queue_); |