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

Unified Diff: webrtc/video/receive_statistics_proxy.cc

Issue 1893543003: Revert of 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: rebase Created 4 years, 8 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 acecf06288d1ec62e7f065ec16264b883d60fd94..ff419249d4f2fe2bcb65d63115b391d5d7e2cf14 100644
--- a/webrtc/video/receive_statistics_proxy.cc
+++ b/webrtc/video/receive_statistics_proxy.cc
@@ -170,6 +170,9 @@ 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(
@@ -226,9 +229,7 @@ void ReceiveStatisticsProxy::OnDecodedFrame() {
stats_.decode_frame_rate = decode_fps_estimator_.Rate(now);
}
-void ReceiveStatisticsProxy::OnRenderedFrame(const VideoFrame& frame) {
- int width = frame.width();
- int height = frame.height();
+void ReceiveStatisticsProxy::OnRenderedFrame(int width, int height) {
RTC_DCHECK_GT(width, 0);
RTC_DCHECK_GT(height, 0);
uint64_t now = clock_->TimeInMilliseconds();
@@ -240,12 +241,6 @@ void ReceiveStatisticsProxy::OnRenderedFrame(const VideoFrame& frame) {
render_height_counter_.Add(height);
render_fps_tracker_.AddSamples(1);
render_pixel_tracker_.AddSamples(sqrt(width * height));
-
- if (frame.ntp_time_ms() > 0) {
- int64_t delay_ms = clock_->CurrentNtpInMilliseconds() - frame.ntp_time_ms();
- if (delay_ms >= 0)
- delay_counter_.Add(delay_ms);
- }
}
void ReceiveStatisticsProxy::OnSyncOffsetUpdated(int64_t sync_offset_ms) {
« 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