IWMEncSource.GetInput

Windows Media Encoder SDK banner art

The GetInput method retrieves the stream capture source.

Syntax

String = IWMEncSource.GetInput(strStreamName, strScheme)

Parameters

strStreamName

[out]  String containing the name of the input source.

strScheme

[out]  String containing the scheme type.

Return Values

This method returns Strings containing the full name of a plug-in or file from which the source stream is captured, the stream name, and the scheme type.

If this method fails, it returns an error number.

Number Description
0x8007000E Memory cannot be allocated.

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)

  SrcVid.SetInput "DEVICE://Default_Video_Device"
  SrcAud.SetInput("Device://Default_Audio_Device")

' Retrieve the audio stream source.
  Dim sSrcAud As String
  sSrcAud = SrcAud.GetInput("SG_1", "DEVICE")

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also