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

Maxim P. DEMENTIEV maxim.dementiev at nexvision.fr
Thu Jun 30 01:09:51 PDT 2016


On 06/29/2016 11:29 PM, Ross Finlayson wrote:
> yes - if a new “ServerMediaSubsession” object happened to be added to the “ServerMediaSession”
So, if a new subsession is added to the session, it should be done with
the help of ServerMediaSession::addSubsession(subsession) method which
increases the value of fSubsessionCounter, and
ServerMediaSession::numSubsessions() getter returns this value.

The question is more general, it is about a using the linear iteration
to count objects instead of a using the counter which is present in the
linked list container (ServerMediaSession), and not about the moment of
adding or removing objects to/from the container. (The invariant?)

Please, don't mind. It could be a little optimization, nothing more.

With respect,
Max



More information about the live-devel mailing list