Muokkaa

Jaa


COutputQueue.NewSegment 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 NewSegment method delivers a new segment to the input pin.

Syntax

HRESULT NewSegment(
   REFERENCE_TIME tStart,
   REFERENCE_TIME tStop,
   double         dRate
);

Parameters

tStart

Starting media position of the segment, in 100-nanosecond units.

tStop

End media position of the segment, in 100-nanosecond units.

dRate

Rate at which this segment should be processed, as a percentage of the original rate.

Return value

Returns an HRESULT value.

Remarks

If the object is using a thread, it queues the following items, in order:

  • A NEW_SEGMENT control message.
  • The segment data.

The NEW_SEGMENT message notifies the thread that the next item on the queue will contain segment data. The segment data is bundled in a structure, declared as follows:

struct NewSegmentPacket {
    REFERENCE_TIME tStart;
    REFERENCE_TIME tStop;
    double dRate;
}; 

The thread calls the IPin::NewSegment method on the input pin, using the data given in the structure.

If the object is not using a thread, it calls the COutputQueue::SendAnyway method to deliver any pending samples. Then it calls IPin::NewSegment on the input pin.

Requirements

Requirement Value
Header
Outputq.h (include Streams.h)
Library
Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

COutputQueue Class