Changes between Initial Version and Version 1 of Nokia_APS_VAS_Direct


Ignore:
Timestamp:
Jan 14, 2009 10:45:04 AM (15 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Nokia_APS_VAS_Direct

    v1 v1  
     1= Using APS-Direct and VAS-Direct in PJMEDIA = 
     2 
     3The '''APS-Direct''' and '''VAS-Direct''' is our codenames for functionalities to use the hardware codecs that are supported by Nokia APS and/or VAS directly, bypassing media processing in PJMEDIA. This feature will be introduced in PJSIP version 1.1. 
     4 
     5APS stands for '''Audio Proxy Server''', and it is available as plug-in for Nokia S60 3rd Edition up to Feature Pack 2 version. This has been deprecated for FP2 devices and above, and it is being replaced by '''VoIP Audio Services (VAS)''', which is available as plug-in for S60 FP1/FP2 devices and will be available built-in in later S60 versions. 
     6 
     7'''Table of Contents''' 
     8[[PageOutline(2-3,,inline)]] 
     9 
     10[[BR]] 
     11 
     12== Introduction == 
     13 
     14The Nokia APS and VAS support codecs such as G.711 (PCMA and PCMU), G.729, iLBC, and AMR-NB, though the availability of these codecs may vary according to the handset types. There are significant benefits of using these codecs instead of software codecs (in PJMEDIA-CODEC), with the main benefits are performance (hardware vs software codecs, latency) and the given codec licenses/royalties. 
     15 
     16Due to these benefits, the ability to use these codecs in PJSIP applications is very desirable. 
     17 
     18[[BR]] 
     19 
     20== Changes == 
     21 
     22The use of APS-Direct and VAS-Direct is very different than traditional PJMEDIA media processing, with the main difference being the audio frames returned by/given to the sound device are now in encoded format rather than in raw PCM format. The following changes will be done in order to support this. 
     23 
     24 
     25=== Non-PCM Media Ports === 
     26 
     27Media ports may now support non-PCM media, and this is signaled by adding a new "format" field in the {{{pjmedia_port_info}}}. The "format" field will use FOURCC identification. For now only stream that will have non-PCM capability. 
     28 
     29 {{{ 
     30 typedef union pjmedia_fourcc {  
     31   pj_uint32_t  u32; 
     32   char         c[4]; 
     33 } pjmedia_fourcc; 
     34 }}} 
     35 
     36 
     37 
     38=== New Frame Type to Carry Encoded Frames === 
     39 
     40Support for new frame type (the {{{enum pjmedia_frame_type}}}): '''{{{PJMEDIA_FRAME_TYPE_EXTENDED}}}'''. When the frame's type is set to this type, the {{{pjmedia_frame}}} structure may be typecasted to '''{{{pjmedia_frame_ext}}}''' struct (new): 
     41 
     42 {{{ 
     43typedef struct pjmedia_frame_ext { 
     44    pjmedia_frame   base;          /**< Base frame info */ 
     45    pj_uint16_t     samples_cnt;   /**< Number of samples in this frame */ 
     46    pj_uint16_t     subframe_cnt;  /**< Number of (sub)frames in this frame */ 
     47 
     48    /* Zero or more (sub)frames follows immediately after this, 
     49     * each will be represented by pjmedia_frame_ext_subframe 
     50     */ 
     51} pjmedia_frame_ext; 
     52 
     53typedef struct pjmedia_frame_ext_subframe { 
     54    pj_uint16_t     bitlen;   /**< Number of bits in the data */ 
     55    pj_uint8_t      data[1];  /**< The encoded data */ 
     56} struct pjmedia_frame_ext_subframe; 
     57 }}} 
     58 
     59 
     60=== (Symbian) Sound Device API === 
     61 
     62The APS/VAS based sound device backends will support additional APIs: 
     63 - to query the list of supported codecs/formats, 
     64 - to set which format to use when opening the sound device, 
     65 - audio routing to loudspeaker or earpiece (this API is already available) 
     66 
     67=== New Audio Switchboard (the non-mixing conference bridge) === 
     68 
     69Since audio frames are forwarded back and forth in encoded format, obviously the traditional conference bridge would not be able to handle it. A new object will be added, we call this audio switchboard ({{{conf_switch.c}}}) and it's API will be compatible with the existing conference bridge API, so that it can replace the bridge in the application by compile time switch. 
     70 
     71Understandably some conference bridge features will not be available: 
     72 - audio mixing feature (no conferencing feature), 
     73 - audio level adjustment and query, 
     74 - passive ports. 
     75 
     76Some of the features of the switchboard: 
     77 - uses the conference bridge API to control it (so it is compile-time compatible), 
     78 - one source may transmit to more than one destinations (though obviously one destination cannot take more than one sources since the switchboard cannot mix audio). This is useful for example to implement call recording feature in the application. 
     79 - it is optimized for low latency to the sound device (no ''delaybuf'' buffering for the microphone), 
     80 - much more lightweight (footprint and performance), 
     81 - supports routing audio from ports with different ''ptime'' settings. 
     82 
     83 
     84=== Non-PCM Format for Stream === 
     85 
     86The stream must also support non-PCM audio frames in its {{{get_frame()}}} and {{{put_frame()}}} port interface. A new "format" field will be added to {{{pjmedia_stream_info}}} to let the application controls the audio format. The format is in FOURCC. 
     87 
     88