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

Unified Diff: webrtc/modules/rtp_rtcp/test/testAPI/test_api_rtcp.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/test/testAPI/test_api_rtcp.cc
diff --git a/webrtc/modules/rtp_rtcp/test/testAPI/test_api_rtcp.cc b/webrtc/modules/rtp_rtcp/test/testAPI/test_api_rtcp.cc
index c1359df8646dfa053d0235211f446c658ed0cf35..f33507e35821ffebaa6eae2e238dde5f1a90d63f 100644
--- a/webrtc/modules/rtp_rtcp/test/testAPI/test_api_rtcp.cc
+++ b/webrtc/modules/rtp_rtcp/test/testAPI/test_api_rtcp.cc
@@ -14,6 +14,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/receive_statistics.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
@@ -66,7 +67,8 @@ class TestRtpFeedback : public NullRtpFeedback {
class RtpRtcpRtcpTest : public ::testing::Test {
protected:
- RtpRtcpRtcpTest() : fake_clock(123456) {
+ RtpRtcpRtcpTest()
+ : fake_clock(123456), retransmission_rate_limiter_(&fake_clock, 1000) {
test_csrcs.push_back(1234);
test_csrcs.push_back(2345);
test_ssrc = 3456;
@@ -91,6 +93,7 @@ class RtpRtcpRtcpTest : public ::testing::Test {
configuration.receive_statistics = receive_statistics1_.get();
configuration.outgoing_transport = transport1;
configuration.intra_frame_callback = myRTCPFeedback1;
+ configuration.retransmission_rate_limiter = &retransmission_rate_limiter_;
rtp_payload_registry1_.reset(new RTPPayloadRegistry(
RTPPayloadStrategy::CreateStrategy(true)));
@@ -197,6 +200,7 @@ class RtpRtcpRtcpTest : public ::testing::Test {
uint16_t test_sequence_number;
std::vector<uint32_t> test_csrcs;
SimulatedClock fake_clock;
+ RateLimiter retransmission_rate_limiter_;
};
TEST_F(RtpRtcpRtcpTest, RTCP_PLI_RPSI) {
« no previous file with comments | « webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.cc ('k') | webrtc/modules/rtp_rtcp/test/testAPI/test_api_video.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698