Changes between Version 12 and Version 13 of Nokia_APS_VAS_Direct
- Timestamp:
- Feb 16, 2009 3:30:08 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Nokia_APS_VAS_Direct
v12 v13 3 3 4 4 '''Table of Contents''' 5 [[PageOutline( 1-3,,inline)]]5 [[PageOutline(2-3,,inline)]] 6 6 7 7 … … 13 13 [[BR]] 14 14 15 = Introduction=15 == Introduction == 16 16 17 17 The 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. … … 23 23 [[BR]] 24 24 25 = Concepts=25 == Concepts == 26 26 27 27 Before starting working with APS-Direct, please make sure you understand the concepts behind APS-Direct so that you can design the application appropriately. … … 29 29 The whole point of APS-Direct is to enable end-to-end '''encoded audio format media flow''', that is from microphone device down to network/socket and from network/socket to the speaker device. This may sound obvious, but it has the following serious implications which will impact your application design. 30 30 31 == What APS-Direct is really==31 === What APS-Direct is really === 32 32 33 33 To use APS-Direct means that you're opening the sound device in codec (i.e. non-PCM) mode. You '''still have the choice''', at run-time, to open the sound device in PCM mode, if you wish, for example to make use of the PCM features in PJMEDIA such as the tone generator, or if you want to use the software codecs such as Speex or G.722 in PJMEDIA. Note that if you use PJSUA-LIB then the management of closing/re-opening the sound device using the correct codec may be done by PJSUA-LIB automatically. 34 34 35 To use APS-Direct also means that you are restricted to use the audio switchboardat compile time (audio switchboard will be explained later). This means that you loose the capability of mixing audio with PJSUA-LIB, as well as several other restrictions on your audio routing arrangements. Among other things, you can't have two calls active and connected to the audio device at the same time. You can have more than one calls, but one of them must be put on-hold.36 37 The sound device can only handle one format at a time , meaning that if it is currently opened with G.729 format (for one call for example), you can't feed it with PCM frames for example from the tone generator or PCM WAV files. All PJMEDIA features that work with PCM audio will no longer work if the audio device is currently opened in codec mode. This includes the tone generator (tonegen) and WAV files. If you wish to use any of the features above, you must close the sound device and re-open it in PCM mode.38 39 40 == When APS-Direct is activated==35 To use APS-Direct also means that you are restricted to use the ''audio switchboard'' at compile time (audio switchboard will be explained later). This means that you loose the capability of mixing audio with PJSUA-LIB, as well as several other restrictions on your audio routing arrangements. Among other things, you can't have two calls active and connected to the audio device at the same time. You can have more than one calls, but one of them must be put on-hold. 36 37 The sound device can only handle one format at a time. For example, if it is currently opened with G.729 format, you can't reconnect it to different media ports (such as stream or other pjmedia_port). You must first close it, then re-open it using the correct format. 38 39 40 === When APS-Direct is activated === 41 41 42 42 APS-Direct is used when passthrough codec is used (and vice versa): 43 - when APS-Direct is used, the sound device emits and takes encoded audio frames ( in contrastto PCM audio frames), and the stream needs special codec which handles this. This special codec is called passthrough codec, since it just do (de)packetization and not the actual encoding/decoding.43 - when APS-Direct is used, the sound device emits and takes encoded audio frames (as opposed to PCM audio frames), and the stream needs special codec which handles this. This special codec is called passthrough codec, since it just do (de)packetization and not the actual encoding/decoding. 44 44 - similarly when passthrough codec is selected in the stream, the stream will emit and take encoded audio frames (rather than PCM frames), hence it needs APS-Direct on the other side. 45 45 46 One important thing to note: '''you may still use software codecs such as Speex and G.722 even when your application is compiled with APS-Direct support'''. When one of these software codecs are selected to be used by the stream, the stream will work as usual (i.e. emitting and taking PCM audio frames) and the audio device shouldbe opened in normal/PCM mode (i.e. non-APS-Direct mode).47 48 49 [[BR]] 50 51 = Changes=46 One important thing to note: '''you may still use software codecs such as Speex and G.722 even when your application is compiled with APS-Direct support'''. When one of these software codecs is selected to be used by the stream, the stream will work as usual (i.e. emitting and taking PCM audio frames), so the audio device '''must''' be opened in normal/PCM mode (i.e. non-APS-Direct mode). 47 48 49 [[BR]] 50 51 == Changes == 52 52 53 53 The 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. 54 54 55 55 56 == Support for non-PCM format==56 === Support for non-PCM format === 57 57 58 58 … … 93 93 The stream must also support non-PCM audio frames in its {{{get_frame()}}} and {{{put_frame()}}} port interface. 94 94 95 == Passthrough Codecs==95 === Passthrough Codecs === 96 96 97 97 While the actual codec encoding/decoding will be done by APS/VAS, "dummy" codec instances still need to be created in PJMEDIA: … … 102 102 103 103 104 == (Symbian) Sound Device API==104 === (Symbian) Sound Device API === 105 105 106 106 The APS/VAS based sound device backends will support additional APIs: … … 110 110 111 111 112 == New Audio Switchboard (the non-mixing conference bridge)==112 === New Audio Switchboard (the non-mixing conference bridge) === 113 113 114 114 Since 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. … … 132 132 [[BR]] 133 133 134 = Using APS-Direct or VAS-Direct=134 == Using APS-Direct or VAS-Direct == 135 135 136 136 Currently only APS-Direct is implemented, and here are the steps to build the application with APS- Direct feature. … … 231 231 232 232 233 = References=233 == References == 234 234 235 235 Internal documentations: