Posts

Showing posts from March, 2010

Blackberry Resource Error - Looking for rrh file after SVN checkin

I have no idea why Blackberry Resource Builder is asking for rrh file in a .svn folder. But, this error will prevent you from building your Eclipse workspace. The workaround is to exclude the following at your Build path

Eclipse -> Right click on your source -> Build Path -> Configure Build Path -> Double click on Excluded -> Click Add -> add in **/.svn/**

You should be able to build your workspace after that.

AAC Configuration

AAC is MPEG4 part 3 and it comes with a configuration data before it can be decoded by a decoder. This configuration data can usually be found in the SDP, under audio track -> config. Normally, it is a 2 bytes in hexadecimal. Below is a sample of the information which may be contains in the configuration data.


1210 = 0001 0010 0001 0000

5 bits for object type = 00010 = 2 = AAC low complexity

4 bits for sampling rate = 0100 = 44100hz

4 bit for channel = 0010 = 2 channel

1 bit for frame length flag = 0 for 1024 sample

1 bit for depends on core coder = 0

1 bit for extension flag = 0

frame length flag:
0: Each packet contains 1024 samples
1: Each packet contains 960 samples

The full specification for AudioSpecificConfig is stated in ISO 14496-3 Section 1.6.2.1
See http://wiki.multimedia.cx/index.php?title=MPEG-4_Audio for complete list.

CL and Link commands

You can compile and link c/c++ code via cl and link Generic Examples
cl /Od /D /D_DEBUG /Yd /Zi /EHsc /MTd /GS /Fo"build/" /W3 /nologo /c
/I "ANY INCLUDE FOLDER" /D "ANY DEFINED MARCO" "SOURCE FILES"

Important note for above example

/c - compile only. Without this, it will tries to link as well
/I - add 1 include folder
/D - add 1 user define marco
/D_DEBUG - add debug information

link /DEBUG /OUT:"OUTPUT NAME" /INCREMENTAL:NO /NOLOGO
/LIBPATH:"ADDITIONAL LIBRARY PATH" /DLL /SUBSYSTEM:WINDOWS
/OPT:REF /OPT:ICF /IMPLIB:"LIBRARY OUTPUT" /MACHINE:X86 "LIBRARY FILES"


Important note for above example

/DEBUG - link with debug information
>/OUT - output name and location
/LIBPATH - add 1 library path

Sample Usage




cl /Od /D /D_DEBUG /Yd /Zi /EHsc /MTd /GS /Fo"build/" /W3 /nologo /c
/I "include" /I "test\include" /D "MY_MARCO1" /D "MY_MARCO2" src\*.c src\*.cpp

link /DEBUG /OUT:&quo…

RFC 3640 for AAC

RFC 3640 defined the rtp payload format for transport MPEG4 elementary stream. More importantly, I am only interested how to setup SDP for AAC High Bitrate and Low Bitrate

First, you need to have a AU header section in the RTP payload. In the AU header section, it has a 2 bytes AU headers length field that denote the length of the all AU headers in bits. For each AU header, it has a list of optional information. You will mostly only interested in AU size and Au index. See section 3.2.1 for details
Next, the SDP define the structure of the RTP payload. If mode exists, RFC 3640 has to be used. I will be focusing on AAC-lbr and AAC-hbr.
mode=AAC-lbr
The maximum size of the frame is 63 bytesAAC frames must not be fragment6 bits of AU size2 bits to AU index (-delta)AU index field must be 0SDP must present sizeLength, indexLength, indexDeltaLengthconfig is the hexadecimal of AudioSpecificConfig of 14496-3 Sample SDP entry
m=audio 49230 RTP/AVP 96 a=rtpmap:96 mpeg4-generic/22050/1 a=fmtp:96 st…