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

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

Issue 2260803002: Generalize FEC header formatting. (pt. 4) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Lint fix. Created 4 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
Index: webrtc/modules/rtp_rtcp/test/testFec/test_fec.cc
diff --git a/webrtc/modules/rtp_rtcp/test/testFec/test_fec.cc b/webrtc/modules/rtp_rtcp/test/testFec/test_fec.cc
index be010382a8335bbd7df4dfdad22ce2b2ac5e88dd..e3368e2b8200d643ffdf5a2d91d4a1a39b19e6a0 100644
--- a/webrtc/modules/rtp_rtcp/test/testFec/test_fec.cc
+++ b/webrtc/modules/rtp_rtcp/test/testFec/test_fec.cc
@@ -107,7 +107,8 @@ TEST(FecTest, MAYBE_FecTest) {
ASSERT_EQ(12, kMaxMediaPackets[1]) << "Max media packets for bursty mode not "
<< "equal to 12.";
- ForwardErrorCorrection fec;
+ std::unique_ptr<ForwardErrorCorrection> fec =
+ ForwardErrorCorrection::CreateUlpfec();
ForwardErrorCorrection::PacketList media_packet_list;
std::list<ForwardErrorCorrection::Packet*> fec_packet_list;
ForwardErrorCorrection::ReceivedPacketList to_decode_list;
@@ -238,7 +239,7 @@ TEST(FecTest, MAYBE_FecTest) {
new ForwardErrorCorrection::Packet());
const uint32_t kMinPacketSize = 12;
const uint32_t kMaxPacketSize = static_cast<uint32_t>(
- IP_PACKET_SIZE - 12 - 28 - fec.MaxPacketOverhead());
+ IP_PACKET_SIZE - 12 - 28 - fec->MaxPacketOverhead());
media_packet->length = random.Rand(kMinPacketSize,
kMaxPacketSize);
@@ -277,9 +278,9 @@ TEST(FecTest, MAYBE_FecTest) {
}
media_packet_list.back()->data[1] |= 0x80;
- ASSERT_EQ(0, fec.EncodeFec(media_packet_list, protection_factor,
- num_imp_packets, kUseUnequalProtection,
- fec_mask_type, &fec_packet_list))
+ ASSERT_EQ(0, fec->EncodeFec(media_packet_list, protection_factor,
+ num_imp_packets, kUseUnequalProtection,
+ fec_mask_type, &fec_packet_list))
<< "EncodeFec() failed";
ASSERT_EQ(num_fec_packets, fec_packet_list.size())
@@ -393,7 +394,7 @@ TEST(FecTest, MAYBE_FecTest) {
}
}
ASSERT_EQ(0,
- fec.DecodeFec(&to_decode_list, &recovered_packet_list))
+ fec->DecodeFec(&to_decode_list, &recovered_packet_list))
<< "DecodeFec() failed";
ASSERT_TRUE(to_decode_list.empty())
<< "Received packet list is not empty.";
@@ -421,7 +422,7 @@ TEST(FecTest, MAYBE_FecTest) {
}
++media_packet_idx;
}
- fec.ResetState(&recovered_packet_list);
+ fec->ResetState(&recovered_packet_list);
ASSERT_TRUE(recovered_packet_list.empty())
<< "Excessive number of recovered packets.\t size is: "
<< recovered_packet_list.size();
@@ -447,7 +448,7 @@ TEST(FecTest, MAYBE_FecTest) {
} // loop over mask types
// Have DecodeFec clear the recovered packet list.
- fec.ResetState(&recovered_packet_list);
+ fec->ResetState(&recovered_packet_list);
ASSERT_TRUE(recovered_packet_list.empty())
<< "Recovered packet list is not empty";
}

Powered by Google App Engine
This is Rietveld 408576698