void StopRecording() { _writer?.Close(); _writer?.Dispose(); _writer = null; CaptureDevice.StopRecording(); }