WMEncEditDecisionList.Count

Windows Media Encoder SDK banner art

The Count property retrieves the number of entries in the current EDL.

Syntax

int = WMEncEditDecisionList.Count;

Parameters

This property takes no parameters.

Property Value

An Int32 that indicates the number of entries.

Remarks

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 C#.

Example Code

using WMEncoderLib;
using WMDEVICECONTROLLib;

try
{
// Create a WMEncoder object.
WMEncoder Encoder = new WMEncoder();

// Add the device as the audio source and the video source.
IWMEncSourceGroupCollection SrcGrpColl = Encoder.SourceGroupCollection;
IWMEncSourceGroup2 SrcGrp = (IWMEncSourceGroup2)SrcGrpColl.Add("SG_1");
IWMEncSource SrcAud = SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_AUDIO);
IWMEncVideoSource SrcVid = (IWMEncVideoSource)SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO);
SrcAud.SetInput("Device resource name", "Device", "");
SrcVid.SetInput("Device resource name", "Device", "");

// Configure the output and profile. 

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

// Initialize the encoding session.
Encoder.PrepareToEncode(true);

// Get the plug-in from the device.
IWMEncDeviceControlPlugin DCPlugin;
DCPlugin = (IWMEncDeviceControlPlugin)DControl.GetDeviceControlPlugin();

// Retrieve an WMEncEditDecisionList object from the device control plug-in. 
WMEncEditDecisionList EDList = DCPlugin.EditDecisionList;

// Create an EDL entry. 
IWMEncEditDecisionData EDData;
EDData = EDList.Add();

// Retrieve the number of entries in the EDL.
int lCount; 
lCount = EDList.Count;
}

catch (Exception e)
{
     // TODO: Handle exceptions.
}

Requirements

Reference: Windows Media Encoder

Namespace: WMEncoderLib

Assembly: Interop.WMEncoderLib.dll

Library: WMEncoderLib.dll

See Also