MP4DMXMpoMp4AudioTrackInf

Syntax

#include <cafe/mp4dmx.h>

///Audio Track Information Structure
typedef struct
{
    ///Audio Track Size
    s32     size;
    ///The playback volume
    s32     volume;
    ///Number of Channels
    s32     channel_count;
    ///Size of sample
    s32     sample_size;
    ///Audio Time Scale
    s32     sample_rate;
    ///Maximum bit rate[bps]
    s32     maxbitrate;
    ///Average bit rate[bps]
    s32     avgbitrate;
    ///Media type of audio
    s32     mediatype;
    ///Number of Channels
    s32     channel_mode;
    ///Audio Object Type
    s32     audio_object_type;
    ///Object Type
    s32     object_type_indication;
    ///SBR flag
    s32     sbr_enable_flag;
    ///ParametricStereo flag
    s32     ps_enable_flag;
    ///The number of offset bytes from the beginning of the file of the first frame
#ifndef _TYPE_CO64
    s32     top_frame_offset;
#else
    u64     top_frame_offset;
#endif /*_TYPE_CO64*/
    ///The number of bytes in the first frame
    s32     top_frame_size;
} MP4DMXMpoMp4AudioTrackInf;

Elements

size The size (in bytes) of the audio track.
volume The playback volume.
channel_count Number of channels.
sample_size The number of bits in a single sample.
sample_rate The audio time scale (in Hz).
maxbitrate The maximum bitrate (in bits per second).
avgbitrate The average bitrate (in bits per second).
mediatype The audio media type. This is MP4DMX_MEDIA_TYPE_MP4A for AAC.
channel_mode The number of channels (the value of mp4a->esds->DecoderConfigDescriptor-> DecoderSpecificInfo->AudioSpecificConfig->ChannelConfiguration).
audio_object_type The audio object type.
Normally, this is the value in AudioSpecificConfig. When AudioObjectType is 0x05 or 0x1D, this is the value of the second AudioObjectType (normally 0x02).
object_type_indication The object type.
The value in DecoderConfigDescriptor.
sbr_enable_flag A spectral band replication (SBR) flag.
This is MP4DMX_SBR_ENABLED when spectral band replication is enabled and MP4DMX_UNKNOWN_INFO when it may or may not be enabled.
ps_enable_flag A parametric stereo (PS) flag.
This is MP4DMX_PS_ENABLED when parametric stereo is enabled and MP4DMX_UNKNOWN_INFO when it may or may not be enabled.
top_frame_offset The offset (in bytes) from the start of the file to the first frame.
This is MP4DMX_UNKNOWN_INFO when the offset is unknown. (See Note below.)
top_frame_size The number of bytes in the first frame.
This is MP4DMX_UNKNOWN_INFO when the number of bytes is unknown. (See Note below.)

NOTE:
If a MovieBox does not have a MediaDataBox, get the offset to and number of bytes in the first frame by calling a utility function after reading a MovieFragmentBox having a MediaDataBox.

Original Data Referenced by MP4DMXMpoMp4AudioTrackInf Structure

Member Variable Referenced Source in MP4 Data File
size trak->size
volume mvhd->volume
channel_count SampleEntry->channels
sample_size A fixed 16-bit value.
sample_rate AAC-LC, HE-AAC v1, HE-AAC v2:
  • AudioSpecificConfig->SamplingFrequencyIndex
maxbitrate AAC-LC, HE-AAC v1, HE-AAC v2:
  • DecoderConfigDescriptor->max_bitrate
avgbitrate AAC-LC, HE-AAC v1, HE-AAC v2:
  • DecoderConfigDescriptor->avg_bitrate
mediatype SampleEntry->type
This takes a value of 'mp4a' even if the bits are reversed.
channel_mode AAC-LC, HE-AAC v1, HE-AAC v2:
  • AudioSpecificConfig->ChannelConfiguration
audio_object_type AAC-LC, HE-AAC v1, HE-AAC v2:
  • AudioSpecificConfig->AudioObjectType
object_type_indication AAC-LC, HE-AAC v1, HE-AAC v2:
  • DecoderConfigDescriptor->ObjectTypeIndication
sbr_enable_flag AAC-LC, HE-AAC v1, HE-AAC v2:
  • AudioSpecificConfig->sbrPresentFlag
ps_enable_flag AAC-LC, HE-AAC v1, HE-AAC v2:
  • AudioSpecificConfig->psPresentFlag
top_frame_offset stco->chunk_offset
top_frame_size stsz->entry_size

Description

This structure stores audio track information retrieved by the library from the MP4 data file. This data can be retrieved using the applicable utility function.

See Also

MP4DMXMpoPARAMETER
MP4DMXMpoOutputFunction
MP4DMXMpoDATA
MP4DMXMpoUNIT
MP4DMXMpoMp4HeaderInf
MP4DMXMpoMp4TrackInf
MP4DMXMpoMp4VideoTrackInf
MP4DMXAvcConfig
MP4DMXAvcParamSets

Revision History

2014-08-01 Initial topic creation.


CONFIDENTIAL