MFSetAttributeRatio

Sets a ratio as a 64-bit attribute value.

Syntax

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

Parameters

pAttributes
Type: IMFAttributes *

A pointer to the IMFAttributes interface of the attribute store.

guidKey
Type: REFGUID 

A GUID that identifies the value to set. If this key already exists, the function overwrites the old value.

unNumerator
Type: UINT32 

The numerator of the ratio.

unDenominator
Type: UINT32 

The denominator of the ratio.

Return value

Type: HRESULT 

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

Refer to Media Foundation return codes.

Remarks

Some attributes specify a ratio as a packed UINT64 value. This function packs the numerator and denominator into a single UINT64 value.

Requirements

Header: Declared in mfapi.h.