void LiveRtspServer::removeRtspMediaSession(const Channel& channel)
{
  /// code to kick clients before removing session so that there are no outstanding references
  endServerSession(channel.ChannelName);

	// Check whether we already have a "ServerMediaSession" for this media stream:
  ServerMediaSession* sms = RTSPServer::lookupServerMediaSession(channel.ChannelName.c_str());
	
	if (sms != NULL)
	{
    VLOG(2) << "Removed session Channel Id: " << channel.ChannelId << " Name: " << channel.ChannelName << " from RTSP ServerMediaSessions";
		// "sms" was created for a media stream that the transcoder is no longer sending. Remove it.
		removeServerMediaSession(sms);
	}
	else
	{
    LOG(WARNING) << "Failed removing session " << channel.ChannelName << " from RTSP ServerMediaSessions";
	}
}
Exemple #2
0
void GenericMediaServer::deleteServerMediaSession(ServerMediaSession* serverMediaSession) {
  if (serverMediaSession == NULL) return;

  closeAllClientSessionsForServerMediaSession(serverMediaSession);
  removeServerMediaSession(serverMediaSession);
}
Exemple #3
0
void GenericMediaServer::removeServerMediaSession(char const* streamName) {
  removeServerMediaSession((ServerMediaSession*)(fServerMediaSessions->Lookup(streamName)));
}
void RTSPServer::removeServerMediaSession(char const* streamName) {
  removeServerMediaSession(lookupServerMediaSession(streamName));
}