Video source player control.

Namespace:  AForge.Controls
Assembly:  AForge.Controls (in AForge.Controls.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public class VideoSourcePlayer : Control

Remarks

The control is aimed to play video sources, which implement IVideoSource interface. To start playing a video the VideoSource property should be initialized first and then Start()()() method should be called. In the case if user needs to perform some sort of image processing with video frames before they are displayed, the NewFrame event may be used.

Sample usage:

CopyC#
// set new frame event handler if we need processing of new frames
playerControl.NewFrame += new VideoSourcePlayer.NewFrameHandler( this.playerControl_NewFrame );
// create video source
IVideoSource videoSource = new ...
// start playing it
playerControl.VideoSource = videoSource;
playerControl.Start( );
...
// new frame event handler
private void playerControl_NewFrame( object sender, ref Bitmap image )
{
    // process new frame somehow ...
    // Note: it may be even changed, so the control will display the result
    // of image processing done here
}

Inheritance Hierarchy

System..::.Object
  System..::.MarshalByRefObject
    System.ComponentModel..::.Component
      System.Windows.Forms..::.Control
        AForge.Controls..::.VideoSourcePlayer

See Also