IWMEncFileTransferSource.RemoveAll

Windows Media Encoder SDK banner art

The RemoveAll method removes all HTML file sets from the collection.

Syntax

IWMEncFileTransferSource.RemoveAll

Parameters

This method takes no parameters.

Return Values

This method does not return a value.

Example Code

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

' Retrieve the source group collection and add a source group.
  Dim SrcGrpColl As IWMEncSourceGroupCollection
  Dim SrcGrp As IWMEncSourceGroup2
  Set SrcGrpColl = Encoder.SourceGroupCollection
  Set SrcGrp = SrcGrpColl.Add("SG_1")

' Add an audio, video, and HTML source.
  Dim SrcAud As IWMEncAudioSource
  Dim SrcVid As IWMEncVideoSource
  Dim SrcHTML As IWMEncSource
  Set SrcAud = SrcGrp.AddSource(WMENC_AUDIO)
  Set SrcVid = SrcGrp.AddSource(WMENC_VIDEO)
  Set SrcHTML = SrcGrp.AddSource(WMENC_FILETRANSFER)

' Use the default audio and video devices.
  SrcAud.SetInput ("Device://Default_Audio_Device")
  SrcVid.SetInput ("Device://Default_Video_Device")

' The HTML scheme is FileTransfer, and the resource string is not used.
  SrcHTML.SetInput ("FileTransfer://placeholdertext")

' Set the HTML stream to repeat.
  SrcHTML.Repeat = True

' Continue configuring the encoding session, including the HTML profile
' and broadcast settings.

' Initialize the encoding session.
  Encoder.PrepareToEncode True

' Retrieve the file transfer plug-in from the HTML source.
  Dim pUnkFileSrcPlugin As IUnknown
  Set pUnkFileSrcPlugin = SrcHTML.GetSourcePlugin
  Dim FileTransSrc As IWMEncFileTransferSource
  Set FileTransSrc = pUnkFileSrcPlugin
 
' Set user driven mode to False to send file sets at specific times.
  FileTransSrc.UserDrivenMode = False
   
' Add two file sets and specify send times.
  Set FileSet = FileTransSrc.Add
  FileSet.Add "C:\HTML\imageA.jpg", "https://YourWebSite/imageA.jpg"
  FileSet.Time = 5000

  Set FileSet = FileTransSrc.Add
  FileSet.Add "C:\HTML\imageB.jpg", "https://YourWebSite/imageB.jpg"
  FileSet.Time = 25000

' Remove all file sets.
  FileTransSrc.RemoveAll

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also