×
Namespaces

Variants
Actions

Configuring AAC codec

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: mkgergely (07 Jun 2007)
Last edited: hamishwillee (14 Jun 2013)

In some cases, configuring AAC or eAAC+ codecs are required (e.g. when raw AAC streams are decoded, probably read from an mp4 file).

AAC codec UIDs

eAAC+ Decoder UID : 0x10207AA9

AAC Decoder UID: 0x101FAF81


Configuring AAC codec

RArray<TInt> configParams;
configParams.Append(inputSampleRate); // Input sample rate
configParams.Append(numChannels); // Number of input channels [1, 2]
configParams.Append(profileType); // AAC Input Profile [1 - LC, 3 - LTP]
configParams.Append(frameLength); // Input Frame Len [1024, 960]
configParams.Append(downMixing); // AAC Down Mixing [0 - none, 1 - mono, 2 - stereo]
configParams.Append(outputChannels); // AAC output channels [0 - none, 1 - 1, 2 - 2]
configParams.Append(decimationFactor); // AAC decimation factor [0 - none, 2 - decimation by 2, 4 - decimation by 4]
configParams.Append(aacConcealment); // AAC concealment [0 - none, 1 - basic]
configParams.Append(bitsPerSample); // Sample resolution - [16 - 16-bit resolution]
configParams.Append(sampleRateConv); // Sample Rate Conversion 0 : none

Configuring eAAC+ codec

RArray<TInt> configParams;
configParams.Append(inputSampleFrequency); // Input sample frequency
configParams.Append(numChannels); // Number of output channels [1, 2]
configParams.Append(profileType); // Input Profile Object type [1 - LC, 3 - LTP]
configParams.Append(samplesPerFrame); // Output frame size (i.e. 4096 for stereo AAC-LC of 1024 samples per frame)
configParams.Append(frameLength); // Input frame length, should be 1024
configParams.Append(samplesPerSecond); // Input Sample Rate
configParams.Append(0); // not used
configParams.Append(downSampleMode); // Down Sample Mode [0 - off, 1 - on]
configParams.Append(bitsPerSample); // Sample resolution, 8 (8-bit PCM) or 16 (16-bit)
configParams.Append(outSamplesPerSecond); // Output Sample Frequency
configParams.Append(extObjectType); // Extension Object Type, valid if Profile = 1
// [0 - AAC, 5 - eAAC+ v1 (AAC-LC + SBR), 6 - eAAC+ v2 (AAC-LC + SBR + PS)]

Creating and configuring CMMFCodec

CMMFCodec* codec = CMMFCodec::NewL(TUid::Uid(0x10207AA9)); // or 0x101FAF81, see codec UIDs
const TDesC8& codecData = REINTERPRET_CAST(const TDesC8&, configData);
const TUid codecId = TUid::Uid(KUidMmfCodecAudioSettings); // 0x10203622
codec->ConfigureL( codecId, codecData );
This page was last modified on 14 June 2013, at 07:52.
52 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×