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

Side by Side Diff: webrtc/modules/video_coding/main/source/session_info_unittest.cc

Issue 1371043003: Unify FrameType and VideoFrameType. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 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) 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 EXPECT_TRUE(session_.HaveLastPacket()); 168 EXPECT_TRUE(session_.HaveLastPacket());
169 EXPECT_EQ(packet_.seqNum, session_.HighSequenceNumber()); 169 EXPECT_EQ(packet_.seqNum, session_.HighSequenceNumber());
170 EXPECT_EQ(0xFFFE, session_.LowSequenceNumber()); 170 EXPECT_EQ(0xFFFE, session_.LowSequenceNumber());
171 171
172 // Insert empty packet which will be the new high sequence number. 172 // Insert empty packet which will be the new high sequence number.
173 // To make things more difficult we will make sure to have a wrap here. 173 // To make things more difficult we will make sure to have a wrap here.
174 packet_.isFirstPacket = false; 174 packet_.isFirstPacket = false;
175 packet_.markerBit = true; 175 packet_.markerBit = true;
176 packet_.seqNum = 2; 176 packet_.seqNum = 2;
177 packet_.sizeBytes = 0; 177 packet_.sizeBytes = 0;
178 packet_.frameType = kFrameEmpty; 178 packet_.frameType = kEmptyFrame;
179 EXPECT_EQ(0, 179 EXPECT_EQ(0,
180 session_.InsertPacket(packet_, 180 session_.InsertPacket(packet_,
181 frame_buffer_, 181 frame_buffer_,
182 kNoErrors, 182 kNoErrors,
183 frame_data)); 183 frame_data));
184 EXPECT_EQ(packet_.seqNum, session_.HighSequenceNumber()); 184 EXPECT_EQ(packet_.seqNum, session_.HighSequenceNumber());
185 } 185 }
186 186
187 TEST_F(TestSessionInfo, NormalOperation) { 187 TEST_F(TestSessionInfo, NormalOperation) {
188 packet_.seqNum = 0xFFFF; 188 packet_.seqNum = 0xFFFF;
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 // This partition is aggregated in partition 0 881 // This partition is aggregated in partition 0
882 SCOPED_TRACE("Calling VerifyPartition"); 882 SCOPED_TRACE("Calling VerifyPartition");
883 EXPECT_TRUE(VerifyPartition(1, 0, 0)); 883 EXPECT_TRUE(VerifyPartition(1, 0, 0));
884 SCOPED_TRACE("Calling VerifyPartition"); 884 SCOPED_TRACE("Calling VerifyPartition");
885 EXPECT_TRUE(VerifyPartition(2, 1, 2)); 885 EXPECT_TRUE(VerifyPartition(2, 1, 2));
886 } 886 }
887 887
888 TEST_F(TestNalUnits, OnlyReceivedEmptyPacket) { 888 TEST_F(TestNalUnits, OnlyReceivedEmptyPacket) {
889 packet_.isFirstPacket = false; 889 packet_.isFirstPacket = false;
890 packet_.completeNALU = kNaluComplete; 890 packet_.completeNALU = kNaluComplete;
891 packet_.frameType = kFrameEmpty; 891 packet_.frameType = kEmptyFrame;
892 packet_.sizeBytes = 0; 892 packet_.sizeBytes = 0;
893 packet_.seqNum = 0; 893 packet_.seqNum = 0;
894 packet_.markerBit = false; 894 packet_.markerBit = false;
895 EXPECT_EQ(0, session_.InsertPacket(packet_, 895 EXPECT_EQ(0, session_.InsertPacket(packet_,
896 frame_buffer_, 896 frame_buffer_,
897 kNoErrors, 897 kNoErrors,
898 frame_data)); 898 frame_data));
899 899
900 EXPECT_EQ(0U, session_.MakeDecodable()); 900 EXPECT_EQ(0U, session_.MakeDecodable());
901 EXPECT_EQ(0U, session_.SessionLength()); 901 EXPECT_EQ(0U, session_.SessionLength());
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 FillPacket(1); 1055 FillPacket(1);
1056 EXPECT_EQ(packet_buffer_size(), 1056 EXPECT_EQ(packet_buffer_size(),
1057 static_cast<size_t>(session_.InsertPacket(packet_, frame_buffer_, 1057 static_cast<size_t>(session_.InsertPacket(packet_, frame_buffer_,
1058 kNoErrors, frame_data))); 1058 kNoErrors, frame_data)));
1059 1059
1060 EXPECT_EQ(2 * packet_buffer_size(), session_.MakeDecodable()); 1060 EXPECT_EQ(2 * packet_buffer_size(), session_.MakeDecodable());
1061 EXPECT_EQ(0U, session_.SessionLength()); 1061 EXPECT_EQ(0U, session_.SessionLength());
1062 } 1062 }
1063 1063
1064 } // namespace webrtc 1064 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698