system_wrappers/source/rtp_to_ntp_estimator.cc
// Calculates the RTP timestamp frequency from two pairs of NTP/RTP timestamps.
Calculates the RTP timestamp frequency from two pairs of NTP/RTP timestamps.
Calculates the RTP timestamp frequency from two pairs of NTP / RTP timestamps .
bool CalculateFrequency(int64_t ntp_ms1,
                        uint32_t rtp_timestamp1,
                        int64_t ntp_ms2,
                        uint32_t rtp_timestamp2,
                        double* frequency_khz) {
  if (ntp_ms1 <= ntp_ms2)
    return false;
  *frequency_khz = static_cast<double>(rtp_timestamp1 - rtp_timestamp2) /
                   static_cast<double>(ntp_ms1 - ntp_ms2);
  return true;
}
bool CalculateFrequency ( int64_t ntp_ms1 , uint32_t rtp_timestamp1 , int64_t ntp_ms2 , uint32_t rtp_timestamp2 , double * frequency_khz ) { if ( ntp_ms1 <= ntp_ms2 ) return false ; * frequency_khz = static_cast < double > ( rtp_timestamp1 - rtp_timestamp2 ) / static_cast < double > ( ntp_ms1 - ntp_ms2 ) ; return true ; }
Calculates the RTP timestamp frequency from two pairs of NTP/RTP timestamps.
Calculates the RTP timestamp frequency from two pairs of NTP / RTP timestamps .