From bcbaf746439291249b5688b239e6346caee90368 Mon Sep 17 00:00:00 2001 From: nisse Date: Tue, 28 Mar 2017 01:16:25 -0700 Subject: [PATCH] Let Call register ReceiveSideCongestionController as CallStatsObserver. Fixes a regression from cl https://codereview.webrtc.org/2752233002. BUG=chromium:704491,webrtc:6847 Review-Url: https://codereview.webrtc.org/2777423002 Cr-Commit-Position: refs/heads/master@{#17407} --- webrtc/call/call.cc | 2 ++ .../include/receive_side_congestion_controller.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/webrtc/call/call.cc b/webrtc/call/call.cc index ef3bc859d8..94acc9ff9d 100644 --- a/webrtc/call/call.cc +++ b/webrtc/call/call.cc @@ -392,6 +392,7 @@ Call::Call(const Call::Config& config, config_.bitrate_config.min_bitrate_bps, config_.bitrate_config.start_bitrate_bps, config_.bitrate_config.max_bitrate_bps); + call_stats_->RegisterStatsObserver(&receive_side_cc_); call_stats_->RegisterStatsObserver(transport_send_->send_side_cc()); module_process_thread_->Start(); @@ -426,6 +427,7 @@ Call::~Call() { module_process_thread_->DeRegisterModule(&receive_side_cc_); module_process_thread_->DeRegisterModule(call_stats_.get()); module_process_thread_->Stop(); + call_stats_->DeregisterStatsObserver(&receive_side_cc_); call_stats_->DeregisterStatsObserver(transport_send_->send_side_cc()); // Only update histograms after process threads have been shut down, so that diff --git a/webrtc/modules/congestion_controller/include/receive_side_congestion_controller.h b/webrtc/modules/congestion_controller/include/receive_side_congestion_controller.h index f6f9462394..1d205b59c5 100644 --- a/webrtc/modules/congestion_controller/include/receive_side_congestion_controller.h +++ b/webrtc/modules/congestion_controller/include/receive_side_congestion_controller.h @@ -46,7 +46,6 @@ class ReceiveSideCongestionController : public CallStatsObserver, virtual const RemoteBitrateEstimator* GetRemoteBitrateEstimator( bool send_side_bwe) const; - // TODO(nisse): Called by CongestionController, but not otherwise wired up. // Implements CallStatsObserver. void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) override;