Пример #1
0
        public WebcamCapture(Filter Filter, Action OnClick)
        {
            _filter        = Filter;
            _onClick       = OnClick;
            _captureWebcam = new CaptureWebcam(Filter, OnClick, IntPtr.Zero);

            _captureWebcam.StartPreview();
        }
Пример #2
0
        public void UpdatePreview(IWindow Window, Rectangle Location)
        {
            _syncContext.Run(() =>
            {
                if (Window != null && _lastWin != Window.Handle)
                {
                    Dispose();

                    _captureWebcam = new CaptureWebcam(_filter, _onClick, Window.Handle);

                    _captureWebcam.StartPreview();

                    _lastWin = Window.Handle;
                }

                _captureWebcam.OnPreviewWindowResize(Location.X, Location.Y, Location.Width, Location.Height);
            });
        }