Video source player control.

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


public class VideoSourcePlayer : Control


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:

// 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


See Also