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 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1571 | 1571 |
1572 RTPVideoHeader hdr = {0}; | 1572 RTPVideoHeader hdr = {0}; |
1573 hdr.video_timing.is_timing_frame = true; | 1573 hdr.video_timing.is_timing_frame = true; |
1574 hdr.video_timing.encode_start_delta_ms = kEncodeStartDeltaMs; | 1574 hdr.video_timing.encode_start_delta_ms = kEncodeStartDeltaMs; |
1575 hdr.video_timing.encode_finish_delta_ms = kEncodeFinishDeltaMs; | 1575 hdr.video_timing.encode_finish_delta_ms = kEncodeFinishDeltaMs; |
1576 | 1576 |
1577 fake_clock_.AdvanceTimeMilliseconds(kPacketizationTimeMs); | 1577 fake_clock_.AdvanceTimeMilliseconds(kPacketizationTimeMs); |
1578 rtp_sender_video_->SendVideo(kRtpVideoGeneric, kVideoFrameKey, kPayload, | 1578 rtp_sender_video_->SendVideo(kRtpVideoGeneric, kVideoFrameKey, kPayload, |
1579 kTimestamp, kCaptureTimestamp, kFrame, | 1579 kTimestamp, kCaptureTimestamp, kFrame, |
1580 sizeof(kFrame), nullptr, &hdr); | 1580 sizeof(kFrame), nullptr, &hdr); |
1581 VideoTiming timing; | 1581 VideoSendTiming timing; |
1582 EXPECT_TRUE(transport_.last_sent_packet().GetExtension<VideoTimingExtension>( | 1582 EXPECT_TRUE(transport_.last_sent_packet().GetExtension<VideoTimingExtension>( |
1583 &timing)); | 1583 &timing)); |
1584 EXPECT_EQ(kPacketizationTimeMs, timing.packetization_finish_delta_ms); | 1584 EXPECT_EQ(kPacketizationTimeMs, timing.packetization_finish_delta_ms); |
1585 EXPECT_EQ(kEncodeStartDeltaMs, timing.encode_start_delta_ms); | 1585 EXPECT_EQ(kEncodeStartDeltaMs, timing.encode_start_delta_ms); |
1586 EXPECT_EQ(kEncodeFinishDeltaMs, timing.encode_finish_delta_ms); | 1586 EXPECT_EQ(kEncodeFinishDeltaMs, timing.encode_finish_delta_ms); |
1587 } | 1587 } |
1588 | 1588 |
1589 TEST_P(RtpSenderVideoTest, DeltaFrameHasCVOWhenChanged) { | 1589 TEST_P(RtpSenderVideoTest, DeltaFrameHasCVOWhenChanged) { |
1590 uint8_t kFrame[kMaxPacketLength]; | 1590 uint8_t kFrame[kMaxPacketLength]; |
1591 EXPECT_EQ(0, rtp_sender_->RegisterRtpHeaderExtension( | 1591 EXPECT_EQ(0, rtp_sender_->RegisterRtpHeaderExtension( |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1717 INSTANTIATE_TEST_CASE_P(WithAndWithoutOverhead, | 1717 INSTANTIATE_TEST_CASE_P(WithAndWithoutOverhead, |
1718 RtpSenderTestWithoutPacer, | 1718 RtpSenderTestWithoutPacer, |
1719 ::testing::Bool()); | 1719 ::testing::Bool()); |
1720 INSTANTIATE_TEST_CASE_P(WithAndWithoutOverhead, | 1720 INSTANTIATE_TEST_CASE_P(WithAndWithoutOverhead, |
1721 RtpSenderVideoTest, | 1721 RtpSenderVideoTest, |
1722 ::testing::Bool()); | 1722 ::testing::Bool()); |
1723 INSTANTIATE_TEST_CASE_P(WithAndWithoutOverhead, | 1723 INSTANTIATE_TEST_CASE_P(WithAndWithoutOverhead, |
1724 RtpSenderAudioTest, | 1724 RtpSenderAudioTest, |
1725 ::testing::Bool()); | 1725 ::testing::Bool()); |
1726 } // namespace webrtc | 1726 } // namespace webrtc |
OLD | NEW |