VideoPlayer.GetAspectRatio method |
|
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 class section.
For details about video clips rendering refer to the How to play video files through DirectShow tutorial.
Syntax
[Visual Basic] Public Function GetAspectRatio ( nPlayerIndex as Int16, ByRef nAspectX as Int32, ByRef nAspectY as Int32 ) as enumErrorCodes |
[C#] public enumErrorCodes GetAspectRatio ( Int16 nPlayerIndex, ref Int32 nAspectX, ref Int32 nAspectY ); |
[C++] public: enumErrorCodes GetAspectRatio ( Int16 nPlayerIndex, Int32 __gc *nAspectX, Int32 __gc *nAspectY ); |
Parameter |
Description |
|
|
nPlayerIndex |
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 (see the LastError property for further error details) |
enumErrorCodes.NOERROR (0) |
The method call was successful. |