<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div>In addition to the NPT, ServerMediaSubsession::seekStream() also takes a clientId, a streamToken, and a streamDuration.</div></blockquote><div><br></div>For your purpose, the "streamDuration" parameter can just be 0.0 - meaning: place no limit on how much data is streamed.</div><div><br></div><div>The other parameters come from your "RTSPServer::RTSPClientSession" object:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>- "fStreamStates[i].subsession" is a member variable. For you, "i" is just 0 (because - for Transport Streams - there is only one 'substream' for each stream).</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>- "fOurSessionId" is a member variable</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>- "fStreamStates[i].streamToken" is also a member variable. (Once again, for you, "i" is just 0.)</div><div><br></div><div>Similarly, for the new function that I proposed</div><div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>float ServerMediaSubsession::currentNPT(unsigned clientSessionId) const;</div><div>for getting the current NPT time, the parameters you need are the member variables:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>- "fStreamStates[i].subsession" (with "i" == 0)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>- "fOurSessionId" </div><div><br></div><div>All of these member variables are "protected:" within "RTSPServer::RTSPClientSession".</div><div><br></div><div>So, you can call these functions from your "RTSPServer::RTSPClientSession" object, provided, of course, that you subclass this - which I assume you have already done (because you have a custom server implementation).</div><div><br></div><div>I.e., you should be able to access these functions - "seekStream()" and "currentNPT()" (if I provide to to you) - by subclassing "RTSPServer::RTSPClientSession", without making *any* changes to the supplied library code.</div><div><br></div><div>The only remaining issue is how to call your new member function(s) of your subclassed "RTSPClientSession" object from outside the server - e.g., from an external thread. The way to do this is using the new "EventTrigger" mechanism that's defined for "TaskScheduler". (The "triggerEvent()" function is the only LIVE555 function that you're allowed to call from a separate thread (i.e., other than the one that runs the LIVE555 event loop).)</div><div><br></div><div>So, here's what I suggest you do. Start by demonstrating that - without making *any* changes to the supplied library code - you can subclass "RTSPServer::RTSPClientSession" in such a way that you can call "seekStream()" with a desired NPT value, and trigger this from an external thread. If (and only if) you can do this - and find that it works the way that you expect (i.e., changes the position of the stream without confusing the RTSP client) - then let me know, and I'll then go ahead and add the "currentNPT()" function (that you could use - in a similar way - to get the NPT 'bookmarks' that you want.)</div></div><br><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>