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

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

Issue 2480293002: New jitter buffer experiment. (Closed)
Patch Set: Nit fix. Created 4 years, 1 month 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
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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698