Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1642)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc

Issue 2181383002: Add NACK rate throttling for audio channels. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc
index bbfb52c6cc9b78b6e65d98d509a8d79fec666537..0e0d7f529167a030ddf8cba2e766ef7899deffa3 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc
@@ -12,6 +12,7 @@
#include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/rate_limiter.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h"
#include "webrtc/modules/remote_bitrate_estimator/include/mock/mock_remote_bitrate_observer.h"
@@ -69,7 +70,8 @@ class RtcpFormatRembTest : public ::testing::Test {
remote_bitrate_observer_(),
remote_bitrate_estimator_(
new RemoteBitrateEstimatorSingleStream(&remote_bitrate_observer_,
- system_clock_)) {}
+ system_clock_)),
+ retransmission_rate_limiter_(Clock::GetRealTimeClock(), 1000) {}
void SetUp() override;
void TearDown() override;
@@ -83,6 +85,7 @@ class RtcpFormatRembTest : public ::testing::Test {
test::NullTransport null_transport_;
MockRemoteBitrateObserver remote_bitrate_observer_;
std::unique_ptr<RemoteBitrateEstimator> remote_bitrate_estimator_;
+ RateLimiter retransmission_rate_limiter_;
};
void RtcpFormatRembTest::SetUp() {
@@ -91,6 +94,7 @@ void RtcpFormatRembTest::SetUp() {
configuration.clock = system_clock_;
configuration.remote_bitrate_estimator = remote_bitrate_estimator_.get();
configuration.outgoing_transport = &null_transport_;
+ configuration.retransmission_rate_limiter = &retransmission_rate_limiter_;
dummy_rtp_rtcp_impl_ = new ModuleRtpRtcpImpl(configuration);
rtcp_receiver_ = new RTCPReceiver(system_clock_, false, nullptr, nullptr,
nullptr, nullptr, dummy_rtp_rtcp_impl_);
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/rtcp_receiver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698