OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 <iterator> | 12 #include <iterator> |
13 #include <list> | 13 #include <list> |
14 #include <set> | 14 #include <set> |
15 | 15 |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "webrtc/base/scoped_ptr.h" | 17 #include "webrtc/base/scoped_ptr.h" |
18 #include "webrtc/common_types.h" | 18 #include "webrtc/common_types.h" |
19 #include "webrtc/modules/rtp_rtcp/interface/receive_statistics.h" | 19 #include "webrtc/modules/rtp_rtcp/include/receive_statistics.h" |
20 #include "webrtc/modules/rtp_rtcp/interface/rtp_header_parser.h" | 20 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" |
21 #include "webrtc/modules/rtp_rtcp/interface/rtp_payload_registry.h" | 21 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" |
22 #include "webrtc/modules/rtp_rtcp/interface/rtp_receiver.h" | 22 #include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h" |
23 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h" | 23 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" |
24 #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h" | 24 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
25 #include "webrtc/transport.h" | 25 #include "webrtc/transport.h" |
26 | 26 |
27 using namespace webrtc; | 27 using namespace webrtc; |
28 | 28 |
29 const int kVideoNackListSize = 30; | 29 const int kVideoNackListSize = 30; |
30 const uint32_t kTestSsrc = 3456; | 30 const uint32_t kTestSsrc = 3456; |
31 const uint16_t kTestSequenceNumber = 2345; | 31 const uint16_t kTestSequenceNumber = 2345; |
32 const uint32_t kTestNumberOfPackets = 1350; | 32 const uint32_t kTestNumberOfPackets = 1350; |
33 const int kTestNumberOfRtxPackets = 149; | 33 const int kTestNumberOfRtxPackets = 149; |
34 const int kNumFrames = 30; | 34 const int kNumFrames = 30; |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 | 343 |
344 TEST_F(RtpRtcpRtxNackTest, RtxNack) { | 344 TEST_F(RtpRtcpRtxNackTest, RtxNack) { |
345 RunRtxTest(kRtxRetransmitted, 10); | 345 RunRtxTest(kRtxRetransmitted, 10); |
346 EXPECT_EQ(kTestSequenceNumber, *(receiver_.sequence_numbers_.begin())); | 346 EXPECT_EQ(kTestSequenceNumber, *(receiver_.sequence_numbers_.begin())); |
347 EXPECT_EQ(kTestSequenceNumber + kTestNumberOfPackets - 1, | 347 EXPECT_EQ(kTestSequenceNumber + kTestNumberOfPackets - 1, |
348 *(receiver_.sequence_numbers_.rbegin())); | 348 *(receiver_.sequence_numbers_.rbegin())); |
349 EXPECT_EQ(kTestNumberOfPackets, receiver_.sequence_numbers_.size()); | 349 EXPECT_EQ(kTestNumberOfPackets, receiver_.sequence_numbers_.size()); |
350 EXPECT_EQ(kTestNumberOfRtxPackets, transport_.count_rtx_ssrc_); | 350 EXPECT_EQ(kTestNumberOfRtxPackets, transport_.count_rtx_ssrc_); |
351 EXPECT_TRUE(ExpectedPacketsReceived()); | 351 EXPECT_TRUE(ExpectedPacketsReceived()); |
352 } | 352 } |
OLD | NEW |