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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
292 clock_.AdvanceTimeMilliseconds(kFps10); | 292 clock_.AdvanceTimeMilliseconds(kFps10); |
293 CheckFrame(i, pid + i, 0); | 293 CheckFrame(i, pid + i, 0); |
294 } | 294 } |
295 } | 295 } |
296 | 296 |
297 TEST_F(TestFrameBuffer2, DropTemporalLayerSlowDecoder) { | 297 TEST_F(TestFrameBuffer2, DropTemporalLayerSlowDecoder) { |
298 uint16_t pid = Rand(); | 298 uint16_t pid = Rand(); |
299 uint32_t ts = Rand(); | 299 uint32_t ts = Rand(); |
300 | 300 |
301 InsertFrame(pid, 0, ts, false); | 301 InsertFrame(pid, 0, ts, false); |
302 InsertFrame(pid + 1, 0, ts + kFps20, false); | 302 InsertFrame(pid + 1, 0, ts + kFps20, false, pid); |
philipel
2016/11/08 09:27:13
Just an error I found as I was working on the new
| |
303 for (int i = 2; i < 10; i += 2) { | 303 for (int i = 2; i < 10; i += 2) { |
304 uint32_t ts_tl0 = ts + i / 2 * kFps10; | 304 uint32_t ts_tl0 = ts + i / 2 * kFps10; |
305 InsertFrame(pid + i, 0, ts_tl0, false, pid + i - 2); | 305 InsertFrame(pid + i, 0, ts_tl0, false, pid + i - 2); |
306 InsertFrame(pid + i + 1, 0, ts_tl0 + kFps20, false, pid + i, pid + i - 1); | 306 InsertFrame(pid + i + 1, 0, ts_tl0 + kFps20, false, pid + i, pid + i - 1); |
307 } | 307 } |
308 | 308 |
309 for (int i = 0; i < 10; ++i) { | 309 for (int i = 0; i < 10; ++i) { |
310 ExtractFrame(); | 310 ExtractFrame(); |
311 clock_.AdvanceTimeMilliseconds(60); | 311 clock_.AdvanceTimeMilliseconds(60); |
312 } | 312 } |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
414 EXPECT_EQ(pid, InsertFrame(pid + 1, 1, ts, true, pid)); | 414 EXPECT_EQ(pid, InsertFrame(pid + 1, 1, ts, true, pid)); |
415 EXPECT_EQ(pid, InsertFrame(pid + 2, 0, ts, false, pid + 1)); | 415 EXPECT_EQ(pid, InsertFrame(pid + 2, 0, ts, false, pid + 1)); |
416 EXPECT_EQ(pid, InsertFrame(pid + 2, 1, ts, true, pid + 1)); | 416 EXPECT_EQ(pid, InsertFrame(pid + 2, 1, ts, true, pid + 1)); |
417 EXPECT_EQ(pid, InsertFrame(pid + 3, 0, ts, false, pid + 2)); | 417 EXPECT_EQ(pid, InsertFrame(pid + 3, 0, ts, false, pid + 2)); |
418 EXPECT_EQ(pid + 3, InsertFrame(pid + 1, 0, ts, false, pid)); | 418 EXPECT_EQ(pid + 3, InsertFrame(pid + 1, 0, ts, false, pid)); |
419 EXPECT_EQ(pid + 3, InsertFrame(pid + 3, 1, ts, true, pid + 2)); | 419 EXPECT_EQ(pid + 3, InsertFrame(pid + 3, 1, ts, true, pid + 2)); |
420 } | 420 } |
421 | 421 |
422 } // namespace video_coding | 422 } // namespace video_coding |
423 } // namespace webrtc | 423 } // namespace webrtc |
OLD | NEW |