Metodo CBaseStreamControl.NotifyFilterState
[La funzionalità associata a questa pagina, DirectShow, è una funzionalità legacy. È stata sostituita da MediaPlayer, IMFMediaEngine e Audio/Video Capture in Media Foundation. Queste funzionalità sono state ottimizzate per Windows 10 e Windows 11. Microsoft consiglia vivamente che il nuovo codice usi MediaPlayer, IMFMediaEngine e Audio/Video Capture in Media Foundation invece di DirectShow, quando possibile. Microsoft suggerisce che il codice esistente che usa le API legacy venga riscritto per usare le nuove API, se possibile.
Il NotifyFilterState
metodo notifica al pin quando cambia lo stato del filtro.
Sintassi
void NotifyFilterState(
FILTER_STATE new_state,
REFERENCE_TIME tStart = 0
);
Parametri
-
new_state
-
Specifica il nuovo stato, come membro dell'enumerazione FILTER_STATE .
-
tStart
-
Specifica l'ora di inizio. Se il nuovo stato del filtro è State_Running, passare il valore dal metodo IMediaFilter::Run . In caso contrario, usare il valore predefinito.
Valore restituito
Questo metodo non restituisce valori.
Commenti
Questo metodo causa l'arresto dell'attesa del metodo CBaseStreamControl::CheckStreamState . Chiamare questo metodo ogni volta che il filtro proprietario cambia stato.
Esempio
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();
}
Requisiti
Requisito | Valore |
---|---|
Intestazione |
|
Libreria |
|