Retrieves an attribute whose value is a ratio.
HRESULT MFGetAttributeRatio(
IMFAttributes *pAttributes,
REFGUID guidKey,
UINT32 *punNumerator,
UINT32 *punDenominator
)
pAttributes
Type: IMFAttributes *
Pointer to the IMFAttributes interface of the attribute store.
guidKey
Type: REFGUID
GUID that identifies which value to retrieve. The attribute type must be MF_ATTRIBUTE_UINT64.
punNumerator
Type: UINT32 *
[out] Receives the numerator of the ratio.
punDenominator
Type: UINT32 *
[out]
Receives the denominator of the ratio.
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Refer to Media Foundation return codes.
Some attributes specify a ratio as a packed UINT64 value. Use this function to get the numerator and denominator as separate 32-bit values.
Header: Declared in mfapi.h.