Version 4 (modified by bennylp, 16 years ago) (diff) |
---|
Using Audio Proxy Server (APS) in PJSIP
Introduction
From Nokia wiki on APS:
"Audio Proxy Server (APS) is a wrapper to the Nokia S60 sound device. Its main purpose is to bypass the Vendor ID (VID) related restrictions on S60 3rd Edition and S60 3rd Edition, FP1 platforms, when streaming audio data in 3rd party applications. The component is most suitable for VoIP developers who need to set the appropriate audio priority and preference values in order to utilize full duplex audio.
APS has some benefits over Audio Streaming API:
- Much lower latency. The Audio Streaming API has few hundreds milliseconds of latency at best, while using APS it is possible to bring down the latency to only about 30ms!
- Ability to switch audio-routing (to earpiece or loudspeaker). Routing to earpiece can also avoid echo.
Requirements
To build PJSIP with APS support, we need:
- APS release 2.4.3 that is packaged in SDK API Plug-in, e.g:
- APS for MR
- APS for FP1
- we're not sure how APS should work for FP2
- You may also need Extensions plug-in for S60 3rd Edition SDK for Symbian OS for C++ MR to get sounddevice.h.
- You need a Symbian Developer Certificate of type Open Signed Offline and with valid Publisher ID to install the application that uses APS on the device. APS requires MultimediaDD capability and this capability is among the restricted capabilities so the application needs to be signed with a valid developer certificate to use the capability. The signing options for applications that need these restricted capabilities are Open Signed Offline or Certified Signed. Please see Symbian Signed website for more detail.
Building Steps
Here are a few steps to build PJSIP with APS support:
- Edit bld.inf and application's .mmp files (e.g: symbian_ua.mmp, symbian_ua_gui.mmp, symsndtest.mmp), and activate SND_USE_APS macro:
#define SND_USE_NULL 0 #define SND_USE_APS 1
- Refresh the makefiles:
- 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.
- If you are building from command line, use bldmake clean then bldmake bldfiles.
- Clean and rebuild the whole project. Please note that WINSCW target doesn't seem to support APS.
- Make the installer (.sis file) for the application.
Installation
- 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.
- Sign the application installer with APS support with Developer Certificate using Open Signed Offline/with Publisher ID.
- Install the application to the device.
Developing Application with APS Support
There are some notes for developing application with APS support:
- 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 this in pjsua config:
med_cfg.audio_frame_ptime = 20;
- Specify application UID in a global variable named APP_UID whose base type TPtrC, e.g:
TPtrC APP_UID = _L("2000521C");
Limitation
- As mentioned before, sound device will only support 20ms frame time.
- Currently, this APS wrapper can only work in S60 3rd edition device that supports G.711, which perhaps means all S60 3rd edition devices.