IWMEncFileSet.Time
![]() |
The Time property specifies and retrieves the send time of the current file set, in milliseconds.
Syntax
IWMEncFileSet.Time = WMENC_LONGLONG
WMENC_LONGLONG = IWMEncFileSet.Time
Parameters
This property takes no parameters.
Property Value
A WMENC_LONGLONG that indicates when to send the file set, relative to when encoding starts.
Remarks
If the IWMEncFileTransferSource.UserDrivenMode property is set to False, this file set is sent at the time specified in the Time property.
The WMENC_LONGLONG data type is a typedef from the CURRENCY type. A 64-bit integer is needed to hold the duration, and CURRENCY is the only 64-bit integer type that Automation supports. However, CURRENCY is a fixed-point type that has the decimal point moved four places to the left. Therefore, to display the CURRENCY value as a true integer, you must multiply the return value by 10,000.
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
FileTransSrc.UserDrivenMode = False
' Create a file set and add HTML content.
Dim FileSet As IWMEncFileSet
Set FileSet = FileTransSrc.Add
FileSet.Add "C:\HTML\image.jpg", "image.jpg"
' Specify a time to send this file set.
FileSet.Time = 30000
Requirements
Reference: Windows Media Encoder
Library: wmenc.exe
See Also
.gif)