public RTPServer GetOrAddServer(string videoId) { if (_rtpServers.ContainsKey(videoId)) { return(_rtpServers[videoId]); } else { int port = PortUtils.GetFreeRTPPort(); RTPServer rs = new RTPServer(port, videoId); rs.TargetsCleared += Rs_TargetsCleared; _rtpServers[videoId] = rs; return(rs); } }