MFGetAttributeDouble

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

Syntax

double MFGetAttributeDouble(
         IMFAttributes *pAttributes,
         REFGUID guidKey,
         double fDefault
)  

Parameters

pAttributes
Type: IMFAttributes *

Pointer to the IMFAttributes interface of the attribute store.

guidKey
Type: REFGUID 

GUID that identifies which value to retrieve.

fDefault
Type: double 

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

Return value

Type: double 

Returns a double value.

Return codes
Return code Description

Refer to Media Foundation return codes.

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

Header: Declared in mfapi.h.