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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 } | 454 } |
455 | 455 |
456 TEST_F(RtcpSenderTest, SendRpsi) { | 456 TEST_F(RtcpSenderTest, SendRpsi) { |
457 const uint64_t kPictureId = 0x41; | 457 const uint64_t kPictureId = 0x41; |
458 const int8_t kPayloadType = 100; | 458 const int8_t kPayloadType = 100; |
459 rtcp_sender_->SetRTCPStatus(RtcpMode::kReducedSize); | 459 rtcp_sender_->SetRTCPStatus(RtcpMode::kReducedSize); |
460 RTCPSender::FeedbackState feedback_state = rtp_rtcp_impl_->GetFeedbackState(); | 460 RTCPSender::FeedbackState feedback_state = rtp_rtcp_impl_->GetFeedbackState(); |
461 feedback_state.send_payload_type = kPayloadType; | 461 feedback_state.send_payload_type = kPayloadType; |
462 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRpsi, 0, nullptr, | 462 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state, kRtcpRpsi, 0, nullptr, |
463 false, kPictureId)); | 463 false, kPictureId)); |
| 464 EXPECT_EQ(1, parser()->rpsi()->num_packets()); |
464 EXPECT_EQ(kPayloadType, parser()->rpsi()->PayloadType()); | 465 EXPECT_EQ(kPayloadType, parser()->rpsi()->PayloadType()); |
465 EXPECT_EQ(kPictureId, parser()->rpsi()->PictureId()); | 466 EXPECT_EQ(kPictureId, parser()->rpsi()->PictureId()); |
466 } | 467 } |
467 | 468 |
468 TEST_F(RtcpSenderTest, SendSli) { | 469 TEST_F(RtcpSenderTest, SendSli) { |
469 const uint16_t kFirstMb = 0; | 470 const uint16_t kFirstMb = 0; |
470 const uint16_t kNumberOfMb = 0x1FFF; | 471 const uint16_t kNumberOfMb = 0x1FFF; |
471 const uint8_t kPictureId = 60; | 472 const uint8_t kPictureId = 60; |
472 rtcp_sender_->SetRTCPStatus(RtcpMode::kReducedSize); | 473 rtcp_sender_->SetRTCPStatus(RtcpMode::kReducedSize); |
473 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state(), kRtcpSli, 0, nullptr, | 474 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state(), kRtcpSli, 0, nullptr, |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 rtcp_sender_->SetRemoteSSRC(kRemoteSsrc); | 772 rtcp_sender_->SetRemoteSSRC(kRemoteSsrc); |
772 | 773 |
773 // Set up XR VoIP metric to be included with BYE | 774 // Set up XR VoIP metric to be included with BYE |
774 rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound); | 775 rtcp_sender_->SetRTCPStatus(RtcpMode::kCompound); |
775 RTCPVoIPMetric metric; | 776 RTCPVoIPMetric metric; |
776 EXPECT_EQ(0, rtcp_sender_->SetRTCPVoIPMetrics(&metric)); | 777 EXPECT_EQ(0, rtcp_sender_->SetRTCPVoIPMetrics(&metric)); |
777 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state(), kRtcpBye)); | 778 EXPECT_EQ(0, rtcp_sender_->SendRTCP(feedback_state(), kRtcpBye)); |
778 } | 779 } |
779 | 780 |
780 } // namespace webrtc | 781 } // namespace webrtc |
OLD | NEW |