> Would I access the RTPTransmissionStatsDB in function 
> RTSPServer::RTSPClientSession:noteLiveness() in RTSPServer.cpp?

No; that function is used only by the RTCP implementation (when it receives an 
incoming "RR" packet).  It's not a function that you would call (or modify) 
yourself.


> Alternatively, is there another (cleaner) way to do this without modifying 
> core library code i.e. RTSPServer.cpp?

Yes.  Note that each "RTPTransmissionStatsDB" object (a 'database of RTP 
transmission stats') is for a particular "RTPSink" object (and accessed using 
"RTPSink::transmissionStatsDB()"); therefore, you access these stats by first 
accessing a "RTPSink" object.

Note that a "RTPSink" object is used for a particular server->client 
(sub)session - i.e., for a particular media substream (audio or video) of a 
particular server->client stream.  Therefore, you access a "RTPSink" object via 
a "RTSPServer::RTSPClientSession" object.  So, you need to do the following:
1/ Subclass "RTSPServer::RTSPClientSession".
2/ Subclass "RTSPServer" (only to redefine the "createNewClientSession()" 
virtual function to create objects of your new "RTSPServer::RTSPClientSession" 
subclass, rather than just the "RTSPServer::RTSPClientSession" base class (the 
default behavior)).
3/ In your "RTSPServer::RTSPClientSession" subclass - whenever you wish to 
access the transmission stats (e.g., you might choose to do this periodically, 
using a timer) - you would do so using code like the following:
      for (unsigned i = 0; i < fNumStreamStates; ++i) {
        (StreamState*)streamState = (StreamState*)fStreamStates[i].streamToken;
          // we can do this cast because we know that we are using 
"OnDemandServerMediaSubsession"s
        RTPTransmissionStatsDB& transmissionStatesDB = 
streamState->rtpSink()->transmissionStatsDB();
      }


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

_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to