Export (0) Print
Expand All
Expand Minimize

MFAverageTimePerFrameToFrameRate function

Calculates the frame rate, in frames per second, from the average duration of a video frame.

Syntax


HRESULT MFAverageTimePerFrameToFrameRate(
  _In_   UINT64 unAverageTimePerFrame,
  _Out_  UINT32 *punNumerator,
  _Out_  UINT32 *punDenominator
);

Parameters

unAverageTimePerFrame [in]

The average duration of a video frame, in 100-nanosecond units.

punNumerator [out]

Receives the numerator of the frame rate.

punDenominator [out]

Receives the denominator of the frame rate.

Return value

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

Return codeDescription
S_OK

The function succeeded.

 

Remarks

Average time per frame is used in the older VIDEOINFOHEADER and VIDEOINFOHEADER2 format structures. This function provides a standard conversion so that all components in the pipeline can use consistent values, if they need to translate between the older format structures and the media type attributes used in Media Foundation.

This function uses a look-up table for certain common durations. The table is listed in the Remarks section for the MFFrameRateToAverageTimePerFrame function.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Mfapi.h

Library

Mfplat.lib

DLL

Mfplat.dll

See also

Media Foundation Functions
MFFrameRateToAverageTimePerFrame
Media Types

 

 

Community Additions

ADD
Show:
© 2014 Microsoft