[Live-devel] RTP Timestamp to UTC time
Ross Finlayson
finlayson at live555.com
Sun Jun 13 18:49:50 PDT 2010
>I am not a casual hobbiest.I am using gmail id because My Official
>mail-id is not accessible from home. I access Live555 mails from
>home also. But if you want I will subscribe to the live555 mailing
>list using my official id.
Yes, if you want to be taken seriously on this mailing list, you
should use a professional email address - i.e., one whose domain name
identifies an organization (company or school) that you're affiliated
with, or at least a personal custom domain name. I use the domain
name of posters' email addresses as a first-level filter when
deciding which messages are worth responding to. If your only access
to email is via a "@hotmail", "@aol", "@gmail" etc. -type address,
then I'm going to assume (absent strong evidence to the contrary)
that you lack the sophistication to use the "LIVE555 Streaming Media"
software. The hundreds of previous messages posted to this mailing
list have borne this out. In any case, messages from 'hobbyist'
email addresses like these will *always* be moderated and delayed -
sometimes for several days.
>I having following confusion:
>
>1. fSyncTime.tv_sec = ntpTimestampMSW - 0x83AA7E80; // 1/1/1900 -> 1/1/1970
> why 0x83AA7E80 is subtracted from ntpTimestampMSW?
Because (as noted in the comment) it converts the time value from one
'epoch' to another. I.e., it converts the time value from the
1/1/1900 epoch used by NTP to the 1/1/1970 epoch used by the
Unix/Posix "gettimeofday()" function. (This is using 32-bit values.)
> 2. double microseconds = (ntpTimestampLSW*15625.0)/0x04000000; // 10^6/2^32
>Why 15625.0 is multiplied with ntpTimestampLSW and the result is
>divided by 0x04000000
Because (as noted in the comment) multiplying by 15625/0x04000000 is
equivalent to multiplying by 10^6, and then dividing by 2^32 - i.e.,
converting a 32-bit binary fraction in seconds to microseconds,
reducing the liklihood of truncation error.
But in any case (especially as you are writing a client application)
you absolutely do not need to care about timestamps (RTP or NTP).
All you need to care about are presentation times (and whether or not
they have been synchronized using RTCP).
--
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
More information about the live-devel
mailing list