Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: modules/rtp_rtcp/source/rtp_format_h264_unittest.cc

Issue 2951033003: [EXPERIMENTAL] Generic stereo codec with index header sending single frames
Patch Set: Rebase and add external codec support. Created 3 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 fragmentation->fragmentationLength[2] = 61 fragmentation->fragmentationLength[2] =
62 kNalHeaderSize + frameSize - payloadOffset; 62 kNalHeaderSize + frameSize - payloadOffset;
63 } 63 }
64 64
65 RtpPacketizer* CreateH264Packetizer(H264PacketizationMode mode, 65 RtpPacketizer* CreateH264Packetizer(H264PacketizationMode mode,
66 size_t max_payload_size, 66 size_t max_payload_size,
67 size_t last_packet_reduction) { 67 size_t last_packet_reduction) {
68 RTPVideoTypeHeader type_header; 68 RTPVideoTypeHeader type_header;
69 type_header.H264.packetization_mode = mode; 69 type_header.H264.packetization_mode = mode;
70 return RtpPacketizer::Create(kRtpVideoH264, max_payload_size, 70 return RtpPacketizer::Create(kRtpVideoH264, max_payload_size,
71 last_packet_reduction, &type_header, 71 last_packet_reduction, &type_header, nullptr,
72 kEmptyFrame); 72 kEmptyFrame);
73 } 73 }
74 74
75 void VerifyFua(size_t fua_index, 75 void VerifyFua(size_t fua_index,
76 const uint8_t* expected_payload, 76 const uint8_t* expected_payload,
77 int offset, 77 int offset,
78 rtc::ArrayView<const uint8_t> packet, 78 rtc::ArrayView<const uint8_t> packet,
79 const std::vector<size_t>& expected_sizes) { 79 const std::vector<size_t>& expected_sizes) {
80 ASSERT_EQ(expected_sizes[fua_index] + kFuAHeaderSize, packet.size()) 80 ASSERT_EQ(expected_sizes[fua_index] + kFuAHeaderSize, packet.size())
81 << "FUA index: " << fua_index; 81 << "FUA index: " << fua_index;
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 EXPECT_EQ(kVideoFrameDelta, payload.frame_type); 937 EXPECT_EQ(kVideoFrameDelta, payload.frame_type);
938 EXPECT_EQ(kH264SingleNalu, h264.packetization_type); 938 EXPECT_EQ(kH264SingleNalu, h264.packetization_type);
939 EXPECT_EQ(kSei, h264.nalu_type); 939 EXPECT_EQ(kSei, h264.nalu_type);
940 ASSERT_EQ(1u, h264.nalus_length); 940 ASSERT_EQ(1u, h264.nalus_length);
941 EXPECT_EQ(static_cast<H264::NaluType>(kSei), h264.nalus[0].type); 941 EXPECT_EQ(static_cast<H264::NaluType>(kSei), h264.nalus[0].type);
942 EXPECT_EQ(-1, h264.nalus[0].sps_id); 942 EXPECT_EQ(-1, h264.nalus[0].sps_id);
943 EXPECT_EQ(-1, h264.nalus[0].pps_id); 943 EXPECT_EQ(-1, h264.nalus[0].pps_id);
944 } 944 }
945 945
946 } // namespace webrtc 946 } // namespace webrtc
OLDNEW
« no previous file with comments | « modules/rtp_rtcp/source/rtp_format.cc ('k') | modules/rtp_rtcp/source/rtp_format_video_stereo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698