MFSetAttributeRatio function

Sets a ratio as a 64-bit attribute value.

Syntax

HRESULT MFSetAttributeRatio(
  IMFAttributes *pAttributes,
  REFGUID       guidKey,
  UINT32        unNumerator,
  UINT32        unDenominator
);

Parameters

pAttributes

A pointer to the IMFAttributes interface of the attribute store.

guidKey

A

          <b>GUID</b> that identifies the value to set. If this key already exists, the function overwrites the old value.

unNumerator

The numerator of the ratio.

unDenominator

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. This function packs the numerator and denominator into a single UINT64 value.

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

Attributes in Media Foundation

MFGetAttributeRatio

Media Foundation Functions