Accord.Controls.VideoSourcePlayer.WaitForStop C# (CSharp) Method

WaitForStop() public method

Wait for video source has stopped.

Waits for video source stopping after it was signaled to stop using SignalToStop method. If SignalToStop was not called, then it will be called automatically.

public WaitForStop ( ) : void
return void
        public void WaitForStop()
        {
            CheckForCrossThreadAccess();

            if (!requestedToStop)
            {
                SignalToStop();
            }

            if (videoSource != null)
            {
                videoSource.WaitForStop();

                if (currentFrame != null)
                {
                    currentFrame.Dispose();
                    currentFrame = null;
                }

                Invalidate();
            }
        }