WMEncoder.OnStateChange

Windows Media Encoder SDK banner art

The OnStateChange event receives an event notice indicating whether the encoding process has been started or stopped.

Syntax

WMEncoder.OnStateChange(enumState)

Parameters

enumState

[in]  Member of a WMENC_ENCODER_STATE enumeration type to specify the operating state.

Return Values

This event does not return a value.

Remarks

Use the OnStateChange method to respond to encoding state event notices. For example, use this callback to determine when to enable or disable UI command buttons that depend upon whether the encoding process is running or stopped.

Example Code

Private Sub Encoder_OnStateChange(ByVal enumState As WMEncoderLib.WMENC_ENCODER_STATE)

    Select Case enumState
        Case WMENC_ENCODER_STARTING
            ' Process the case.
        Case WMENC_ENCODER_RUNNING
            ' Process the case.
        Case WMENC_ENCODER_STOPPING
            ' Process the case.
        Case WMENC_ENCODER_STOPPED
            ' Process the case.

    End Select
End Sub

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also