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

Unified Diff: webrtc/video/rtp_streams_synchronizer.cc

Issue 2385763002: Add stats for frequency offset when converting RTP timestamp to NTP time. (Closed)
Patch Set: calculate freq/offset when rtcp list is updated Created 4 years, 2 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/rtp_streams_synchronizer.cc
diff --git a/webrtc/video/rtp_streams_synchronizer.cc b/webrtc/video/rtp_streams_synchronizer.cc
index 885dad39797fcebeb585e4d3fe4c564d8b3a33e6..3bc208fe99e5bf67b4f6ba4f25f402afdb539295 100644
--- a/webrtc/video/rtp_streams_synchronizer.cc
+++ b/webrtc/video/rtp_streams_synchronizer.cc
@@ -40,8 +40,8 @@ int UpdateMeasurements(StreamSynchronization::Measurements* stream,
}
bool new_rtcp_sr = false;
- if (!UpdateRtcpList(
- ntp_secs, ntp_frac, rtp_timestamp, &stream->rtcp, &new_rtcp_sr)) {
+ if (!UpdateRtcpList(ntp_secs, ntp_frac, rtp_timestamp, &stream->rtcp,
+ &new_rtcp_sr)) {
return -1;
}
@@ -168,7 +168,9 @@ void RtpStreamsSynchronizer::Process() {
}
bool RtpStreamsSynchronizer::GetStreamSyncOffsetInMs(
- const VideoFrame& frame, int64_t* stream_offset_ms) const {
+ const VideoFrame& frame,
+ int64_t* stream_offset_ms,
+ double* estimated_freq_khz) const {
rtc::CritScope lock(&crit_);
if (voe_channel_id_ == -1)
return false;
@@ -197,6 +199,7 @@ bool RtpStreamsSynchronizer::GetStreamSyncOffsetInMs(
latest_video_ntp += time_to_render_ms;
*stream_offset_ms = latest_audio_ntp - latest_video_ntp;
+ *estimated_freq_khz = video_measurement_.rtcp.params.frequency_khz;
return true;
}

Powered by Google App Engine
This is Rietveld 408576698