<br>Thank you for the clarification. One question about 'wall clock' time:<br><br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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:<br>
<br>
// Our samples are 100 NS units. So to get to usec, we divide by 10.<br>
fDurationInMicroseconds = sample->m_duration / 10;<br>
REFERENCE_TIME sampleTimeInUsec = sample->m_time / 10;<br>
fPresentationTime.tv_sec = (long) sampleTimeInUsec / 1000000;<br>
fPresentationTime.tv_usec = (long) sampleTimeInUsec % 1000000;<br>
<br>
...I am likely doing something wrong<br>
</blockquote>
<br></div>
Yes, you're not aligning these presentation times with 'wall clock' time - i.e., the time that you would get by calling "gettimeofday()".</blockquote><div><br>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?<br>
<br>My video source is live, so the timestamps I get from the encoder are (somewhat) arbitrary.</div></div>