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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 TEST_P(RtpSenderTestWithoutPacer, WritesTimestampToTimingExtension) { | 466 TEST_P(RtpSenderTestWithoutPacer, WritesTimestampToTimingExtension) { |
467 rtp_sender_->SetStorePacketsStatus(true, 10); | 467 rtp_sender_->SetStorePacketsStatus(true, 10); |
468 EXPECT_EQ(0, rtp_sender_->RegisterRtpHeaderExtension( | 468 EXPECT_EQ(0, rtp_sender_->RegisterRtpHeaderExtension( |
469 kRtpExtensionVideoTiming, kVideoTimingExtensionId)); | 469 kRtpExtensionVideoTiming, kVideoTimingExtensionId)); |
470 int64_t capture_time_ms = fake_clock_.TimeInMilliseconds(); | 470 int64_t capture_time_ms = fake_clock_.TimeInMilliseconds(); |
471 auto packet = rtp_sender_->AllocatePacket(); | 471 auto packet = rtp_sender_->AllocatePacket(); |
472 packet->SetPayloadType(kPayload); | 472 packet->SetPayloadType(kPayload); |
473 packet->SetMarker(true); | 473 packet->SetMarker(true); |
474 packet->SetTimestamp(kTimestamp); | 474 packet->SetTimestamp(kTimestamp); |
475 packet->set_capture_time_ms(capture_time_ms); | 475 packet->set_capture_time_ms(capture_time_ms); |
476 const VideoTiming kVideoTiming = {0u, 0u, 0u, 0u, 0u, 0u, true}; | 476 const VideoSendTiming kVideoTiming = {0u, 0u, 0u, 0u, 0u, 0u, true}; |
477 packet->SetExtension<VideoTimingExtension>(kVideoTiming); | 477 packet->SetExtension<VideoTimingExtension>(kVideoTiming); |
478 EXPECT_TRUE(rtp_sender_->AssignSequenceNumber(packet.get())); | 478 EXPECT_TRUE(rtp_sender_->AssignSequenceNumber(packet.get())); |
479 size_t packet_size = packet->size(); | 479 size_t packet_size = packet->size(); |
480 webrtc::RTPHeader rtp_header; | 480 webrtc::RTPHeader rtp_header; |
481 | 481 |
482 packet->GetHeader(&rtp_header); | 482 packet->GetHeader(&rtp_header); |
483 | 483 |
484 const int kStoredTimeInMs = 100; | 484 const int kStoredTimeInMs = 100; |
485 fake_clock_.AdvanceTimeMilliseconds(kStoredTimeInMs); | 485 fake_clock_.AdvanceTimeMilliseconds(kStoredTimeInMs); |
486 | 486 |
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1566 | 1566 |
1567 RTPVideoHeader hdr = {0}; | 1567 RTPVideoHeader hdr = {0}; |
1568 hdr.video_timing.is_timing_frame = true; | 1568 hdr.video_timing.is_timing_frame = true; |
1569 hdr.video_timing.encode_start_delta_ms = kEncodeStartDeltaMs; | 1569 hdr.video_timing.encode_start_delta_ms = kEncodeStartDeltaMs; |
1570 hdr.video_timing.encode_finish_delta_ms = kEncodeFinishDeltaMs; | 1570 hdr.video_timing.encode_finish_delta_ms = kEncodeFinishDeltaMs; |
1571 | 1571 |
1572 fake_clock_.AdvanceTimeMilliseconds(kPacketizationTimeMs); | 1572 fake_clock_.AdvanceTimeMilliseconds(kPacketizationTimeMs); |
1573 rtp_sender_video_->SendVideo(kRtpVideoGeneric, kVideoFrameKey, kPayload, | 1573 rtp_sender_video_->SendVideo(kRtpVideoGeneric, kVideoFrameKey, kPayload, |
1574 kTimestamp, kCaptureTimestamp, kFrame, | 1574 kTimestamp, kCaptureTimestamp, kFrame, |
1575 sizeof(kFrame), nullptr, &hdr); | 1575 sizeof(kFrame), nullptr, &hdr); |
1576 VideoTiming timing; | 1576 VideoSendTiming timing; |
1577 EXPECT_TRUE(transport_.last_sent_packet().GetExtension<VideoTimingExtension>( | 1577 EXPECT_TRUE(transport_.last_sent_packet().GetExtension<VideoTimingExtension>( |
1578 &timing)); | 1578 &timing)); |
1579 EXPECT_EQ(kPacketizationTimeMs, timing.packetization_finish_delta_ms); | 1579 EXPECT_EQ(kPacketizationTimeMs, timing.packetization_finish_delta_ms); |
1580 EXPECT_EQ(kEncodeStartDeltaMs, timing.encode_start_delta_ms); | 1580 EXPECT_EQ(kEncodeStartDeltaMs, timing.encode_start_delta_ms); |
1581 EXPECT_EQ(kEncodeFinishDeltaMs, timing.encode_finish_delta_ms); | 1581 EXPECT_EQ(kEncodeFinishDeltaMs, timing.encode_finish_delta_ms); |
1582 } | 1582 } |
1583 | 1583 |
1584 TEST_P(RtpSenderVideoTest, DeltaFrameHasCVOWhenChanged) { | 1584 TEST_P(RtpSenderVideoTest, DeltaFrameHasCVOWhenChanged) { |
1585 uint8_t kFrame[kMaxPacketLength]; | 1585 uint8_t kFrame[kMaxPacketLength]; |
1586 EXPECT_EQ(0, rtp_sender_->RegisterRtpHeaderExtension( | 1586 EXPECT_EQ(0, rtp_sender_->RegisterRtpHeaderExtension( |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1712 INSTANTIATE_TEST_CASE_P(WithAndWithoutOverhead, | 1712 INSTANTIATE_TEST_CASE_P(WithAndWithoutOverhead, |
1713 RtpSenderTestWithoutPacer, | 1713 RtpSenderTestWithoutPacer, |
1714 ::testing::Bool()); | 1714 ::testing::Bool()); |
1715 INSTANTIATE_TEST_CASE_P(WithAndWithoutOverhead, | 1715 INSTANTIATE_TEST_CASE_P(WithAndWithoutOverhead, |
1716 RtpSenderVideoTest, | 1716 RtpSenderVideoTest, |
1717 ::testing::Bool()); | 1717 ::testing::Bool()); |
1718 INSTANTIATE_TEST_CASE_P(WithAndWithoutOverhead, | 1718 INSTANTIATE_TEST_CASE_P(WithAndWithoutOverhead, |
1719 RtpSenderAudioTest, | 1719 RtpSenderAudioTest, |
1720 ::testing::Bool()); | 1720 ::testing::Bool()); |
1721 } // namespace webrtc | 1721 } // namespace webrtc |
OLD | NEW |