Beispiel #1
0
        public void Close()
        {
            /* resetting common properties */
            pausebutton.Visible = false;
            stopbutton.Visible  = false;
            recbutton.Visible   = true;
            captureStarted      = false;
            capturing           = false;
            OnTick(0);

            if (capturer == null)
            {
                return;
            }

            /* stopping and closing capturer */
            try {
                capturer.Stop();
                capturer.Close();
                if (capturerType == CapturerType.Live)
                {
                    /* release and dispose live capturer */
                    capturer.Error        -= OnError;
                    capturer.DeviceChange += OnDeviceChange;
                    capturerhbox.Remove(capturer as Gtk.Widget);
                    capturer.Dispose();
                }
            } catch (Exception) {}
            capturer = null;
        }
        public void Close()
        {
            /* resetting common properties */
            pausebutton.Visible = false;
            stopbutton.Visible = false;
            recbutton.Visible = true;
            captureStarted = false;
            capturing = false;
            OnTick(0);

            if(capturer == null)
                return;

            /* stopping and closing capturer */
            try {
                capturer.Stop();
                capturer.Close();
                if(capturerType == CapturerType.Live) {
                    /* release and dispose live capturer */
                    capturer.Error -= OnError;
                    capturer.DeviceChange += OnDeviceChange;
                    capturerhbox.Remove(capturer as Gtk.Widget);
                    capturer.Dispose();
                }
            } catch(Exception) {}
            capturer = null;
        }