AForge.Video.DirectShow.VideoCaptureDevice.Stop C# (CSharp) Метод

Stop() публичный Метод

Stop video source.

Stops video source aborting its thread.

Since the method aborts background thread, its usage is highly not preferred and should be done only if there are no other options. The correct way of stopping camera is signaling it stop and then waiting for background thread's completion.

public Stop ( ) : void
Результат void
        public void Stop( )
        {
            if ( this.IsRunning )
            {
                thread.Abort( );
                WaitForStop( );
            }
        }

Usage Example

Пример #1
0
 private void button3_Click(object sender, EventArgs e)
 {
     if (vkl)
     {
         cam.Stop();
         player.Stop();
     }
 }
All Usage Examples Of AForge.Video.DirectShow.VideoCaptureDevice::Stop