WMEncProfile2.get_VBRMode
![]() |
The get_VBRMode method retrieves the variable bit rate (VBR) mode of the current profile.
Syntax
WMENC_PROFILE_VBR_MODE WMEncProfile2.get_VBRMode(
WMENC_SOURCE_TYPE enumSrcType,
short iRenderSiteIndex
);
Parameters
enumSrcType
[in] Member of a WMENC_SOURCE_TYPE enumeration type identifying the media stream type.
iRenderSiteIndex
[in] Int16 containing the audience stream index. Because an audience can only contain one stream of each type, iRenderSiteIndex must be 0.
Return Values
A member of the WMENC_PROFILE_VBR_MODE enumeration type that indicates the VBR mode.
Remarks
When you want your encoded content to be compatible with Windows Media version 8 and earlier (for example, if you think the majority of your users have Windows Media Player 7.1), the only valid VBR mode is none (constant bit rate (CBR)).
Example Code
using WMEncoderLib;
try
{
// Create a WMEncProfile2 object.
WMEncProfile2 Pro;
Pro = new WMEncProfile2();
// Load a custom profile. REPLACE THE FILE NAME.
Pro.LoadFromFile("C:\\Profiles\\CustomProfile.prx");
// Retrieve a string indicating the audio VBR mode.
string sAudMode;
switch (Pro.get_VBRMode(WMENC_SOURCE_TYPE.WMENC_AUDIO, 0))
{
case 1:
sAudMode = "None - CBR";
break;
case 2:
sAudMode = "Bitrate VBR - Peak";
break;
case 3:
sAudMode = "Quality VBR";
break;
case 4:
sAudMode = "Bitrate VBR";
break;
}
}
catch (Exception e)
{
// TODO: Handle exceptions.
}
Requirements
Reference: Windows Media Encoder
Namespace: WMEncoderLib
Assembly: Interop.WMEncoderLib.dll
Library: WMEncoderLib.dll
See Also
.gif)