Move stats for decoded frames per second from VCMTiming to ReceiveStatisticsProxy.

Bug: none
Change-Id: I631a2b1cb550dded6d1e1daf47ac35583298d30d
Reviewed-on: https://webrtc-review.googlesource.com/36121
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21757}
This commit is contained in:
Åsa Persson
2018-01-24 17:04:07 +01:00
committed by Commit Bot
parent 91af24a74b
commit b9b07eaf28
4 changed files with 62 additions and 3 deletions

View File

@ -50,6 +50,7 @@ VCMTiming::~VCMTiming() {
}
}
// TODO(asapersson): Move stats to ReceiveStatisticsProxy.
void VCMTiming::UpdateHistograms() const {
rtc::CritScope cs(&crit_sect_);
if (num_decoded_frames_ == 0) {
@ -60,9 +61,6 @@ void VCMTiming::UpdateHistograms() const {
if (elapsed_sec < metrics::kMinRunTimeInSeconds) {
return;
}
RTC_HISTOGRAM_COUNTS_100(
"WebRTC.Video.DecodedFramesPerSecond",
static_cast<int>((num_decoded_frames_ / elapsed_sec) + 0.5f));
RTC_HISTOGRAM_PERCENTAGE(
"WebRTC.Video.DelayedFramesToRenderer",
num_delayed_decoded_frames_ * 100 / num_decoded_frames_);