This chapter describes multimedia functions related to properties.
The header file MMProperty.h
declares the API that this chapter describes.
Multimedia Property Functions and Macros
MMPropertyEnumerate Function
Purpose
Iterates through the supported values of a particular property of an object.
Declared In
MMProperty.h
Prototype
status_t MMPropertyEnumerate ( int32_tid
, int32_tproperty
, int32_t*ioIterator
, MMTypeCodetypeCode
, void*outValue
, int32_t*ioLength
)
Parameters
-
→ id
- A valid object ID.
-
→ property
- A valid property key.
-
↔ ioIterator
- Pointer to the value returned by the previous call to this function. On the first call to this function, set this value to
P_MM_ENUM_BEGIN
. When the set of iterated values is exhausted, this function sets this value toP_MM_ENUM_END
. -
→ typeCode
- The expected type of data. Specify one of the constants listed in "MMTypeCode."
-
↔ outValue
- On input, a pointer to a buffer capable of storing the specified type of data. On output, a pointer to the value, if it was found and enough storage space was provided.
-
↔ ioLength
- On input, if
typeCode
specifies a variable-length value with no delimiter (P_MM_TYPE_RAW
,), then this is a pointer to the size of theoutValue
buffer in bytes; otherwise this may beNULL
. On output, a pointer to the actual size of the value.
Returns
-
errNone
- No error.
-
sysErrParamErr
- The specified object or property is invalid.
-
sysErrBadIndex
- The iterator value is invalid or past the last item in the set.
-
sysErrBadType
- The specified
typeCode
does not match the property's type. -
sysErrNotAllowed
- Cannot enumerate this property.
-
memErrNotEnoughSpace
- The
outValue
buffer was filled to capacity with a partial value andioLength
is set to indicate the required capacity.
MMPropertyGet Function
Purpose
Returns the value of an object property.
Declared In
MMProperty.h
Prototype
status_t MMPropertyGet ( int32_tid
, int32_tproperty
, MMTypeCodetypeCode
, void*outValue
, int32_t*ioValueLen
)
Parameters
-
→ id
- A valid object ID.
-
→ property
- A valid property key.
-
→ typeCode
- The expected type of data. Specify one of the constants listed in "MMTypeCode."
-
↔ outValue
- On input, a pointer to a buffer capable of storing the specified type of data. On output, a pointer to the value, if it was found and enough storage space was provided.
-
↔ ioLength
- On input, if
typeCode
specifies a variable-length value with no delimiter (P_MM_TYPE_RAW
,), then this is a pointer to the size of theoutValue
buffer in bytes; otherwise this may beNULL
. On output, a pointer to the actual size of the value.
Returns
-
errNone
- No error.
-
sysErrParamErr
- The specified object or property is invalid.
-
sysErrBadType
- The specified
typeCode
does not match the property's type. -
memErrNotEnoughSpace
- The
outValue
buffer was filled to capacity with a partial value andioLength
is set to indicate the required capacity.
See Also
MMPropertyInfo Function
Purpose
Returns metadata about a property.
Declared In
MMProperty.h
Prototype
status_t MMPropertyInfo ( int32_tid
, MMPropInfoTypeinfoType
, int32_tproperty
, MMTypeCodetypeCode
, void*outValue
, int32_t*ioValueLen
)
Parameters
-
→ id
- A valid object ID.
-
→ infoType
- The type of information to return. Specify one of the constants listed in "MMPropInfoType."
-
→ property
- A valid property key.
-
→ typeCode
- The expected type of data. Specify one of the constants listed in "MMTypeCode."
-
↔ outValue
- On input, a pointer to a buffer capable of storing the specified type of data. On output, a pointer to the value, if it was found and enough storage space was provided.
-
↔ ioLength
- On input, if
typeCode
specifies a variable-length value with no delimiter (P_MM_TYPE_RAW
,), then this is a pointer to the size of theoutValue
buffer in bytes; otherwise this may beNULL
. On output, a pointer to the actual size of the value.
Returns
-
errNone
- No error.
-
sysErrParamErr
- The specified object or property is invalid.
-
sysErrBadType
- The specified
typeCode
does not match the property's type. -
memErrNotEnoughSpace
- The
outValue
buffer was filled to capacity with a partial value andioLength
is set to indicate the required capacity.
See Also
MMPropertySet Function
Purpose
Sets an object property value.
Declared In
MMProperty.h
Prototype
status_t MMPropertySet ( int32_tid
, int32_tproperty
, MMTypeCodetypeCode
, const void*value
, uint32_tlength
)
Parameters
-
→ id
- A valid object ID.
-
→ property
- A valid property key.
-
→ typeCode
- The expected type of data. Specify one of the constants listed in "MMTypeCode."
-
→ value
- A pointer to the value to set for the property.
-
→ length
- If
typeCode
specifies a variable-length value with no delimiter (P_MM_TYPE_RAW
,), then this indicates the size of the value in bytes. Otherwise,length
is ignored and should be set to 0.
Returns
-
errNone
- No error.
-
sysErrParamErr
- The specified object or property is invalid.
-
sysErrBadType
- The specified
typeCode
does not match the property's type.