CAsyncIo::~CAsyncIo() { BeginFlush(); CloseThread(); POSITION pos = m_listDone.GetHeadPosition(); while (pos) { CAsyncRequest* pRequest = m_listDone.GetNext(pos); delete pRequest; } m_listDone.RemoveAll(); }
CAsyncIo::~CAsyncIo() { // move everything to the done list BeginFlush(); // shutdown worker thread CloseThread(); // empty the done list POSITION pos = m_listDone.GetHeadPosition(); while (pos) { CAsyncRequest* pRequest = m_listDone.GetNext(pos); delete pRequest; } m_listDone.RemoveAll(); }
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::DeliverBeginFlush() { CallQueue(BeginFlush()); }