Exemplo n.º 1
0
CAsyncIo::~CAsyncIo()
{
    
    BeginFlush();

    
    CloseThread();

    
    POSITION pos = m_listDone.GetHeadPosition();
    while (pos) {
        CAsyncRequest* pRequest = m_listDone.GetNext(pos);
        delete pRequest;
    }
    m_listDone.RemoveAll();
}
Exemplo n.º 2
0
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;
}
Exemplo n.º 4
0
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;
}
Exemplo n.º 5
0
HRESULT CBufferFilterOutputPin::DeliverBeginFlush()
{
	CallQueue(BeginFlush());
}