Share via


IWMEncTransform.SetInput

Windows Media Encoder SDK banner art

The SetInput method specifies a transform plug-in by name and scheme.

Syntax

void IWMEncTransform.SetInput(
  string  bstrInput,
  string  bstrScheme,
  string  bstrInitData
);

Parameters

bstrInput

[in]  String containing the full name of a transform plug-in. Specify a plug-in name in the "scheme://resource" format. If you put only the resource in bstrInput, and not the full path, the scheme type is determined from bstrScheme.

bstrScheme

[in]  String containing the scheme type. If you supply a value for this parameter, the encoding process examines bstrInput to form a "scheme://resource" plug-in identifier without parsing the stream. This is useful if the resource part of the string contains special characters or symbols that cannot be interpreted as part of a standard URL.

bstrInitData

[in]  String containing optional initialization data for 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

You must call the IWMEncTransformCollection.Add method before calling SetInput.

Transform plug-ins can be applied to individual source streams, to the entire source group, or to both.

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", "");

// Retrieve the name and scheme type of the transform plug-in.
string sScheme;
string sInitData;
string sTransName;
sTransName = Trans.GetInput(out sScheme, out sInitData);
}

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

Requirements

Reference: Windows Media Encoder

Namespace: WMEncoderLib

Assembly: Interop.WMEncoderLib.dll

Library: WMEncoderLib.dll

See Also