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

Unified Diff: webrtc/video/receive_statistics_proxy.cc

Issue 1688143003: Update histogram "WebRTC.Video.OnewayDelayInMs" to use the estimated one-way delay. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « webrtc/video/receive_statistics_proxy.h ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/receive_statistics_proxy.cc
diff --git a/webrtc/video/receive_statistics_proxy.cc b/webrtc/video/receive_statistics_proxy.cc
index 649ea0cd6e0523ccb7a4ba9df512608a805ff482..12b04218c0c2e4077a5b70bc2801d0716023b5ea 100644
--- a/webrtc/video/receive_statistics_proxy.cc
+++ b/webrtc/video/receive_statistics_proxy.cc
@@ -109,9 +109,6 @@ void ReceiveStatisticsProxy::OnDecoderTiming(int decode_ms,
stats_.min_playout_delay_ms = min_playout_delay_ms;
stats_.render_delay_ms = render_delay_ms;
decode_time_counter_.Add(decode_ms);
- // Network delay (rtt/2) + target_delay_ms (jitter delay + decode time +
- // render delay).
- delay_counter_.Add(target_delay_ms + rtt_ms / 2);
}
void ReceiveStatisticsProxy::RtcpPacketTypesCounterUpdated(
@@ -161,7 +158,9 @@ void ReceiveStatisticsProxy::OnDecodedFrame() {
stats_.decode_frame_rate = decode_fps_estimator_.Rate(now);
}
-void ReceiveStatisticsProxy::OnRenderedFrame(int width, int height) {
+void ReceiveStatisticsProxy::OnRenderedFrame(const VideoFrame& frame) {
+ int width = frame.width();
+ int height = frame.height();
RTC_DCHECK_GT(width, 0);
RTC_DCHECK_GT(height, 0);
uint64_t now = clock_->TimeInMilliseconds();
@@ -173,6 +172,11 @@ void ReceiveStatisticsProxy::OnRenderedFrame(int width, int height) {
render_height_counter_.Add(height);
render_fps_tracker_.AddSamples(1);
render_pixel_tracker_.AddSamples(sqrt(width * height));
+
+ if (frame.ntp_time_ms() > 0) {
+ delay_counter_.Add(clock_->CurrentNtpInMilliseconds() -
+ frame.ntp_time_ms());
stefan-webrtc 2016/02/22 16:18:21 Maybe we should make sure this is positive before
åsapersson 2016/03/01 12:01:43 RemoteNtpTimeEstimator::Estimate returns -1 on err
stefan-webrtc 2016/03/01 12:38:20 I'm not sure that's enough as there are no guarant
åsapersson 2016/03/01 13:46:42 Ok. Added a check that the delay is positive befor
+ }
}
void ReceiveStatisticsProxy::OnReceiveRatesUpdated(uint32_t bitRate,
« no previous file with comments | « webrtc/video/receive_statistics_proxy.h ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698