COutputQueue.QueueSample method
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The QueueSample
method queues a sample.
Syntax
void QueueSample(
IMediaSample *pSample
);
Parameters
-
pSample
-
Pointer to the sample's IMediaSample interface.
Return value
This method does not return a value.
Remarks
This method adds a sample to the tail of the queue. Hold the critical section before calling this method, and call it only when the object is using a thread to deliver samples. To determine if the object is using a thread, call the COutputQueue::IsQueued method.
This method can also be used to put control messages onto the queue. A control message is a defined constant (cast to a LONG_PTR type) that instructs the thread to perform some action. The COutputQueue class defines the control messages shown in the following table.
Label | Value |
---|---|
Message | Action |
EOS_PACKET | Deliver an end-of-stream notification. |
NEW_SEGMENT | Deliver a new segment. |
RESET_PACKET | Reset the state of the queue. |
SEND_PACKET | Send a partial batch of samples. |
This is a protected method, which the COutputQueue class uses internally.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|