Example #1
0
        public void Stop()
        {
            if (rtsp_client != null)
            {
                Rtsp.Messages.RtspRequest teardown_message = new Rtsp.Messages.RtspRequestTeardown();
                teardown_message.RtspUri = new Uri(url);
                teardown_message.Session = session;
                rtsp_client.SendMessage(teardown_message);
            }

            // Stop the keepalive timer
            if (keepalive_timer != null)
            {
                keepalive_timer.Stop();
            }

            // clear up any UDP sockets
            if (video_udp_pair != null)
            {
                video_udp_pair.Stop();
            }
            if (audio_udp_pair != null)
            {
                audio_udp_pair.Stop();
            }

            // Drop the RTSP session
            if (rtsp_client != null)
            {
                rtsp_client.Stop();
            }
        }
Example #2
0
        public void Stop()
        {
            if (rtsp_client != null)
            {
                // Send TEARDOWN
                Rtsp.Messages.RtspRequest teardown_message = new Rtsp.Messages.RtspRequestTeardown();
                teardown_message.RtspUri = new Uri(url);
                teardown_message.Session = session;
                if (auth_type != null)
                {
                    AddAuthorization(teardown_message, username, password, auth_type, realm, nonce, url);
                }
                rtsp_client.SendMessage(teardown_message);
            }

            // Stop the keepalive timer
            if (keepalive_timer != null)
            {
                keepalive_timer.Stop();
            }

            // clear up any UDP sockets
            if (video_udp_pair != null)
            {
                video_udp_pair.Stop();
            }
            if (audio_udp_pair != null)
            {
                audio_udp_pair.Stop();
            }

            // Drop the RTSP session
            if (rtsp_client != null)
            {
                rtsp_client.Stop();
            }
        }