Microsoft Windows CE 3.0  

IMediaFilter::GetState

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

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_INTERMEDIATEif 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_INTERMEDIATEuntil 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::GetStatemethod, the filter graph manager calls GetStateon the filter and continues to poll. If the filter graph manager receives VFW_S_CANT_CUEback from the filter, it returns this value to the application from its IMediaControl::GetStatemethod.