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

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

Issue 2527903002: Fixed bug in PacketBuffer to correctly detect new complete frames. (Closed)
Patch Set: Feedback fix Created 4 years 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/packet_buffer.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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 TEST_F(TestPacketBuffer, InvalidateFrameByClearing) { 418 TEST_F(TestPacketBuffer, InvalidateFrameByClearing) {
419 const uint16_t seq_num = Rand(); 419 const uint16_t seq_num = Rand();
420 420
421 EXPECT_TRUE(Insert(seq_num, kKeyFrame, kFirst, kLast)); 421 EXPECT_TRUE(Insert(seq_num, kKeyFrame, kFirst, kLast));
422 ASSERT_EQ(1UL, frames_from_callback_.size()); 422 ASSERT_EQ(1UL, frames_from_callback_.size());
423 423
424 packet_buffer_->Clear(); 424 packet_buffer_->Clear();
425 EXPECT_FALSE(frames_from_callback_.begin()->second->GetBitstream(nullptr)); 425 EXPECT_FALSE(frames_from_callback_.begin()->second->GetBitstream(nullptr));
426 } 426 }
427 427
428 TEST_F(TestPacketBuffer, FramesAfterClear) {
429 Insert(9025, kDeltaFrame, kFirst, kLast);
430 Insert(9024, kKeyFrame, kFirst, kLast);
431 packet_buffer_->ClearTo(9025);
432 Insert(9057, kDeltaFrame, kFirst, kLast);
433 Insert(9026, kDeltaFrame, kFirst, kLast);
434
435 CheckFrame(9024);
436 CheckFrame(9025);
437 CheckFrame(9026);
438 CheckFrame(9057);
439 }
440
428 } // namespace video_coding 441 } // namespace video_coding
429 } // namespace webrtc 442 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/packet_buffer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698