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

Side by Side Diff: webrtc/modules/video_coding/frame_buffer2_unittest.cc

Issue 2830723002: Check if the order of frames becomes ambiguous by inserting a new frame, and if so, clear the Frame… (Closed)
Patch Set: Additional saftey check. Created 3 years, 8 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
« no previous file with comments | « webrtc/modules/video_coding/frame_buffer2.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 frame->num_references = 0; 490 frame->num_references = 0;
491 frame->inter_layer_predicted = false; 491 frame->inter_layer_predicted = false;
492 492
493 EXPECT_EQ(buffer_.InsertFrame(std::move(frame)), pid); 493 EXPECT_EQ(buffer_.InsertFrame(std::move(frame)), pid);
494 } 494 }
495 495
496 ExtractFrame(); 496 ExtractFrame();
497 CheckFrame(0, pid, 0); 497 CheckFrame(0, pid, 0);
498 } 498 }
499 499
500 TEST_F(TestFrameBuffer2, ForwardJumps) {
501 EXPECT_EQ(5453, InsertFrame(5453, 0, 1, false));
502 ExtractFrame();
503 EXPECT_EQ(5454, InsertFrame(5454, 0, 1, false, 5453));
504 ExtractFrame();
505 EXPECT_EQ(15670, InsertFrame(15670, 0, 1, false));
506 ExtractFrame();
507 EXPECT_EQ(29804, InsertFrame(29804, 0, 1, false));
508 ExtractFrame();
509 EXPECT_EQ(29805, InsertFrame(29805, 0, 1, false, 29804));
510 ExtractFrame();
511 EXPECT_EQ(29806, InsertFrame(29806, 0, 1, false, 29805));
512 ExtractFrame();
513 EXPECT_EQ(33819, InsertFrame(33819, 0, 1, false));
514 ExtractFrame();
515 EXPECT_EQ(41248, InsertFrame(41248, 0, 1, false));
516 ExtractFrame();
517 }
518
500 } // namespace video_coding 519 } // namespace video_coding
501 } // namespace webrtc 520 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/frame_buffer2.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698