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

Side by Side Diff: webrtc/modules/rtp_rtcp/test/testFec/test_fec.cc

Issue 2950313002: Enable large-scale FEC tests on iOS. (Closed)
Patch Set: Enable tests. Created 3 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 ASSERT_EQ(12, kMaxMediaPackets[1]) << "Max media packets for bursty mode not " 101 ASSERT_EQ(12, kMaxMediaPackets[1]) << "Max media packets for bursty mode not "
102 << "equal to 12."; 102 << "equal to 12.";
103 103
104 ForwardErrorCorrection::PacketList media_packet_list; 104 ForwardErrorCorrection::PacketList media_packet_list;
105 std::list<ForwardErrorCorrection::Packet*> fec_packet_list; 105 std::list<ForwardErrorCorrection::Packet*> fec_packet_list;
106 ForwardErrorCorrection::ReceivedPacketList to_decode_list; 106 ForwardErrorCorrection::ReceivedPacketList to_decode_list;
107 ForwardErrorCorrection::ReceivedPacketList received_packet_list; 107 ForwardErrorCorrection::ReceivedPacketList received_packet_list;
108 ForwardErrorCorrection::RecoveredPacketList recovered_packet_list; 108 ForwardErrorCorrection::RecoveredPacketList recovered_packet_list;
109 std::list<uint8_t*> fec_mask_list; 109 std::list<uint8_t*> fec_mask_list;
110 110
111 // Running over only one loss rate to limit execution time. 111 // Running over only two loss rates to limit execution time.
112 const float loss_rate[] = {0.5f}; 112 const float loss_rate[] = {0.05f, 0.01f};
113 const uint32_t loss_rate_size = sizeof(loss_rate) / sizeof(*loss_rate); 113 const uint32_t loss_rate_size = sizeof(loss_rate) / sizeof(*loss_rate);
114 const float reorder_rate = 0.1f; 114 const float reorder_rate = 0.1f;
115 const float duplicate_rate = 0.1f; 115 const float duplicate_rate = 0.1f;
116 116
117 uint8_t media_loss_mask[kMaxNumberMediaPackets]; 117 uint8_t media_loss_mask[kMaxNumberMediaPackets];
118 uint8_t fec_loss_mask[kMaxNumberFecPackets]; 118 uint8_t fec_loss_mask[kMaxNumberFecPackets];
119 uint8_t fec_packet_masks[kMaxNumberFecPackets][kMaxNumberMediaPackets]; 119 uint8_t fec_packet_masks[kMaxNumberFecPackets][kMaxNumberMediaPackets];
120 120
121 // Seed the random number generator, storing the seed to file in order to 121 // Seed the random number generator, storing the seed to file in order to
122 // reproduce past results. 122 // reproduce past results.
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 } // loop over num_media_packets 456 } // loop over num_media_packets
457 } // loop over loss rates 457 } // loop over loss rates
458 } // loop over mask types 458 } // loop over mask types
459 459
460 // Have DecodeFec clear the recovered packet list. 460 // Have DecodeFec clear the recovered packet list.
461 fec->ResetState(&recovered_packet_list); 461 fec->ResetState(&recovered_packet_list);
462 ASSERT_TRUE(recovered_packet_list.empty()) 462 ASSERT_TRUE(recovered_packet_list.empty())
463 << "Recovered packet list is not empty"; 463 << "Recovered packet list is not empty";
464 } 464 }
465 465
466 // Too slow to finish before timeout on iOS. See webrtc:4755. 466 TEST(FecTest, UlpfecTest) {
467 #if defined(WEBRTC_IOS)
468 #define MAYBE_UlpfecTest DISABLED_UlpfecTest
469 #define MAYBE_FlexfecTest DISABLED_FlexfecTest
470 #else
471 #define MAYBE_UlpfecTest UlpfecTest
472 #define MAYBE_FlexfecTest FlexfecTest
473 #endif
474 TEST(FecTest, MAYBE_UlpfecTest) {
475 RunTest(false); 467 RunTest(false);
476 } 468 }
477 469
478 TEST(FecTest, MAYBE_FlexfecTest) { 470 TEST(FecTest, FlexfecTest) {
479 RunTest(true); 471 RunTest(true);
480 } 472 }
481 473
482 } // namespace test 474 } // namespace test
483 } // namespace webrtc 475 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698