IWMEncStatistics.FileArchiveStats
The FileArchiveStats property retrieves an IWMEncFileArchiveStats object to determine the size of the archive file and the duration of the encoded content stored in the file.
Syntax
IWMEncFileArchiveStats = IWMEncStatistics.FileArchiveStats
Parameters
This property takes no parameters.
Property Value
An IWMEncFileArchiveStats object.
If this property fails, it returns an error number.
Number | Description |
0xC00D1B7D | No statistics are currently available. |
0xC00D1B7E | The encoder engine is not currently archiving. |
Remarks
This property is read-only. File size and duration information does not persist after the encoding process has stopped. You can create a timer object to retrieve the archiving statistics.
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 FileStats As IWMEncFileArchiveStats
Dim lDuration As WMENC_LONGLONG
Dim lSize As WMENC_LONGLONG
' Retrieve an IWMEncStatistics object and retrieve
' the IWMEncFileArchiveStats object from it.
Set Stats = Encoder.Statistics
Set FileStats = Stats.FileArchiveStats
' Find the duration (in seconds) and size (in KB) of the archive file.
lDuration = FileStats.FileDuration * 10
lSize = FileStats.FileSize * 10
Requirements
Reference: Windows Media Encoder
Library: wmenc.exe
See Also