diff --git a/webrtc/audio/audio_send_stream.cc b/webrtc/audio/audio_send_stream.cc index 377002f929..ee84b96aaa 100644 --- a/webrtc/audio/audio_send_stream.cc +++ b/webrtc/audio/audio_send_stream.cc @@ -64,8 +64,7 @@ AudioSendStream::AudioSendStream( rtc::TaskQueue* worker_queue, CongestionController* congestion_controller, BitrateAllocator* bitrate_allocator, - RtcEventLog* event_log, - RtcpRttStats* rtcp_rtt_stats) + RtcEventLog* event_log) : worker_queue_(worker_queue), config_(config), audio_state_(audio_state), @@ -78,7 +77,6 @@ AudioSendStream::AudioSendStream( VoiceEngineImpl* voe_impl = static_cast(voice_engine()); channel_proxy_ = voe_impl->GetChannelProxy(config_.voe_channel_id); channel_proxy_->SetRtcEventLog(event_log); - channel_proxy_->SetRtcpRttStats(rtcp_rtt_stats); channel_proxy_->RegisterSenderCongestionControlObjects( congestion_controller->pacer(), congestion_controller->GetTransportFeedbackObserver(), diff --git a/webrtc/audio/audio_send_stream.h b/webrtc/audio/audio_send_stream.h index 0f980fa370..2e0b7aed58 100644 --- a/webrtc/audio/audio_send_stream.h +++ b/webrtc/audio/audio_send_stream.h @@ -23,7 +23,6 @@ namespace webrtc { class CongestionController; class VoiceEngine; class RtcEventLog; -class RtcpRttStats; namespace voe { class ChannelProxy; @@ -38,8 +37,7 @@ class AudioSendStream final : public webrtc::AudioSendStream, rtc::TaskQueue* worker_queue, CongestionController* congestion_controller, BitrateAllocator* bitrate_allocator, - RtcEventLog* event_log, - RtcpRttStats* rtcp_rtt_stats); + RtcEventLog* event_log); ~AudioSendStream() override; // webrtc::AudioSendStream implementation. diff --git a/webrtc/audio/audio_send_stream_unittest.cc b/webrtc/audio/audio_send_stream_unittest.cc index bebeacecb0..a05c00ba49 100644 --- a/webrtc/audio/audio_send_stream_unittest.cc +++ b/webrtc/audio/audio_send_stream_unittest.cc @@ -20,7 +20,6 @@ #include "webrtc/modules/congestion_controller/include/mock/mock_congestion_controller.h" #include "webrtc/modules/pacing/paced_sender.h" #include "webrtc/modules/remote_bitrate_estimator/include/mock/mock_remote_bitrate_estimator.h" -#include "webrtc/modules/rtp_rtcp/mocks/mock_rtcp_rtt_stats.h" #include "webrtc/test/gtest.h" #include "webrtc/test/mock_voe_channel_proxy.h" #include "webrtc/test/mock_voice_engine.h" @@ -110,8 +109,6 @@ struct ConfigHelper { .Times(1); EXPECT_CALL(*channel_proxy_, SetRtcEventLog(testing::IsNull())) .Times(1); // Destructor resets the event log - EXPECT_CALL(*channel_proxy_, SetRtcpRttStats(&rtcp_rtt_stats_)) - .Times(1); return channel_proxy_; })); stream_config_.voe_channel_id = kChannelId; @@ -135,7 +132,6 @@ struct ConfigHelper { BitrateAllocator* bitrate_allocator() { return &bitrate_allocator_; } rtc::TaskQueue* worker_queue() { return &worker_queue_; } RtcEventLog* event_log() { return &event_log_; } - RtcpRttStats* rtcp_rtt_stats() { return &rtcp_rtt_stats_; } void SetupMockForSendTelephoneEvent() { EXPECT_TRUE(channel_proxy_); @@ -190,7 +186,6 @@ struct ConfigHelper { testing::NiceMock remote_bitrate_observer_; CongestionController congestion_controller_; MockRtcEventLog event_log_; - MockRtcpRttStats rtcp_rtt_stats_; testing::NiceMock limit_observer_; BitrateAllocator bitrate_allocator_; // |worker_queue| is defined last to ensure all pending tasks are cancelled @@ -220,7 +215,7 @@ TEST(AudioSendStreamTest, ConstructDestruct) { internal::AudioSendStream send_stream( helper.config(), helper.audio_state(), helper.worker_queue(), helper.congestion_controller(), helper.bitrate_allocator(), - helper.event_log(), helper.rtcp_rtt_stats()); + helper.event_log()); } TEST(AudioSendStreamTest, SendTelephoneEvent) { @@ -228,7 +223,7 @@ TEST(AudioSendStreamTest, SendTelephoneEvent) { internal::AudioSendStream send_stream( helper.config(), helper.audio_state(), helper.worker_queue(), helper.congestion_controller(), helper.bitrate_allocator(), - helper.event_log(), helper.rtcp_rtt_stats()); + helper.event_log()); helper.SetupMockForSendTelephoneEvent(); EXPECT_TRUE(send_stream.SendTelephoneEvent(kTelephoneEventPayloadType, kTelephoneEventCode, kTelephoneEventDuration)); @@ -239,7 +234,7 @@ TEST(AudioSendStreamTest, SetMuted) { internal::AudioSendStream send_stream( helper.config(), helper.audio_state(), helper.worker_queue(), helper.congestion_controller(), helper.bitrate_allocator(), - helper.event_log(), helper.rtcp_rtt_stats()); + helper.event_log()); EXPECT_CALL(*helper.channel_proxy(), SetInputMute(true)); send_stream.SetMuted(true); } @@ -249,7 +244,7 @@ TEST(AudioSendStreamTest, GetStats) { internal::AudioSendStream send_stream( helper.config(), helper.audio_state(), helper.worker_queue(), helper.congestion_controller(), helper.bitrate_allocator(), - helper.event_log(), helper.rtcp_rtt_stats()); + helper.event_log()); helper.SetupMockForGetStats(); AudioSendStream::Stats stats = send_stream.GetStats(); EXPECT_EQ(kSsrc, stats.local_ssrc); @@ -279,7 +274,7 @@ TEST(AudioSendStreamTest, GetStatsTypingNoiseDetected) { internal::AudioSendStream send_stream( helper.config(), helper.audio_state(), helper.worker_queue(), helper.congestion_controller(), helper.bitrate_allocator(), - helper.event_log(), helper.rtcp_rtt_stats()); + helper.event_log()); helper.SetupMockForGetStats(); EXPECT_FALSE(send_stream.GetStats().typing_noise_detected); diff --git a/webrtc/call/call.cc b/webrtc/call/call.cc index a68a60e120..9515ac10f1 100644 --- a/webrtc/call/call.cc +++ b/webrtc/call/call.cc @@ -373,7 +373,7 @@ webrtc::AudioSendStream* Call::CreateAudioSendStream( event_log_->LogAudioSendStreamConfig(config); AudioSendStream* send_stream = new AudioSendStream( config, config_.audio_state, &worker_queue_, congestion_controller_.get(), - bitrate_allocator_.get(), event_log_, call_stats_->rtcp_rtt_stats()); + bitrate_allocator_.get(), event_log_); { WriteLockScoped write_lock(*send_crit_); RTC_DCHECK(audio_send_ssrcs_.find(config.rtp.ssrc) == diff --git a/webrtc/modules/rtp_rtcp/mocks/mock_rtcp_rtt_stats.h b/webrtc/modules/rtp_rtcp/mocks/mock_rtcp_rtt_stats.h deleted file mode 100644 index aeabafa730..0000000000 --- a/webrtc/modules/rtp_rtcp/mocks/mock_rtcp_rtt_stats.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_MODULES_RTP_RTCP_MOCKS_MOCK_RTCP_RTT_STATS_H_ -#define WEBRTC_MODULES_RTP_RTCP_MOCKS_MOCK_RTCP_RTT_STATS_H_ - -#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" -#include "webrtc/test/gmock.h" - -namespace webrtc { - -class MockRtcpRttStats : public RtcpRttStats { - public: - MOCK_METHOD1(OnRttUpdate, void(int64_t rtt)); - - MOCK_CONST_METHOD0(LastProcessedRtt, int64_t()); -}; -} // namespace webrtc -#endif // WEBRTC_MODULES_RTP_RTCP_MOCKS_MOCK_RTCP_RTT_STATS_H_ diff --git a/webrtc/test/mock_voe_channel_proxy.h b/webrtc/test/mock_voe_channel_proxy.h index 1a89d9a1d2..1847cf4711 100644 --- a/webrtc/test/mock_voe_channel_proxy.h +++ b/webrtc/test/mock_voe_channel_proxy.h @@ -59,7 +59,6 @@ class MockVoEChannelProxy : public voe::ChannelProxy { const rtc::scoped_refptr&()); MOCK_METHOD1(SetChannelOutputVolumeScaling, void(float scaling)); MOCK_METHOD1(SetRtcEventLog, void(RtcEventLog* event_log)); - MOCK_METHOD1(SetRtcpRttStats, void(RtcpRttStats* rtcp_rtt_stats)); MOCK_METHOD1(SetBitrate, void(int bitrate_bps)); }; } // namespace test diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc index 6dcef5fb4b..ac424305b7 100644 --- a/webrtc/voice_engine/channel.cc +++ b/webrtc/voice_engine/channel.cc @@ -157,34 +157,6 @@ class RtcEventLogProxy final : public webrtc::RtcEventLog { RTC_DISALLOW_COPY_AND_ASSIGN(RtcEventLogProxy); }; -class RtcpRttStatsProxy final : public RtcpRttStats { - public: - RtcpRttStatsProxy() : rtcp_rtt_stats_(nullptr) {} - - void OnRttUpdate(int64_t rtt) override { - rtc::CritScope lock(&crit_); - if (rtcp_rtt_stats_) - rtcp_rtt_stats_->OnRttUpdate(rtt); - } - - int64_t LastProcessedRtt() const override { - rtc::CritScope lock(&crit_); - if (rtcp_rtt_stats_ == nullptr) - return 0; - return rtcp_rtt_stats_->LastProcessedRtt(); - } - - void SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats) { - rtc::CritScope lock(&crit_); - rtcp_rtt_stats_ = rtcp_rtt_stats; - } - - private: - rtc::CriticalSection crit_; - RtcpRttStats* rtcp_rtt_stats_ GUARDED_BY(crit_); - RTC_DISALLOW_COPY_AND_ASSIGN(RtcpRttStatsProxy); -}; - class TransportFeedbackProxy : public TransportFeedbackObserver { public: TransportFeedbackProxy() : feedback_observer_(nullptr) { @@ -843,7 +815,6 @@ Channel::Channel(int32_t channelId, : _instanceId(instanceId), _channelId(channelId), event_log_proxy_(new RtcEventLogProxy()), - rtcp_rtt_stats_proxy_(new RtcpRttStatsProxy()), rtp_header_parser_(RtpHeaderParser::Create()), rtp_payload_registry_( new RTPPayloadRegistry(RTPPayloadStrategy::CreateStrategy(true))), @@ -928,7 +899,6 @@ Channel::Channel(int32_t channelId, configuration.transport_feedback_callback = feedback_observer_proxy_.get(); } configuration.event_log = &(*event_log_proxy_); - configuration.rtt_stats = &(*rtcp_rtt_stats_proxy_); configuration.retransmission_rate_limiter = retransmission_rate_limiter_.get(); @@ -2873,10 +2843,6 @@ void Channel::SetRtcEventLog(RtcEventLog* event_log) { event_log_proxy_->SetEventLog(event_log); } -void Channel::SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats) { - rtcp_rtt_stats_proxy_->SetRtcpRttStats(rtcp_rtt_stats); -} - int Channel::RegisterExternalMediaProcessing(ProcessingTypes type, VoEMediaProcess& processObject) { WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), diff --git a/webrtc/voice_engine/channel.h b/webrtc/voice_engine/channel.h index bf279d870e..b0725867aa 100644 --- a/webrtc/voice_engine/channel.h +++ b/webrtc/voice_engine/channel.h @@ -66,7 +66,6 @@ namespace voe { class OutputMixer; class RtcEventLogProxy; -class RtcpRttStatsProxy; class RtpPacketSenderProxy; class Statistics; class StatisticsProxy; @@ -421,8 +420,6 @@ class Channel // Set a RtcEventLog logging object. void SetRtcEventLog(RtcEventLog* event_log); - void SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats); - protected: void OnIncomingFractionLoss(int fraction_lost); @@ -458,7 +455,6 @@ class Channel ChannelState channel_state_; std::unique_ptr event_log_proxy_; - std::unique_ptr rtcp_rtt_stats_proxy_; std::unique_ptr rtp_header_parser_; std::unique_ptr rtp_payload_registry_; diff --git a/webrtc/voice_engine/channel_proxy.cc b/webrtc/voice_engine/channel_proxy.cc index b7cfa9fd01..fc22180566 100644 --- a/webrtc/voice_engine/channel_proxy.cc +++ b/webrtc/voice_engine/channel_proxy.cc @@ -214,11 +214,6 @@ void ChannelProxy::SetRtcEventLog(RtcEventLog* event_log) { channel()->SetRtcEventLog(event_log); } -void ChannelProxy::SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats) { - RTC_DCHECK(thread_checker_.CalledOnValidThread()); - channel()->SetRtcpRttStats(rtcp_rtt_stats); -} - Channel* ChannelProxy::channel() const { RTC_DCHECK(channel_owner_.channel()); return channel_owner_.channel(); diff --git a/webrtc/voice_engine/channel_proxy.h b/webrtc/voice_engine/channel_proxy.h index 1d0116d969..d84e73b60f 100644 --- a/webrtc/voice_engine/channel_proxy.h +++ b/webrtc/voice_engine/channel_proxy.h @@ -25,7 +25,6 @@ namespace webrtc { class AudioSinkInterface; class PacketRouter; class RtcEventLog; -class RtcpRttStats; class RtpPacketSender; class Transport; class TransportFeedbackObserver; @@ -92,8 +91,6 @@ class ChannelProxy { virtual void SetRtcEventLog(RtcEventLog* event_log); - virtual void SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats); - private: Channel* channel() const;