Documentation  |   Table of Contents   |  < Previous   |  Next >   |  Index

5    Multimedia Codecs

Multimedia

Exploring Palm OS®

This chapter describes multimedia constants and functions related to codecs:

Multimedia Codec Constants
Multimedia Codec Functions and Macros

The header file MMCodecClass.h declares the API that this chapter describes.

Multimedia Codec Constants ^TOP^

Codec Class Properties ^TOP^

Purpose

Defines property keys that can be used to access information in codec classes.

Declared In

MMCodecClass.h

Constants

#define P_MM_CODEC_CLASS_PROP_CREATOR (P_MM_CODEC_CLASS_PROP_BASE | 0x0003L)
The codec class's creator ID.
#define P_MM_CODEC_CLASS_PROP_DEST_FORMAT (P_MM_CODEC_CLASS_PROP_BASE | 0x0005L)
The codec's destination format if it is an encoder.
#define P_MM_CODEC_CLASS_PROP_NAME (P_MM_CODEC_CLASS_PROP_BASE | 0x0001L)
The codec's name.
#define P_MM_CODEC_CLASS_PROP_SOURCE_FORMAT (P_MM_CODEC_CLASS_PROP_BASE | 0x0004L)
The codec's source format if it is a decoder.
#define P_MM_CODEC_CLASS_PROP_VERSION (P_MM_CODEC_CLASS_PROP_BASE | 0x0002L)
The codec's version number.

Multimedia Codec Functions and Macros ^TOP^

MMCodecClassEnumerate Function ^TOP^

Purpose

Iterates through the available codecs, both encoders and decoders.

Declared In

MMCodecClass.h

Prototype

status_t MMCodecClassEnumerate (
   MMFormatType type,
   int32_t *ioIterator,
   MMCodecClassID *outCodecClassID
)

Parameters

type
The type of codecs to enumerate. Specify one of the constants listed in "formatType," or specify P_FORMAT_UNKNOWN to enumerate codecs of all format types.
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 to P_MM_ENUM_END.
outCodecClassID
Pointer to the ID of the next available codec.

Returns

The following result codes:

errNone
No error.
sysErrParamErr
The iterator is invalid or the type doesn't match previous calls in the same iteration set.
sysErrBadIndex
The iterator value is invalid or past the last item in the set.

MMFileFormatEnumerate Function ^TOP^

Purpose

Iterates through the supported file formats (these are distinct from codecs because a file format may encapsulate many kinds of encoded data).

Declared In

MMCodecClass.h

Prototype

status_t MMFileFormatEnumerate (
   int32_t *ioIterator,
   MMFormatType *outFormat
)

Parameters

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 to P_MM_ENUM_END.
outFormat
Pointer to the ID of the next available format.

Returns

The following result codes:

errNone
No error.
sysErrParamErr
The iterator is invalid or the type doesn't match previous calls in the same iteration set.
sysErrBadIndex
The iterator value is invalid or past the last item in the set.