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

Unified Diff: webrtc/video/receive_statistics_proxy.cc

Issue 2649133005: Add QP sum stats for received streams. (Closed)
Patch Set: Add DecodedWithQp to interface. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
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);
}

Powered by Google App Engine
This is Rietveld 408576698