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

Unified Diff: webrtc/modules/rtp_rtcp/test/testAPI/test_api.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.cc
diff --git a/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc b/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc
index d4c11115dbcc6b0c6b73c628395ea218bb2a759e..ab666cec2c4c616ab9382c69c154a7f793faf072 100644
--- a/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc
+++ b/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc
@@ -14,6 +14,7 @@
#include <memory>
#include <vector>
+#include "webrtc/base/rate_limiter.h"
#include "webrtc/test/null_transport.h"
namespace webrtc {
@@ -80,7 +81,8 @@ int32_t TestRtpReceiver::OnReceivedPayloadData(
class RtpRtcpAPITest : public ::testing::Test {
protected:
- RtpRtcpAPITest() : fake_clock_(123456) {
+ RtpRtcpAPITest()
+ : fake_clock_(123456), retransmission_rate_limiter_(&fake_clock_, 1000) {
test_csrcs_.push_back(1234);
test_csrcs_.push_back(2345);
test_ssrc_ = 3456;
@@ -94,6 +96,7 @@ class RtpRtcpAPITest : public ::testing::Test {
configuration.audio = true;
configuration.clock = &fake_clock_;
configuration.outgoing_transport = &null_transport_;
+ configuration.retransmission_rate_limiter = &retransmission_rate_limiter_;
module_.reset(RtpRtcp::CreateRtpRtcp(configuration));
rtp_payload_registry_.reset(new RTPPayloadRegistry(
RTPPayloadStrategy::CreateStrategy(true)));
@@ -110,6 +113,7 @@ class RtpRtcpAPITest : public ::testing::Test {
std::vector<uint32_t> test_csrcs_;
SimulatedClock fake_clock_;
test::NullTransport null_transport_;
+ RateLimiter retransmission_rate_limiter_;
};
TEST_F(RtpRtcpAPITest, Basic) {
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc ('k') | webrtc/modules/rtp_rtcp/test/testAPI/test_api_audio.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698