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 |
11 #include <list> | 11 #include <list> |
12 #include <memory> | 12 #include <memory> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "webrtc/test/gtest.h" | |
16 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" | 15 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
17 #include "webrtc/modules/rtp_rtcp/source/fec_test_helper.h" | 16 #include "webrtc/modules/rtp_rtcp/source/fec_test_helper.h" |
18 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h" | 17 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h" |
19 #include "webrtc/modules/rtp_rtcp/source/producer_fec.h" | 18 #include "webrtc/modules/rtp_rtcp/source/producer_fec.h" |
| 19 #include "webrtc/test/gtest.h" |
20 | 20 |
21 namespace webrtc { | 21 namespace webrtc { |
22 | 22 |
23 namespace { | 23 namespace { |
24 constexpr uint8_t kFecPayloadType = 96; | 24 constexpr uint8_t kFecPayloadType = 96; |
25 constexpr uint8_t kRedPayloadType = 97; | 25 constexpr uint8_t kRedPayloadType = 97; |
26 } // namespace | 26 } // namespace |
27 | 27 |
28 using ::webrtc::test::fec::FrameGenerator; | 28 using ::webrtc::test::fec::FrameGenerator; |
29 using ::webrtc::test::fec::RawRtpPacket; | 29 using ::webrtc::test::fec::RawRtpPacket; |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 ProducerFec::BuildRedPacket(packet->data, packet->length - kRtpHeaderSize, | 199 ProducerFec::BuildRedPacket(packet->data, packet->length - kRtpHeaderSize, |
200 kRtpHeaderSize, kRedPayloadType); | 200 kRtpHeaderSize, kRedPayloadType); |
201 EXPECT_EQ(packet->length + kRedForFecHeaderLength, red_packet->length()); | 201 EXPECT_EQ(packet->length + kRedForFecHeaderLength, red_packet->length()); |
202 VerifyHeader(packet->header.header.sequenceNumber, | 202 VerifyHeader(packet->header.header.sequenceNumber, |
203 packet->header.header.timestamp, kRedPayloadType, | 203 packet->header.header.timestamp, kRedPayloadType, |
204 packet->header.header.payloadType, red_packet.get(), | 204 packet->header.header.payloadType, red_packet.get(), |
205 true); // Marker bit set. | 205 true); // Marker bit set. |
206 } | 206 } |
207 | 207 |
208 } // namespace webrtc | 208 } // namespace webrtc |
OLD | NEW |