public void Stop() { if (_catalogTask != null) { _catalogTask.Stop(); } foreach (var item in MonitorService) { item.Value.Stop(); } LocalEndPoint = null; LocalSIPId = null; RemoteEndPoint = null; RemoteSIPId = null; Transport = null; MonitorService.Clear(); MonitorService = null; }
/// <summary> /// 停止计时器/关闭RTP通道 /// </summary> public void Stop() { if (_realTask != null) { _realTask.OnCloseRTPChannel -= Task_OnCloseRTPChannel; _realTask.Stop(); } if (_byeTask != null) { _byeTask.OnCloseRTPChannel -= Task_OnCloseRTPChannel; _byeTask.Stop(); } if (_rtpChannel != null) { _rtpChannel.OnFrameReady -= _rtpChannel_OnFrameReady; _rtpChannel.Close(); } if (m_fs != null) { m_fs.Close(); m_fs.Dispose(); m_fs = null; } }