Chromium Code Reviews| 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..b78ba66f95c61cb61bba12b42591f1f910aefb4d 100644 |
| --- a/webrtc/video/receive_statistics_proxy.cc |
| +++ b/webrtc/video/receive_statistics_proxy.cc |
| @@ -395,11 +395,20 @@ 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) { |
|
sprang_webrtc
2017/01/25 15:25:41
Maybe we should dcheck on the off chance qp < -1 ?
sakal
2017/01/25 15:34:45
Sure, I can add that once we decide whether to use
sakal
2017/01/26 09:33:31
Done.
|
| + if (!stats_.qp_sum) { |
| + RTC_DCHECK_EQ(stats_.frames_decoded, 1); |
| + stats_.qp_sum = rtc::Optional<uint64_t>(0); |
| + } |
| + *stats_.qp_sum += qp; |
| + } else { |
| + RTC_DCHECK(!stats_.qp_sum); |
|
sprang_webrtc
2017/01/25 15:25:41
Any chance we could hit this if we change codec on
sakal
2017/01/25 15:34:45
Yes, I think that is possible if one supports prov
sprang_webrtc
2017/01/25 15:59:14
Yeah, logging a warning and resetting the stats so
sakal
2017/01/26 09:33:31
Done.
|
| + } |
| decode_fps_estimator_.Update(1, now); |
| stats_.decode_frame_rate = decode_fps_estimator_.Rate(now).value_or(0); |
| } |