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

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

Issue 2007743003: Add sender controlled playout delay limits (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@cleanup_rtp_hdr_extensions
Patch Set: Rename OnReceivedRtcpReport to OnReceivedRtcpReportBlocks Created 4 years, 6 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) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 requiredDecodeTimeMs = 10; 97 requiredDecodeTimeMs = 10;
98 timing.SetJitterDelay(jitterDelayMs); 98 timing.SetJitterDelay(jitterDelayMs);
99 clock.AdvanceTimeMilliseconds(1000); 99 clock.AdvanceTimeMilliseconds(1000);
100 timeStamp += 90000; 100 timeStamp += 90000;
101 timing.UpdateCurrentDelay(timeStamp); 101 timing.UpdateCurrentDelay(timeStamp);
102 waitTime = timing.MaxWaitingTime( 102 waitTime = timing.MaxWaitingTime(
103 timing.RenderTimeMs(timeStamp, clock.TimeInMilliseconds()), 103 timing.RenderTimeMs(timeStamp, clock.TimeInMilliseconds()),
104 clock.TimeInMilliseconds()); 104 clock.TimeInMilliseconds());
105 EXPECT_EQ(waitTime, jitterDelayMs); 105 EXPECT_EQ(waitTime, jitterDelayMs);
106 106
107 uint32_t minTotalDelayMs = 200; 107 int minTotalDelayMs = 200;
108 timing.set_min_playout_delay(minTotalDelayMs); 108 timing.set_min_playout_delay(minTotalDelayMs);
109 clock.AdvanceTimeMilliseconds(5000); 109 clock.AdvanceTimeMilliseconds(5000);
110 timeStamp += 5 * 90000; 110 timeStamp += 5 * 90000;
111 timing.UpdateCurrentDelay(timeStamp); 111 timing.UpdateCurrentDelay(timeStamp);
112 const int kRenderDelayMs = 10; 112 const int kRenderDelayMs = 10;
113 timing.set_render_delay(kRenderDelayMs); 113 timing.set_render_delay(kRenderDelayMs);
114 waitTime = timing.MaxWaitingTime( 114 waitTime = timing.MaxWaitingTime(
115 timing.RenderTimeMs(timeStamp, clock.TimeInMilliseconds()), 115 timing.RenderTimeMs(timeStamp, clock.TimeInMilliseconds()),
116 clock.TimeInMilliseconds()); 116 clock.TimeInMilliseconds());
117 // We should at least have minTotalDelayMs - decodeTime (10) - renderTime 117 // We should at least have minTotalDelayMs - decodeTime (10) - renderTime
(...skipping 22 matching lines...) Expand all
140 int64_t render_time = 140 int64_t render_time =
141 timing.RenderTimeMs(0xFFFFFFFFu, clock.TimeInMilliseconds()); 141 timing.RenderTimeMs(0xFFFFFFFFu, clock.TimeInMilliseconds());
142 EXPECT_EQ(3 * 1000 / kFramerate, render_time); 142 EXPECT_EQ(3 * 1000 / kFramerate, render_time);
143 render_time = timing.RenderTimeMs(89u, // One second later in 90 kHz. 143 render_time = timing.RenderTimeMs(89u, // One second later in 90 kHz.
144 clock.TimeInMilliseconds()); 144 clock.TimeInMilliseconds());
145 EXPECT_EQ(3 * 1000 / kFramerate + 1, render_time); 145 EXPECT_EQ(3 * 1000 / kFramerate + 1, render_time);
146 } 146 }
147 } 147 }
148 148
149 } // namespace webrtc 149 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698