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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_format_vp9_unittest.cc

Issue 1211353002: Integration of VP9 packetization. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: allow 1-3 temporal layers Created 5 years, 4 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) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // +-+-+-+-+-+-+-+-+ 121 // +-+-+-+-+-+-+-+-+
122 // V: | SS | 122 // V: | SS |
123 // | .. | 123 // | .. |
124 // +-+-+-+-+-+-+-+-+ 124 // +-+-+-+-+-+-+-+-+
125 125
126 class RtpPacketizerVp9Test : public ::testing::Test { 126 class RtpPacketizerVp9Test : public ::testing::Test {
127 protected: 127 protected:
128 RtpPacketizerVp9Test() {} 128 RtpPacketizerVp9Test() {}
129 virtual void SetUp() { 129 virtual void SetUp() {
130 expected_.InitRTPVideoHeaderVP9(); 130 expected_.InitRTPVideoHeaderVP9();
131 // Always input one layer frame at a time.
132 expected_.beginning_of_frame = true;
133 expected_.end_of_frame = true;
134 } 131 }
135 132
136 rtc::scoped_ptr<uint8_t[]> packet_; 133 rtc::scoped_ptr<uint8_t[]> packet_;
137 rtc::scoped_ptr<uint8_t[]> payload_; 134 rtc::scoped_ptr<uint8_t[]> payload_;
138 size_t payload_size_; 135 size_t payload_size_;
139 size_t payload_pos_; 136 size_t payload_pos_;
140 RTPVideoHeaderVP9 expected_; 137 RTPVideoHeaderVP9 expected_;
141 rtc::scoped_ptr<RtpPacketizerVp9> packetizer_; 138 rtc::scoped_ptr<RtpPacketizerVp9> packetizer_;
142 139
143 void Init(size_t payload_size, size_t packet_size) { 140 void Init(size_t payload_size, size_t packet_size) {
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 } 652 }
656 653
657 TEST_F(RtpDepacketizerVp9Test, ParseFailsForTooShortBufferToFitPayload) { 654 TEST_F(RtpDepacketizerVp9Test, ParseFailsForTooShortBufferToFitPayload) {
658 const uint8_t kHeaderLength = 1; 655 const uint8_t kHeaderLength = 1;
659 uint8_t packet[kHeaderLength] = {0}; 656 uint8_t packet[kHeaderLength] = {0};
660 RtpDepacketizer::ParsedPayload parsed; 657 RtpDepacketizer::ParsedPayload parsed;
661 EXPECT_FALSE(depacketizer_->Parse(&parsed, packet, sizeof(packet))); 658 EXPECT_FALSE(depacketizer_->Parse(&parsed, packet, sizeof(packet)));
662 } 659 }
663 660
664 } // namespace webrtc 661 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698