[Live-devel] Get current playback position

Ross Finlayson finlayson at live555.com
Fri Sep 30 15:12:30 PDT 2011


> We want to implement bookmarking:
> 
>   a) find out where the server is playing from right now;

Would the following work for you?

A new member function to "ServerMediaSubsession":
	float currentNPT(unsigned clientSessionId) const;

That returns (based on the most recently-sent data) the current 'normal play time' (NPT) for the specified client (on this 'subsession').  (Note that the function has to be on "ServerMediaSubsession" rather than "ServerMediaSession" because (in general, even though not for Transport Streams) there can be more than one RTP stream for each client session, and these could be paused/played independently.)


> For step a), I haven't yet studied whether the other parameters are easy to obtain as a client of the library.

Yes, at the client end, there's a function:
	double MediaSession::getNormalPlayTime(struct timeval const& presentationTime);
that you can call to get the 'NPT' (based on a recently-received presentation time).


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20110930/f815399f/attachment.html>


More information about the live-devel mailing list