blob: 1f5c12f7f4a6c900d1220042041625516cdcf879 [file] [log] [blame]
stefan@webrtc.org9f557c12013-05-17 12:55:07 +00001/*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#include "modules/video_coding/timing.h"
Jonas Olssona4d87372019-07-05 19:08:33 +020012
Evan Shrubsoled6cdf802022-03-02 15:13:55 +010013#include "api/units/frequency.h"
14#include "api/units/time_delta.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020015#include "system_wrappers/include/clock.h"
Johannes Kron985905d2021-06-29 11:37:06 +020016#include "test/field_trial.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020017#include "test/gtest.h"
stefan@webrtc.org9f557c12013-05-17 12:55:07 +000018
19namespace webrtc {
Åsa Persson8368d1a2018-01-05 12:44:45 +010020namespace {
Evan Shrubsoled6cdf802022-03-02 15:13:55 +010021
22constexpr Frequency k25Fps = Frequency::Hertz(25);
23constexpr Frequency k90kHz = Frequency::KiloHertz(90);
24
Åsa Persson8368d1a2018-01-05 12:44:45 +010025} // namespace
stefan@webrtc.org9f557c12013-05-17 12:55:07 +000026
Johannes Kron985905d2021-06-29 11:37:06 +020027TEST(ReceiverTimingTest, JitterDelay) {
stefan@webrtc.org9f557c12013-05-17 12:55:07 +000028 SimulatedClock clock(0);
29 VCMTiming timing(&clock);
Åsa Persson8368d1a2018-01-05 12:44:45 +010030 timing.Reset();
31
32 uint32_t timestamp = 0;
33 timing.UpdateCurrentDelay(timestamp);
stefan@webrtc.org9f557c12013-05-17 12:55:07 +000034
35 timing.Reset();
36
Evan Shrubsoled6cdf802022-03-02 15:13:55 +010037 timing.IncomingTimestamp(timestamp, clock.CurrentTime());
38 TimeDelta jitter_delay = TimeDelta::Millis(20);
39 timing.SetJitterDelay(jitter_delay);
Åsa Persson8368d1a2018-01-05 12:44:45 +010040 timing.UpdateCurrentDelay(timestamp);
Evan Shrubsoled6cdf802022-03-02 15:13:55 +010041 timing.set_render_delay(TimeDelta::Zero());
42 auto wait_time = timing.MaxWaitingTime(
43 timing.RenderTime(timestamp, clock.CurrentTime()), clock.CurrentTime(),
44 /*too_many_frames_queued=*/false);
stefan@webrtc.org9f557c12013-05-17 12:55:07 +000045 // First update initializes the render time. Since we have no decode delay
Evan Shrubsoled6cdf802022-03-02 15:13:55 +010046 // we get wait_time = renderTime - now - renderDelay = jitter.
47 EXPECT_EQ(jitter_delay, wait_time);
stefan@webrtc.org9f557c12013-05-17 12:55:07 +000048
Evan Shrubsoled6cdf802022-03-02 15:13:55 +010049 jitter_delay += TimeDelta::Millis(VCMTiming::kDelayMaxChangeMsPerS + 10);
Åsa Persson8368d1a2018-01-05 12:44:45 +010050 timestamp += 90000;
stefan@webrtc.org9f557c12013-05-17 12:55:07 +000051 clock.AdvanceTimeMilliseconds(1000);
Evan Shrubsoled6cdf802022-03-02 15:13:55 +010052 timing.SetJitterDelay(jitter_delay);
Åsa Persson8368d1a2018-01-05 12:44:45 +010053 timing.UpdateCurrentDelay(timestamp);
Evan Shrubsoled6cdf802022-03-02 15:13:55 +010054 wait_time = timing.MaxWaitingTime(
55 timing.RenderTime(timestamp, clock.CurrentTime()), clock.CurrentTime(),
56 /*too_many_frames_queued=*/false);
stefan@webrtc.org9f557c12013-05-17 12:55:07 +000057 // Since we gradually increase the delay we only get 100 ms every second.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +010058 EXPECT_EQ(jitter_delay - TimeDelta::Millis(10), wait_time);
stefan@webrtc.org9f557c12013-05-17 12:55:07 +000059
Åsa Persson8368d1a2018-01-05 12:44:45 +010060 timestamp += 90000;
stefan@webrtc.org9f557c12013-05-17 12:55:07 +000061 clock.AdvanceTimeMilliseconds(1000);
Åsa Persson8368d1a2018-01-05 12:44:45 +010062 timing.UpdateCurrentDelay(timestamp);
Evan Shrubsoled6cdf802022-03-02 15:13:55 +010063 wait_time = timing.MaxWaitingTime(
64 timing.RenderTime(timestamp, clock.CurrentTime()), clock.CurrentTime(),
65 /*too_many_frames_queued=*/false);
66 EXPECT_EQ(jitter_delay, wait_time);
stefan@webrtc.org9f557c12013-05-17 12:55:07 +000067
Åsa Persson8368d1a2018-01-05 12:44:45 +010068 // Insert frames without jitter, verify that this gives the exact wait time.
69 const int kNumFrames = 300;
70 for (int i = 0; i < kNumFrames; i++) {
Evan Shrubsoled6cdf802022-03-02 15:13:55 +010071 clock.AdvanceTime(1 / k25Fps);
72 timestamp += k90kHz / k25Fps;
73 timing.IncomingTimestamp(timestamp, clock.CurrentTime());
stefan@webrtc.org9f557c12013-05-17 12:55:07 +000074 }
Åsa Persson8368d1a2018-01-05 12:44:45 +010075 timing.UpdateCurrentDelay(timestamp);
Evan Shrubsoled6cdf802022-03-02 15:13:55 +010076 wait_time = timing.MaxWaitingTime(
77 timing.RenderTime(timestamp, clock.CurrentTime()), clock.CurrentTime(),
78 /*too_many_frames_queued=*/false);
79 EXPECT_EQ(jitter_delay, wait_time);
stefan@webrtc.org9f557c12013-05-17 12:55:07 +000080
Åsa Persson8368d1a2018-01-05 12:44:45 +010081 // Add decode time estimates for 1 second.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +010082 const TimeDelta kDecodeTime = TimeDelta::Millis(10);
83 for (int i = 0; i < k25Fps.hertz(); i++) {
84 clock.AdvanceTime(kDecodeTime);
85 timing.StopDecodeTimer(kDecodeTime, clock.CurrentTime());
86 timestamp += k90kHz / k25Fps;
87 clock.AdvanceTime(1 / k25Fps - kDecodeTime);
88 timing.IncomingTimestamp(timestamp, clock.CurrentTime());
stefan@webrtc.org9f557c12013-05-17 12:55:07 +000089 }
Åsa Persson8368d1a2018-01-05 12:44:45 +010090 timing.UpdateCurrentDelay(timestamp);
Evan Shrubsoled6cdf802022-03-02 15:13:55 +010091 wait_time = timing.MaxWaitingTime(
92 timing.RenderTime(timestamp, clock.CurrentTime()), clock.CurrentTime(),
93 /*too_many_frames_queued=*/false);
94 EXPECT_EQ(jitter_delay, wait_time);
stefan@webrtc.org9f557c12013-05-17 12:55:07 +000095
Evan Shrubsoled6cdf802022-03-02 15:13:55 +010096 const TimeDelta kMinTotalDelay = TimeDelta::Millis(200);
97 timing.set_min_playout_delay(kMinTotalDelay);
stefan@webrtc.org9f557c12013-05-17 12:55:07 +000098 clock.AdvanceTimeMilliseconds(5000);
Åsa Persson8368d1a2018-01-05 12:44:45 +010099 timestamp += 5 * 90000;
100 timing.UpdateCurrentDelay(timestamp);
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100101 const TimeDelta kRenderDelay = TimeDelta::Millis(10);
102 timing.set_render_delay(kRenderDelay);
103 wait_time = timing.MaxWaitingTime(
104 timing.RenderTime(timestamp, clock.CurrentTime()), clock.CurrentTime(),
105 /*too_many_frames_queued=*/false);
Åsa Persson8368d1a2018-01-05 12:44:45 +0100106 // We should at least have kMinTotalDelayMs - decodeTime (10) - renderTime
stefan@webrtc.org9f557c12013-05-17 12:55:07 +0000107 // (10) to wait.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100108 EXPECT_EQ(kMinTotalDelay - kDecodeTime - kRenderDelay, wait_time);
stefan@webrtc.org9f557c12013-05-17 12:55:07 +0000109 // The total video delay should be equal to the min total delay.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100110 EXPECT_EQ(kMinTotalDelay, timing.TargetVideoDelay());
stefan@webrtc.org9f557c12013-05-17 12:55:07 +0000111
mikhal@webrtc.orgadc64a72013-05-30 16:20:18 +0000112 // Reset playout delay.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100113 timing.set_min_playout_delay(TimeDelta::Zero());
stefan@webrtc.org9f557c12013-05-17 12:55:07 +0000114 clock.AdvanceTimeMilliseconds(5000);
Åsa Persson8368d1a2018-01-05 12:44:45 +0100115 timestamp += 5 * 90000;
116 timing.UpdateCurrentDelay(timestamp);
stefan@webrtc.org9f557c12013-05-17 12:55:07 +0000117}
118
Johannes Kron985905d2021-06-29 11:37:06 +0200119TEST(ReceiverTimingTest, TimestampWrapAround) {
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100120 constexpr auto kStartTime = Timestamp::Millis(1337);
121 SimulatedClock clock(kStartTime);
stefan@webrtc.org9f557c12013-05-17 12:55:07 +0000122 VCMTiming timing(&clock);
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100123
Åsa Persson8368d1a2018-01-05 12:44:45 +0100124 // Provoke a wrap-around. The fifth frame will have wrapped at 25 fps.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100125 constexpr uint32_t kRtpTicksPerFrame = k90kHz / k25Fps;
126 uint32_t timestamp = 0xFFFFFFFFu - 3 * kRtpTicksPerFrame;
Åsa Persson8368d1a2018-01-05 12:44:45 +0100127 for (int i = 0; i < 5; ++i) {
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100128 timing.IncomingTimestamp(timestamp, clock.CurrentTime());
129 clock.AdvanceTime(1 / k25Fps);
130 timestamp += kRtpTicksPerFrame;
131 EXPECT_EQ(kStartTime + 3 / k25Fps,
132 timing.RenderTime(0xFFFFFFFFu, clock.CurrentTime()));
133 // One ms later in 90 kHz.
134 EXPECT_EQ(kStartTime + 3 / k25Fps + TimeDelta::Millis(1),
135 timing.RenderTime(89u, clock.CurrentTime()));
stefan@webrtc.org9f557c12013-05-17 12:55:07 +0000136 }
137}
138
Johannes Kron985905d2021-06-29 11:37:06 +0200139TEST(ReceiverTimingTest, MaxWaitingTimeIsZeroForZeroRenderTime) {
140 // This is the default path when the RTP playout delay header extension is set
Johannes Kron23bfff32021-09-28 21:31:46 +0200141 // to min==0 and max==0.
Johannes Kron985905d2021-06-29 11:37:06 +0200142 constexpr int64_t kStartTimeUs = 3.15e13; // About one year in us.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100143 constexpr TimeDelta kTimeDelta = 1 / Frequency::Hertz(60);
144 constexpr Timestamp kZeroRenderTime = Timestamp::Zero();
Johannes Kron985905d2021-06-29 11:37:06 +0200145 SimulatedClock clock(kStartTimeUs);
146 VCMTiming timing(&clock);
147 timing.Reset();
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100148 timing.set_max_playout_delay(TimeDelta::Zero());
Johannes Kron985905d2021-06-29 11:37:06 +0200149 for (int i = 0; i < 10; ++i) {
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100150 clock.AdvanceTime(kTimeDelta);
151 Timestamp now = clock.CurrentTime();
152 EXPECT_LT(timing.MaxWaitingTime(kZeroRenderTime, now,
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200153 /*too_many_frames_queued=*/false),
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100154 TimeDelta::Zero());
Johannes Kron985905d2021-06-29 11:37:06 +0200155 }
156 // Another frame submitted at the same time also returns a negative max
157 // waiting time.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100158 Timestamp now = clock.CurrentTime();
159 EXPECT_LT(timing.MaxWaitingTime(kZeroRenderTime, now,
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200160 /*too_many_frames_queued=*/false),
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100161 TimeDelta::Zero());
Johannes Kron985905d2021-06-29 11:37:06 +0200162 // MaxWaitingTime should be less than zero even if there's a burst of frames.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100163 EXPECT_LT(timing.MaxWaitingTime(kZeroRenderTime, now,
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200164 /*too_many_frames_queued=*/false),
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100165 TimeDelta::Zero());
166 EXPECT_LT(timing.MaxWaitingTime(kZeroRenderTime, now,
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200167 /*too_many_frames_queued=*/false),
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100168 TimeDelta::Zero());
169 EXPECT_LT(timing.MaxWaitingTime(kZeroRenderTime, now,
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200170 /*too_many_frames_queued=*/false),
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100171 TimeDelta::Zero());
Johannes Kron985905d2021-06-29 11:37:06 +0200172}
173
174TEST(ReceiverTimingTest, MaxWaitingTimeZeroDelayPacingExperiment) {
175 // The minimum pacing is enabled by a field trial and active if the RTP
176 // playout delay header extension is set to min==0.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100177 constexpr TimeDelta kMinPacing = TimeDelta::Millis(3);
Johannes Kron985905d2021-06-29 11:37:06 +0200178 test::ScopedFieldTrials override_field_trials(
179 "WebRTC-ZeroPlayoutDelay/min_pacing:3ms/");
180 constexpr int64_t kStartTimeUs = 3.15e13; // About one year in us.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100181 constexpr TimeDelta kTimeDelta = 1 / Frequency::Hertz(60);
182 constexpr auto kZeroRenderTime = Timestamp::Zero();
Johannes Kron985905d2021-06-29 11:37:06 +0200183 SimulatedClock clock(kStartTimeUs);
184 VCMTiming timing(&clock);
185 timing.Reset();
186 // MaxWaitingTime() returns zero for evenly spaced video frames.
187 for (int i = 0; i < 10; ++i) {
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100188 clock.AdvanceTime(kTimeDelta);
189 Timestamp now = clock.CurrentTime();
190 EXPECT_EQ(timing.MaxWaitingTime(kZeroRenderTime, now,
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200191 /*too_many_frames_queued=*/false),
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100192 TimeDelta::Zero());
193 timing.SetLastDecodeScheduledTimestamp(now);
Johannes Kron985905d2021-06-29 11:37:06 +0200194 }
195 // Another frame submitted at the same time is paced according to the field
196 // trial setting.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100197 auto now = clock.CurrentTime();
198 EXPECT_EQ(timing.MaxWaitingTime(kZeroRenderTime, now,
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200199 /*too_many_frames_queued=*/false),
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100200 kMinPacing);
Rezaul Barbhuiya82c22482021-08-05 17:54:11 -0700201 // If there's a burst of frames, the wait time is calculated based on next
202 // decode time.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100203 EXPECT_EQ(timing.MaxWaitingTime(kZeroRenderTime, now,
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200204 /*too_many_frames_queued=*/false),
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100205 kMinPacing);
206 EXPECT_EQ(timing.MaxWaitingTime(kZeroRenderTime, now,
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200207 /*too_many_frames_queued=*/false),
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100208 kMinPacing);
Johannes Kron985905d2021-06-29 11:37:06 +0200209 // Allow a few ms to pass, this should be subtracted from the MaxWaitingTime.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100210 constexpr TimeDelta kTwoMs = TimeDelta::Millis(2);
211 clock.AdvanceTime(kTwoMs);
212 now = clock.CurrentTime();
213 EXPECT_EQ(timing.MaxWaitingTime(kZeroRenderTime, now,
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200214 /*too_many_frames_queued=*/false),
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100215 kMinPacing - kTwoMs);
Rezaul Barbhuiya82c22482021-08-05 17:54:11 -0700216 // A frame is decoded at the current time, the wait time should be restored to
217 // pacing delay.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100218 timing.SetLastDecodeScheduledTimestamp(now);
219 EXPECT_EQ(timing.MaxWaitingTime(kZeroRenderTime, now,
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200220 /*too_many_frames_queued=*/false),
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100221 kMinPacing);
Johannes Kron985905d2021-06-29 11:37:06 +0200222}
223
224TEST(ReceiverTimingTest, DefaultMaxWaitingTimeUnaffectedByPacingExperiment) {
225 // The minimum pacing is enabled by a field trial but should not have any
226 // effect if render_time_ms is greater than 0;
227 test::ScopedFieldTrials override_field_trials(
228 "WebRTC-ZeroPlayoutDelay/min_pacing:3ms/");
229 constexpr int64_t kStartTimeUs = 3.15e13; // About one year in us.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100230 const TimeDelta kTimeDelta = TimeDelta::Millis(1000.0 / 60.0);
Johannes Kron985905d2021-06-29 11:37:06 +0200231 SimulatedClock clock(kStartTimeUs);
232 VCMTiming timing(&clock);
233 timing.Reset();
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100234 clock.AdvanceTime(kTimeDelta);
235 auto now = clock.CurrentTime();
236 Timestamp render_time = now + TimeDelta::Millis(30);
Johannes Kron985905d2021-06-29 11:37:06 +0200237 // Estimate the internal processing delay from the first frame.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100238 TimeDelta estimated_processing_delay =
239 (render_time - now) -
240 timing.MaxWaitingTime(render_time, now,
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200241 /*too_many_frames_queued=*/false);
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100242 EXPECT_GT(estimated_processing_delay, TimeDelta::Zero());
Johannes Kron985905d2021-06-29 11:37:06 +0200243
244 // Any other frame submitted at the same time should be scheduled according to
245 // its render time.
246 for (int i = 0; i < 5; ++i) {
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100247 render_time += kTimeDelta;
248 EXPECT_EQ(timing.MaxWaitingTime(render_time, now,
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200249 /*too_many_frames_queued=*/false),
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100250 render_time - now - estimated_processing_delay);
Johannes Kron985905d2021-06-29 11:37:06 +0200251 }
252}
253
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100254TEST(ReceiverTimingTest, MaxWaitingTimeReturnsZeroIfTooManyFramesQueuedIsTrue) {
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200255 // The minimum pacing is enabled by a field trial and active if the RTP
256 // playout delay header extension is set to min==0.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100257 constexpr TimeDelta kMinPacing = TimeDelta::Millis(3);
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200258 test::ScopedFieldTrials override_field_trials(
259 "WebRTC-ZeroPlayoutDelay/min_pacing:3ms/");
260 constexpr int64_t kStartTimeUs = 3.15e13; // About one year in us.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100261 const TimeDelta kTimeDelta = TimeDelta::Millis(1000.0 / 60.0);
262 constexpr auto kZeroRenderTime = Timestamp::Zero();
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200263 SimulatedClock clock(kStartTimeUs);
264 VCMTiming timing(&clock);
265 timing.Reset();
266 // MaxWaitingTime() returns zero for evenly spaced video frames.
267 for (int i = 0; i < 10; ++i) {
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100268 clock.AdvanceTime(kTimeDelta);
269 auto now = clock.CurrentTime();
270 EXPECT_EQ(timing.MaxWaitingTime(kZeroRenderTime, now,
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200271 /*too_many_frames_queued=*/false),
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100272 TimeDelta::Zero());
273 timing.SetLastDecodeScheduledTimestamp(now);
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200274 }
275 // Another frame submitted at the same time is paced according to the field
276 // trial setting.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100277 auto now_ms = clock.CurrentTime();
278 EXPECT_EQ(timing.MaxWaitingTime(kZeroRenderTime, now_ms,
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200279 /*too_many_frames_queued=*/false),
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100280 kMinPacing);
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200281 // MaxWaitingTime returns 0 even if there's a burst of frames if
282 // too_many_frames_queued is set to true.
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100283 EXPECT_EQ(timing.MaxWaitingTime(kZeroRenderTime, now_ms,
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200284 /*too_many_frames_queued=*/true),
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100285 TimeDelta::Zero());
286 EXPECT_EQ(timing.MaxWaitingTime(kZeroRenderTime, now_ms,
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200287 /*too_many_frames_queued=*/true),
Evan Shrubsoled6cdf802022-03-02 15:13:55 +0100288 TimeDelta::Zero());
Johannes Kron2ddc39e2021-08-10 16:56:12 +0200289}
290
stefan@webrtc.org9f557c12013-05-17 12:55:07 +0000291} // namespace webrtc