[Live-devel] Problem with fPresentationTime

Jeremy Noring kidjan at gmail.com
Wed Jul 29 11:50:18 PDT 2009


Thank you for the clarification.  One question about 'wall clock' time:

 In the server, my samples come to me timestamped with a REFERENCE_TIME,
>> which is an __int64 value with 100 nanosecond units. So to convert from this
>> to the timeval, I do the following:
>>
>>        // Our samples are 100 NS units.  So to get to usec, we divide by
>> 10.
>>        fDurationInMicroseconds = sample->m_duration / 10;
>>        REFERENCE_TIME sampleTimeInUsec = sample->m_time / 10;
>>        fPresentationTime.tv_sec = (long) sampleTimeInUsec / 1000000;
>>        fPresentationTime.tv_usec = (long) sampleTimeInUsec % 1000000;
>>
>> ...I am likely doing something wrong
>>
>
> Yes, you're not aligning these presentation times with 'wall clock' time -
> i.e., the time that you would get by calling "gettimeofday()".


So, the sample times I get from my encoder start at 0 and increase (i.e. a
relative timestamp); when you say 'wall clock' time, does this mean I should
be taking note of the absolute start time?

My video source is live, so the timestamps I get from the encoder are
(somewhat) arbitrary.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20090729/ed4e7639/attachment.html>


More information about the live-devel mailing list