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 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 if (!sequence_numbers_.empty()) | 46 if (!sequence_numbers_.empty()) |
47 EXPECT_EQ(kTestSsrc, rtp_header->header.ssrc); | 47 EXPECT_EQ(kTestSsrc, rtp_header->header.ssrc); |
48 sequence_numbers_.push_back(rtp_header->header.sequenceNumber); | 48 sequence_numbers_.push_back(rtp_header->header.sequenceNumber); |
49 return 0; | 49 return 0; |
50 } | 50 } |
51 std::list<uint16_t> sequence_numbers_; | 51 std::list<uint16_t> sequence_numbers_; |
52 }; | 52 }; |
53 | 53 |
54 class TestRtpFeedback : public NullRtpFeedback { | 54 class TestRtpFeedback : public NullRtpFeedback { |
55 public: | 55 public: |
56 TestRtpFeedback(RtpRtcp* rtp_rtcp) : rtp_rtcp_(rtp_rtcp) {} | 56 explicit TestRtpFeedback(RtpRtcp* rtp_rtcp) : rtp_rtcp_(rtp_rtcp) {} |
57 virtual ~TestRtpFeedback() {} | 57 virtual ~TestRtpFeedback() {} |
58 | 58 |
59 void OnIncomingSSRCChanged(const uint32_t ssrc) override { | 59 void OnIncomingSSRCChanged(const uint32_t ssrc) override { |
60 rtp_rtcp_->SetRemoteSSRC(ssrc); | 60 rtp_rtcp_->SetRemoteSSRC(ssrc); |
61 } | 61 } |
62 | 62 |
63 private: | 63 private: |
64 RtpRtcp* rtp_rtcp_; | 64 RtpRtcp* rtp_rtcp_; |
65 }; | 65 }; |
66 | 66 |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 RunRtxTest(kRtxRetransmitted, 10); | 333 RunRtxTest(kRtxRetransmitted, 10); |
334 EXPECT_EQ(kTestSequenceNumber, *(receiver_.sequence_numbers_.begin())); | 334 EXPECT_EQ(kTestSequenceNumber, *(receiver_.sequence_numbers_.begin())); |
335 EXPECT_EQ(kTestSequenceNumber + kTestNumberOfPackets - 1, | 335 EXPECT_EQ(kTestSequenceNumber + kTestNumberOfPackets - 1, |
336 *(receiver_.sequence_numbers_.rbegin())); | 336 *(receiver_.sequence_numbers_.rbegin())); |
337 EXPECT_EQ(kTestNumberOfPackets, receiver_.sequence_numbers_.size()); | 337 EXPECT_EQ(kTestNumberOfPackets, receiver_.sequence_numbers_.size()); |
338 EXPECT_EQ(kTestNumberOfRtxPackets, transport_.count_rtx_ssrc_); | 338 EXPECT_EQ(kTestNumberOfRtxPackets, transport_.count_rtx_ssrc_); |
339 EXPECT_TRUE(ExpectedPacketsReceived()); | 339 EXPECT_TRUE(ExpectedPacketsReceived()); |
340 } | 340 } |
341 | 341 |
342 } // namespace webrtc | 342 } // namespace webrtc |
OLD | NEW |