Microsoft DirectX 9.0


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


DWORD ThreadProc(void);

Return Value

Returns zero.


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.

See Also