OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 } | 540 } |
541 | 541 |
542 class RtpDepacketizerH264Test : public ::testing::Test { | 542 class RtpDepacketizerH264Test : public ::testing::Test { |
543 protected: | 543 protected: |
544 RtpDepacketizerH264Test() | 544 RtpDepacketizerH264Test() |
545 : depacketizer_(RtpDepacketizer::Create(kRtpVideoH264)) {} | 545 : depacketizer_(RtpDepacketizer::Create(kRtpVideoH264)) {} |
546 | 546 |
547 void ExpectPacket(RtpDepacketizer::ParsedPayload* parsed_payload, | 547 void ExpectPacket(RtpDepacketizer::ParsedPayload* parsed_payload, |
548 const uint8_t* data, | 548 const uint8_t* data, |
549 size_t length) { | 549 size_t length) { |
550 ASSERT_TRUE(parsed_payload != NULL); | 550 ASSERT_TRUE(parsed_payload != nullptr); |
551 EXPECT_THAT(std::vector<uint8_t>( | 551 EXPECT_THAT(std::vector<uint8_t>( |
552 parsed_payload->payload, | 552 parsed_payload->payload, |
553 parsed_payload->payload + parsed_payload->payload_length), | 553 parsed_payload->payload + parsed_payload->payload_length), |
554 ::testing::ElementsAreArray(data, length)); | 554 ::testing::ElementsAreArray(data, length)); |
555 } | 555 } |
556 | 556 |
557 std::unique_ptr<RtpDepacketizer> depacketizer_; | 557 std::unique_ptr<RtpDepacketizer> depacketizer_; |
558 }; | 558 }; |
559 | 559 |
560 TEST_F(RtpDepacketizerH264Test, TestSingleNalu) { | 560 TEST_F(RtpDepacketizerH264Test, TestSingleNalu) { |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 const RTPVideoHeaderH264& h264 = payload.type.Video.codecHeader.H264; | 889 const RTPVideoHeaderH264& h264 = payload.type.Video.codecHeader.H264; |
890 EXPECT_EQ(kH264SingleNalu, h264.packetization_type); | 890 EXPECT_EQ(kH264SingleNalu, h264.packetization_type); |
891 EXPECT_EQ(kSei, h264.nalu_type); | 891 EXPECT_EQ(kSei, h264.nalu_type); |
892 ASSERT_EQ(1u, h264.nalus_length); | 892 ASSERT_EQ(1u, h264.nalus_length); |
893 EXPECT_EQ(static_cast<H264::NaluType>(kSei), h264.nalus[0].type); | 893 EXPECT_EQ(static_cast<H264::NaluType>(kSei), h264.nalus[0].type); |
894 EXPECT_EQ(-1, h264.nalus[0].sps_id); | 894 EXPECT_EQ(-1, h264.nalus[0].sps_id); |
895 EXPECT_EQ(-1, h264.nalus[0].pps_id); | 895 EXPECT_EQ(-1, h264.nalus[0].pps_id); |
896 } | 896 } |
897 | 897 |
898 } // namespace webrtc | 898 } // namespace webrtc |
OLD | NEW |