ScreenToGif.Webcam.DirectX.CaptureWebcam.StartPreviewIfNeeded C# (CSharp) Method

StartPreviewIfNeeded() protected method

Setup and start the preview window if the user has requested it (by setting PreviewWindow).
protected StartPreviewIfNeeded ( ) : void
return void
        protected void StartPreviewIfNeeded()
        {
            // Render preview 
            if (WantPreviewRendered && IsPreviewRendered)
            {
                // Run the graph (ignore errors)
                // We can run the entire graph becuase the capture
                // stream should not be rendered (and that is enforced
                // in the if statement above)
                MediaControl.Run();
            }
        }