public async Task PreviewStop() { if (cameraCapture.IsPreviewActive) { await cameraCapture.Stop(); } IsPreviewActive = cameraCapture.IsPreviewActive; UpdateProcessing(); }
private async Task UpdatePreviewState() { if (!_cameraCapture.IsPreviewActive) { await _cameraCapture.Start(); BeginTracking(); } else { await _cameraCapture.Stop(); CanvasFaceDisplay.Children.Clear(); } }
/// <summary> /// So we can replace with a new framerate /// </summary> public void UpdateCaptureGrabber(ICaptureGrab captureGrabber) { if (CameraCapture != null) { CameraCapture.ImageGrabbed -= InternalImageGrabbedHandler; CameraCapture.Stop(); } CameraCapture = captureGrabber; CameraCapture.ImageGrabbed += InternalImageGrabbedHandler; if (Started) { CameraCapture.Start(); } }
private async Task UpdatePreviewState() { await cameraCapture.Initialize(CaptureElementPreview); if (cameraCapture.IsInitialized) { if (!cameraCapture.IsPreviewActive) { await cameraCapture.Start(); BeginProcessing(); } else { await cameraCapture.Stop(); } } }