Video source for video files.

Namespace:  AForge.Video.DirectShow
Assembly:  AForge.Video.DirectShow (in AForge.Video.DirectShow.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public class FileVideoSource : IVideoSource

Remarks

The video source provides access to video files. DirectShow is used to access video files.

Sample usage:

CopyC#
// create video source
FileVideoSource videoSource = new FileVideoSource( fileName );
// set NewFrame event handler
videoSource.NewFrame += new NewFrameEventHandler( video_NewFrame );
// start the video source
videoSource.Start( );
// ...
// signal to stop
videoSource.SignalToStop( );
// ...

// New frame event handler, which is invoked on each new available video frame
private void video_NewFrame( object sender, NewFrameEventArgs eventArgs )
{
    // get new frame
    Bitmap bitmap = eventArgs.Frame;
    // process the frame
}

Inheritance Hierarchy

System..::.Object
  AForge.Video.DirectShow..::.FileVideoSource

See Also