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

Unified Diff: webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.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_audio.cc
diff --git a/webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.cc b/webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.cc
index 0fb98456d9600098a558c6c59902a66fffe74de4..f9e50015872604ca6a7d6fd6e2939a586db87fa0 100644
--- a/webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.cc
+++ b/webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.cc
@@ -15,6 +15,7 @@
#include "webrtc/modules/rtp_rtcp/test/testAPI/test_api.h"
+#include "webrtc/base/rate_limiter.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
@@ -77,7 +78,8 @@ class RTPCallback : public NullRtpFeedback {
class RtpRtcpAudioTest : public ::testing::Test {
protected:
- RtpRtcpAudioTest() : fake_clock(123456) {
+ RtpRtcpAudioTest()
+ : fake_clock(123456), retransmission_rate_limiter_(&fake_clock, 1000) {
test_CSRC[0] = 1234;
test_CSRC[2] = 2345;
test_ssrc = 3456;
@@ -106,6 +108,7 @@ class RtpRtcpAudioTest : public ::testing::Test {
configuration.clock = &fake_clock;
configuration.receive_statistics = receive_statistics1_.get();
configuration.outgoing_transport = transport1;
+ configuration.retransmission_rate_limiter = &retransmission_rate_limiter_;
module1 = RtpRtcp::CreateRtpRtcp(configuration);
rtp_receiver1_.reset(RtpReceiver::CreateAudioReceiver(
@@ -152,6 +155,7 @@ class RtpRtcpAudioTest : public ::testing::Test {
uint16_t test_sequence_number;
uint32_t test_CSRC[webrtc::kRtpCsrcSize];
SimulatedClock fake_clock;
+ RateLimiter retransmission_rate_limiter_;
};
TEST_F(RtpRtcpAudioTest, Basic) {
« no previous file with comments | « webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc ('k') | webrtc/modules/rtp_rtcp/test/testAPI/test_api_rtcp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698