Share via


COutputQueue::ThreadProc

 
Microsoft DirectShow 9.0

COutputQueue::ThreadProc

The ThreadProc method retrieves samples from the queue and delivers them to the input pin.

Syntax

  DWORD ThreadProc(void);

Return Value

Returns zero.

Remarks

The COutputQueue::InitialThreadProc method calls this method, which implements the main thread loop. Within the loop, the method performs the following steps:

  1. Retrieves a sample for the queue.
  2. If the sample is a control message, the thread executes the control action. Otherwise, it places the sample into the COutputQueue::m_ppSamples array.
  3. When the array is full (or if COutputQueue::m_bBatchExact is FALSE), the thread calls the IMemInputPin::ReceiveMultiple method to deliver the samples.
  4. If no samples are queued, the thread waits on the COutputQueue::m_hSem semaphore.

The thread terminates when the COutputQueue::m_bTerminate member variable becomes TRUE.

Requirements

**  Header:** Declared in Outputq.h; include Streams.h.

**  Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

See Also