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

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

Issue 2946413002: Report timing frames info in GetStats. (Closed)
Patch Set: rebase Created 3 years, 5 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 MOCK_METHOD1(OnDiscardedPacketsUpdated, void(int discarded_packets)); 109 MOCK_METHOD1(OnDiscardedPacketsUpdated, void(int discarded_packets));
110 MOCK_METHOD1(OnFrameCountsUpdated, void(const FrameCounts& frame_counts)); 110 MOCK_METHOD1(OnFrameCountsUpdated, void(const FrameCounts& frame_counts));
111 MOCK_METHOD7(OnFrameBufferTimingsUpdated, 111 MOCK_METHOD7(OnFrameBufferTimingsUpdated,
112 void(int decode_ms, 112 void(int decode_ms,
113 int max_decode_ms, 113 int max_decode_ms,
114 int current_delay_ms, 114 int current_delay_ms,
115 int target_delay_ms, 115 int target_delay_ms,
116 int jitter_buffer_ms, 116 int jitter_buffer_ms,
117 int min_playout_delay_ms, 117 int min_playout_delay_ms,
118 int render_delay_ms)); 118 int render_delay_ms));
119 MOCK_METHOD1(OnTimingFrameInfoUpdated, void(const TimingFrameInfo& info));
119 }; 120 };
120 121
121 class TestFrameBuffer2 : public ::testing::Test { 122 class TestFrameBuffer2 : public ::testing::Test {
122 protected: 123 protected:
123 static constexpr int kMaxReferences = 5; 124 static constexpr int kMaxReferences = 5;
124 static constexpr int kFps1 = 1000; 125 static constexpr int kFps1 = 1000;
125 static constexpr int kFps10 = kFps1 / 10; 126 static constexpr int kFps10 = kFps1 / 10;
126 static constexpr int kFps20 = kFps1 / 20; 127 static constexpr int kFps20 = kFps1 / 20;
127 128
128 TestFrameBuffer2() 129 TestFrameBuffer2()
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 // TODO(philipel): implement more unittests related to invalid references. 535 // TODO(philipel): implement more unittests related to invalid references.
535 TEST_F(TestFrameBuffer2, InvalidReferences) { 536 TEST_F(TestFrameBuffer2, InvalidReferences) {
536 EXPECT_EQ(-1, InsertFrame(0, 0, 1000, false, 2)); 537 EXPECT_EQ(-1, InsertFrame(0, 0, 1000, false, 2));
537 EXPECT_EQ(1, InsertFrame(1, 0, 2000, false)); 538 EXPECT_EQ(1, InsertFrame(1, 0, 2000, false));
538 ExtractFrame(); 539 ExtractFrame();
539 EXPECT_EQ(2, InsertFrame(2, 0, 3000, false, 1)); 540 EXPECT_EQ(2, InsertFrame(2, 0, 3000, false, 1));
540 } 541 }
541 542
542 } // namespace video_coding 543 } // namespace video_coding
543 } // namespace webrtc 544 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/frame_buffer2.cc ('k') | webrtc/modules/video_coding/generic_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698