Class VideoPlayer
Represents a graphics accelerated video player control.
public class VideoPlayer : UserControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl
- Inheritance
-
VideoPlayer
- Implements
- Inherited Members
Constructors
VideoPlayer()
Initializes a new instance of the VideoPlayer class.
public VideoPlayer()
Properties
Canvas
Gets the graphics canvas used to render video frames.
public VisualizerCanvas Canvas { get; }
Property Value
FrameCount
Gets or sets the number of frames in the video.
public int FrameCount { get; set; }
Property Value
Loop
Gets or sets a value indicating whether the video should loop when the end of the file is reached.
public bool Loop { get; set; }
Property Value
PlaybackRate
Gets or sets the speed, in frames per second, at which to play images from the video.
public double PlaybackRate { get; set; }
Property Value
Playing
Gets or sets a value specifying whether the video is playing.
public bool Playing { get; set; }
Property Value
Methods
Dispose(bool)
Clean up any resources being used.
protected override void Dispose(bool disposing)
Parameters
disposing
booltrue if managed resources should be disposed; otherwise, false.
OnLoad(EventArgs)
Raises the Load event.
protected override void OnLoad(EventArgs e)
Parameters
OnPlaybackRateChanged(EventArgs)
Raises the PlaybackRateChanged event.
protected virtual void OnPlaybackRateChanged(EventArgs e)
Parameters
OnPlayingChanged(EventArgs)
Raises the PlayingChanged event.
protected virtual void OnPlayingChanged(EventArgs e)
Parameters
OnSeek(SeekEventArgs)
Raises the Seek event.
protected virtual void OnSeek(SeekEventArgs e)
Parameters
e
SeekEventArgsA SeekEventArgs that contains the event data.
ProcessCmdKey(ref Message, Keys)
Processes a command key.
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
Parameters
msg
MessageA Message, passed by reference, that represents the window message to process.
keyData
KeysOne of the Keys values that represents the key to process.
Returns
- bool
true if the character was processed by the control; otherwise, false.
Update(IplImage, int)
Updates the video player control with the specified frame.
public void Update(IplImage frame, int frameNumber)
Parameters
frame
IplImageAn IplImage object containing the pixel data of the current video frame.
frameNumber
intThe zero-based index of the current video frame.
Events
LoopChanged
Occurs when the Loop property value changes.
public event EventHandler LoopChanged
Event Type
PlaybackRateChanged
Occurs when the PlaybackRate property value changes.
public event EventHandler PlaybackRateChanged
Event Type
PlayingChanged
Occurs when the Playing property value changes.
public event EventHandler PlayingChanged
Event Type
Seek
Occurs when the user moves the video seek bar.
public event EventHandler<SeekEventArgs> Seek