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

Unified Diff: webrtc/modules/remote_bitrate_estimator/transport_feedback_adapter_unittest.cc

Issue 2005313003: Propagate probing cluster id to SendTimeHistory. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Test probe_cluster_id in PacketRouterTest. Created 4 years, 7 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/remote_bitrate_estimator/transport_feedback_adapter_unittest.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/transport_feedback_adapter_unittest.cc b/webrtc/modules/remote_bitrate_estimator/transport_feedback_adapter_unittest.cc
index 4f7d83c9eb31ec93815e65f4ec14d2ecc84f703d..1e99e5146a9e4a52b334ccc4e017382aec637195 100644
--- a/webrtc/modules/remote_bitrate_estimator/transport_feedback_adapter_unittest.cc
+++ b/webrtc/modules/remote_bitrate_estimator/transport_feedback_adapter_unittest.cc
@@ -93,14 +93,15 @@ class TransportFeedbackAdapterTest : public ::testing::Test {
EXPECT_EQ(truth[i].sequence_number, input[i].sequence_number);
EXPECT_EQ(truth[i].payload_size, input[i].payload_size);
EXPECT_EQ(truth[i].was_paced, input[i].was_paced);
+ EXPECT_EQ(truth[i].probe_cluster_id, input[i].probe_cluster_id);
}
}
// Utility method, to reset arrival_time_ms before adding send time.
void OnSentPacket(PacketInfo info) {
info.arrival_time_ms = 0;
- adapter_->AddPacket(info.sequence_number, info.payload_size,
- info.was_paced);
+ adapter_->AddPacket(info.sequence_number, info.payload_size, info.was_paced,
+ info.probe_cluster_id);
adapter_->OnSentPacket(info.sequence_number, info.send_time_ms);
}
@@ -114,11 +115,11 @@ class TransportFeedbackAdapterTest : public ::testing::Test {
TEST_F(TransportFeedbackAdapterTest, AdaptsFeedbackAndPopulatesSendTimes) {
std::vector<PacketInfo> packets;
- packets.push_back(PacketInfo(100, 200, 0, 1500, true));
- packets.push_back(PacketInfo(110, 210, 1, 1500, true));
- packets.push_back(PacketInfo(120, 220, 2, 1500, true));
- packets.push_back(PacketInfo(130, 230, 3, 1500, true));
- packets.push_back(PacketInfo(140, 240, 4, 1500, true));
+ packets.push_back(PacketInfo(100, 200, 0, 1500, true, 0));
+ packets.push_back(PacketInfo(110, 210, 1, 1500, true, 0));
+ packets.push_back(PacketInfo(120, 220, 2, 1500, true, 0));
+ packets.push_back(PacketInfo(130, 230, 3, 1500, true, 1));
+ packets.push_back(PacketInfo(140, 240, 4, 1500, true, 1));
for (const PacketInfo& packet : packets)
OnSentPacket(packet);
@@ -145,11 +146,11 @@ TEST_F(TransportFeedbackAdapterTest, AdaptsFeedbackAndPopulatesSendTimes) {
TEST_F(TransportFeedbackAdapterTest, HandlesDroppedPackets) {
std::vector<PacketInfo> packets;
- packets.push_back(PacketInfo(100, 200, 0, 1500, true));
- packets.push_back(PacketInfo(110, 210, 1, 1500, true));
- packets.push_back(PacketInfo(120, 220, 2, 1500, true));
- packets.push_back(PacketInfo(130, 230, 3, 1500, true));
- packets.push_back(PacketInfo(140, 240, 4, 1500, true));
+ packets.push_back(PacketInfo(100, 200, 0, 1500, true, 1));
+ packets.push_back(PacketInfo(110, 210, 1, 1500, true, 2));
+ packets.push_back(PacketInfo(120, 220, 2, 1500, true, 3));
+ packets.push_back(PacketInfo(130, 230, 3, 1500, true, 4));
+ packets.push_back(PacketInfo(140, 240, 4, 1500, true, 5));
const uint16_t kSendSideDropBefore = 1;
const uint16_t kReceiveSideDropAfter = 3;
@@ -190,9 +191,12 @@ TEST_F(TransportFeedbackAdapterTest, SendTimeWrapsBothWays) {
static_cast<int64_t>(1 << 8) *
static_cast<int64_t>((1 << 23) - 1) / 1000;
std::vector<PacketInfo> packets;
- packets.push_back(PacketInfo(kHighArrivalTimeMs - 64, 200, 0, 1500, true));
- packets.push_back(PacketInfo(kHighArrivalTimeMs + 64, 210, 1, 1500, true));
- packets.push_back(PacketInfo(kHighArrivalTimeMs, 220, 2, 1500, true));
+ packets.push_back(PacketInfo(kHighArrivalTimeMs - 64, 200, 0, 1500, true,
+ PacketInfo::kNotAProbe));
+ packets.push_back(PacketInfo(kHighArrivalTimeMs + 64, 210, 1, 1500, true,
+ PacketInfo::kNotAProbe));
+ packets.push_back(PacketInfo(kHighArrivalTimeMs, 220, 2, 1500, true,
+ PacketInfo::kNotAProbe));
for (const PacketInfo& packet : packets)
OnSentPacket(packet);
@@ -225,9 +229,9 @@ TEST_F(TransportFeedbackAdapterTest, SendTimeWrapsBothWays) {
TEST_F(TransportFeedbackAdapterTest, HandlesReordering) {
std::vector<PacketInfo> packets;
- packets.push_back(PacketInfo(120, 200, 0, 1500, true));
- packets.push_back(PacketInfo(110, 210, 1, 1500, true));
- packets.push_back(PacketInfo(100, 220, 2, 1500, true));
+ packets.push_back(PacketInfo(120, 200, 0, 1500, true, 0));
+ packets.push_back(PacketInfo(110, 210, 1, 1500, true, 0));
+ packets.push_back(PacketInfo(100, 220, 2, 1500, true, 0));
std::vector<PacketInfo> expected_packets;
expected_packets.push_back(packets[2]);
expected_packets.push_back(packets[1]);
@@ -267,7 +271,7 @@ TEST_F(TransportFeedbackAdapterTest, TimestampDeltas) {
rtcp::TransportFeedback::kDeltaScaleFactor *
std::numeric_limits<int16_t>::min();
- PacketInfo info(100, 200, 0, 1500, true);
+ PacketInfo info(100, 200, 0, 1500, true, PacketInfo::kNotAProbe);
sent_packets.push_back(info);
info.send_time_ms += kSmallDeltaUs / 1000;
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/transport_feedback_adapter.cc ('k') | webrtc/modules/rtp_rtcp/include/rtp_rtcp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698