IWMEncSource.GetInput
The GetInput method retrieves the stream capture source.
Syntax
string IWMEncSource.GetInput(
out string bstrStreamName,
out string bstrScheme
);
Parameters
bstrStreamName
[out] String containing the name of the input source.
bstrScheme
[out] String containing the scheme type.
Return Values
This method returns a String containing the full name of a plug-in or file from which the source stream is captured.
If this method fails, it returns an error number.
Number | Description |
0x8007000E | Memory cannot be allocated. |
Example Code
using WMEncoderLib;
try
{
// Create a WMEncoder object.
WMEncoder Encoder;
Encoder = new WMEncoder();
// Declare objects and variables.
IWMEncSourceGroupCollection SrcGrpColl;
IWMEncSourceGroup SrcGrp;
IWMEncSource SrcAud;
IWMEncVideoSource SrcVid;
// Create an IWMEncSourceGroupCollection object.
SrcGrpColl = Encoder.SourceGroupCollection;
// Create an IWMEncSourceGroup object.
SrcGrp = SrcGrpColl.Add("SG_1");
// Create an audio and a video source object.
SrcAud = SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_AUDIO);
SrcVid = (IWMEncVideoSource)SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO);
SrcVid.SetInput("Default_Video_Device", "Device", "");
SrcAud.SetInput("Default_Audio_Device", "Device", "");
// Retrieve the audio stream source.
string sSrcAud;
string sStreamName;
string sDevice;
sSrcAud = SrcAud.GetInput(out sStreamName, out sDevice);
}
catch (Exception e)
{
// TODO: Handle exceptions.
}
Requirements
Reference: Windows Media Encoder
Namespace: WMEncoderLib
Assembly: Interop.WMEncoderLib.dll
Library: WMEncoderLib.dll
See Also