Copyright © 2001-2023 MultiMedia Soft

VideoPlayer.VideoWindowAdd method

Previous pageReturn to chapter overviewNext page

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 object section.

For details about video clips rendering refer to the How to play video files through DirectShow tutorial.

 

 

Syntax

 

[Visual Basic]

control.VideoPlayer.VideoWindowAdd (

nPlayer as Integer,

nUniqueID as Long,

hWndTarget as OLE_HANDLE,

nLeft as Long,

nTop as Long,

nWidth as Long,

nHeight as Long

) as enumErrorCodes


 

[C++]

short control.VideoPlayer.VideoWindowAdd (

short nPlayer,

long nUniqueID,

OLE_HANDLE hWndTarget,

long nLeft,

long nTop,

long nWidth,

long nHeight

);


 

 

 

Parameter

Description

 

 

nPlayer

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, check the LastError property value in order to get the error code

enumErrorCodes.ERR_NOERROR (0)

The method call was successful