IWMEncTransformCollection.Remove

Windows Media Encoder SDK banner art

The Remove method removes a specific plug-in from the collection.

Syntax

void IWMEncTransformCollection.Remove(
  int  lIndex
);

Parameters

lIndex

[in]  Int32 containing the numeric index of the plug-in.

Return Values

If this method fails, it returns an error number.

Number Description
0xC00D0011 This method cannot be called if the encoder engine is running.

Remarks

To use the time compression plug-in, you must add the Windows Media Encoder Time Compression Plug-in reference to the project. For more information, see Programming in C#.

Example Code

using WMEncoderLib;

try
{
// Create a WMEncoder object.
WMEncoder Encoder;
Encoder = new WMEncoder();

// Configure the profile and an audio source.

// Retrieve the transform collection from the audio source.
IWMEncTransformCollection SrcTrnsColl;
SrcTrnsColl = SrcAud.TransformCollection;

// Add a transform plug-in to the collection.
IWMEncTransform Trans;
Trans = SrcTrnsColl.Add();

// Apply a DMO Audio Transform Filter to the source.
Trans.SetInput("Echo", "PluginWrapperForDMO", "");

// Add another DMO Audio Transform Filter.
Trans = SrcTrnsColl.Add();
Trans.SetInput("Gargle", "PluginWrapperForDMO", "");

// Retrieve the name of the plug-ins in the current source collection.
string sName;
string sScheme;
string sInitData;
for (i = 0; i < SrcTrnsColl.Count; i++)
{
  sName = SrcTrnsColl.Item(i).GetInput(out sScheme, out sInitData);
}

// Remove the first plug-in.
SrcTrnsColl.Remove(0);
}

catch (Exception e)
{
     // TODO: Handle exceptions.
}

Requirements

Reference: Windows Media Encoder

Namespace: WMEncoderLib

Assembly: Interop.WMEncoderLib.dll

Library: WMEncoderLib.dll

See Also