Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(412)

Side by Side Diff: webrtc/modules/video_coding/timing.cc

Issue 1788783002: Add macros for ability to log samples that are added to histograms (RTC_LOGGED_*). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/video_coding/jitter_buffer.cc ('k') | webrtc/system_wrappers/include/metrics.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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( 65 RTC_LOGGED_HISTOGRAM_COUNTS_100(
66 "WebRTC.Video.DecodedFramesPerSecond", 66 "WebRTC.Video.DecodedFramesPerSecond",
67 static_cast<int>((num_decoded_frames_ / elapsed_sec) + 0.5f)); 67 static_cast<int>((num_decoded_frames_ / elapsed_sec) + 0.5f));
68 RTC_HISTOGRAM_PERCENTAGE( 68 RTC_LOGGED_HISTOGRAM_PERCENTAGE(
69 "WebRTC.Video.DelayedFramesToRenderer", 69 "WebRTC.Video.DelayedFramesToRenderer",
70 num_delayed_decoded_frames_ * 100 / num_decoded_frames_); 70 num_delayed_decoded_frames_ * 100 / num_decoded_frames_);
71 if (num_delayed_decoded_frames_ > 0) { 71 if (num_delayed_decoded_frames_ > 0) {
72 RTC_HISTOGRAM_COUNTS_1000( 72 RTC_LOGGED_HISTOGRAM_COUNTS_1000(
73 "WebRTC.Video.DelayedFramesToRenderer_AvgDelayInMs", 73 "WebRTC.Video.DelayedFramesToRenderer_AvgDelayInMs",
74 sum_missed_render_deadline_ms_ / num_delayed_decoded_frames_); 74 sum_missed_render_deadline_ms_ / num_delayed_decoded_frames_);
75 } 75 }
76 } 76 }
77 77
78 void VCMTiming::Reset() { 78 void VCMTiming::Reset() {
79 CriticalSectionScoped cs(crit_sect_); 79 CriticalSectionScoped cs(crit_sect_);
80 ts_extrapolator_->Reset(clock_->TimeInMilliseconds()); 80 ts_extrapolator_->Reset(clock_->TimeInMilliseconds());
81 codec_timer_.reset(new VCMCodecTimer()); 81 codec_timer_.reset(new VCMCodecTimer());
82 render_delay_ms_ = kDefaultRenderDelayMs; 82 render_delay_ms_ = kDefaultRenderDelayMs;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 *decode_ms = last_decode_ms_; 277 *decode_ms = last_decode_ms_;
278 *max_decode_ms = static_cast<int>(RequiredDecodeTimeMs()); 278 *max_decode_ms = static_cast<int>(RequiredDecodeTimeMs());
279 *current_delay_ms = current_delay_ms_; 279 *current_delay_ms = current_delay_ms_;
280 *target_delay_ms = TargetDelayInternal(); 280 *target_delay_ms = TargetDelayInternal();
281 *jitter_buffer_ms = jitter_delay_ms_; 281 *jitter_buffer_ms = jitter_delay_ms_;
282 *min_playout_delay_ms = min_playout_delay_ms_; 282 *min_playout_delay_ms = min_playout_delay_ms_;
283 *render_delay_ms = render_delay_ms_; 283 *render_delay_ms = render_delay_ms_;
284 } 284 }
285 285
286 } // namespace webrtc 286 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/jitter_buffer.cc ('k') | webrtc/system_wrappers/include/metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698