| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |