MFGetAttributeDouble function (mfapi.h)

Returns a double value from an attribute store, or a default value if the attribute is not present.

Syntax

double MFGetAttributeDouble(
  [in] IMFAttributes *pAttributes,
  [in] REFGUID       guidKey,
  [in] double        fDefault
);

Parameters

[in] pAttributes

Pointer to the IMFAttributes interface of the attribute store.

[in] guidKey

GUID that identifies which value to retrieve.

[in] fDefault

Default value to return if the attribute store does not contain the specified attribute.

Return value

Returns a double value.

Remarks

This helper function queries the attribute store for the attribute specified by guidKey. If the attribute is not present or does not have type double, the function returns fDefault.

This function is convenient because it never returns a failure code. However, if the attribute in question does not have a meaningful default value, you should call IMFAttributes::GetDouble and check for MF_E_ATTRIBUTENOTFOUND.

Requirements

Requirement Value
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 and Properties

IMFAttributes::GetDouble

Media Foundation Functions