[Live-devel] Get current playback position

Warren Young warren at etr-usa.com
Fri Sep 30 18:37:59 PDT 2011


On 9/30/2011 4:12 PM, Ross Finlayson wrote:
>> 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);

We want to do this stream seeking from the RTSP server side, in a 
program that, like live555MediaServer, does little more than just wrap 
the RTSP server implementation in liblivemedia.  By "client", we mean "a 
client of liblivemedia.so", not "the RTSP protocol client".

In addition to the NPT, ServerMediaSubsession::seekStream() also takes a 
clientId, a streamToken, and a streamDuration.  I was saying that I 
hadn't looked into whether these other values are actually available to 
clients of liblivemedia, or whether we'd need more accessors to dig 
these other values out of the library, too.

I just looked into it, and it appears that at least some of these other 
values belong to RTSPClientSession, which is buried inside RTSPServer. 
I haven't looked deeper than that, but I'm getting the sense that we 
need more than this proposed currentNPT() call to call seekStream() from 
outside liblivemedia.

If I'd realized there was that much work involved, I'd have provided a 
patch instead of shooting off a request for a simple accessor function.

You're welcome to do the work if you want, but it is our itch.

This is also experimental.  We don't yet know how the various RTSP 
clients will cope with the stream changing out from under them like 
that.  We're streaming MPEG-2 TS, so we *assume* they'll treat it like 
packet loss and quickly re-sync.  If we have to do something like wait 
for an I frame to do the switch, it'll be a significant amount of work.


More information about the live-devel mailing list