IWMEncStatistics.IndexerStats

Windows Media Encoder SDK banner art

The IndexerStats property retrieves an IWMEncIndexerStats object to determine the number of files being indexed, the name of a file in the queue, and the percentage of indexing completed on the current file.

Syntax

IWMEncIndexerStats = IWMEncStatistics.IndexerStats

Parameters

This property takes no parameters.

Property Value

An IWMEncIndexerStats object.

If this property fails, it returns an error number.

Number Description
0xC00D1B7D No statistics are currently available.

Remarks

This property is read-only. The IWMEncIndexerStats object monitors the indexing process for a Windows Media file. A file index enables operations, such as fast forwarding, that must seek to specific time offsets in the file. If you specify an archive file, the indexing process starts automatically on a separate thread in the background of the encoding process immediately after the archiving process stops. The indexing process stops at the end of the file.

Example Code

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

' Configure the encoding session including the sources, output,
' and profile, then start encoding.

' You can create a timer control to retrieve the statistics
' (as follows) after you start the encoding session.

' Declare objects and variables.
  Dim Stats As IWMEncStatistics
  Dim IndexStats As IWMEncIndexerStats
  Dim lFileCount As Long
  Dim sFileName As String
  Dim lPercent As Long

' Retrieve an IWMEncStatistics object, and use it to
' retrieve an IWMEncIndexerStats object.
  Set Stats = Encoder.Statistics
  Set IndexStats = Stats.IndexerStats

' Retrieve the number of files remaining in the queue.
  lFileCount = IndexStats.FileCount

' Retrieve the name of a specific file in the queue.
  sFileName = IndexStats.FileName(0)

' Retrieve the percentage of indexing completed on the
' current file.
  lPercent = IndexStats.PercentComplete

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also