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

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

Issue 2868723003: Break backwards traversal loop if we have looped around all packet in the PacketBuffer for H264 fra… (Closed)
Patch Set: Added comment. Created 3 years, 7 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/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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 470
471 TEST_F(TestPacketBuffer, ContinuousSeqNumDoubleMarkerBit) { 471 TEST_F(TestPacketBuffer, ContinuousSeqNumDoubleMarkerBit) {
472 Insert(2, kKeyFrame, kNotFirst, kNotLast); 472 Insert(2, kKeyFrame, kNotFirst, kNotLast);
473 Insert(1, kKeyFrame, kFirst, kLast); 473 Insert(1, kKeyFrame, kFirst, kLast);
474 frames_from_callback_.clear(); 474 frames_from_callback_.clear();
475 Insert(3, kKeyFrame, kNotFirst, kLast); 475 Insert(3, kKeyFrame, kNotFirst, kLast);
476 476
477 EXPECT_EQ(0UL, frames_from_callback_.size()); 477 EXPECT_EQ(0UL, frames_from_callback_.size());
478 } 478 }
479 479
480 TEST_F(TestPacketBuffer, OneH264FrameFillBuffer) {
481 VCMPacket packet;
482 packet.seqNum = 0;
483 packet.codec = kVideoCodecH264;
484 packet.dataPtr = nullptr;
485 packet.sizeBytes = 0;
486 packet.is_first_packet_in_frame = true;
487 packet.markerBit = false;
488 packet_buffer_->InsertPacket(&packet);
489
490 packet.is_first_packet_in_frame = false;
491 for (int i = 1; i < kStartSize - 1; ++i) {
492 packet.seqNum = i;
493 packet_buffer_->InsertPacket(&packet);
494 }
495
496 packet.seqNum = kStartSize - 1;
497 packet.markerBit = true;
498 packet_buffer_->InsertPacket(&packet);
499
500 EXPECT_EQ(1UL, frames_from_callback_.size());
501 CheckFrame(0);
502 }
503
480 } // namespace video_coding 504 } // namespace video_coding
481 } // namespace webrtc 505 } // 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