Copyright © 2001-2018 MultiMedia Soft

VideoPlayer.GetAspectRatio method

Previous pageReturn to chapter overviewNext page

Remarks

 

Obtains the native aspect ratio of the loaded video. The aspect ratio describes the proportional relationship between its width and its height and it's commonly expressed as two numbers separated by a colon, for example 4:3 and 16:9.

 

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.GetAspectRatio (

nPlayer as Integer,

nAspectX as Long,

nAspectY as Long

) as enumErrorCodes


 

[C++]

short control.VideoPlayer.GetAspectRatio (

short nPlayer,

long *nAspectX,

long *nAspectY

);


 

Parameter

Description

 

 

nPlayer

Number representing the zero-based index of the player that will use the video player.

nAspectX

Reference that, on return from the method call, will contain the native horizontal ratio of the loaded video, for example 4 or 16

nAspectY

Reference that, on return from the method call, will contain the native vertical ratio of the loaded video, for example 3 or 9

 

 

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