public bool AddServer(IMediaServer server) { if (Dispatcher.IsWorking()) { return(false); // coz we will not lock OutputList } OutputList.Add(new ChannelServerItem(server, server.GetClients(ChannelName))); return(true); }
public bool AddServer(IMediaServer server) { if (Dispatcher.IsWorking()) { return(false); // coz we will not lock OutputList } if (server != null) { //m_Logger = server.Logger; int inputQueueLength = server.GetChannelInputQueueLength(ChannelName); if (inputQueueLength > 0) { m_MaxInputQueueSize = inputQueueLength; //server.Logger.Info("Max InputQueueLength of [" + ChannelName + "] is set to " + m_MaxInputQueueSize); } else { inputQueueLength = server.InputQueueSize; if (inputQueueLength > 0) { if (m_MaxInputQueueSize <= 0) { m_MaxInputQueueSize = server.InputQueueSize; //server.Logger.Info("Max InputQueueLength of [" + ChannelName + "] is set to " + m_MaxInputQueueSize); } else { if (m_MaxInputQueueSize > server.InputQueueSize) { m_MaxInputQueueSize = server.InputQueueSize; // just get the small one //server.Logger.Info("Max InputQueueLength of [" + ChannelName + "] is set to " + m_MaxInputQueueSize); } } } } } OutputList.Add(new ChannelServerItem(server, server.GetClients(ChannelName))); return(true); }