public void StopCaptureToFile() { if (!IsConnected()) { return; } lock (_lock) { if (!_isCapturing) { return; } CppAssembly.StopCaptureImageToFile(_cameraReaderPointer); _isCapturing = false; } }
public void ConfigureCaptureToFile(string path, CameraSetup setup) { Connect(); lock (_lock) { if (_isCapturing) { CppAssembly.StopCaptureImageToFile(_cameraReaderPointer); } CppAssembly.StartCaptureImageToFile(_cameraReaderPointer, path, (uint)setup.RGBWidth, (uint)setup.RGBHeight, (uint)setup.RGBFPS, out var invokeResult); _isCapturing = true; _startTime = DateTime.Now; if (invokeResult != 0) { throw new InvalidOperationException($"StartRecording Failed #{invokeResult}."); } } }