다음을 통해 공유


CBaseStreamControl::NotifyFilterState (Windows CE 5.0)

Send Feedback

Notifies the pin of your filter's state.

void NotifyFilterState(FILTER_STATEnew_state,REFERENCE_TIMEtStart= 0 );

Parameters

  • new_state
    Filter's new state.
  • tStart
    Time at which streaming starts (only valid when new_state is in State_Running).

Return Values

None.

Remarks

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

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

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

DirectShow applications and DirectShow filters have different include file and link library requirements.

For more information, see Setting Up the Build Environment.

OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Header:

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.