Index: webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc |
index 98269cfb84a03245d9281107d711c52c6bb1c548..1e2cc61fca11e55650ec8cbc5b2276b8a61096a9 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc |
@@ -15,6 +15,7 @@ |
#include "testing/gmock/include/gmock/gmock.h" |
#include "testing/gtest/include/gtest/gtest.h" |
+#include "webrtc/base/rate_limiter.h" |
#include "webrtc/common_types.h" |
#include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
@@ -37,6 +38,7 @@ |
const uint8_t kBaseLayerTid = 0; |
const uint8_t kHigherLayerTid = 1; |
const uint16_t kSequenceNumber = 100; |
+const int64_t kMaxRttMs = 1000; |
class RtcpRttStatsTestImpl : public RtcpRttStats { |
public: |
@@ -99,7 +101,9 @@ |
class RtpRtcpModule : public RtcpPacketTypeCounterObserver { |
public: |
explicit RtpRtcpModule(SimulatedClock* clock) |
- : receive_statistics_(ReceiveStatistics::Create(clock)) { |
+ : receive_statistics_(ReceiveStatistics::Create(clock)), |
+ remote_ssrc_(0), |
+ retransmission_rate_limiter_(clock, kMaxRttMs) { |
RtpRtcp::Configuration config; |
config.audio = false; |
config.clock = clock; |
@@ -107,6 +111,7 @@ |
config.receive_statistics = receive_statistics_.get(); |
config.rtcp_packet_type_counter_observer = this; |
config.rtt_stats = &rtt_stats_; |
+ config.retransmission_rate_limiter = &retransmission_rate_limiter_; |
impl_.reset(new ModuleRtpRtcpImpl(config)); |
impl_->SetRTCPStatus(RtcpMode::kCompound); |
@@ -121,6 +126,7 @@ |
RtcpRttStatsTestImpl rtt_stats_; |
std::unique_ptr<ModuleRtpRtcpImpl> impl_; |
uint32_t remote_ssrc_; |
+ RateLimiter retransmission_rate_limiter_; |
void SetRemoteSsrc(uint32_t ssrc) { |
remote_ssrc_ = ssrc; |