[Live-devel] Problem with fPresentationTime
Jeremy Noring
kidjan at gmail.com
Tue Jul 28 08:52:10 PDT 2009
I have an OnDemand RTSP server based around Live555 that streams out live
H.264; I implemented a subsession and framer. On the client side, I have a
receiver application based loosely around openRTSP, but with my own custom
H264 MediaSink class.
My problem is fPresentationTime; the values I hand off to Live555 on the
server side are not the values I get on the client side. Furthermore, the
_first_ value I receive on the client side is always crazy, and then values
thereafter appear to increase monotonically (although they still differ from
what was supplied to the server). I think I'm misunderstanding something
here.
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, but I don't understand why the first
timestamp I get on the receiver is out in left field. Could it be that
running on Windows has some effect on the time stamp? (both server/client
are running on Win32)
Any help is much appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20090728/024af040/attachment-0001.html>
More information about the live-devel
mailing list