[Live-devel] Setting Multiple Parameters with one SET_PARAMETER command

Ross Finlayson finlayson at live555.com
Fri Sep 28 01:33:39 PDT 2012


> For an example, our sever session status widget displays, among other things the RTP and RTCP ports for UDP that are in use for each stream in each client session. Right or wrong the way we did it before was by sub-classing RTSPClientSession so we'd have access to the void* streamToken for each stream and then through OnDemaindMediaSubsession (or a subclass there of) inspecting the values in the StreamState object. Each RTSPClientSession object has a list of StreamState objects that appears to hold all of this kind of information and it appears to be specific to the client session.
[...]
> Spending a few minutes looking at the code this morning I can't see another easy way to do this.

Another way to do this - which is the way that I originally would have preferred - is to redefine (in your "OnDemandServerMediaSubsession" subclass) the "getStreamParameters()" virtual function.  Your reimplemented "getStreamParameters()" would first call the original "getStreamParameters()", and then get the RTP and RTCP port numbers (which were result parameters from this call).

But on reflection this probably isn't really any cleaner than what you're doing, so, reluctantly, I'll endorse letting developers see the "StreamState" and "Destinations" classes.  So, in the next release of the software, I'll make the "fDestinationsHashTable" field "protected:".  That should give you what you need.


> I'm not quite sure how it works if fReuseFirstSource is set and one client requests a TCP connection and another a UDP? 

Aha!  There's actually a bug in the current code that prevents this from working properly.  That's another thing that I'll need to fix in the next release of the software.

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/20120928/cdfa22c3/attachment.html>


More information about the live-devel mailing list