[Previous] [Contents] [Index] [Next]

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

Multimedia library Structure Reference

This chapter provides reference information about the data structures used by the Multimedia library.

These structures are defined in the Addon Library, and used by the Multimedia library:

These structures are defined by the Multimedia library:

AOMimeInfo_t

This structure contains mime information. An addon uses AOMimeInfo_t to let an application know what mimetypes it can process.

The structure contains at least the following members:

char *mimetype
The mimetype (type and subtype) supported (e.g. image/jpeg).
char *extensions
A comma-separated list of file extensions for the mimetype (e.g. jpg,jpeg).
char *description
A description of the mimetype.

AOResource_t

This is the resource structure your addon has to use to give access to internal resources.

The structure contains at least the following members:

char *name
The name of the resource.
char *description
A short description of the resource.
void *value
A pointer to the actual value of the resource.
void *info
A pointer to typing information (such as a range, list of items, etc.).
int32_t type
The resource type, which is one of: You can OR the type member with one or more of the following permission values. These values are used when automatically generating a GUI for a DDL's resources, for example:

AODataFormat_t

This structure defines a description of a media format. Use the mtype field to determine the output type (audio or video), as well as its compressed state. This structure provides a quick way to determine if you need to hook up a given channel to a decoder, or to a final output if you're playing back media.

Unless you're writing your own filters, you'll never have to touch fourcc or u.

This structure has the following members:

uint32_t mtype
A flag indicating media type, which can be one of: These flags can be ORed with MEDIA_TYPE_COMPRESSED if the data is compressed.
uint32_t fourcc
A standard "four character code" that describes the media type. This is the standard FOURCC value used in AVI and quicktime files. A number of additional values are defined:
u
A straight union for the above media formats. The union contains members image, audio, and video, of type AOImageFormat_t, AOAudioFormat_t, and AOVideoFormat_t respectively.

AOImageFormat_t

This structure defines an image format, and is used by AODataFormat_t.

This structure has at least the following members:

uint32_t width
The width of the image, in pixels.
uint32_t height
The height of the image, in pixels.
uint16_t depth
The color depth of the image, in bits.
int16_t transparent
If this image is transparent, this value is the transparency index + 1. If the image isn't transparent, this value is 0.
uint8_t pal[256][3]
The image palette.

AOAudioFormat_t

This structure defines an audio format, and is used by AODataFormat_t.

This structure has at least the following members:

uint32_t channels
The number of audio channels per frame. For example, a stereo signal has 2 channels.
uint32_t depth
The audio depth (sample rate) in bytes.
int32_t frame_rate
The scaled frame rate. This value is divided by scale for the actual frame rate.
int32_t scale
A scaling value for the frame rate. This value is required if the frame rate isn't an integer. For example, if the frame rate is 29.97, set frame_rate to 2997, and scale to 100.
int32_t duration
The duration of the audio, in frames.

AOVideoFormat_t

This structure defines a video format, and is used by AODataFormat_t.

This structure has at least the following members:

uint32_t width
The width of the video image, in pixels.
uint32_t height
The height of the video image, in pixels.
uint32_t depth
The color depth (number of bits per pixel).
int32_t frame_rate
The scaled frame rate. This value is divided by scale for the actual frame rate.
int32_t scale
A scaling value for the frame rate. This value is required if the frame rate isn't an integer. For example, if the frame rate is 29.97, set frame_rate to 2997, and scale to 100.
int32_t duration
The duration of the video, in frames. Set to 0 if unknown.

[Previous] [Contents] [Index] [Next]