| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 TEST_F(TestPacketBuffer, FrameSize) { | 138 TEST_F(TestPacketBuffer, FrameSize) { |
| 139 uint16_t seq_num = Rand(); | 139 uint16_t seq_num = Rand(); |
| 140 uint8_t data[] = {1, 2, 3, 4, 5}; | 140 uint8_t data[] = {1, 2, 3, 4, 5}; |
| 141 | 141 |
| 142 InsertPacket(seq_num, kKeyFrame, kFirst, kNotLast, 5, data); | 142 InsertPacket(seq_num, kKeyFrame, kFirst, kNotLast, 5, data); |
| 143 InsertPacket(seq_num + 1, kKeyFrame, kNotFirst, kNotLast, 5, data); | 143 InsertPacket(seq_num + 1, kKeyFrame, kNotFirst, kNotLast, 5, data); |
| 144 InsertPacket(seq_num + 2, kKeyFrame, kNotFirst, kNotLast, 5, data); | 144 InsertPacket(seq_num + 2, kKeyFrame, kNotFirst, kNotLast, 5, data); |
| 145 InsertPacket(seq_num + 3, kKeyFrame, kNotFirst, kLast, 5, data); | 145 InsertPacket(seq_num + 3, kKeyFrame, kNotFirst, kLast, 5, data); |
| 146 | 146 |
| 147 ASSERT_EQ(1UL, frames_from_callback_.size()); | 147 ASSERT_EQ(1UL, frames_from_callback_.size()); |
| 148 EXPECT_EQ(20UL, frames_from_callback_.begin()->second->size); | 148 EXPECT_EQ(20UL, frames_from_callback_.begin()->second->size()); |
| 149 } | 149 } |
| 150 | 150 |
| 151 TEST_F(TestPacketBuffer, ExpandBuffer) { | 151 TEST_F(TestPacketBuffer, ExpandBuffer) { |
| 152 uint16_t seq_num = Rand(); | 152 uint16_t seq_num = Rand(); |
| 153 | 153 |
| 154 for (int i = 0; i < kStartSize + 1; ++i) { | 154 for (int i = 0; i < kStartSize + 1; ++i) { |
| 155 InsertPacket(seq_num + i, kKeyFrame, kFirst, kLast); | 155 InsertPacket(seq_num + i, kKeyFrame, kFirst, kLast); |
| 156 } | 156 } |
| 157 } | 157 } |
| 158 | 158 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 packet.seqNum = Rand(); | 350 packet.seqNum = Rand(); |
| 351 EXPECT_TRUE(packet_buffer_->InsertPacket(packet)); | 351 EXPECT_TRUE(packet_buffer_->InsertPacket(packet)); |
| 352 ASSERT_EQ(1UL, frames_from_callback_.size()); | 352 ASSERT_EQ(1UL, frames_from_callback_.size()); |
| 353 | 353 |
| 354 packet_buffer_->Clear(); | 354 packet_buffer_->Clear(); |
| 355 EXPECT_FALSE(frames_from_callback_.begin()->second->GetBitstream(nullptr)); | 355 EXPECT_FALSE(frames_from_callback_.begin()->second->GetBitstream(nullptr)); |
| 356 } | 356 } |
| 357 | 357 |
| 358 } // namespace video_coding | 358 } // namespace video_coding |
| 359 } // namespace webrtc | 359 } // namespace webrtc |
| OLD | NEW |