Remarks
Creates a new rendering window for the video player and links it to a given player: once created, the rendering window will stay active until the termination of the container form.
When more rendering windows are added to the same player, they will be automatically in synch during video playback.
The rendering window can be hidden or shown through the VideoPlayer.VideoWindowShow method and moved or resized through the VideoPlayer.VideoWindowMove method.
If the video player has been attached to a video mixer through a call to the VideoPlayer.AttachToVideoMixer method, only the first rendering window will be available for preview: the other rendering windows will stay inactive until the video player is detached from the video mixer through a call to the VideoPlayer.DetachFromVideoMixer method and a new video clip is loaded into the video player.
If the given player is under control of the embedded fader, as a consequence of a call to the Fader.Init method, only the first rendering window will be used.
For further details about the use of the embedded video player see the VideoPlayer class section.
For details about video clips rendering refer to the How to play video files through DirectShow tutorial.
Syntax
[Visual Basic]
Public Function VideoWindowAdd (
nPlayerIndex as Int16,
nUniqueID as Int32,
hWndTarget as IntPtr,
nLeft as Int32,
nTop as Int32,
nWidth as Int32,
nHeight as Int32
) as enumErrorCodes
|
|
[C#]
public enumErrorCodes VideoWindowAdd (
Int16 nPlayerIndex,
Int32 nUniqueID,
IntPtr hWndTarget,
Int32 nLeft,
Int32 nTop,
Int32 nWidth,
Int32 nHeight
);
|
|
[C++]
public: enumErrorCodes VideoWindowAdd (
Int16 nPlayerIndex,
Int32 nUniqueID,
IntPtr hWndTarget,
Int32 nLeft,
Int32 nTop,
Int32 nWidth,
Int32 nHeight
);
|
|
Parameter
|
Description
|
|
|
nPlayerIndex
|
Number representing the zero-based index of the player that will use the video player.
|
nUniqueID
|
Unique identifier of the rendering window: you can set your own values for each video window
|
hWndTarget
|
Handle of the window/control whose surface will be used in order to render video frames; this handle must belong to a valid and existing window/control or the method call will fail.
In case you should simply need to render the video stream into a floating ActiveMovie window, make a call to the VideoPlayer.VideoStreamSendToActiveMovieWin method before loading the video clip.
|
nLeft
|
Left position of the video window, expressed in client coordinates (pixels) of the target window represented by hWndTarget
|
nTop
|
Top position of the video window, expressed in client coordinates (pixels) of the target window represented by hWndTarget
|
nWidth
|
Width of the video window, expressed in pixels
|
nHeight
|
Height of the video window, expressed in pixels
|
Return value
Value
|
Meaning
|
|
|
Negative value
|
An error occurred (see the LastError property for further error details)
|
enumErrorCodes.NOERROR (0)
|
The method call was successful.
|
|