[Live-devel] How to get NPT of a received RTP Packet in openRTSP

Nitin Jain jnitin at ssdi.sharp.co.in
Tue Dec 18 05:45:15 PST 2007


Hi all,
 
>From the LIVE mailing lists I found that :-
 
How does one obtain the current NPT (normal playing time) of a 
received packet?  The closests thing I can find is 
FramedSource::fPresentationTime, which is in UTC format... o.0

You will need to use this presentation time, but subtract from it the 
presentation time for the first-received RTP packet.  (You can also 
get the latter presentation time from the "RTPInfo" header - i.e., 
from the field "MediaSubsession.rtpInfo.timestamp").
 
Hence I try to use the same logic to derive npt time in sec of latest RTP Packet i.e
 nptTime = (((current_presentationTime.tv_sec - FirstReceivedPacket_presentationTime.tv_sec)) +

(((current_presentationTime.tv_usec - FirstReceivedPacket_presentationTime.tv_usec))/1000000));

But I am getting very big no i.e  1197953352.0000000.  Do i need to convert it to some other format .

I want to set the start time in playMediaSession for seeking purpose using npt time so that client should forward 2 sec from the current  media timeline which i think is npt .

Regards

Nitin

 
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20071218/e4976f3a/attachment.html 


More information about the live-devel mailing list