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

Unified Diff: webrtc/system_wrappers/source/rtp_to_ntp.cc

Issue 2385763002: Add stats for frequency offset when converting RTP timestamp to NTP time. (Closed)
Patch Set: 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
« no previous file with comments | « webrtc/system_wrappers/include/rtp_to_ntp.h ('k') | webrtc/system_wrappers/source/rtp_to_ntp_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/system_wrappers/source/rtp_to_ntp.cc
diff --git a/webrtc/system_wrappers/source/rtp_to_ntp.cc b/webrtc/system_wrappers/source/rtp_to_ntp.cc
index 05091461d4123ff9bfbea041bd18187a0c411e02..5bca4c094a3bba2cc889c8206130b928846e5222 100644
--- a/webrtc/system_wrappers/source/rtp_to_ntp.cc
+++ b/webrtc/system_wrappers/source/rtp_to_ntp.cc
@@ -96,6 +96,15 @@ bool UpdateRtcpList(uint32_t ntp_secs,
bool RtpToNtpMs(int64_t rtp_timestamp,
const RtcpList& rtcp,
int64_t* rtp_timestamp_in_ms) {
+ double frequency_khz;
+ return RtpToNtpMsAndReturnFreq(rtp_timestamp, rtcp, rtp_timestamp_in_ms,
+ &frequency_khz);
+}
+
+bool RtpToNtpMsAndReturnFreq(int64_t rtp_timestamp,
stefan-webrtc 2016/10/05 14:35:46 Instead of introducing this slightly odd function,
åsapersson 2016/10/09 14:22:15 The old timestamp in the RctpList is used in RtpTo
+ const RtcpList& rtcp,
+ int64_t* rtp_timestamp_in_ms,
+ double* estimated_frequency_khz) {
if (rtcp.size() != 2)
return false;
@@ -133,6 +142,7 @@ bool RtpToNtpMs(int64_t rtp_timestamp,
return false;
}
*rtp_timestamp_in_ms = rtp_timestamp_ntp_ms;
+ *estimated_frequency_khz = freq_khz;
return true;
}
« no previous file with comments | « webrtc/system_wrappers/include/rtp_to_ntp.h ('k') | webrtc/system_wrappers/source/rtp_to_ntp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698