[Live-devel] ServerMediaSession::numSubsessions() and fNumStreamStates in RTSPServer::RTSPClientSession::handleCmd_SETUP()

Ross Finlayson finlayson at live555.com
Wed Jun 29 14:29:02 PDT 2016


> A cycle with ServerMediaSubsessionIterator is used in
> RTSPServer::RTSPClientSession::handleCmd_SETUP() to calculate the value
> of fNumStreamStates.
> 
> I wonder why ServerMediaSession::numSubsessions() isn't used for it?
> Could they have different results?

In principle, yes - if a new “ServerMediaSubsession” object happened to be added to the “ServerMediaSession” sometime after the “SETUP” command was handled.  (Normally that won’t happen though, because normally all of the “ServerMediaSubsession” objects are added to the “ServerMediaSession” before the server starts handling commands.)


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




More information about the live-devel mailing list