Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IPin::NewSegment method

The NewSegment method notifies the pin that media samples received after this call are grouped as a segment, with a common start time, stop time, and rate.

Applications should not call this method. This method is called by other filters.

Syntax


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

Parameters

tStart

Start time of the segment, relative to the original source, in 100-nanosecond units.

tStop

End time of the segment, relative to the original source, in 100-nanosecond units.

dRate

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

Return value

Returns S_OK if successful, or an HRESULT value indicating the cause of the error.

Remarks

A source filter (or parser filter) calls this method at the start of each new stream and after each seek operation. It calls the method on the input pin of the downstream filter, after delivering the previous batch of data and before calling IMemInputPin::Receive with any new data. The downstream filter propagates the NewSegment call downstream.

Filters can use segment information to process samples. For example, with some formats it is impossible to reconstruct a delta frame without the next key frame. Therefore, if the stop time occurs on a delta frame, the source filter must send some additional frames. The decoder filter determines the final frame based on the segment information. The segment rate is used to render continuous data sources, such as audio data. For example, the audio renderer uses the sampling rate and the segment rate to render the audio data correctly.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Strmif.h (include Dshow.h)

Library

Strmiids.lib

See also

Data Flow in the Filter Graph
Error and Success Codes
IPin Interface

 

 

Community Additions

ADD
Show:
© 2015 Microsoft