IWMEncTransformCollection.Add

Windows Media Encoder SDK banner art

The Add method adds a transform plug-in to a source group.

Syntax

IWMEncTransform = IWMEncTransformCollection.Add

Parameters

This method takes no parameters.

Return Values

This method returns an IWMEncTransform object.

If this method fails, it returns an error number.

Number Description
0x8007000E Memory cannot be allocated.

Remarks

Use the Add method to reserve the memory needed to add a transform plug-in to the collection. Use the SetInput method in the IWMEncTransform object to add a specific plug-in.

Example Code

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

' Configure the profile and an audio source.

' Retrieve the transform collection from the audio source.
Dim SrcTrnsColl As IWMEncTransformCollection
Set SrcTrnsColl = SrcAud.TransformCollection

' Add a transform plug-in to the collection.
Dim Trans As IWMEncTransform
Set Trans = SrcTrnsColl.Add

' Apply a DMO Audio Transform Filter to the source.
Trans.SetInput "PluginWrapperForDMO://Echo"

' Add another DMO Audio Transform Filter.
Set Trans = SrcTrnsColl.Add
Trans.SetInput "PluginWrapperForDMO://Gargle"

' Display the names of the plug-ins in the current source collection.
Dim sScheme As String, sDataInit As String
For i = 0 To SrcTrnsColl.Count – 1
  MsgBox SrcTrnsColl.Item(i).GetInput(sScheme , sDataInit)
Next i

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also