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 57 matching lines...) Loading... |
68 | 68 |
69 class RtxLoopBackTransport : public webrtc::Transport { | 69 class RtxLoopBackTransport : public webrtc::Transport { |
70 public: | 70 public: |
71 explicit RtxLoopBackTransport(uint32_t rtx_ssrc) | 71 explicit RtxLoopBackTransport(uint32_t rtx_ssrc) |
72 : count_(0), | 72 : count_(0), |
73 packet_loss_(0), | 73 packet_loss_(0), |
74 consecutive_drop_start_(0), | 74 consecutive_drop_start_(0), |
75 consecutive_drop_end_(0), | 75 consecutive_drop_end_(0), |
76 rtx_ssrc_(rtx_ssrc), | 76 rtx_ssrc_(rtx_ssrc), |
77 count_rtx_ssrc_(0), | 77 count_rtx_ssrc_(0), |
78 rtp_payload_registry_(NULL), | 78 rtp_payload_registry_(nullptr), |
79 rtp_receiver_(NULL), | 79 rtp_receiver_(nullptr), |
80 module_(NULL) {} | 80 module_(nullptr) {} |
81 | 81 |
82 void SetSendModule(RtpRtcp* rtpRtcpModule, | 82 void SetSendModule(RtpRtcp* rtpRtcpModule, |
83 RTPPayloadRegistry* rtp_payload_registry, | 83 RTPPayloadRegistry* rtp_payload_registry, |
84 RtpReceiver* receiver) { | 84 RtpReceiver* receiver) { |
85 module_ = rtpRtcpModule; | 85 module_ = rtpRtcpModule; |
86 rtp_payload_registry_ = rtp_payload_registry; | 86 rtp_payload_registry_ = rtp_payload_registry; |
87 rtp_receiver_ = receiver; | 87 rtp_receiver_ = receiver; |
88 } | 88 } |
89 | 89 |
90 void DropEveryNthPacket(int n) { packet_loss_ = n; } | 90 void DropEveryNthPacket(int n) { packet_loss_ = n; } |
(...skipping 243 matching lines...) Loading... |
334 RunRtxTest(kRtxRetransmitted, 10); | 334 RunRtxTest(kRtxRetransmitted, 10); |
335 EXPECT_EQ(kTestSequenceNumber, *(receiver_.sequence_numbers_.begin())); | 335 EXPECT_EQ(kTestSequenceNumber, *(receiver_.sequence_numbers_.begin())); |
336 EXPECT_EQ(kTestSequenceNumber + kTestNumberOfPackets - 1, | 336 EXPECT_EQ(kTestSequenceNumber + kTestNumberOfPackets - 1, |
337 *(receiver_.sequence_numbers_.rbegin())); | 337 *(receiver_.sequence_numbers_.rbegin())); |
338 EXPECT_EQ(kTestNumberOfPackets, receiver_.sequence_numbers_.size()); | 338 EXPECT_EQ(kTestNumberOfPackets, receiver_.sequence_numbers_.size()); |
339 EXPECT_EQ(kTestNumberOfRtxPackets, transport_.count_rtx_ssrc_); | 339 EXPECT_EQ(kTestNumberOfRtxPackets, transport_.count_rtx_ssrc_); |
340 EXPECT_TRUE(ExpectedPacketsReceived()); | 340 EXPECT_TRUE(ExpectedPacketsReceived()); |
341 } | 341 } |
342 | 342 |
343 } // namespace webrtc | 343 } // namespace webrtc |
OLD | NEW |