MFGetAttributeRatio function

Retrieves an attribute whose value is a ratio.

Syntax

HRESULT MFGetAttributeRatio(
  IMFAttributes *pAttributes,
  REFGUID       guidKey,
  UINT32        *punNumerator,
  UINT32        *punDenominator
);

Parameters

pAttributes

Pointer to the IMFAttributes interface of the attribute store.

guidKey

GUID that identifies which value to retrieve. The attribute type must be MF_ATTRIBUTE_UINT64.

punNumerator

Receives the numerator of the ratio.

punDenominator

Receives the denominator of the ratio.

Return Value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Some attributes specify a ratio as a packed UINT64 value. Use this function to get the numerator and denominator as separate 32-bit values.

Requirements

   
Minimum supported client Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header mfapi.h

See Also

MFSetAttributeRatio

Media Foundation Functions