IWMEncStatistics.WMFOutputStats

Windows Media Encoder SDK banner art

The WMFOutputStats property retrieves status information for the encoded output.

Syntax

IWMEncOutputStats = IWMEncStatistics.WMFOutputStats

Parameters

This property takes no parameters.

Property Value

An IWMEncOutputStats object containing encoding and broadcasting statistics for the encoded output.

Remarks

This property is read-only. The IWMEncOutputStats object contains information about the number of media samples received and dropped; the current, average and expected bit rate of the broadcast; and the current, average and expected rates at which media samples are encoded.

Example Code

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

' Retrieve an IWMEncStatistics object.
Dim Stats As IWMEncStatistics
Set Stats = Encoder.Statistics

' Configure the encoding session.

' Retrieve an IWMEncOutputStats object from the
' IWMEncStatistics object.
Dim OutputStats As IWMEncOutputStats
Set OutputStats = Stats.WMFOutputStats

' You can create a timer control to retrieve the statistics
' (as follows) after you start encoding.
Dim lAvgBitrate As Long
Dim lAvgSampleRate As Long
Dim lByteCount As WMENC_LONGLONG
Dim lCurrentBitRate As Long
Dim lCurrentSampleRate As Long
Dim lDroppedByteCount As WMENC_LONGLONG
Dim lDroppedSampleCount As WMENC_LONGLONG
Dim lExpectedBitRate As Long
Dim lExpectedSampleRate As Long
Dim lSampleCount As WMENC_LONGLONG

lAvgBitrate = OutputStats.AverageBitrate
lAvgSampleRate = OutputStats.AverageSampleRate
lByteCount = OutputStats.ByteCount
lCurrentBitRate = OutputStats.CurrentBitrate
lCurrentSampleRate = OutputStats.CurrentSampleRate
lDroppedByteCount = OutputStats.DroppedByteCount
lDroppedSampleCount = OutputStats.DroppedSampleCount
lExpectedBitRate = OutputStats.ExpectedBitrate
lExpectedSampleRate = OutputStats.ExpectedSampleRate
lSampleCount = OutputStats.SampleCount

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also