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 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 configuration.audio = false; | 236 configuration.audio = false; |
237 configuration.clock = &clock_; | 237 configuration.clock = &clock_; |
238 configuration.outgoing_transport = &test_transport_; | 238 configuration.outgoing_transport = &test_transport_; |
239 configuration.retransmission_rate_limiter = &retransmission_rate_limiter_; | 239 configuration.retransmission_rate_limiter = &retransmission_rate_limiter_; |
240 | 240 |
241 rtp_rtcp_impl_.reset(new ModuleRtpRtcpImpl(configuration)); | 241 rtp_rtcp_impl_.reset(new ModuleRtpRtcpImpl(configuration)); |
242 rtcp_sender_.reset(new RTCPSender(false, &clock_, receive_statistics_.get(), | 242 rtcp_sender_.reset(new RTCPSender(false, &clock_, receive_statistics_.get(), |
243 nullptr, nullptr, &test_transport_)); | 243 nullptr, nullptr, &test_transport_)); |
244 rtcp_sender_->SetSSRC(kSenderSsrc); | 244 rtcp_sender_->SetSSRC(kSenderSsrc); |
245 rtcp_sender_->SetRemoteSSRC(kRemoteSsrc); | 245 rtcp_sender_->SetRemoteSSRC(kRemoteSsrc); |
246 rtcp_sender_->SetStartTimestamp(kStartRtpTimestamp); | 246 rtcp_sender_->SetTimestampOffset(kStartRtpTimestamp); |
247 rtcp_sender_->SetLastRtpTime(kRtpTimestamp, clock_.TimeInMilliseconds()); | 247 rtcp_sender_->SetLastRtpTime(kRtpTimestamp, clock_.TimeInMilliseconds()); |
248 } | 248 } |
249 | 249 |
250 void InsertIncomingPacket(uint32_t remote_ssrc, uint16_t seq_num) { | 250 void InsertIncomingPacket(uint32_t remote_ssrc, uint16_t seq_num) { |
251 RTPHeader header; | 251 RTPHeader header; |
252 header.ssrc = remote_ssrc; | 252 header.ssrc = remote_ssrc; |
253 header.sequenceNumber = seq_num; | 253 header.sequenceNumber = seq_num; |
254 header.timestamp = 12345; | 254 header.timestamp = 12345; |
255 header.headerLength = 12; | 255 header.headerLength = 12; |
256 size_t kPacketLength = 100; | 256 size_t kPacketLength = 100; |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 } | 806 } |
807 | 807 |
808 return true; | 808 return true; |
809 })); | 809 })); |
810 | 810 |
811 // Re-configure rtcp_sender_ with mock_transport_ | 811 // Re-configure rtcp_sender_ with mock_transport_ |
812 rtcp_sender_.reset(new RTCPSender(false, &clock_, receive_statistics_.get(), | 812 rtcp_sender_.reset(new RTCPSender(false, &clock_, receive_statistics_.get(), |
813 nullptr, nullptr, &mock_transport)); | 813 nullptr, nullptr, &mock_transport)); |
814 rtcp_sender_->SetSSRC(kSenderSsrc); | 814 rtcp_sender_->SetSSRC(kSenderSsrc); |
815 rtcp_sender_->SetRemoteSSRC(kRemoteSsrc); | 815 rtcp_sender_->SetRemoteSSRC(kRemoteSsrc); |
816 rtcp_sender_->SetStartTimestamp(kStartRtpTimestamp); | 816 rtcp_sender_->SetTimestampOffset(kStartRtpTimestamp); |
817 rtcp_sender_->SetLastRtpTime(kRtpTimestamp, clock_.TimeInMilliseconds()); | 817 rtcp_sender_->SetLastRtpTime(kRtpTimestamp, clock_.TimeInMilliseconds()); |
818 | 818 |
819 // Set up XR VoIP metric to be included with BYE | 819 // Set up XR VoIP metric to be included with BYE |
820 rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound); | 820 rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound); |
821 RTCPVoIPMetric metric; | 821 RTCPVoIPMetric metric; |
822 EXPECT_EQ(0, rtcp_sender_->SetRTCPVoIPMetrics(&metric)); | 822 EXPECT_EQ(0, rtcp_sender_->SetRTCPVoIPMetrics(&metric)); |
823 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state(), kRtcpBye)); | 823 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state(), kRtcpBye)); |
824 } | 824 } |
825 | 825 |
826 } // namespace webrtc | 826 } // namespace webrtc |
OLD | NEW |