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/base/basictypes.h" | |
16 #include "webrtc/base/random.h" | |
17 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" | 15 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" |
18 #include "webrtc/modules/rtp_rtcp/source/fec_test_helper.h" | 16 #include "webrtc/modules/rtp_rtcp/source/fec_test_helper.h" |
19 #include "webrtc/modules/rtp_rtcp/source/flexfec_header_reader_writer.h" | 17 #include "webrtc/modules/rtp_rtcp/source/flexfec_header_reader_writer.h" |
20 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h" | 18 #include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h" |
21 #include "webrtc/modules/rtp_rtcp/source/ulpfec_header_reader_writer.h" | 19 #include "webrtc/modules/rtp_rtcp/source/ulpfec_header_reader_writer.h" |
| 20 #include "webrtc/rtc_base/basictypes.h" |
| 21 #include "webrtc/rtc_base/random.h" |
22 #include "webrtc/test/gtest.h" | 22 #include "webrtc/test/gtest.h" |
23 | 23 |
24 namespace webrtc { | 24 namespace webrtc { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 // Transport header size in bytes. Assume UDP/IPv4 as a reasonable minimum. | 28 // Transport header size in bytes. Assume UDP/IPv4 as a reasonable minimum. |
29 constexpr size_t kTransportOverhead = 28; | 29 constexpr size_t kTransportOverhead = 28; |
30 | 30 |
31 constexpr uint32_t kMediaSsrc = 83542; | 31 constexpr uint32_t kMediaSsrc = 83542; |
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 this->NetworkReceivedPackets(this->media_loss_mask_, this->fec_loss_mask_); | 1026 this->NetworkReceivedPackets(this->media_loss_mask_, this->fec_loss_mask_); |
1027 | 1027 |
1028 EXPECT_EQ(0, this->fec_.DecodeFec(&this->received_packets_, | 1028 EXPECT_EQ(0, this->fec_.DecodeFec(&this->received_packets_, |
1029 &this->recovered_packets_)); | 1029 &this->recovered_packets_)); |
1030 | 1030 |
1031 // 5 protected packets lost, one FEC packet, cannot get complete recovery. | 1031 // 5 protected packets lost, one FEC packet, cannot get complete recovery. |
1032 EXPECT_FALSE(this->IsRecoveryComplete()); | 1032 EXPECT_FALSE(this->IsRecoveryComplete()); |
1033 } | 1033 } |
1034 | 1034 |
1035 } // namespace webrtc | 1035 } // namespace webrtc |
OLD | NEW |