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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/fec_receiver_unittest.cc

Issue 2276473002: Rename FrameGenerator -> UlpfecPacketGenerator. (pt. 6b) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@headers-pt5-add_flexfec
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/fec_test_helper.h » ('j') | 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 93
94 void InjectGarbagePacketLength(size_t fec_garbage_offset); 94 void InjectGarbagePacketLength(size_t fec_garbage_offset);
95 static void SurvivesMaliciousPacket(const uint8_t* data, 95 static void SurvivesMaliciousPacket(const uint8_t* data,
96 size_t length, 96 size_t length,
97 uint8_t ulpfec_payload_type); 97 uint8_t ulpfec_payload_type);
98 98
99 MockRtpData rtp_data_callback_; 99 MockRtpData rtp_data_callback_;
100 std::unique_ptr<ForwardErrorCorrection> fec_; 100 std::unique_ptr<ForwardErrorCorrection> fec_;
101 std::unique_ptr<FecReceiver> receiver_fec_; 101 std::unique_ptr<FecReceiver> receiver_fec_;
102 test::fec::FrameGenerator generator_; 102 test::fec::UlpfecPacketGenerator generator_;
103 }; 103 };
104 104
105 TEST_F(ReceiverFecTest, TwoMediaOneFec) { 105 TEST_F(ReceiverFecTest, TwoMediaOneFec) {
106 const unsigned int kNumFecPackets = 1u; 106 const unsigned int kNumFecPackets = 1u;
107 std::list<RawRtpPacket*> media_rtp_packets; 107 std::list<RawRtpPacket*> media_rtp_packets;
108 ForwardErrorCorrection::PacketList media_packets; 108 ForwardErrorCorrection::PacketList media_packets;
109 GenerateFrame(2, 0, &media_rtp_packets, &media_packets); 109 GenerateFrame(2, 0, &media_rtp_packets, &media_packets);
110 std::list<ForwardErrorCorrection::Packet*> fec_packets; 110 std::list<ForwardErrorCorrection::Packet*> fec_packets;
111 EncodeFec(&media_packets, &fec_packets, kNumFecPackets); 111 EncodeFec(&media_packets, &fec_packets, kNumFecPackets);
112 112
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 0x27, 508 0x27,
509 0xc4, 509 0xc4,
510 0x2a, 510 0x2a,
511 0x21, 511 0x21,
512 0x2a, 512 0x2a,
513 0x28}; 513 0x28};
514 SurvivesMaliciousPacket(kPacket, sizeof(kPacket), 100); 514 SurvivesMaliciousPacket(kPacket, sizeof(kPacket), 100);
515 } 515 }
516 516
517 } // namespace webrtc 517 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/fec_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698