Video source for video files.

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

Sample usage:

// 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: IVideoSource
コード例 #1
0
ファイル: MainForm.cs プロジェクト: accord-net/framework
        // Open video file using DirectShow
        private void openVideofileusingDirectShowToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                // create video source
                FileVideoSource fileSource = new FileVideoSource(openFileDialog.FileName);

                // open it
                OpenVideoSource(fileSource);
            }
        }
コード例 #2
0
 // Constructor
 public Grabber(FileVideoSource parent)
 {
     this.parent = parent;
 }
コード例 #3
0
 // Constructor
 public Grabber( FileVideoSource parent )
 {
     this.parent = parent;
 }