Microsoft DirectX 9.0 |
The GetState method retrieves the filters's state (running, stopped, or paused).
Syntax
HRESULT GetState(
DWORD dwMilliSecsTimeout,
FILTER_STATE *State
);
Parameters
dwMilliSecsTimeout
[in] Time-out interval, in milliseconds. To block indefinitely, use the value INFINITE.
State
[out] Pointer to a variable that receives a member of the FILTER_STATE enumerated type, indicating the filter's state.
Return Value
Returns an HRESULT value. Possible values include those shown in the following table.
Value | Description |
S_OK | Success. |
E_POINTER | NULL pointer argument. |
VFW_S_STATE_INTERMEDIATE | Intermediate state. |
VFW_S_CANT_CUE | The filter is active, but cannot deliver data. |
Remarks
State transitions can be asynchronous. If the filter is transitioning to a new state, and the method times out before the transition completes, the method returns VFW_S_STATE_INTERMEDIATE.
If a filter cannot deliver data for some reason, it returns VFW_S_CANT_CUE. Live capture filters return this value while paused, because they do not deliver data in the paused state.
For more information, see Data Flow in the Filter Graph.
See Also