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

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

Issue 2086633002: Revert of Remove audio/video distinction for probe packets. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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 f9ac8c9fa15bdb43368f3364653924d4225d7344..1e99e5146a9e4a52b334ccc4e017382aec637195 100644
--- a/webrtc/modules/remote_bitrate_estimator/transport_feedback_adapter_unittest.cc
+++ b/webrtc/modules/remote_bitrate_estimator/transport_feedback_adapter_unittest.cc
@@ -92,6 +92,7 @@
EXPECT_EQ(truth[i].send_time_ms, input[i].send_time_ms);
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);
}
}
@@ -99,7 +100,7 @@
// 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,
+ 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 @@
TEST_F(TransportFeedbackAdapterTest, AdaptsFeedbackAndPopulatesSendTimes) {
std::vector<PacketInfo> packets;
- packets.push_back(PacketInfo(100, 200, 0, 1500, 0));
- packets.push_back(PacketInfo(110, 210, 1, 1500, 0));
- packets.push_back(PacketInfo(120, 220, 2, 1500, 0));
- packets.push_back(PacketInfo(130, 230, 3, 1500, 1));
- packets.push_back(PacketInfo(140, 240, 4, 1500, 1));
+ 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, HandlesDroppedPackets) {
std::vector<PacketInfo> packets;
- packets.push_back(PacketInfo(100, 200, 0, 1500, 1));
- packets.push_back(PacketInfo(110, 210, 1, 1500, 2));
- packets.push_back(PacketInfo(120, 220, 2, 1500, 3));
- packets.push_back(PacketInfo(130, 230, 3, 1500, 4));
- packets.push_back(PacketInfo(140, 240, 4, 1500, 5));
+ 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,12 +191,12 @@
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,
+ packets.push_back(PacketInfo(kHighArrivalTimeMs - 64, 200, 0, 1500, true,
PacketInfo::kNotAProbe));
- packets.push_back(PacketInfo(kHighArrivalTimeMs + 64, 210, 1, 1500,
+ packets.push_back(PacketInfo(kHighArrivalTimeMs + 64, 210, 1, 1500, true,
PacketInfo::kNotAProbe));
- packets.push_back(
- PacketInfo(kHighArrivalTimeMs, 220, 2, 1500, PacketInfo::kNotAProbe));
+ packets.push_back(PacketInfo(kHighArrivalTimeMs, 220, 2, 1500, true,
+ PacketInfo::kNotAProbe));
for (const PacketInfo& packet : packets)
OnSentPacket(packet);
@@ -228,9 +229,9 @@
TEST_F(TransportFeedbackAdapterTest, HandlesReordering) {
std::vector<PacketInfo> packets;
- packets.push_back(PacketInfo(120, 200, 0, 1500, 0));
- packets.push_back(PacketInfo(110, 210, 1, 1500, 0));
- packets.push_back(PacketInfo(100, 220, 2, 1500, 0));
+ 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]);

Powered by Google App Engine
This is Rietveld 408576698