Microsoft DirectX 9.0

AM_SimpleRateChange Structure

The AM_SimpleRateChange structure is used to change the playback rate for an MPEG-2 stream.

Syntax

 typedef struct {
   REFERENCE_TIME StartTime;
   LONG           Rate;
} AM_SimpleRateChange;

Members

StartTime

Specifies the time stamp on the input sample when the new rate takes effect. The new rate applies to all samples with a time stamp >= StartTime and less than the start time on the next queued rate segment.

Rate

Specifies the new rate x 10000.

Remarks

Rate is the inverse of speed. For example, if the playback speed is 2x, the rate is 1/2, so the Rate member is set to 5000.

Version 1.1 Semantics

For version 1.1 of this property set, the StartTime member can be -1. This value indicates that the rate change applies to the decoder's most forward sample, defined as the sample at the head of the decoder's outgoing queue. The decoder should adjust the time stamps on every queued sample to reflect the new rate. If the decoder does not keep an internal queue of samples, it should return VFW_E_BUFFER_UNDERFLOW from the IKsPropertySet::Set method.

Queued samples might be incompatible with the new rate, especially for audio decoders; if so, the decoder may simply drop the queued samples. After dropping samples, it should set the discontinuity flag on the first sample it delivers.

If the source filter schedules a rate change whose start time is earlier than previously queued rate changes, the later rate changes are no longer valid, and the decoder should flush them from its queue. If StartTime is -1, the decoder should flush all pending rate changes before queuing the new rate change.

Requirements

Include Dvdmedia.h.

See Also