OLD | NEW |
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 Loading... |
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 |
OLD | NEW |