Share via


IWMEncContentAnalyzer.Property

Windows Media Encoder SDK banner art

The Property method retrieves a value indicating the recommended video optimization to apply.

Syntax

Variant = IWMEncContentAnalyzer.Property(enumType, iIndex, strProperty)

Parameters

enumType

[in]  Specifies a member of the WMENC_SOURCE_TYPE enumeration type.

iIndex

[in]  Integer containing the stream index.

strProperty

[in]  String containing the property to analyze. At this time, "Optimization" is the only supported property.

Return Values

This method returns a Variant that indicates the type of video optimization to apply. This value corresponds to a WMENC_VIDEO_OPTIMIZATION enumeration type.

If this method fails, it returns an error number.

Remarks

Use the SourceGroup property to specify the video content to analyze. Use the Start method to begin analyzing content.

If the Property method is called too soon after starting the content analysis process, an error is returned indicating that no frames have been submitted. To avoid this, a pause is required.

Example Code

' Create a WMEncoder object.
  Dim Encoder As WMEncoder
  Set Encoder = New WMEncoder

' Create a source group. Add a video source and specify an input file.
' Configure the profile settings for the encoding session.

' Create an IWMEncContentAnalyzer object.
  Dim Analyze As IWMEncContentAnalyzer
  Set Analyze = Encoder.ContentAnalyzer

' Analyze the first source group.
  Analyze.SourceGroup = SrcGrpColl.Item(0)

' Start analyzing the video content.
  Analyze.Start
  MsgBox "This pause is required before calling the Property method."

' Retrieve the value indicating the video optimization to apply.
  Dim vResult As Variant
  vResult = Analyze.Property(WMENC_VIDEO, 0, "Optimization")

' Stop the content analysis process.
  Analyze.Stop

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also