<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite">In looking at our old code we were looking at fDestinationsHashTable to determine if a stream was RTP over TCP or RTP over UDP (for a server sessions status widget).<br>This was done before you put the StreamState and Destinations classes in the header and the guy that did it back then added a GetClientCommProtocol() method to OnDemandServerMediaSubsession that checked the isTCP member of the Destinations object for the sessionID . I wanted to do the same but without modifying your code so I was going to put it in a child class but I can't if fDestinationsHashTable is private.<br><br>If there is another better way to determine if a session is TCP or UDP</blockquote><div><br></div>Yes - the way to do this is to inspect a "RTSPServer::RTSPClientSession" object, because that is the class that represents the state of a RTSP/RTP/RTCP stream to a client.  Beginning with the latest release (version 2012.09.27) of the "LIVE555 Streaming Media" code, there's a member function</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>Boolean usesTCPTransport();</div><div>of the "RTSPServer::RTSPClientSession" class that you can call, to check whether a stream is TCP or UDP.</div><div><br></div><div>(If you need your own way to keep track of these "RTSPServer::RTSPClientSession" objects, then the way to do this is to:</div><div><span class="Apple-tab-span" style="white-space:pre">   </span>- Subclass "RTSPServer" and "RTSPServer::RTSPClientSession"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>- Redefine the virtual function "RTSPServer::createNewClientSession()", and reimplement it (in your "RTSPServer" subclass) to return an instance of your "RTSPServer::RTSPClientSession" subclass.</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>- (Perhaps) Redefine and reimplement the destructor of your "RTSPServer::RTSPClientSession" subclass also.</div><div>)</div><div><br></div><div>Note that, in contrast, an "OnDemandServerMediaSubsession" object is the *wrong* thing to be inspecting, because that class represents a piece of media that can be streamed, possibly several different times (sequentially or concurrently), to many different clients (which might have request TCP streaming, or UDP streaming).</div><div><br></div><div>And a "StreamState" object is also the wrong thing to be inspecting, because that class represents the state of a currently ongoing stream (from the piece of media represented by an "OnDemandServerMediaSubsession" object), *possibly to several different concurrent clients* (if the "reuseFirstSource" parameter was set to True).</div><div><br></div><div>In fact, I'm not convinced that any developer needs to have the "StreamState" class (or the "Destinations" class) visible, so there's a good chance that this visibility will be removed in future releases of the software.  (So if you, or anyone, believes that they really need these classes to remain visible, then please let us know ASAP.)</div><br><br><div apple-content-edited="true">
<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>