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

Unified Diff: webrtc/video/rtp_streams_synchronizer.cc

Issue 2574133003: Make class of static functions in rtp_to_ntp.h: (Closed)
Patch Set: address comments Created 4 years 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/system_wrappers/source/rtp_to_ntp_unittest.cc ('k') | webrtc/video/stream_synchronization.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/rtp_streams_synchronizer.cc
diff --git a/webrtc/video/rtp_streams_synchronizer.cc b/webrtc/video/rtp_streams_synchronizer.cc
index d7fd949fff7634cf5fc0b202990279274c9c1f4e..0d026b310a492d0463f6d9ac12ff0d4f46bec1d3 100644
--- a/webrtc/video/rtp_streams_synchronizer.cc
+++ b/webrtc/video/rtp_streams_synchronizer.cc
@@ -41,8 +41,8 @@ bool UpdateMeasurements(StreamSynchronization::Measurements* stream,
}
bool new_rtcp_sr = false;
- if (!UpdateRtcpList(ntp_secs, ntp_frac, rtp_timestamp, &stream->rtcp,
- &new_rtcp_sr)) {
+ if (!stream->rtp_to_ntp.UpdateMeasurements(ntp_secs, ntp_frac, rtp_timestamp,
+ &new_rtcp_sr)) {
return false;
}
@@ -183,14 +183,14 @@ bool RtpStreamsSynchronizer::GetStreamSyncOffsetInMs(
}
int64_t latest_audio_ntp;
- if (!RtpToNtpMs(playout_timestamp, audio_measurement_.rtcp,
- &latest_audio_ntp)) {
+ if (!audio_measurement_.rtp_to_ntp.Estimate(playout_timestamp,
+ &latest_audio_ntp)) {
return false;
}
int64_t latest_video_ntp;
- if (!RtpToNtpMs(frame.timestamp(), video_measurement_.rtcp,
- &latest_video_ntp)) {
+ if (!video_measurement_.rtp_to_ntp.Estimate(frame.timestamp(),
+ &latest_video_ntp)) {
return false;
}
@@ -200,7 +200,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;
+ *estimated_freq_khz = video_measurement_.rtp_to_ntp.params().frequency_khz;
return true;
}
« no previous file with comments | « webrtc/system_wrappers/source/rtp_to_ntp_unittest.cc ('k') | webrtc/video/stream_synchronization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698