Returns a double value from an attribute store, or a default value if the attribute is not present.
double MFGetAttributeDouble(
IMFAttributes *pAttributes,
REFGUID guidKey,
double fDefault
)
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.
Type: double
Returns a double value.
| Return code | Description |
|---|
Refer to Media Foundation return codes.
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.
Header: Declared in mfapi.h.