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.
A version of this page is also available for
4/8/2010

Notifies the pin of your filter's state.

Syntax

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

Parameters

new_state

Filter's new state.

tStart

Time at which streaming starts (only valid when new_stateis in State_Running).

Return Value

None.

Remarks

This member function notifies the pin of a filter's new state by setting a FILTER_STATEenumeration type variable.

If you implement your own filter, inform your pin's CBaseStreamControl::NotifyFilterStatemember function what state your filter is in every time your filter changes state, as shown in the following example.

Copy Code
STDMETHODIMP CMyFilter::Run(REFERENCE_TIME tStart)
{
   //once error check is successful
   m_pMyPin->NotifyFilterState(State_Running, tStart);
   
   //now continue with whatever should occur next, for example...
   return CBaseFilter::Run(tStart);
}
STDMETHODIMP CMyFilter::Pause()
{
   //Once error check is successful
   m_pMyPin->NotifyFilterState(State_Paused, 0);
   
   //Now continue with whatever should occur next, for example...
   return CBaseFilter::Pause();
}
STDMETHODIMP CMyFilter::Stop()
{
   //Once error check is successful
   m_pMyPin->NotifyFilterState(State_Stopped, 0);
   
   //Now continue with whatever should occur next, for example...
   return CBaseFilter::Stop(tStart);
}

Requirements

Windows Embedded CE Windows CE 2.12 and later
Windows Mobile Windows Mobile Version 5.0 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment,
Version 2.12 requires DXPAK 1.0 or later