mm_audio_format_t

Audio format information

Synopsis:

#include <mm/types.h>

typedef struct mm_audio_format {
    char        codec[MM_CODEC_NAME_MAX_LEN];
    uint32_t    bitrate;
    uint32_t    samplerate;
    uint8_t     channels;
    uint8_t     bitrate_type;
    uint8_t     channel_type;
    uint8_t     reserve1;
    int32_t     reserve2;
    int32_t     reserve3;
} mm_audio_format_t;

Description:

The structure mm_audio_format_t provides information about the current state of an audio stream. It includes at least the members described in the table below.

Member Type Description
codec char Name of the audio codec. This member is the character string with the name of the audio codec. See Audio codec below.
bitrate uint32_t Average bitrate for the audio track, in bits per second.
samplerate uint32_t Sample bitrate, in hertz.
channels uint8_t Channel type. See Audio channels.
bitrate_type uint8_t Bitrate type. See mm_bitrate_t in this reference.
channel_type uint8_t Deprecated in MME 1.1.0. Do not use.
reserve1 uint8_t For future use.
reserve2, 3 int32_t For future use.

Audio codec

The MME API function mme_audio_get_status() uses the data structure mm_audio_format_t. The MME API function mme_video_get_status() uses the data structure mm_video_info_t. Both these structures include a member codec. The codec members of the structures mm_video_info_t and mm_audio_format_t hold character strings identifying the codec format for the video or audio. These strings can have a length of up to the number of bytes defined by MM_CODEC_NAME_MAX_LEN, which is currently 32 bytes.

Client applications can pass these character strings up to the end users to inform them of the codec format used by a video or audio track.

Audio channels

The channels member of the structure mm_audio_format_t describes the number of channels available in the audio stream. It can be set to any number defined as valid by the audio stream specification.

Example audio stream channels

Channels Audio stream
1 mono
2 stereo
6 Dolby digital 5.1
6 DTS
8 Dolby digital 7.1
8 DTS_ES

Classification:

QNX Multimedia

See also:

mm_bitrate_t, mme_video_audio_info_t, mm_video_audio_info_t, mm_video_info_t, mme_audio_get_status, video_get_status()