Share via


IWMEncAudienceObj.Property

Windows Media Encoder SDK banner art

The Property property specifies and retrieves the value of a named property for a particular stream in the current audience.

Syntax

IWMEncAudienceObj.Property(enumSrcType, iRenderSiteIndex, strProperty) = Variant
Variant = IWMEncAudienceObj.Property(enumSrcType, iRenderSiteIndex, strProperty)

Parameters

enumSrcType

[in]  Member of a WMENC_SOURCE_TYPE enumeration type identifying the media stream type.

iRenderSiteIndex

[in]  Integer containing the audience stream index. Because an audience can only contain one stream of each type, iRenderSiteIndex must be zero.

strProperty

[in]  String containing the property. Currently the only properties supported are "BufferWindow" for HTML (WMENC_FILETRANSFER) streams, and "DeviceConformanceTarget" for video.

Property Value

A Variant that indicates the property value.

If this property fails, it returns an error number.

Return code Number Description
NS_E_INVALID_REQUEST 0xC00D002BL The request is invalid in the current state.

Remarks

The BufferWindow property corresponds to the preroll value for HTML streaming to specify how far in advance (in milliseconds) to send HTML content. You determine the value of this setting according to the largest HTML file in your collection and the bit rate you specify. A preroll setting that is too small might prevent files from being transferred or might cause the stream to be out of sync.

The DeviceConformanceTarget property allows you to specify a complexity setting for video if you are targeting a hardware device other than a computer. During playback, a hardware device can determine if it supports the complexity setting you selected. For example, the simple setting is intended for low-battery and low-power CPU devices such as wireless hand-sets or PDAs, the complex setting supports all codec algorithms without limitations, and the main setting supports most algorithms. Typically, you should use Auto, which enables the correct complexity setting to be selected automatically during encoding. You can specify the following strings for the DeviceConformanceTarget property.

DeviceConformanceTarget Value
Auto " "
Main "MP"
Simple "SP"
Complex "CP"

Example Code

' Create a WMEncProfile2 object.
  Dim Pro As WMEncProfile2
  Set Pro = New WMEncProfile2

' Load a custom profile. REPLACE THE FILE NAME.
  Pro.LoadFromFile "C:\Profiles\CustomProfile.prx"

' Create an IWMEncAudienceObj object, selecting the first audience (0)
' in the profile.
  Dim Audnc As IWMEncAudienceObj
  Set Audnc = Pro.Audience(0)

' Retrieve the value for the file transfer stream's buffer window.
  Dim vStreamBuffer As Variant
  vStreamBuffer = Audnc.Property(WMENC_FILETRANSFER, 0, "BufferWindow")

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also