Index Topic Contents | |||
Previous Topic: Pin Property Set Next Topic: Event Notification Codes |
DVD Time Stamp Rate Change Property Set
The DVD Time Stamp Rate Change property set enables you to change DVD playback rate. DVD playback rates are changed by modifying time stamps between input and output pins on two filters.
Time stamp remapping is a linear relationship given by the equation y = r(x - xi), where y is the new time stamp, r is the rate (or slope), x is the original time stamp, and xi is the x-intercept. This can be represented graphically where the time stamps input to the filter are shown along the x-axis and the output time stamps are shown along the y-axis:
Variable definitions for the time stamp conversion graph:
x = input time stamp y = output time stamp xi = current x-axis intercept xs = start time of the current rate xi2 = x-axis intercept for new rate xs2 = start time of the new rate r = current rate r2 = new rate The decoder filter handles DVD rate changes, by reading the original time stamp on the media sample (x). The remaining variables, r and xi, must either be supplied or internally calculated to determine the new time stamp for the sample. The Time Stamp Rate Change property set supports two mechanisms for setting these parameters:
- The AM_RATE_ExactRateChange property accepts the OutputZeroTime parameter as the x-axis intercept for new rate, and the Rate parameter as the new rate (xi2 and r2). However, you must supply the upstream filter setting this property with the equation (y = r(x - xi)) that the downstream filter is using to do the rate change.
- The AM_RATE_SimpleRateChange property specifies two parameters that an upstream filter already knows: the new rate (r2) and the start time of the new rate (xs2). This requires the filter doing the rate change to calculate the x-axis intercept (xi2). You can calculate the new x-axis intercept with the following formula: xi2 = (r/r2)(xi - xs2) + xs2. Now that you have the input time stamp (x), the new rate (r2), and x-axis intercept (xi2), you can plug these variables into the original equation y = r2(x - xi2) to calculate the new time stamp.
Specifiying the AM_RATE_SimpleRateChange property is the easiest way to change the rate, but requires the filter to do some additional calculation.
The AM_RATE_MaxFullDataRate property enables an upstream filter to query for the maximum rate at which it can process the data. It uses the AM_MaxFullDataRate data type, which is a LONG value.
Finally, the AM_RATE_Step property enables the filter to step forward one sample at a time. It uses the AM_Step data type, which is a DWORD value.
The following information presents the necessary constants and data types to use for this property set in calls to IKsPropertySet methods. It provides values for the GUID (guidPropSet), property ID (dwPropID), and property data type (pPropData) parameters.
Property Set GUID: AM_TS_RATE_CHANGE
Property ID Data type used by the specified property AM_RATE_ExactRateChange AM_ExactRateChange AM_RATE_MaxFullDataRate AM_MaxFullDataRate AM_RATE_SimpleRateChange AM_SimpleRateChange AM_RATE_Step AM_Step The following list provides the Time Stamp Rate Change property set IDs and descriptions.
- AM_RATE_ExactRateChange
- Use the AM_ExactRateChange structure to change rate.
- AM_RATE_MaxFullDataRate
- Use the AM_MaxFullDataRate long value to process at maximum rate.
- AM_RATE_SimpleRateChange
- Use the AM_SimpleRateChange structure to change rate.
- AM_RATE_Step
- Indicates the number of frames to step over.
Use the IKsPropertySet interface to set, retrieve, and query for support of these properties.
This property set uses the following data types.
Data type Description AM_ExactRateChange Changes the rate of DVD playback based on the new rate and the time at which the output time stamps are zero. AM_SimpleRateChange Changes the rate of DVD playback, based on starting time and the new rate. DVD Time Stamp Rate Change Property Set
AM_ExactRateChangeChanges the rate of DVD playback based on the new rate and the time at which the output time stamps are zero.
typedef struct { REFERENCE_TIME OutputZeroTime; LONG Rate; } AM_ExactRateChange;Members
- OutputZeroTime
- Time at which the output time stamps are zero.
- Rate
- New rate of playback.
Remarks
The OutputZeroTime member variable represents the x-intercept in the graph shown in the DVD Time Stamp Rate Change Property Set section.
The AM_RATE_ExactRateChange property uses this structure.
DVD Time Stamp Rate Change Property Set
AM_SimpleRateChangeChanges the rate of DVD playback, based on starting time and the new rate.
typedef struct {REFERENCE_TIME StartTime; LONG Rate; } AM_SimpleRateChange;Members
- StartTime
- Time at which the new rate will take effect.
- Rate
- New rate of playback.
Remarks
Specify values for Rate member that are multiples of the normal rate, such as 2 for double time or .5 for half time.
The AM_RATE_SimpleRateChange property uses this structure.
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.