OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |