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 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 | 944 |
945 // TODO(ilnik): because of webrtc:7859. Once FEC moved below pacer, this test | 945 // TODO(ilnik): because of webrtc:7859. Once FEC moved below pacer, this test |
946 // should be removed. | 946 // should be removed. |
947 TEST_P(RtpSenderTest, NoFlexfecForTimingFrames) { | 947 TEST_P(RtpSenderTest, NoFlexfecForTimingFrames) { |
948 constexpr int kMediaPayloadType = 127; | 948 constexpr int kMediaPayloadType = 127; |
949 constexpr int kFlexfecPayloadType = 118; | 949 constexpr int kFlexfecPayloadType = 118; |
950 constexpr uint32_t kMediaSsrc = 1234; | 950 constexpr uint32_t kMediaSsrc = 1234; |
951 constexpr uint32_t kFlexfecSsrc = 5678; | 951 constexpr uint32_t kFlexfecSsrc = 5678; |
952 const std::vector<RtpExtension> kNoRtpExtensions; | 952 const std::vector<RtpExtension> kNoRtpExtensions; |
953 const std::vector<RtpExtensionSize> kNoRtpExtensionSizes; | 953 const std::vector<RtpExtensionSize> kNoRtpExtensionSizes; |
| 954 |
954 FlexfecSender flexfec_sender(kFlexfecPayloadType, kFlexfecSsrc, kMediaSsrc, | 955 FlexfecSender flexfec_sender(kFlexfecPayloadType, kFlexfecSsrc, kMediaSsrc, |
955 kNoRtpExtensions, kNoRtpExtensionSizes, | 956 kNoRtpExtensions, kNoRtpExtensionSizes, |
956 nullptr /* rtp_state */, &fake_clock_); | 957 nullptr /* rtp_state */, &fake_clock_); |
957 | 958 |
958 // Reset |rtp_sender_| to use FlexFEC. | 959 // Reset |rtp_sender_| to use FlexFEC. |
959 rtp_sender_.reset(new RTPSender( | 960 rtp_sender_.reset(new RTPSender( |
960 false, &fake_clock_, &transport_, &mock_paced_sender_, &flexfec_sender, | 961 false, &fake_clock_, &transport_, &mock_paced_sender_, &flexfec_sender, |
961 &seq_num_allocator_, nullptr, nullptr, nullptr, nullptr, | 962 &seq_num_allocator_, nullptr, nullptr, nullptr, nullptr, |
962 &mock_rtc_event_log_, &send_packet_observer_, | 963 &mock_rtc_event_log_, &send_packet_observer_, |
963 &retransmission_rate_limiter_, nullptr)); | 964 &retransmission_rate_limiter_, nullptr)); |
964 rtp_sender_->SetSSRC(kMediaSsrc); | 965 rtp_sender_->SetSSRC(kMediaSsrc); |
965 rtp_sender_->SetSequenceNumber(kSeqNum); | 966 rtp_sender_->SetSequenceNumber(kSeqNum); |
966 rtp_sender_->SetSendPayloadType(kMediaPayloadType); | 967 rtp_sender_->SetSendPayloadType(kMediaPayloadType); |
967 rtp_sender_->SetStorePacketsStatus(true, 10); | 968 rtp_sender_->SetStorePacketsStatus(true, 10); |
968 | 969 |
| 970 // Need extension to be registered for timing frames to be sent. |
| 971 ASSERT_EQ(0, rtp_sender_->RegisterRtpHeaderExtension( |
| 972 kRtpExtensionVideoTiming, kVideoTimingExtensionId)); |
| 973 |
969 // Parameters selected to generate a single FEC packet per media packet. | 974 // Parameters selected to generate a single FEC packet per media packet. |
970 FecProtectionParams params; | 975 FecProtectionParams params; |
971 params.fec_rate = 15; | 976 params.fec_rate = 15; |
972 params.max_fec_frames = 1; | 977 params.max_fec_frames = 1; |
973 params.fec_mask_type = kFecMaskRandom; | 978 params.fec_mask_type = kFecMaskRandom; |
974 rtp_sender_->SetFecParameters(params, params); | 979 rtp_sender_->SetFecParameters(params, params); |
975 | 980 |
976 EXPECT_CALL(mock_paced_sender_, | 981 EXPECT_CALL(mock_paced_sender_, |
977 InsertPacket(RtpPacketSender::kLowPriority, kMediaSsrc, kSeqNum, | 982 InsertPacket(RtpPacketSender::kLowPriority, kMediaSsrc, kSeqNum, |
978 _, _, false)); | 983 _, _, false)); |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1712 INSTANTIATE_TEST_CASE_P(WithAndWithoutOverhead, | 1717 INSTANTIATE_TEST_CASE_P(WithAndWithoutOverhead, |
1713 RtpSenderTestWithoutPacer, | 1718 RtpSenderTestWithoutPacer, |
1714 ::testing::Bool()); | 1719 ::testing::Bool()); |
1715 INSTANTIATE_TEST_CASE_P(WithAndWithoutOverhead, | 1720 INSTANTIATE_TEST_CASE_P(WithAndWithoutOverhead, |
1716 RtpSenderVideoTest, | 1721 RtpSenderVideoTest, |
1717 ::testing::Bool()); | 1722 ::testing::Bool()); |
1718 INSTANTIATE_TEST_CASE_P(WithAndWithoutOverhead, | 1723 INSTANTIATE_TEST_CASE_P(WithAndWithoutOverhead, |
1719 RtpSenderAudioTest, | 1724 RtpSenderAudioTest, |
1720 ::testing::Bool()); | 1725 ::testing::Bool()); |
1721 } // namespace webrtc | 1726 } // namespace webrtc |
OLD | NEW |