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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 void VCMTiming::UpdateHistograms() const { | 56 void VCMTiming::UpdateHistograms() const { |
57 CriticalSectionScoped cs(crit_sect_); | 57 CriticalSectionScoped cs(crit_sect_); |
58 if (num_decoded_frames_ == 0) { | 58 if (num_decoded_frames_ == 0) { |
59 return; | 59 return; |
60 } | 60 } |
61 int64_t elapsed_sec = | 61 int64_t elapsed_sec = |
62 (clock_->TimeInMilliseconds() - first_decoded_frame_ms_) / 1000; | 62 (clock_->TimeInMilliseconds() - first_decoded_frame_ms_) / 1000; |
63 if (elapsed_sec < metrics::kMinRunTimeInSeconds) { | 63 if (elapsed_sec < metrics::kMinRunTimeInSeconds) { |
64 return; | 64 return; |
65 } | 65 } |
66 RTC_LOGGED_HISTOGRAM_COUNTS_100( | 66 RTC_HISTOGRAM_COUNTS_100( |
67 "WebRTC.Video.DecodedFramesPerSecond", | 67 "WebRTC.Video.DecodedFramesPerSecond", |
68 static_cast<int>((num_decoded_frames_ / elapsed_sec) + 0.5f)); | 68 static_cast<int>((num_decoded_frames_ / elapsed_sec) + 0.5f)); |
69 RTC_LOGGED_HISTOGRAM_PERCENTAGE( | 69 RTC_HISTOGRAM_PERCENTAGE( |
70 "WebRTC.Video.DelayedFramesToRenderer", | 70 "WebRTC.Video.DelayedFramesToRenderer", |
71 num_delayed_decoded_frames_ * 100 / num_decoded_frames_); | 71 num_delayed_decoded_frames_ * 100 / num_decoded_frames_); |
72 if (num_delayed_decoded_frames_ > 0) { | 72 if (num_delayed_decoded_frames_ > 0) { |
73 RTC_LOGGED_HISTOGRAM_COUNTS_1000( | 73 RTC_HISTOGRAM_COUNTS_1000( |
74 "WebRTC.Video.DelayedFramesToRenderer_AvgDelayInMs", | 74 "WebRTC.Video.DelayedFramesToRenderer_AvgDelayInMs", |
75 sum_missed_render_deadline_ms_ / num_delayed_decoded_frames_); | 75 sum_missed_render_deadline_ms_ / num_delayed_decoded_frames_); |
76 } | 76 } |
77 } | 77 } |
78 | 78 |
79 void VCMTiming::Reset() { | 79 void VCMTiming::Reset() { |
80 CriticalSectionScoped cs(crit_sect_); | 80 CriticalSectionScoped cs(crit_sect_); |
81 ts_extrapolator_->Reset(clock_->TimeInMilliseconds()); | 81 ts_extrapolator_->Reset(clock_->TimeInMilliseconds()); |
82 codec_timer_.reset(new VCMCodecTimer()); | 82 codec_timer_.reset(new VCMCodecTimer()); |
83 render_delay_ms_ = kDefaultRenderDelayMs; | 83 render_delay_ms_ = kDefaultRenderDelayMs; |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 *decode_ms = last_decode_ms_; | 298 *decode_ms = last_decode_ms_; |
299 *max_decode_ms = RequiredDecodeTimeMs(); | 299 *max_decode_ms = RequiredDecodeTimeMs(); |
300 *current_delay_ms = current_delay_ms_; | 300 *current_delay_ms = current_delay_ms_; |
301 *target_delay_ms = TargetDelayInternal(); | 301 *target_delay_ms = TargetDelayInternal(); |
302 *jitter_buffer_ms = jitter_delay_ms_; | 302 *jitter_buffer_ms = jitter_delay_ms_; |
303 *min_playout_delay_ms = min_playout_delay_ms_; | 303 *min_playout_delay_ms = min_playout_delay_ms_; |
304 *render_delay_ms = render_delay_ms_; | 304 *render_delay_ms = render_delay_ms_; |
305 } | 305 } |
306 | 306 |
307 } // namespace webrtc | 307 } // namespace webrtc |
OLD | NEW |