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

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

Issue 2627463004: Make the new jitter buffer the default jitter buffer. (Closed)
Patch Set: Offline feedback. Created 3 years, 11 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
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 protected: 88 protected:
89 static constexpr int kMaxReferences = 5; 89 static constexpr int kMaxReferences = 5;
90 static constexpr int kFps1 = 1000; 90 static constexpr int kFps1 = 1000;
91 static constexpr int kFps10 = kFps1 / 10; 91 static constexpr int kFps10 = kFps1 / 10;
92 static constexpr int kFps20 = kFps1 / 20; 92 static constexpr int kFps20 = kFps1 / 20;
93 93
94 TestFrameBuffer2() 94 TestFrameBuffer2()
95 : clock_(0), 95 : clock_(0),
96 timing_(&clock_), 96 timing_(&clock_),
97 jitter_estimator_(&clock_), 97 jitter_estimator_(&clock_),
98 buffer_(&clock_, &jitter_estimator_, &timing_), 98 buffer_(&clock_, &jitter_estimator_, &timing_, nullptr),
stefan-webrtc 2017/01/12 14:16:15 Perhaps add a simple test for this instead.
philipel 2017/01/12 16:41:34 Done.
99 rand_(0x34678213), 99 rand_(0x34678213),
100 tear_down_(false), 100 tear_down_(false),
101 extract_thread_(&ExtractLoop, this, "Extract Thread"), 101 extract_thread_(&ExtractLoop, this, "Extract Thread"),
102 trigger_extract_event_(false, false), 102 trigger_extract_event_(false, false),
103 crit_acquired_event_(false, false) {} 103 crit_acquired_event_(false, false) {}
104 104
105 void SetUp() override { extract_thread_.Start(); } 105 void SetUp() override { extract_thread_.Start(); }
106 106
107 void TearDown() override { 107 void TearDown() override {
108 tear_down_ = true; 108 tear_down_ = true;
(...skipping 305 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