| 1 | = Enable Audio Proxy Server (APS) in PJSIP = |
| 2 | |
| 3 | == Introduction == |
| 4 | You can read about APS [http://wiki.forum.nokia.com/index.php/Audio_Proxy_Server here]. |
| 5 | The benefits of enabling APS in PJSIP are: |
| 6 | - '''Low latency'''. As mentioned somewhere that PCM frame size in some audio layer is about 4KB (4KB/2/8000Hz * 1000ms = 250ms), this seems to be the source of high latency audio in Symbian, while using APS it is possible to record/play ''encoded'' audio frames with latency only about 30ms! |
| 7 | - '''Ability to switch audio-routing (to earpiece or loudspeaker)'''. Using standard API (CMdaAudioOutputStream) the audio is routed to loudspeaker which may not be prefered in a private conversation. While routing audio to earpiece can also avoid echo. |
| 8 | |
| 9 | == Requirements == |
| 10 | To build PJSIP with APS support, you will need: |
| 11 | 1. APS release 2.4.3 that is packaged in [http://wiki.forum.nokia.com/index.php/SDK_API_Plugin SDK API Plug-in], e.g: |
| 12 | - for [http://www.forum.nokia.com/info/sw.nokia.com/id/53439e01-f605-4491-96f4-62d003bd4c0c/S60_3rd_SDK_MR_API_Plug-In_Pack1.zip.html MR] |
| 13 | - for [http://www.forum.nokia.com/info/sw.nokia.com/id/4ff42a22-7099-4cc9-91bf-5e66166bd28d/S60_3rd_SDK_FP1_API_Plug-In_Pack.html FP1] |
| 14 | - not sure for FP2, is it included in the FP2 SDK? |
| 15 | 2. You may also need [http://www.forum.nokia.com/info/sw.nokia.com/id/48a93bd5-028a-4b3e-a0b1-148ff203b2b3/Extensions_plugin_S60_3rd_ed.exe.html Extensions plug-in for S60 3rd Edition SDK for Symbian OS, for C++, MR] to get '''sounddevice.h'''. |
| 16 | |
| 17 | |
| 18 | == Building Steps == |
| 19 | Here are a few steps to build PJSIP with APS support: |
| 20 | 1. Edit '''bld.inf''' and '''application .mmp files''' (e.g: ''symbian_ua.mmp'', ''symbian_ua_gui.mmp'', ''symsndtest.mmp''), please make sure '''SND_USE_APS''' is set: |
| 21 | {{{ |
| 22 | #define SND_USE_NULL 0 |
| 23 | #define SND_USE_APS 1 |
| 24 | }}} |
| 25 | 2. If you are using Carbide, please refresh the project first (right click '''bld.inf''' from the '''Symbian Project Navigator''' pane, and select '''Refresh'''). '''symbian_audio_aps.mmp''' should be there after the refresh done. |
| 26 | 3. Clean and rebuild the whole project, please note that WINSCW target doesn't seem to support APS. |
| 27 | 4. Make the installer (.sis file) for the application. |
| 28 | |
| 29 | |
| 30 | == Installation == |
| 31 | 1. Install APS Server '''apsserver2.sisx''' to device, the installer comes with the APS SDK package i.e in folder '''!InstallToDevice/AudioProxyServer243'''. You will need to do this only once for each device. |
| 32 | 2. Sign the application installer with APS support with '''Developer Certificate using Open Signed Offline/with Publisher ID'''. (APS requires '''MultimediaDD''' capability and this capability is among the restricted capabilities). Please see [http://www.symbiansigned.com Symbian Signed] for more detail. |
| 33 | 3. Install the application to the device. |
| 34 | |
| 35 | |
| 36 | == Developing Application with APS Support == |
| 37 | There are some notes for developing application with APS support: |
| 38 | - Currently, frame time/PTIME supported by sound device with APS is only 20ms. For example if your application is using pjsua, you will need to specify something like this in pjsua config: |
| 39 | {{{ |
| 40 | med_cfg.audio_frame_ptime = 20; |
| 41 | }}} |
| 42 | - Specify application UID in a global variable named '''APP_UID''' whose base type '''TPtrC''', e.g: |
| 43 | {{{ |
| 44 | TPtrC APP_UID = _L("2000521C"); |
| 45 | }}} |
| 46 | |
| 47 | |
| 48 | == Limitation == |
| 49 | - As mentioned before, sound device will only support 20ms frame time. |
| 50 | - Currently, this APS wrapper can only work in S60 3rd edition device that supports G.711, which perhaps (almost) all S60 3rd edition devices. |