WMEncoder.SourceGroupCollection

Windows Media Encoder SDK banner art

The SourceGroupCollection property retrieves the collection of source groups.

Syntax

IWMEncSourceGroupCollection = WMEncoder.SourceGroupCollection

Parameters

This property takes no parameters.

Property Value

An IWMEncSourceGroupCollection object.

Remarks

This property is read-only. Use this method to acquire an IWMEncSourceGroupCollection object. Iterate through the collection to find the desired source group or create a group and add it to the collection.

Example Code

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

' Declare objects and variables.
Dim SrcGrpColl As IWMEncSourceGroupCollection
Dim SrcGrp As IWMEncSourceGroup
Dim SrcAud As IWMEncSource
Dim SrcVid As IWMEncVideoSource

' Create an IWMEncSourceGroupCollection object.
Set SrcGrpColl = Encoder.SourceGroupCollection

' Create an IWMEncSourceGroup object.
Set SrcGrp = SrcGrpColl.Add("SG_1")

' Create an audio and a video source object.
Set SrcAud = SrcGrp.AddSource(WMENC_AUDIO)
Set SrcVid = SrcGrp.AddSource(WMENC_VIDEO)

' Specify the .avi source file.
SrcAud.SetInput "C:\filename.avi"
SrcVid.SetInput "C:\filename.avi"

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also