public void Stop() { IsStarted = false; rtspListener?.SendMessage(new RtspRequestTeardown { RtspUri = new Uri(rtspUrl), Session = rtspSession }); udpSocketPair?.Stop(); // clear up any UDP sockets timer?.Dispose(); // Stop the keepalive timer rtspListener?.Stop(); // Drop the RTSP session }
public void Stop() { if (rtspListener != null) { RtspRequest teardownMessage = new RtspRequestTeardown { RtspUri = new Uri(url), Session = session }; rtspListener.SendMessage(teardownMessage); } // clear up any UDP sockets udpPair?.Stop(); // Stop the keepalive timer timer?.Dispose(); // Drop the RTSP session rtspListener?.Stop(); }
private void ProcessTeardownResponse() { if (_rtpRtspCts == null || _rtpRtspCts.IsCancellationRequested == true) { return; } Logger.Info(""); _rtpRtspCts.Cancel(); if (_currentState != State.Idle) { rtspListener.Stop(); udpSocketPair?.Stop(); _currentState = State.Idle; } rtspSession = null; chunkReadySubject.OnCompleted(); rtspErrorSubject.OnCompleted(); }