MixAudioConfigParamsAAC

MixAudioConfigParamsAAC — Audio configuration parameters for AAC-LC, HEAAC v1, and HEAAC v2 audio format.

Synopsis


#include <mixacpaac.h>

enum                MixAACBitrateType;
enum                MixAACBitstreamFormt;
enum                MixAACProfile;
enum                MixAACMpegID;
                    MixAudioConfigParamsAAC;
MixAudioConfigParamsAAC * mix_acp_aac_new               (void);
MixAudioConfigParamsAAC * mix_acp_aac_ref               (MixAudioConfigParamsAAC *mix);
#define             mix_acp_aac_unref                   (obj)
MIX_RESULT          mix_acp_aac_set_mpeg_id             (MixAudioConfigParamsAAC *obj,
                                                         MixAACMpegID mpegid);
MixAACMpegID        mix_acp_aac_get_mpeg_id             (MixAudioConfigParamsAAC *obj);
#define             MIX_ACP_AAC_CRC                     (obj)
MIX_RESULT          mix_acp_aac_set_aot                 (MixAudioConfigParamsAAC *obj,
                                                         guint aot);
guint               mix_acp_aac_get_aot                 (MixAudioConfigParamsAAC *obj);
#define             MIX_ACP_AAC_SBR_FLAG                (obj)
#define             MIX_ACP_AAC_PS_FLAG                 (obj)
#define             MIX_ACP_AAC_PCE_FLAG                (obj)
#define             MIX_ACP_AAC_SAMPLE_RATE             (obj)
#define             MIX_ACP_AAC_CHANNELS                (obj)
MixAACBitstreamFormt  mix_acp_aac_get_bit_stream_format (MixAudioConfigParamsAAC *obj);
MIX_RESULT          mix_acp_aac_set_bit_stream_format   (MixAudioConfigParamsAAC *obj,
                                                         MixAACBitstreamFormt bit_stream_format);
MixAACProfile       mix_acp_aac_get_aac_profile         (MixAudioConfigParamsAAC *obj);
MIX_RESULT          mix_acp_aac_set_aac_profile         (MixAudioConfigParamsAAC *obj,
                                                         MixAACProfile aac_profile);
MixAACBitrateType   mix_acp_aac_get_bit_rate_type       (MixAudioConfigParamsAAC *obj);
MIX_RESULT          mix_acp_aac_set_bit_rate_type       (MixAudioConfigParamsAAC *obj,
                                                         MixAACBitrateType bit_rate_type);

Description

A data object which stores audio specific parameters for the following formats:

  • AAC-LC
  • HE-AAC v1
  • HE-AAC v2

Additional parameters must be set in the parent object MixAudioConfigParams

Details

enum MixAACBitrateType

typedef enum {
  MIX_AAC_BR_NULL=-1,
  MIX_AAC_BR_CONSTANT=0,
  MIX_AAC_BR_VARIABLE,
  MIX_AAC_BR_LAST
} MixAACBitrateType;

Types of bitrate in AAC.

MIX_AAC_BR_NULL

Undefined bit rate type.

MIX_AAC_BR_CONSTANT

Constant bit rate.

MIX_AAC_BR_VARIABLE

Variable bit rate.

MIX_AAC_BR_LAST

last entry.

enum MixAACBitstreamFormt

typedef enum {
  MIX_AAC_BS_NULL=-1,
  MIX_AAC_BS_ADTS=0,
  MIX_AAC_BS_ADIF,
  MIX_AAC_BS_RAW,
  MIX_AAC_BS_LAST
} MixAACBitstreamFormt;

AAC bitstream format.

MIX_AAC_BS_NULL

Undefined bitstream format.

MIX_AAC_BS_ADTS

Bitstream is in ADTS format.

MIX_AAC_BS_ADIF

Bitstream is in ADIF format.

MIX_AAC_BS_RAW

Bitstream is in raw format.

MIX_AAC_BS_LAST

Last entry.

enum MixAACProfile

typedef enum {
  MIX_AAC_PROFILE_NULL=-1,
  MIX_AAC_PROFILE_MAIN=0,
  MIX_AAC_PROFILE_LC,
  MIX_AAC_PROFILE_SSR,
  MIX_AAC_PROFILE_LAST
} MixAACProfile;

AAC profiles definitions.

MIX_AAC_PROFILE_NULL

Undefined profile.

MIX_AAC_PROFILE_MAIN

Not Supported AAC Main profile.

MIX_AAC_PROFILE_LC

AAC-LC profile, including support of SBR and PS tool.

MIX_AAC_PROFILE_SSR

Not Supported SSR profile.

MIX_AAC_PROFILE_LAST

Last entry.

enum MixAACMpegID

typedef enum {
  MIX_AAC_MPEG_ID_NULL=-1,
  MIX_AAC_MPEG_2_ID = 0,
  MIX_AAC_MPEG_4_ID = 1,
  MIX_AAC_MPEG_LAST
} MixAACMpegID;

AAC MPEG ID.

MIX_AAC_MPEG_ID_NULL

Undefined MPEG ID.

MIX_AAC_MPEG_2_ID

Indicate MPEG 2 Audio.

MIX_AAC_MPEG_4_ID

Indicate MPEG 4 Audio.

MIX_AAC_MPEG_LAST

last entry.

MixAudioConfigParamsAAC

typedef struct {
  MixAudioConfigParams parent;

  /* Audio Format Parameters */
  MixAACMpegID MPEG_id;
  MixAACBitstreamFormt bit_stream_format;
  MixAACProfile aac_profile;
  guint aot;
  guint aac_sample_rate;      
  guint aac_channels;  
  MixAACBitrateType bit_rate_type;
  gboolean CRC;
  guint sbrPresentFlag;
  guint psPresentFlag;
  gboolean pce_present;
  gint8 syntc_id[2]; 
  gint8 syntc_tag[2]; 
  gint num_syntc_elems;
} MixAudioConfigParamsAAC;

MixAudio Parameter object

MixAudioConfigParams parent;

parent.

MixAACMpegID MPEG_id;

MPEG ID. See mix_acp_aac_set_mpeg_id

MixAACBitstreamFormt bit_stream_format;

Bitstream format. See mix_acp_aac_set_bit_stream_format.

MixAACProfile aac_profile;

AAC profile. See mix_acp_aac_set_aac_profile.

guint aot;

Audio object type. See mix_acp_aac_set_aot

guint aac_sample_rate;

See MIX_ACP_AAC_SAMPLE_RATE macro.

guint aac_channels;

See MIX_ACP_AAC_CHANNELS macro.

MixAACBitrateType bit_rate_type;

Bitrate type. See mix_acp_aac_set_bit_rate_type

gboolean CRC;

CRC check 0:disable, 1:enable.

guint sbrPresentFlag;

See MIX_ACP_AAC_SBR_FLAG macro.

guint psPresentFlag;

See MIX_ACP_AAC_PS_FLAG macro.

gboolean pce_present;

Not Used. See MIX_ACP_AAC_PCE_FLAG

gint8 syntc_id[2];

Not Used. 0 for ID_SCE(Dula Mono), -1 for raw.

gint8 syntc_tag[2];

Not Used. -1 for raw. 0-16 for rest of the streams.

gint num_syntc_elems;

Not Used. Number of syntatic elements.

mix_acp_aac_new ()

MixAudioConfigParamsAAC * mix_acp_aac_new               (void);

Use this method to create new instance of MixAudioConfigParamsAAC

returns :

A newly allocated instance of MixAudioConfigParamsAAC

mix_acp_aac_ref ()

MixAudioConfigParamsAAC * mix_acp_aac_ref               (MixAudioConfigParamsAAC *mix);

Add reference count.

mix :

object to add reference

returns :

the MixAudioConfigParamsAAC instance where reference count has been increased.

mix_acp_aac_unref()

#define mix_acp_aac_unref(obj) mix_params_unref(MIX_PARAMS(obj))

Decrement reference count of the object.

obj :

object to unref.

mix_acp_aac_set_mpeg_id ()

MIX_RESULT          mix_acp_aac_set_mpeg_id             (MixAudioConfigParamsAAC *obj,
                                                         MixAACMpegID mpegid);

Configure decoder to treat audio as MPEG 2 or MPEG 4.

obj :

MixAudioConfigParamsAAC

mpegid :

MPEG ID to set.

return :

MIX_RESULT

mix_acp_aac_get_mpeg_id ()

MixAACMpegID        mix_acp_aac_get_mpeg_id             (MixAudioConfigParamsAAC *obj);

Retrieve currently configured mpeg id value.

obj :

MixAudioConfigParamsAAC object

returns :

MPEG ID.

MIX_ACP_AAC_CRC()

#define MIX_ACP_AAC_CRC(obj) (MIX_AUDIOCONFIGPARAMSAAC(obj)->CRC)

MixAudioConfigParamAAC.CRC accessor.

obj :

MixAudioConfigParamsAAC object.

mix_acp_aac_set_aot ()

MIX_RESULT          mix_acp_aac_set_aot                 (MixAudioConfigParamsAAC *obj,
                                                         guint aot);

Audio Object Type for the MPEG-4 audio stream. Valid value are:

2 - for AAC-LC

5 - for SBR

Method returns MIX_RESULT_NOT_SUPPORTED for not supported value.

obj :

MixAudioConfigParamsAAC

aot :

Audio Object Type.

mix_acp_aac_get_aot ()

guint               mix_acp_aac_get_aot                 (MixAudioConfigParamsAAC *obj);

To retrieve currently configured audio object type.

obj :

MixAudioConfigParamsAAC

aot :

Pointer to receive the Audio Object Type.

return :

Currently configured audio object type. Or 0 if not yet specified.

MIX_ACP_AAC_SBR_FLAG()

#define MIX_ACP_AAC_SBR_FLAG(obj) (MIX_AUDIOCONFIGPARAMSAAC(obj)->sbrPresentFlag)

MixAudioConfigParamAAC.sbrPresentFlag accessor.

Applicable only when bit_stream_format==MIX_AAC_BS_RAW. Indicates whether SBR data is present.

0: Absent

1: Present

-1 (0xffffffff): indicates implicit signalling.

obj :

MixAudioConfigParamsAAC object

MIX_ACP_AAC_PS_FLAG()

#define MIX_ACP_AAC_PS_FLAG(obj) (MIX_AUDIOCONFIGPARAMSAAC(obj)->psPresentFlag)

MixAudioConfigParamAAC.psPresentFlag accessor.

Applicable only when bit_stream_format==MIX_AAC_BS_RAW. Indicates whether PS data is present.

0: Absent

1: Present

-1 (0xffffffff): indicates implicit signalling.

obj :

MixAudioConfigParamsAAC object

MIX_ACP_AAC_PCE_FLAG()

#define MIX_ACP_AAC_PCE_FLAG(obj) (MIX_AUDIOCONFIGPARAMSAAC(obj)->pce_present)

MixAudioConfigParamAAC.pce_present accessor.

Applicable only when bit_stream_format==MIX_AAC_BS_RAW. Indicates PCE data presence.

1:present

0:absent.

Not Used on Moorestown.

obj :

MixAudioConfigParamsAAC object.

MIX_ACP_AAC_SAMPLE_RATE()

#define MIX_ACP_AAC_SAMPLE_RATE(obj) (MIX_AUDIOCONFIGPARAMSAAC(obj)->aac_sample_rate)

MixAudioConfigParamAAC.aac_sample_rate accessor.

Plain AAC decoder operating sample rate. Which could be different from the output sampling rate with HE AAC v1 and v2.

obj :

MixAudioConfigParamsAAC object.

MIX_ACP_AAC_CHANNELS()

#define MIX_ACP_AAC_CHANNELS(obj) (MIX_AUDIOCONFIGPARAMSAAC(obj)->aac_channels)

MixAudioConfigParamAAC.aac_channels accessor.

Indicates the number of output channels used by AAC decoder before SBR or PS tools are applied.


mix_acp_aac_get_bit_stream_format ()

MixAACBitstreamFormt  mix_acp_aac_get_bit_stream_format (MixAudioConfigParamsAAC *obj);

Return the bitstream format currently configured.


mix_acp_aac_set_bit_stream_format ()

MIX_RESULT          mix_acp_aac_set_bit_stream_format   (MixAudioConfigParamsAAC *obj,
                                                         MixAACBitstreamFormt bit_stream_format);

Set the type of bitstream format as specified in MixAACBitstreamFormt.

obj :

MixAudioConfigParamsAAC

bit_stream_format :

Bit stream format.

returns :

MIX_RESULT

mix_acp_aac_get_aac_profile ()

MixAACProfile       mix_acp_aac_get_aac_profile         (MixAudioConfigParamsAAC *obj);

Retrieve the AAC profile currently configured.


mix_acp_aac_set_aac_profile ()

MIX_RESULT          mix_acp_aac_set_aac_profile         (MixAudioConfigParamsAAC *obj,
                                                         MixAACProfile aac_profile);

Configure AAC profile for current session.

Only MIX_AAC_PROFILE_LC is supported in Moorestown.

obj :

MixAudioConfigParamsAAC

aac_profile :

AAC profile to set.

returns :

MIX_RESULT

mix_acp_aac_get_bit_rate_type ()

MixAACBitrateType   mix_acp_aac_get_bit_rate_type       (MixAudioConfigParamsAAC *obj);

Retrieve the bit rate type currently configured.


mix_acp_aac_set_bit_rate_type ()

MIX_RESULT          mix_acp_aac_set_bit_rate_type       (MixAudioConfigParamsAAC *obj,
                                                         MixAACBitrateType bit_rate_type);

Set the bit rate type used.

obj :

MixAudioConfigParamsAAC

bit_rate_type :

Bit rate type to set.

returns :

MIX_RESULT