Microsoft DirectX 8.1 (C++)

COutputQueue::COutputQueue

Constructor method.

Syntax

COutputQueue(
    IPin *pInputPin,
    HRESULT *phr,
    BOOL bAuto = TRUE,
    BOOL bQueue = TRUE,
    LONG lBatchSize = 1,
    BOOL bBatchExact = FALSE,
    LONG lListSize = DEFAULTCACHE,
    DWORD dwPriority = THREAD_PRIORITY_NORMAL
);

Parameters

pInputPin

Pointer to the IPin interface of the input pin. The object will deliver samples to this pin.

phr

Pointer to an HRESULT return code. Set the value to S_OK before calling this method. On return, phr receives a value that indicates the success or failure of the method.

bAuto

Flag that specifies whether the object decides when to create a queue. If TRUE, the object creates a queue only if the input pin might block. If FALSE, the bQueue parameter specifies whether to create a queue.

bQueue

If bAuto is TRUE, this parameter is ignored. If bAuto is FALSE, this flag specifies whether to create a queue.

lBatchSize

Maximum number of samples to deliver in one batch.

bBatchExact

Flag that specifies whether to use exact batch sizes. If TRUE, the object waits for lBatchSize samples before delivering them to the input pin. If FALSE, the object delivers samples as it receives them.

lListSize

Cache size for the queue. The default value, DEFAULTCACHE, is a constant defined for the CBaseList class.

dwPriority

Priority of the thread that delivers samples.

Remarks

If bAuto is TRUE, the object calls the IMemInputPin::ReceiveCanBlock method on the downstream pin. If ReceiveCanBlock returns S_OK (meaning the pin might block on IMemInputPin::Receive calls), the object creates a thread for delivering samples. Otherwise, it does not create a thread.

If bAuto is FALSE, the value of bQueue determines whether to create a thread.

If the object creates a thread, it assigns the thread handle to the COutputQueue::m_hThread member variable. The thread procedure is COutputQueue::InitialThreadProc, and the thread parameter is a pointer to this. The object also creates a queue for holding samples, which is given by the COutputQueue::m_List member variable.

See Also