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

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

Issue 2061423003: Refactor NACK bitrate allocation (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixed nit 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
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/bitrate.cc ('k') | webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc
diff --git a/webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc b/webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc
index f8d92438589aed763dfa881adb8fe1d6bec44ef6..b12c08e6424fa06f21dc04d65884ee97eaf732ff 100644
--- a/webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc
@@ -15,6 +15,7 @@
#include <set>
#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_header_parser.h"
@@ -34,6 +35,7 @@ const int kTestNumberOfRtxPackets = 149;
const int kNumFrames = 30;
const int kPayloadType = 123;
const int kRtxPayloadType = 98;
+const int64_t kMaxRttMs = 1000;
class VerifyingRtxReceiver : public NullRtpData {
public:
@@ -168,11 +170,12 @@ class RtpRtcpRtxNackTest : public ::testing::Test {
protected:
RtpRtcpRtxNackTest()
: rtp_payload_registry_(RTPPayloadStrategy::CreateStrategy(false)),
- rtp_rtcp_module_(NULL),
+ rtp_rtcp_module_(nullptr),
transport_(kTestSsrc + 1),
receiver_(),
payload_data_length(sizeof(payload_data)),
- fake_clock(123456) {}
+ fake_clock(123456),
+ retranmission_rate_limiter_(&fake_clock, kMaxRttMs) {}
~RtpRtcpRtxNackTest() {}
void SetUp() override {
@@ -182,6 +185,7 @@ class RtpRtcpRtxNackTest : public ::testing::Test {
receive_statistics_.reset(ReceiveStatistics::Create(&fake_clock));
configuration.receive_statistics = receive_statistics_.get();
configuration.outgoing_transport = &transport_;
+ configuration.retransmission_rate_limiter = &retranmission_rate_limiter_;
rtp_rtcp_module_ = RtpRtcp::CreateRtpRtcp(configuration);
rtp_feedback_.reset(new TestRtpFeedback(rtp_rtcp_module_));
@@ -288,6 +292,7 @@ class RtpRtcpRtxNackTest : public ::testing::Test {
uint8_t payload_data[65000];
size_t payload_data_length;
SimulatedClock fake_clock;
+ RateLimiter retranmission_rate_limiter_;
};
TEST_F(RtpRtcpRtxNackTest, LongNackList) {
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/bitrate.cc ('k') | webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698