Example #1
0
        public async Task PreviewStop()
        {
            if (cameraCapture.IsPreviewActive)
            {
                await cameraCapture.Stop();
            }

            IsPreviewActive = cameraCapture.IsPreviewActive;

            UpdateProcessing();
        }
Example #2
0
        private async Task UpdatePreviewState()
        {
            if (!_cameraCapture.IsPreviewActive)
            {
                await _cameraCapture.Start();

                BeginTracking();
            }
            else
            {
                await _cameraCapture.Stop();

                CanvasFaceDisplay.Children.Clear();
            }
        }
Example #3
0
        /// <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();
            }
        }
Example #4
0
        private async Task UpdatePreviewState()
        {
            await cameraCapture.Initialize(CaptureElementPreview);

            if (cameraCapture.IsInitialized)
            {
                if (!cameraCapture.IsPreviewActive)
                {
                    await cameraCapture.Start();

                    BeginProcessing();
                }
                else
                {
                    await cameraCapture.Stop();
                }
            }
        }