void ReleaseCaptureDevice() { if (captureDevice == null) { return; } captureDevice.Dispose(); captureDevice = null; }