IMediaFilter::GetState
Determines the filter's state.
HRESULT GetState(
DWORD dwMilliSecsTimeout,
FILTER_STATE *State);
Parameters
- dwMilliSecsTimeout
[in] Duration of the time-out, in milliseconds. To block indefinitely, pass INFINITE. - State
[out] Returned state of the filter. States include stopped, paused, running, or intermediate (in the process of changing).
Return Values
Returns S_OK if the state is running, paused, or inactive; otherwise, returns VFW_S_STATE_INTERMEDIATE if the transition is not complete (the time-out expired). The state returned in the latter case is the one being changed to.
Remarks
Usually, renderer filters will return VFW_S_STATE_INTERMEDIATE until they receive enough data to render at least one sample. In some circumstances, a filter will find that it can supply data on all of its output streams. This condition usually occurs because of unusual or bad data. An example of unusual data might be an MPEG slide show, where video frames occur infrequently in the data but audio is continuous. In this case, a video frame in the video stream might not be found until a certain spot in the audio stream. If the filter discovers that it cannot complete the state change (for this or any other reason), it can return VFW_S_CANT_CUE.
When an application calls the filter graph manager's IMediaControl::GetState method, the filter graph manager calls GetState on the filter and continues to poll. If the filter graph manager receives VFW_S_CANT_CUE back from the filter, it returns this value to the application from its IMediaControl::GetState method.
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.