From 77313800c72fa1e33c30e952800e4157e9ad44a4 Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Wed, 17 Apr 2024 08:50:15 -0700 Subject: [PATCH] webrtc stats: fix video remote-outbound-rtp timestamp which had a 70 year offset (i.e. 2094 instead of 2024) which broke the webrtc-internal stats graphs. A similar adjustment is done for audio in audio/channel_receive.cc BUG=webrtc:12529 Change-Id: I0ce43cc8b451185bc056cf9e54757ef22d006c99 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347780 Reviewed-by: Florent Castelli Commit-Queue: Philipp Hancke Reviewed-by: Harald Alvestrand Cr-Commit-Position: refs/heads/main@{#42114} --- video/video_receive_stream2.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/video/video_receive_stream2.cc b/video/video_receive_stream2.cc index 6f63f760c0..f3a7c329a6 100644 --- a/video/video_receive_stream2.cc +++ b/video/video_receive_stream2.cc @@ -573,9 +573,10 @@ VideoReceiveStreamInterface::Stats VideoReceiveStream2::GetStats() const { rtp_video_stream_receiver_.GetSenderReportStats(); if (rtcp_sr_stats) { stats.last_sender_report_timestamp_ms = - rtcp_sr_stats->last_arrival_timestamp.ToMs(); + rtcp_sr_stats->last_arrival_timestamp.ToMs() - + rtc::kNtpJan1970Millisecs; stats.last_sender_report_remote_timestamp_ms = - rtcp_sr_stats->last_remote_timestamp.ToMs(); + rtcp_sr_stats->last_remote_timestamp.ToMs() - rtc::kNtpJan1970Millisecs; stats.sender_reports_packets_sent = rtcp_sr_stats->packets_sent; stats.sender_reports_bytes_sent = rtcp_sr_stats->bytes_sent; stats.sender_reports_reports_count = rtcp_sr_stats->reports_count;