Поделиться через


COutputQueue::QueueSample

 
Microsoft DirectShow 9.0

COutputQueue::QueueSample

The QueueSample method queues a sample.

Syntax

  void QueueSample(
    IMediaSample *pSample
);

Parameters

pSample

Pointer to the sample's IMediaSample interface.

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.

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

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

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

See Also