IWMEncDeviceControlPlugin.TotalEDLDurationInMilliseconds

Windows Media Encoder SDK banner art

The TotalEDLDurationInMilliseconds property retrieves the total duration of the EDL segments, in milliseconds.

Syntax

IWMEncDeviceControlPlugin.TotalEDLDurationInMilliseconds(plDuration)

Parameters

plDuration

[in]  A Long containing the duration, in milliseconds.

Property Value

This property does not return a value.

Remarks

The total duration is returned in milliseconds. Therefore, if the duration is 10 seconds and 21 frames (where the frame rate is 30 frames per second), the duration value will be ((10 seconds*1000) + (21/30*1000)) = 10700 milliseconds.

This property is read-only.

To control digital devices programmatically, you must add the Windows Media Encoder Device Control reference to the project. For more information, see Programming in Visual Basic.

Example Code

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

' Add the device as the audio source and the video source.
  Dim SrcGrpColl As IWMEncSourceGroupCollection
  Dim SrcGrp As IWMEncSourceGroup2
  Dim SrcAud As IWMEncSource
  Dim SrcVid As IWMEncVideoSource
  Set SrcGrpColl = Encoder.SourceGroupCollection
  Set SrcGrp = SrcGrpColl.Add("SG_1")
  Set SrcAud = SrcGrp.AddSource(WMENC_AUDIO)
  Set SrcVid = SrcGrp.AddSource(WMENC_VIDEO)
  ' Replace the following name with the name of your device.
  SrcAud.SetInput ("Device://Device resource name")
  SrcVid.SetInput ("Device://Device resource name")

' Configure the output and profile.

' Retrieve the device control collection, then add a device to it.
  Dim DCColl As IWMEncDeviceControlCollection
  Set DCColl = SrcGrp.DeviceControlCollection
  Dim DControl As IWMEncDeviceControl
  Set DControl = DCColl.Add
  ' Replace the following name with the name of your device.
  DControl.SetInput ("DeviceControl://Device resource name")

' Initialize the encoding session.
  Encoder.PrepareToEncode True

' Get the plug-in from the device.
  Dim DCPlugin As IWMEncDeviceControlPlugin
  Set DCPlugin = DControl.GetDeviceControlPlugin

' Retrieve a WMEncEditDecisionList object from the device
' control plug-in.
  Dim EDList As WMEncEditDecisionList
  Set EDList = DCPlugin.EditDecisionList

' Create an EDL entry.
  Dim EDData As IWMEncEditDecisionData
  Set EDData = EDList.Add

' Add attributes to the EDL entry specifying mark-in, mark-out,
' tape ID, and description information.
  EDData.Add "MarkIn", 262695
  EDData.Add "MarkOut", 267268
  EDData.Add "TapeID", "A"
  EDData.Add "Description", "Scene 1"

' Retrieve the duration of the EDL in milliseconds.
  Dim lDurationMS As Long
  lDurationMS = DCPlugin.TotalEDLDurationInMilliseconds

Requirements

Reference: Windows Media Encoder Device Control

Library: wmdevctl.dll

See Also