niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
| 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 | |
stefan@webrtc.org | a678a3b | 2013-01-21 07:42:11 +0000 | [diff] [blame] | 11 | #include "webrtc/modules/video_coding/main/source/timing.h" |
| 12 | |
| 13 | #include "webrtc/modules/video_coding/main/source/internal_defines.h" |
| 14 | #include "webrtc/modules/video_coding/main/source/jitter_buffer_common.h" |
stefan@webrtc.org | a678a3b | 2013-01-21 07:42:11 +0000 | [diff] [blame] | 15 | #include "webrtc/system_wrappers/interface/clock.h" |
asapersson@webrtc.org | f244760 | 2014-12-09 14:13:26 +0000 | [diff] [blame] | 16 | #include "webrtc/system_wrappers/interface/metrics.h" |
wu@webrtc.org | 66773a0 | 2014-05-07 17:09:44 +0000 | [diff] [blame] | 17 | #include "webrtc/system_wrappers/interface/timestamp_extrapolator.h" |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 18 | |
| 19 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 20 | namespace webrtc { |
| 21 | |
stefan@webrtc.org | a678a3b | 2013-01-21 07:42:11 +0000 | [diff] [blame] | 22 | VCMTiming::VCMTiming(Clock* clock, |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 23 | VCMTiming* master_timing) |
| 24 | : crit_sect_(CriticalSectionWrapper::CreateCriticalSection()), |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 25 | clock_(clock), |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 26 | master_(false), |
| 27 | ts_extrapolator_(), |
| 28 | codec_timer_(), |
| 29 | render_delay_ms_(kDefaultRenderDelayMs), |
mikhal@webrtc.org | adc64a7 | 2013-05-30 16:20:18 +0000 | [diff] [blame] | 30 | min_playout_delay_ms_(0), |
| 31 | jitter_delay_ms_(0), |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 32 | current_delay_ms_(0), |
fischman@webrtc.org | 37bb497 | 2013-10-23 23:59:45 +0000 | [diff] [blame] | 33 | last_decode_ms_(0), |
asapersson@webrtc.org | f244760 | 2014-12-09 14:13:26 +0000 | [diff] [blame] | 34 | prev_frame_timestamp_(0), |
| 35 | num_decoded_frames_(0), |
| 36 | num_delayed_decoded_frames_(0), |
| 37 | first_decoded_frame_ms_(-1), |
| 38 | sum_missed_render_deadline_ms_(0) { |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 39 | if (master_timing == NULL) { |
| 40 | master_ = true; |
wu@webrtc.org | 66773a0 | 2014-05-07 17:09:44 +0000 | [diff] [blame] | 41 | ts_extrapolator_ = new TimestampExtrapolator(clock_->TimeInMilliseconds()); |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 42 | } else { |
| 43 | ts_extrapolator_ = master_timing->ts_extrapolator_; |
| 44 | } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 45 | } |
| 46 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 47 | VCMTiming::~VCMTiming() { |
asapersson@webrtc.org | f244760 | 2014-12-09 14:13:26 +0000 | [diff] [blame] | 48 | UpdateHistograms(); |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 49 | if (master_) { |
| 50 | delete ts_extrapolator_; |
| 51 | } |
| 52 | delete crit_sect_; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 53 | } |
| 54 | |
asapersson@webrtc.org | f244760 | 2014-12-09 14:13:26 +0000 | [diff] [blame] | 55 | void VCMTiming::UpdateHistograms() const { |
| 56 | CriticalSectionScoped cs(crit_sect_); |
| 57 | if (num_decoded_frames_ == 0) { |
| 58 | return; |
| 59 | } |
| 60 | int64_t elapsed_sec = |
| 61 | (clock_->TimeInMilliseconds() - first_decoded_frame_ms_) / 1000; |
| 62 | if (elapsed_sec < metrics::kMinRunTimeInSeconds) { |
| 63 | return; |
| 64 | } |
| 65 | RTC_HISTOGRAM_COUNTS_100("WebRTC.Video.DecodedFramesPerSecond", |
| 66 | static_cast<int>((num_decoded_frames_ / elapsed_sec) + 0.5f)); |
| 67 | RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.DelayedFramesToRenderer", |
| 68 | num_delayed_decoded_frames_ * 100 / num_decoded_frames_); |
| 69 | if (num_delayed_decoded_frames_ > 0) { |
| 70 | RTC_HISTOGRAM_COUNTS_1000( |
| 71 | "WebRTC.Video.DelayedFramesToRenderer_AvgDelayInMs", |
| 72 | sum_missed_render_deadline_ms_ / num_delayed_decoded_frames_); |
| 73 | } |
| 74 | } |
| 75 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 76 | void VCMTiming::Reset() { |
| 77 | CriticalSectionScoped cs(crit_sect_); |
wu@webrtc.org | ed4cb56 | 2014-05-06 04:50:49 +0000 | [diff] [blame] | 78 | ts_extrapolator_->Reset(clock_->TimeInMilliseconds()); |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 79 | codec_timer_.Reset(); |
| 80 | render_delay_ms_ = kDefaultRenderDelayMs; |
mikhal@webrtc.org | adc64a7 | 2013-05-30 16:20:18 +0000 | [diff] [blame] | 81 | min_playout_delay_ms_ = 0; |
| 82 | jitter_delay_ms_ = 0; |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 83 | current_delay_ms_ = 0; |
| 84 | prev_frame_timestamp_ = 0; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 85 | } |
| 86 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 87 | void VCMTiming::ResetDecodeTime() { |
pbos@webrtc.org | 0422100 | 2014-07-10 15:25:37 +0000 | [diff] [blame] | 88 | CriticalSectionScoped lock(crit_sect_); |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 89 | codec_timer_.Reset(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 90 | } |
| 91 | |
mikhal@webrtc.org | adc64a7 | 2013-05-30 16:20:18 +0000 | [diff] [blame] | 92 | void VCMTiming::set_render_delay(uint32_t render_delay_ms) { |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 93 | CriticalSectionScoped cs(crit_sect_); |
| 94 | render_delay_ms_ = render_delay_ms; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 95 | } |
| 96 | |
mikhal@webrtc.org | adc64a7 | 2013-05-30 16:20:18 +0000 | [diff] [blame] | 97 | void VCMTiming::set_min_playout_delay(uint32_t min_playout_delay_ms) { |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 98 | CriticalSectionScoped cs(crit_sect_); |
mikhal@webrtc.org | adc64a7 | 2013-05-30 16:20:18 +0000 | [diff] [blame] | 99 | min_playout_delay_ms_ = min_playout_delay_ms; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 100 | } |
| 101 | |
mikhal@webrtc.org | adc64a7 | 2013-05-30 16:20:18 +0000 | [diff] [blame] | 102 | void VCMTiming::SetJitterDelay(uint32_t jitter_delay_ms) { |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 103 | CriticalSectionScoped cs(crit_sect_); |
mikhal@webrtc.org | adc64a7 | 2013-05-30 16:20:18 +0000 | [diff] [blame] | 104 | if (jitter_delay_ms != jitter_delay_ms_) { |
mikhal@webrtc.org | adc64a7 | 2013-05-30 16:20:18 +0000 | [diff] [blame] | 105 | jitter_delay_ms_ = jitter_delay_ms; |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 106 | // When in initial state, set current delay to minimum delay. |
| 107 | if (current_delay_ms_ == 0) { |
mikhal@webrtc.org | adc64a7 | 2013-05-30 16:20:18 +0000 | [diff] [blame] | 108 | current_delay_ms_ = jitter_delay_ms_; |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 109 | } |
| 110 | } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 111 | } |
| 112 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 113 | void VCMTiming::UpdateCurrentDelay(uint32_t frame_timestamp) { |
| 114 | CriticalSectionScoped cs(crit_sect_); |
| 115 | uint32_t target_delay_ms = TargetDelayInternal(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 116 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 117 | if (current_delay_ms_ == 0) { |
| 118 | // Not initialized, set current delay to target. |
| 119 | current_delay_ms_ = target_delay_ms; |
| 120 | } else if (target_delay_ms != current_delay_ms_) { |
| 121 | int64_t delay_diff_ms = static_cast<int64_t>(target_delay_ms) - |
| 122 | current_delay_ms_; |
| 123 | // Never change the delay with more than 100 ms every second. If we're |
| 124 | // changing the delay in too large steps we will get noticeable freezes. By |
| 125 | // limiting the change we can increase the delay in smaller steps, which |
| 126 | // will be experienced as the video is played in slow motion. When lowering |
| 127 | // the delay the video will be played at a faster pace. |
| 128 | int64_t max_change_ms = 0; |
| 129 | if (frame_timestamp < 0x0000ffff && prev_frame_timestamp_ > 0xffff0000) { |
| 130 | // wrap |
| 131 | max_change_ms = kDelayMaxChangeMsPerS * (frame_timestamp + |
| 132 | (static_cast<int64_t>(1) << 32) - prev_frame_timestamp_) / 90000; |
| 133 | } else { |
| 134 | max_change_ms = kDelayMaxChangeMsPerS * |
| 135 | (frame_timestamp - prev_frame_timestamp_) / 90000; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 136 | } |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 137 | if (max_change_ms <= 0) { |
| 138 | // Any changes less than 1 ms are truncated and |
| 139 | // will be postponed. Negative change will be due |
| 140 | // to reordering and should be ignored. |
| 141 | return; |
| 142 | } |
| 143 | delay_diff_ms = std::max(delay_diff_ms, -max_change_ms); |
| 144 | delay_diff_ms = std::min(delay_diff_ms, max_change_ms); |
mikhal@webrtc.org | 6faba6e | 2013-04-30 15:39:34 +0000 | [diff] [blame] | 145 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 146 | current_delay_ms_ = current_delay_ms_ + static_cast<int32_t>(delay_diff_ms); |
| 147 | } |
| 148 | prev_frame_timestamp_ = frame_timestamp; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 149 | } |
| 150 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 151 | void VCMTiming::UpdateCurrentDelay(int64_t render_time_ms, |
| 152 | int64_t actual_decode_time_ms) { |
| 153 | CriticalSectionScoped cs(crit_sect_); |
| 154 | uint32_t target_delay_ms = TargetDelayInternal(); |
| 155 | int64_t delayed_ms = actual_decode_time_ms - |
| 156 | (render_time_ms - MaxDecodeTimeMs() - render_delay_ms_); |
| 157 | if (delayed_ms < 0) { |
| 158 | return; |
| 159 | } |
| 160 | if (current_delay_ms_ + delayed_ms <= target_delay_ms) { |
| 161 | current_delay_ms_ += static_cast<uint32_t>(delayed_ms); |
| 162 | } else { |
| 163 | current_delay_ms_ = target_delay_ms; |
| 164 | } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 165 | } |
| 166 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 167 | int32_t VCMTiming::StopDecodeTimer(uint32_t time_stamp, |
| 168 | int64_t start_time_ms, |
asapersson@webrtc.org | f244760 | 2014-12-09 14:13:26 +0000 | [diff] [blame] | 169 | int64_t now_ms, |
| 170 | int64_t render_time_ms) { |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 171 | CriticalSectionScoped cs(crit_sect_); |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 172 | int32_t time_diff_ms = codec_timer_.StopTimer(start_time_ms, now_ms); |
stefan@webrtc.org | 34c5da6 | 2014-04-11 14:08:35 +0000 | [diff] [blame] | 173 | assert(time_diff_ms >= 0); |
fischman@webrtc.org | 37bb497 | 2013-10-23 23:59:45 +0000 | [diff] [blame] | 174 | last_decode_ms_ = time_diff_ms; |
asapersson@webrtc.org | f244760 | 2014-12-09 14:13:26 +0000 | [diff] [blame] | 175 | |
| 176 | // Update stats. |
| 177 | ++num_decoded_frames_; |
| 178 | if (num_decoded_frames_ == 1) { |
| 179 | first_decoded_frame_ms_ = now_ms; |
| 180 | } |
| 181 | int time_until_rendering_ms = render_time_ms - render_delay_ms_ - now_ms; |
| 182 | if (time_until_rendering_ms < 0) { |
| 183 | sum_missed_render_deadline_ms_ += -time_until_rendering_ms; |
| 184 | ++num_delayed_decoded_frames_; |
| 185 | } |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 186 | return 0; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 187 | } |
| 188 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 189 | void VCMTiming::IncomingTimestamp(uint32_t time_stamp, int64_t now_ms) { |
| 190 | CriticalSectionScoped cs(crit_sect_); |
stefan@webrtc.org | 34c5da6 | 2014-04-11 14:08:35 +0000 | [diff] [blame] | 191 | ts_extrapolator_->Update(now_ms, time_stamp); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 192 | } |
| 193 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 194 | int64_t VCMTiming::RenderTimeMs(uint32_t frame_timestamp, int64_t now_ms) |
| 195 | const { |
| 196 | CriticalSectionScoped cs(crit_sect_); |
| 197 | const int64_t render_time_ms = RenderTimeMsInternal(frame_timestamp, now_ms); |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 198 | return render_time_ms; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 199 | } |
| 200 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 201 | int64_t VCMTiming::RenderTimeMsInternal(uint32_t frame_timestamp, |
| 202 | int64_t now_ms) const { |
| 203 | int64_t estimated_complete_time_ms = |
| 204 | ts_extrapolator_->ExtrapolateLocalTime(frame_timestamp); |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 205 | if (estimated_complete_time_ms == -1) { |
| 206 | estimated_complete_time_ms = now_ms; |
| 207 | } |
mikhal@webrtc.org | 6faba6e | 2013-04-30 15:39:34 +0000 | [diff] [blame] | 208 | |
mikhal@webrtc.org | adc64a7 | 2013-05-30 16:20:18 +0000 | [diff] [blame] | 209 | // Make sure that we have at least the playout delay. |
| 210 | uint32_t actual_delay = std::max(current_delay_ms_, min_playout_delay_ms_); |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 211 | return estimated_complete_time_ms + actual_delay; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 212 | } |
| 213 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 214 | // Must be called from inside a critical section. |
| 215 | int32_t VCMTiming::MaxDecodeTimeMs(FrameType frame_type /*= kVideoFrameDelta*/) |
| 216 | const { |
| 217 | const int32_t decode_time_ms = codec_timer_.RequiredDecodeTimeMs(frame_type); |
stefan@webrtc.org | 34c5da6 | 2014-04-11 14:08:35 +0000 | [diff] [blame] | 218 | assert(decode_time_ms >= 0); |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 219 | return decode_time_ms; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 220 | } |
| 221 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 222 | uint32_t VCMTiming::MaxWaitingTime(int64_t render_time_ms, int64_t now_ms) |
| 223 | const { |
| 224 | CriticalSectionScoped cs(crit_sect_); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 225 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 226 | const int64_t max_wait_time_ms = render_time_ms - now_ms - |
| 227 | MaxDecodeTimeMs() - render_delay_ms_; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 228 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 229 | if (max_wait_time_ms < 0) { |
| 230 | return 0; |
| 231 | } |
| 232 | return static_cast<uint32_t>(max_wait_time_ms); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 233 | } |
| 234 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 235 | bool VCMTiming::EnoughTimeToDecode(uint32_t available_processing_time_ms) |
| 236 | const { |
| 237 | CriticalSectionScoped cs(crit_sect_); |
| 238 | int32_t max_decode_time_ms = MaxDecodeTimeMs(); |
| 239 | if (max_decode_time_ms < 0) { |
| 240 | // Haven't decoded any frames yet, try decoding one to get an estimate |
| 241 | // of the decode time. |
| 242 | return true; |
| 243 | } else if (max_decode_time_ms == 0) { |
| 244 | // Decode time is less than 1, set to 1 for now since |
| 245 | // we don't have any better precision. Count ticks later? |
| 246 | max_decode_time_ms = 1; |
| 247 | } |
| 248 | return static_cast<int32_t>(available_processing_time_ms) - |
| 249 | max_decode_time_ms > 0; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 250 | } |
| 251 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 252 | uint32_t VCMTiming::TargetVideoDelay() const { |
| 253 | CriticalSectionScoped cs(crit_sect_); |
| 254 | return TargetDelayInternal(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 255 | } |
| 256 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 257 | uint32_t VCMTiming::TargetDelayInternal() const { |
mikhal@webrtc.org | adc64a7 | 2013-05-30 16:20:18 +0000 | [diff] [blame] | 258 | return std::max(min_playout_delay_ms_, |
| 259 | jitter_delay_ms_ + MaxDecodeTimeMs() + render_delay_ms_); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 260 | } |
| 261 | |
fischman@webrtc.org | 37bb497 | 2013-10-23 23:59:45 +0000 | [diff] [blame] | 262 | void VCMTiming::GetTimings(int* decode_ms, |
| 263 | int* max_decode_ms, |
| 264 | int* current_delay_ms, |
| 265 | int* target_delay_ms, |
| 266 | int* jitter_buffer_ms, |
| 267 | int* min_playout_delay_ms, |
| 268 | int* render_delay_ms) const { |
| 269 | CriticalSectionScoped cs(crit_sect_); |
| 270 | *decode_ms = last_decode_ms_; |
| 271 | *max_decode_ms = MaxDecodeTimeMs(); |
| 272 | *current_delay_ms = current_delay_ms_; |
| 273 | *target_delay_ms = TargetDelayInternal(); |
| 274 | *jitter_buffer_ms = jitter_delay_ms_; |
| 275 | *min_playout_delay_ms = min_playout_delay_ms_; |
| 276 | *render_delay_ms = render_delay_ms_; |
| 277 | } |
| 278 | |
mikhal@webrtc.org | 2eaf98b | 2013-05-21 17:58:43 +0000 | [diff] [blame] | 279 | } // namespace webrtc |