×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Apr 2006
    Location
    Prague, The Czech Republic
    Posts
    142

    VoIP Audio Services problem - iLBC implementation incorrect

    Hello,

    the problem I am reporting is probably a bug in the VoIP Audio Services plugin, as distributed in the Plugin API pack.

    The iLBC codec standard defines two possible modes of the codec: 20 ms (15200 b/s), and 30 ms (13330 b/s). The first mode produces 38-byte frames, the second mode produces 50-byte frames.

    The first bug: The VoIP Audio Services API defines a class named CVoIPILBCEncoderIntfc, which has functions SetMode() and GetMode(), that should be able to set one of these modes. The default mode is 20 ms. However, you cannot switch the encoder to the 30 ms mode using the function SetMode(). Even if you execute

    iVoIPILBCEncoderIntfc->SetMode(CVoIPFormatIntfc::EiLBC30mSecFrame)

    the encoder will stay in the 20-ms mode and will produce 38-byte packets.

    There is a workaround for this problem, namely execution of

    iVoIPILBCEncoderIntfc->SetBitRate(13330)

    This will finally force the encoder into the 30-ms mode, and it will start producing 50-byte packets. However, the call

    iVoIPILBCEncoderIntfc->GetMode()

    will still result in CVoIPFormatIntfc::EiLBC20mSecFrame, as if nothing happened.

    OK, now comes the second bug, which is much more serious, since it has no workaround. The decoder thread (Downlink) will immediately crash with USER 23 code, when it is asked to decode an incoming 30 ms iLBC frame. This frame is longer (50 bytes) than the 20 ms frame (38 bytes), and it seems that the Decoder cannot reset itself to the 30 ms mode.

    The problem is that you cannot reset the BitRate of the Decoder manually to 13330. An attempt to do this leads to immediate freezing of the application. It therefore seems that the iLBC implementation within VoIP Audio Services, as produced by Nokia, is not very good.

    I have tested this on Nokia N90. Nokia E51 seems to be even worse; at the very moment when you try to play the first 30-ms frame in the Downlink, the phone restarts itself.


    A not-just-rhetorical question: How are we, 3rd party developers, supposed to develop VoIP applications if such a critical component of the OS is flawed?

    I have found many more bugs in the VoIP Audio Services API, but these are the "showstoppers". If anyone from Nokia is willing to co-operate with me on this, I will point out many more bugs.

  2. #2
    Nokia Developer Expert
    Join Date
    Dec 2006
    Location
    Mountain View, CA
    Posts
    197

    Re: VoIP Audio Services problem - iLBC implementation incorrect

    1. Does the customer pre-pend each buffer with the required 2-byte header? See the Appendix of the VAS Specification document for more details. If not, the codec will not know what to do with the frames and may act as described. 30ms frames sent to the iLBC decoder should be 52 bytes long (including 2-byte header).

    2. You cannot have codec mode switched to 20ms and force 13.3 kbps bitrate. Codec won't work this way. Changing mode to 30ms sets the decoder in 13.3 kbps. Similarly, setting 20ms mode (the default) sets codec in 15.2 kbps mode. No bitrate forcing is needed. Codec mode must be set before the streaming is started. If codec mode is not specified, the default 20ms frame rate will be used.

    3. If the answers above don't resolve the problem, it is possible that iLBC codec implementation on N90 and E51 (potentially other devices as well) has problems.

    4. There is VAS 2.0 available and customers are encouraged to switch to this new version. We are working to publish this shortly in a SDK plugin but if you are hurry, please submit a partner API request trough Forum Nokia:
    http://www.forum.nokia.com/I_Want_To...nical_Support/

    I tested iLBC on few devices with VAS 2.0 and I don't see any problem. Even when I send frames encoded at unsupported bitrates the device doesn't play any audio but it doesn't crash either.

  3. #3
    Registered User
    Join Date
    Apr 2006
    Location
    Prague, The Czech Republic
    Posts
    142

    Re: VoIP Audio Services problem - iLBC implementation incorrect

    Quote Originally Posted by nly View Post
    See the Appendix of the VAS Specification document for more details. If not, the codec will not know what to do with the frames and may act as described. 30ms frames sent to the iLBC decoder should be 52 bytes long (including 2-byte header).
    I am not even aware of existence of an official, downloadable "VAS Specification Document". The document "VOIP_Audio_Services_API_v1_0_en.pdf", which is distributed within the "VoIPAudioServicesAPI.zip" in the API Plugin Pack, does not even have any Appendix.

    Do you possibly have a link for me? I tried searching forum.nokia.com for VAS, but the only hits were for the discussion forum, nothing from Documents, Tools or Knowledge Baase.

    Quote Originally Posted by nly View Post
    2. You cannot have codec mode switched to 20ms and force 13.3 kbps bitrate. Codec won't work this way. Changing mode to 30ms sets the decoder in 13.3 kbps. Similarly, setting 20ms mode (the default) sets codec in 15.2 kbps mode. No bitrate forcing is needed. Codec mode must be set before the streaming is started. If codec mode is not specified, the default 20ms frame rate will be used.
    I understand that, but the problem is that the SetMode function does not set the 30ms mode. It simply did not do anything. And yes, it was invoked before the Start() method of the Uplink.

    Quote Originally Posted by nly View Post
    3. If the answers above don't resolve the problem, it is possible that iLBC codec implementation on N90 and E51 (potentially other devices as well) has problems.
    That is possible.

    Quote Originally Posted by nly View Post
    4. There is VAS 2.0 available and customers are encouraged to switch to this new version. We are working to publish this shortly in a SDK plugin but if you are hurry, please submit a partner API request trough Forum Nokia:
    That is a welcome news. What is your current anticipated term of publishing VAS 2.0? "Shortly" may mean a week or a month.

    Quote Originally Posted by nly View Post
    I tested iLBC on few devices with VAS 2.0 and I don't see any problem. Even when I send frames encoded at unsupported bitrates the device doesn't play any audio but it doesn't crash either.
    I would also like to try that...

  4. #4
    Nokia Developer Expert
    Join Date
    Dec 2006
    Location
    Mountain View, CA
    Posts
    197

    Re: VoIP Audio Services problem - iLBC implementation incorrect

    Hi,
    I did not realise that VAS 2.0 was not published. Thanks for bringing it to our attention. Now it is out.

    VAS 2.0 is now available for S60 5.0 devices and in 2-3 days we will publish it for S60 3.2 devices.

    You might find the Appendix in the VoIP_Design_Specification useful. I would anticipate that your buffers are missing the headers.

    Best regards,
    Niklas
    Last edited by nly; 2009-02-17 at 17:50.

  5. #5
    Registered User
    Join Date
    Apr 2006
    Location
    Prague, The Czech Republic
    Posts
    142

    Re: VoIP Audio Services problem - iLBC implementation incorrect

    Quote Originally Posted by nly View Post
    Hi,
    I did not realise that VAS 2.0 was not published. Thanks for bringing it to our attention. Now it is out.

    VAS 2.0 is now available for S60 5.0 devices and in 2-3 days we will publish it for S60 3.2 devices.

    You might find the Appendix in the VoIP_Design_Specification useful. I would anticipate that your buffers are missing the headers.

    Best regards,
    Niklas
    Dear Niklas,

    thank you for the link. I will experiment with it tomorrow.

    Are you also planning to publish VAS 2.0 for S60 3.1 devices? There is quite a lot of them running around. In fact, I haven't had any later devices than 3.1 in my hands so far.

    Best regards

    Marian

Similar Threads

  1. problem in audio playback
    By prashantpersistent in forum Mobile Java General
    Replies: 3
    Last Post: 2008-09-02, 05:23
  2. Problem in playing in an audio file.
    By PankajNeve in forum Symbian
    Replies: 3
    Last Post: 2007-03-09, 13:52
  3. 3500 (s40) playing audio problem
    By ahmadi2c in forum Mobile Java General
    Replies: 2
    Last Post: 2007-03-07, 08:03
  4. Replies: 7
    Last Post: 2007-02-07, 18:12
  5. NDS v1.1 - Audio Converter problem
    By Dess in forum Mobile Java Tools & SDKs
    Replies: 4
    Last Post: 2004-01-28, 19:49

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×