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 <algorithm> | 11 #include <algorithm> |
12 #include <list> | 12 #include <list> |
13 #include <memory> | 13 #include <memory> |
14 | 14 |
15 #include "webrtc/test/gtest.h" | |
16 #include "webrtc/base/basictypes.h" | 15 #include "webrtc/base/basictypes.h" |
17 #include "webrtc/base/random.h" | 16 #include "webrtc/base/random.h" |
18 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" | 17 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
19 #include "webrtc/modules/rtp_rtcp/source/fec_test_helper.h" | 18 #include "webrtc/modules/rtp_rtcp/source/fec_test_helper.h" |
20 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h" | 19 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h" |
21 #include "webrtc/modules/rtp_rtcp/source/ulpfec_header_reader_writer.h" | 20 #include "webrtc/modules/rtp_rtcp/source/ulpfec_header_reader_writer.h" |
| 21 #include "webrtc/test/gtest.h" |
22 | 22 |
23 namespace webrtc { | 23 namespace webrtc { |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 // Transport header size in bytes. Assume UDP/IPv4 as a reasonable minimum. | 27 // Transport header size in bytes. Assume UDP/IPv4 as a reasonable minimum. |
28 constexpr size_t kTransportOverhead = 28; | 28 constexpr size_t kTransportOverhead = 28; |
29 | 29 |
30 constexpr uint32_t kMediaSsrc = 83542; | 30 constexpr uint32_t kMediaSsrc = 83542; |
31 | 31 |
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 this->NetworkReceivedPackets(this->media_loss_mask_, this->fec_loss_mask_); | 943 this->NetworkReceivedPackets(this->media_loss_mask_, this->fec_loss_mask_); |
944 | 944 |
945 EXPECT_EQ(0, this->fec_.DecodeFec(&this->received_packets_, | 945 EXPECT_EQ(0, this->fec_.DecodeFec(&this->received_packets_, |
946 &this->recovered_packets_)); | 946 &this->recovered_packets_)); |
947 | 947 |
948 // 5 protected packets lost, one FEC packet, cannot get complete recovery. | 948 // 5 protected packets lost, one FEC packet, cannot get complete recovery. |
949 EXPECT_FALSE(this->IsRecoveryComplete()); | 949 EXPECT_FALSE(this->IsRecoveryComplete()); |
950 } | 950 } |
951 | 951 |
952 } // namespace webrtc | 952 } // namespace webrtc |
OLD | NEW |