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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 void VCMTiming::UpdateHistograms() const { | 55 void VCMTiming::UpdateHistograms() const { |
56 CriticalSectionScoped cs(crit_sect_); | 56 CriticalSectionScoped cs(crit_sect_); |
57 if (num_decoded_frames_ == 0) { | 57 if (num_decoded_frames_ == 0) { |
58 return; | 58 return; |
59 } | 59 } |
60 int64_t elapsed_sec = | 60 int64_t elapsed_sec = |
61 (clock_->TimeInMilliseconds() - first_decoded_frame_ms_) / 1000; | 61 (clock_->TimeInMilliseconds() - first_decoded_frame_ms_) / 1000; |
62 if (elapsed_sec < metrics::kMinRunTimeInSeconds) { | 62 if (elapsed_sec < metrics::kMinRunTimeInSeconds) { |
63 return; | 63 return; |
64 } | 64 } |
65 RTC_HISTOGRAM_COUNTS_100("WebRTC.Video.DecodedFramesPerSecond", | 65 RTC_HISTOGRAM_COUNTS_SPARSE_100( |
| 66 "WebRTC.Video.DecodedFramesPerSecond", |
66 static_cast<int>((num_decoded_frames_ / elapsed_sec) + 0.5f)); | 67 static_cast<int>((num_decoded_frames_ / elapsed_sec) + 0.5f)); |
67 RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.DelayedFramesToRenderer", | 68 RTC_HISTOGRAM_PERCENTAGE_SPARSE( |
| 69 "WebRTC.Video.DelayedFramesToRenderer", |
68 num_delayed_decoded_frames_ * 100 / num_decoded_frames_); | 70 num_delayed_decoded_frames_ * 100 / num_decoded_frames_); |
69 if (num_delayed_decoded_frames_ > 0) { | 71 if (num_delayed_decoded_frames_ > 0) { |
70 RTC_HISTOGRAM_COUNTS_1000( | 72 RTC_HISTOGRAM_COUNTS_SPARSE_1000( |
71 "WebRTC.Video.DelayedFramesToRenderer_AvgDelayInMs", | 73 "WebRTC.Video.DelayedFramesToRenderer_AvgDelayInMs", |
72 sum_missed_render_deadline_ms_ / num_delayed_decoded_frames_); | 74 sum_missed_render_deadline_ms_ / num_delayed_decoded_frames_); |
73 } | 75 } |
74 } | 76 } |
75 | 77 |
76 void VCMTiming::Reset() { | 78 void VCMTiming::Reset() { |
77 CriticalSectionScoped cs(crit_sect_); | 79 CriticalSectionScoped cs(crit_sect_); |
78 ts_extrapolator_->Reset(clock_->TimeInMilliseconds()); | 80 ts_extrapolator_->Reset(clock_->TimeInMilliseconds()); |
79 codec_timer_.Reset(); | 81 codec_timer_.Reset(); |
80 render_delay_ms_ = kDefaultRenderDelayMs; | 82 render_delay_ms_ = kDefaultRenderDelayMs; |
81 min_playout_delay_ms_ = 0; | 83 min_playout_delay_ms_ = 0; |
82 jitter_delay_ms_ = 0; | 84 jitter_delay_ms_ = 0; |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 *decode_ms = last_decode_ms_; | 272 *decode_ms = last_decode_ms_; |
271 *max_decode_ms = MaxDecodeTimeMs(); | 273 *max_decode_ms = MaxDecodeTimeMs(); |
272 *current_delay_ms = current_delay_ms_; | 274 *current_delay_ms = current_delay_ms_; |
273 *target_delay_ms = TargetDelayInternal(); | 275 *target_delay_ms = TargetDelayInternal(); |
274 *jitter_buffer_ms = jitter_delay_ms_; | 276 *jitter_buffer_ms = jitter_delay_ms_; |
275 *min_playout_delay_ms = min_playout_delay_ms_; | 277 *min_playout_delay_ms = min_playout_delay_ms_; |
276 *render_delay_ms = render_delay_ms_; | 278 *render_delay_ms = render_delay_ms_; |
277 } | 279 } |
278 | 280 |
279 } // namespace webrtc | 281 } // namespace webrtc |
OLD | NEW |