OLD | NEW |
1 /* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 1 /* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
2 * | 2 * |
3 * Use of this source code is governed by a BSD-style license | 3 * Use of this source code is governed by a BSD-style license |
4 * that can be found in the LICENSE file in the root of the source | 4 * that can be found in the LICENSE file in the root of the source |
5 * tree. An additional intellectual property rights grant can be found | 5 * tree. An additional intellectual property rights grant can be found |
6 * in the file PATENTS. All contributing project authors may | 6 * in the file PATENTS. All contributing project authors may |
7 * be found in the AUTHORS file in the root of the source tree. | 7 * be found in the AUTHORS file in the root of the source tree. |
8 */ | 8 */ |
9 | 9 |
10 #include "webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h" | 10 #include "webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h" |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 int64_t duration_sec = | 308 int64_t duration_sec = |
309 (clock_->TimeInMilliseconds() - stats_.first_frame_time_ms_ + 500) / 1000; | 309 (clock_->TimeInMilliseconds() - stats_.first_frame_time_ms_ + 500) / 1000; |
310 if (duration_sec >= metrics::kMinRunTimeInSeconds) { | 310 if (duration_sec >= metrics::kMinRunTimeInSeconds) { |
311 RTC_HISTOGRAM_COUNTS_10000( | 311 RTC_HISTOGRAM_COUNTS_10000( |
312 "WebRTC.Video.Screenshare.Layer0.FrameRate", | 312 "WebRTC.Video.Screenshare.Layer0.FrameRate", |
313 (stats_.num_tl0_frames_ + (duration_sec / 2)) / duration_sec); | 313 (stats_.num_tl0_frames_ + (duration_sec / 2)) / duration_sec); |
314 RTC_HISTOGRAM_COUNTS_10000( | 314 RTC_HISTOGRAM_COUNTS_10000( |
315 "WebRTC.Video.Screenshare.Layer1.FrameRate", | 315 "WebRTC.Video.Screenshare.Layer1.FrameRate", |
316 (stats_.num_tl1_frames_ + (duration_sec / 2)) / duration_sec); | 316 (stats_.num_tl1_frames_ + (duration_sec / 2)) / duration_sec); |
317 int total_frames = stats_.num_tl0_frames_ + stats_.num_tl1_frames_; | 317 int total_frames = stats_.num_tl0_frames_ + stats_.num_tl1_frames_; |
318 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.Screenshare.FramesPerDrop", | 318 RTC_HISTOGRAM_COUNTS_10000( |
319 stats_.num_dropped_frames_ == 0 | 319 "WebRTC.Video.Screenshare.FramesPerDrop", |
320 ? 0 | 320 (stats_.num_dropped_frames_ == 0 ? 0 : total_frames / |
321 : total_frames / stats_.num_dropped_frames_); | 321 stats_.num_dropped_frames_)); |
322 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.Screenshare.FramesPerOvershoot", | 322 RTC_HISTOGRAM_COUNTS_10000( |
323 stats_.num_overshoots_ == 0 | 323 "WebRTC.Video.Screenshare.FramesPerOvershoot", |
324 ? 0 | 324 (stats_.num_overshoots_ == 0 ? 0 |
325 : total_frames / stats_.num_overshoots_); | 325 : total_frames / stats_.num_overshoots_)); |
326 if (stats_.num_tl0_frames_ > 0) { | 326 if (stats_.num_tl0_frames_ > 0) { |
327 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.Screenshare.Layer0.Qp", | 327 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.Screenshare.Layer0.Qp", |
328 stats_.tl0_qp_sum_ / stats_.num_tl0_frames_); | 328 stats_.tl0_qp_sum_ / stats_.num_tl0_frames_); |
329 RTC_HISTOGRAM_COUNTS_10000( | 329 RTC_HISTOGRAM_COUNTS_10000( |
330 "WebRTC.Video.Screenshare.Layer0.TargetBitrate", | 330 "WebRTC.Video.Screenshare.Layer0.TargetBitrate", |
331 stats_.tl0_target_bitrate_sum_ / stats_.num_tl0_frames_); | 331 stats_.tl0_target_bitrate_sum_ / stats_.num_tl0_frames_); |
332 } | 332 } |
333 if (stats_.num_tl1_frames_ > 0) { | 333 if (stats_.num_tl1_frames_ > 0) { |
334 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.Screenshare.Layer1.Qp", | 334 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.Screenshare.Layer1.Qp", |
335 stats_.tl1_qp_sum_ / stats_.num_tl1_frames_); | 335 stats_.tl1_qp_sum_ / stats_.num_tl1_frames_); |
336 RTC_HISTOGRAM_COUNTS_10000( | 336 RTC_HISTOGRAM_COUNTS_10000( |
337 "WebRTC.Video.Screenshare.Layer1.TargetBitrate", | 337 "WebRTC.Video.Screenshare.Layer1.TargetBitrate", |
338 stats_.tl1_target_bitrate_sum_ / stats_.num_tl1_frames_); | 338 stats_.tl1_target_bitrate_sum_ / stats_.num_tl1_frames_); |
339 } | 339 } |
340 } | 340 } |
341 } | 341 } |
342 | 342 |
343 } // namespace webrtc | 343 } // namespace webrtc |
OLD | NEW |