> I have an application that uses one or more RTSPClients.  I am having 
> difficulties in figuring out the best way to have the client handle a drop of 
> the server.  What is the best way to cleanly shutdown the client when the 
> server is either dies or is no longer reachable?  This is part of a larger 
> application and I can't just shutdown the entire application.  Can anyone 
> help me with this?

OK, here are the steps to take (in order):

1/ Close each of the 'sink' objects.  You can do this as follows (assuming that 
you have "session": a pointer to a "MediaSession" object):

if (session != NULL) {
  MediaSubsessionIterator iter(*session);
  MediaSubsession* subsession;
  while ((subsession = iter.next()) != NULL) {
    Medium::close(subsession->sink);
  }
}

2/ Close the "MediaSession" object (and all of the "RTPSource" and 
"RTCPInstance" objects that it created):

        Medium::close(session);

3/ Close the "RTSPClient" object:

        Medium::close(rtspClient);


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

_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to