IMFRateSupport::GetFastestRate method

Gets the fastest playback rate supported by the object.


HRESULT GetFastestRate(
  [in]  MFRATE_DIRECTION eDirection,
  [in]  BOOL             fThin,
  [out] float            *pflRate


eDirection [in]

Specifies whether to query to the fastest forward playback rate or reverse playback rate. The value is a member of the MFRATE_DIRECTION enumeration.

fThin [in]

If TRUE, the method retrieves the fastest thinned playback rate. Otherwise, the method retrieves the fastest non-thinned playback rate. For information about thinning, see About Rate Control.

pflRate [out]

Receives the fastest playback rate that the object supports.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codeDescription

The method succeeded.


The object does not support reverse playback.


The object does not support thinning.



For some formats (such as ASF), thinning means dropping all frames that are not I-frames. If a component produces stream data, such as a media source or a demultiplexer, it should pay attention to the fThin parameter and return MF_E_THINNING_UNSUPPORTED if it cannot thin the stream.

If the component processes or receives a stream (most transforms or media sinks), it may ignore this parameter if it does not care whether the stream is thinned. In the Media Session's implementation of rate support, if the transforms do not explicitly support reverse playback, the Media Session will attempt to playback in reverse with thinning but not without thinning. Therefore, most applications will set fThin to TRUE when using the Media Session for reverse playback.

If eDirection is MFRATE_REVERSE, the method retrieves the fastest reverse playback rate. This is a negative value, assuming the object supports reverse playback.


Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]





See also

How to Determine Supported Rates