IWMEncSourceGroup2.GetAutoRollover

Windows Media Encoder SDK banner art

The GetAutoRollover method retrieves the name of the source group that the current source group will roll over to automatically.

Syntax

String = IWMEncSourceGroup2.GetAutoRollover(var)

Parameters

var

[out]  Variant indicating whether to roll over automatically. A value of 0 indicates no auto rollover; -1 indicates an automatic rollover at the end of the source group.

Return Values

This method returns a String specifying the source group name, and a Variant indicating whether to roll over automatically.

Remarks

An empty string indicates that automatic rollover is not set.

Example Code

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

' Create an IWMEncSourceGroupCollection object.
  Dim SrcGrpColl As IWMEncSourceGroupCollection
  Set SrcGrpColl = Encoder.SourceGroupCollection

' Add an IWMEncSourceGroup object to the collection and add an
' audio source to it.
  Dim SrcGrp1 As IWMEncSourceGroup2
  Dim SrcAud1 As IWMEncSource
  Set SrcGrp1 = SrcGrpColl.Add("SG_1")
  Set SrcAud1 = SrcGrp1.AddSource(WMENC_AUDIO)
  SrcAud1.SetInput "C:\audio1.avi"

' Add a second IWMEncSourceGroup object to the collection and add an
' audio source to it.
  Dim SrcGrp2 As IWMEncSourceGroup2
  Dim SrcAud2 As IWMEncSource
  Set SrcGrp2 = SrcGrpColl.Add("SG_2")
  Set SrcAud2 = SrcGrp2.AddSource(WMENC_AUDIO)
  SrcAud2.SetInput "Device://Default_Audio_Device"

' Set SG_1 to roll over to SG_2 when the end of the file is reached.
  SrcGrp1.SetAutoRollover -1, "SG_2"

' Retrieve the rollover settings for both source groups.
  Dim sRollTo1 As String, vRollTime1 As Variant
  Dim sRollTo2 As String, vRollTime2 As Variant
  sRollTo1 = SrcGrp1.GetAutoRollover(vRollTime1)
  sRollTo2 = SrcGrp2.GetAutoRollover(vRollTime2)

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also