Index: webrtc/video/receive_statistics_proxy.cc |
diff --git a/webrtc/video/receive_statistics_proxy.cc b/webrtc/video/receive_statistics_proxy.cc |
index 68050ba6a8a440dcc3eb31a4edf22127d99949c0..dac50c3bf18b6b82154db17c60c580034993678c 100644 |
--- a/webrtc/video/receive_statistics_proxy.cc |
+++ b/webrtc/video/receive_statistics_proxy.cc |
@@ -395,11 +395,16 @@ void ReceiveStatisticsProxy::DataCountersUpdated( |
} |
} |
-void ReceiveStatisticsProxy::OnDecodedFrame() { |
+void ReceiveStatisticsProxy::OnDecodedFrame(int qp) { |
uint64_t now = clock_->TimeInMilliseconds(); |
rtc::CritScope lock(&crit_); |
++stats_.frames_decoded; |
+ if (qp != -1) { |
+ if (!stats_.qp_sum) |
+ stats_.qp_sum = rtc::Optional<uint64_t>(0); |
+ *stats_.qp_sum += qp; |
+ } |
hbos
2017/01/25 11:31:12
Either all frames or no frames should have qp valu
sakal
2017/01/25 12:39:34
Done.
|
decode_fps_estimator_.Update(1, now); |
stats_.decode_frame_rate = decode_fps_estimator_.Rate(now).value_or(0); |
} |