Microsoft DirectX 9.0

CBaseStreamControl::NotifyFilterState

The NotifyFilterState method notifies the pin when the filter's state changes.

Syntax

void NotifyFilterState(
    FILTER_STATE new_state,
    REFERENCE_TIME tStart = 0
);

Parameters

new_state

Specifies the new state, as a member of the FILTER_STATE enumeration.

tStart

Specifies the start time. If the new filter state is State_Running, pass in the value from the IMediaFilter::Run method. Otherwise, use the default value.

Return Values

This method does not return a value.

Remarks

This method causes the CBaseStreamControl::CheckStreamState method to stop waiting. Call this method whenever the owning filter changes state.

Example Code

STDMETHODIMP CMyFilter::Run(REFERENCE_TIME tStart)
{
   /* Do other things needed by the filter ... */
   m_pMyPin->NotifyFilterState(State_Running, tStart);
   return CBaseFilter::Run(tStart); // Call the filter base class.
}

STDMETHODIMP CMyFilter::Pause()
{
   /* Do other things needed by the filter ... */
   m_pMyPin->NotifyFilterState(State_Paused);
   return CBaseFilter::Pause();
}

STDMETHODIMP CMyFilter::Stop()
{
   /* Do other things needed by the filter ... */
   m_pMyPin->NotifyFilterState(State_Stopped);
   return CBaseFilter::Stop();
}

See Also