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

Unified Diff: modules/rtp_rtcp/test/testFec/test_fec.cc

Issue 3012243002: Change ForwardErrorCorrection class to accept one received packet at a time. (Closed)
Patch Set: Rebased. Created 3 years, 3 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 | « modules/rtp_rtcp/source/ulpfec_receiver_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/rtp_rtcp/test/testFec/test_fec.cc
diff --git a/modules/rtp_rtcp/test/testFec/test_fec.cc b/modules/rtp_rtcp/test/testFec/test_fec.cc
index c65a2b592603adcff12b532cf0f5e7baeabbc22d..32dc374e4fc71c4a9e70cc016a571f8f791005aa 100644
--- a/modules/rtp_rtcp/test/testFec/test_fec.cc
+++ b/modules/rtp_rtcp/test/testFec/test_fec.cc
@@ -35,8 +35,10 @@ namespace test {
using fec_private_tables::kPacketMaskBurstyTbl;
void ReceivePackets(
- ForwardErrorCorrection::ReceivedPacketList* to_decode_list,
- ForwardErrorCorrection::ReceivedPacketList* received_packet_list,
+ std::vector<std::unique_ptr<ForwardErrorCorrection::ReceivedPacket>>*
+ to_decode_list,
+ std::vector<std::unique_ptr<ForwardErrorCorrection::ReceivedPacket>>*
+ received_packet_list,
size_t num_packets_to_decode,
float reorder_rate,
float duplicate_rate,
@@ -103,8 +105,10 @@ void RunTest(bool use_flexfec) {
ForwardErrorCorrection::PacketList media_packet_list;
std::list<ForwardErrorCorrection::Packet*> fec_packet_list;
- ForwardErrorCorrection::ReceivedPacketList to_decode_list;
- ForwardErrorCorrection::ReceivedPacketList received_packet_list;
+ std::vector<std::unique_ptr<ForwardErrorCorrection::ReceivedPacket>>
+ to_decode_list;
+ std::vector<std::unique_ptr<ForwardErrorCorrection::ReceivedPacket>>
+ received_packet_list;
ForwardErrorCorrection::RecoveredPacketList recovered_packet_list;
std::list<uint8_t*> fec_mask_list;
@@ -403,11 +407,10 @@ void RunTest(bool use_flexfec) {
}
}
}
- ASSERT_EQ(0,
- fec->DecodeFec(&to_decode_list, &recovered_packet_list))
- << "DecodeFec() failed";
- ASSERT_TRUE(to_decode_list.empty())
- << "Received packet list is not empty.";
+ for (const auto& received_packet : to_decode_list) {
+ fec->DecodeFec(*received_packet, &recovered_packet_list);
+ }
+ to_decode_list.clear();
}
media_packet_idx = 0;
for (const auto& media_packet : media_packet_list) {
« no previous file with comments | « modules/rtp_rtcp/source/ulpfec_receiver_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698