bool CAVISplitter::Suspend() { // the parser cannot set the seek params until the pushing // thread is stopped ThreadMsg msg = m_thread_state; bool bShouldRestart = false; if (msg == tm_start) { BeginFlush(); if (m_threadid != GetCurrentThreadId()) { bShouldRestart = true; PauseThread(); } EndFlush(); } return bShouldRestart; }
HRESULT CPullPin::Seek(REFERENCE_TIME tStart, REFERENCE_TIME tStop) { CAutoLock lock(&m_AccessLock); ThreadMsg AtStart = m_State; if(AtStart == TM_Start) { BeginFlush(); PauseThread(); EndFlush(); } m_tStart = tStart; m_tStop = tStop; HRESULT hr = S_OK; if(AtStart == TM_Start) { hr = StartThread(); } return hr; }
HRESULT CBufferFilterOutputPin::DeliverEndFlush() { CallQueue(EndFlush()); }