yuan- / sipdroid

Automatically exported from code.google.com/p/sipdroid
GNU General Public License v3.0
0 stars 0 forks source link

Alternate Codec Support #49

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
If possible, it would be REALLY helpful if multiple codec support was
included as there are a couple codecs that would be much better for a phone
like this. Or even set a fallback codec, however that is not even close to
mattering...

The codecs that would be EPIC to see supported are:

ILBC - Internet Low Bitrate Codec (Good for edge, or low signal)
GSM  
G729
G711

Thanks!

Original issue reported on code.google.com by andrusjo...@gmail.com on 9 Jun 2009 at 7:12

GoogleCodeExporter commented 8 years ago
recently i check latest sipdroid version 2.0.1 with HTC wildfire android os 
version 2.2.1,google nexus one os version 2.2.2, and HTC desire os version 
2.2.2 devices by using wifi network connection, i get one sided voice that was 
can not hear the other person problem by wifi connection on my devices.

but when i use EDGE/3g/gprs connectoin then i get the two sided voice.

another query that was when i build latest sipdroid 2.0.1 on android version 
2.3.1 then error occure after established a call and OSNetworkSystem.c file is 
the cause of the error. the error was 
"java/lang/ClassNotFoundException::org.apache.harmony.luni.net.GenericIPMreq 
can not load delvic machine"

how can i solve this problem.

i am using adt 9.0.0.v201 and android 2.3.2, eclipse 3.5.2 and latest sipdroid 
2.0.1
open souce.

Original comment by ocean.ra...@gmail.com on 4 Feb 2011 at 9:09

GoogleCodeExporter commented 8 years ago
I am new in Android and I have some difficulties,please help me.
I want to know except g729_jni, what I will add in my project to have g729 
codec?
and armeabi-v7a ?
Thanks in advance.

Original comment by Arian.Sa...@gmail.com on 4 Feb 2011 at 10:05

GoogleCodeExporter commented 8 years ago
Please  ocean.ra...@gmail.com write smth.
I wait to your answer.It's very important for me.

Original comment by Arian.Sa...@gmail.com on 6 Feb 2011 at 1:34

GoogleCodeExporter commented 8 years ago
i give you all information about g729 build process.i don't understand whats 
the problem.please tell me details about problem.

Original comment by ocean.ra...@gmail.com on 6 Feb 2011 at 7:33

GoogleCodeExporter commented 8 years ago
"please see the comment 151".i need the solution that latest sipdroid 2.0.1 
works on wifi network and want to get both side voice on devices. i only get 
the voice both side on emulator-2.2 by using wifi. i need patch for sipdroid 
work on android vs 2.3.1.
please help me........

Original comment by ocean.ra...@gmail.com on 6 Feb 2011 at 7:40

GoogleCodeExporter commented 8 years ago
I build libg729_jni.so by use siphon g729 and g729_jnicpp here , however, no 
sound at all while connection . Incallscreen showed G729 . But no sound . Does 
I miss something or wrong G729.java?

Original comment by tester...@gmail.com on 7 Feb 2011 at 2:17

GoogleCodeExporter commented 8 years ago
please give me G729.java file

Original comment by ocean.ra...@gmail.com on 8 Feb 2011 at 9:13

GoogleCodeExporter commented 8 years ago
g729.java here

Original comment by tester...@gmail.com on 8 Feb 2011 at 10:48

Attachments:

GoogleCodeExporter commented 8 years ago
this file is ok.now you check g729 works perfectly.check Codecs.java
private static final Vector<Codec> codecs = new Vector<Codec>() {{
                    add(new G729());
            //add(new G722());          
            //add(new SILK24());        
            //add(new SILK16());
            //add(new SILK8());
            //add(new alaw());
            //add(new ulaw());
            //add(new Speex());
            //add(new GSM());
            //add(new BV16());
        }};

          -String prefs = sp.getString(Settings.PREF_CODECS,     Settings.DEFAULT_CODECS);
        + String prefs = "18";

UserAgentProfile.java

--public int[] audio_codecs = {3, 8, 0, 18};
    ++public int[] audio_codecs = {18};

UserAgent.java modified exactly by this code

public void initSessionDescriptor(Codecs.Map c) {
        SessionDescriptor sdp = new SessionDescriptor(
                user_profile.from_url,
                sip_provider.getViaAddress());

        local_session = sdp.toString();
        printLog("Local Session" + local_session);
        //We will have at least one media line, and it will be 
        //audio
        if (user_profile.audio || !user_profile.video)
        {
//          addMediaDescriptor("audio", user_profile.audio_port, c, 
user_profile.audio_sample_rate);
            addMediaDescriptor("audio", user_profile.audio_port, c);
        }

        /*if (user_profile.video)
        {
            addMediaDescriptor("video", user_profile.video_port, user_profile.video_avp, "h263-1998", 90000);
        }*/
    }
    //change end

    /** Adds a single media to the SDP */
    /*private void addMediaDescriptor(String media, int port, int avp,
                    String codec, int rate) {
        SessionDescriptor sdp = new SessionDescriptor(local_session);

        String attr_param = String.valueOf(avp);

        if (codec != null)
        {
            attr_param += " " + codec + "/" + rate;
        }
        sdp.addMedia(new MediaField(media, port, 0, "RTP/AVP", 
                String.valueOf(avp)), 
                new AttributeField("rtpmap", attr_param));

        local_session = sdp.toString();
    }*/

    /** Adds a set of media to the SDP */
//  private void addMediaDescriptor(String media, int port, Codecs.Map c,int 
rate) {
    private void addMediaDescriptor(String media, int port, Codecs.Map c) {
        SessionDescriptor sdp = new SessionDescriptor(local_session);

        Vector<String> avpvec = new Vector<String>();
        Vector<AttributeField> afvec = new Vector<AttributeField>();
        if (c == null) {
            // offer all known codecs
            for (int i : Codecs.getCodecs()) {
                Codec codec = Codecs.get(i);
                if (i == 0) codec.init();
                avpvec.add(String.valueOf(i));
                if (codec.number() == 9)
                    afvec.add(new AttributeField("rtpmap", String.format("%d %s/%d", i, codec.userName(), 8000))); // kludge for G722. See RFC3551.
                else
                    afvec.add(new AttributeField("rtpmap", String.format("%d %s/%d", i, codec.userName(), codec.samp_rate())));
            }
        } else {
            c.codec.init();
            avpvec.add(String.valueOf(c.number));
            if (c.codec.number() == 9)
                afvec.add(new AttributeField("rtpmap", String.format("%d %s/%d", c.number, c.codec.userName(), 8000))); // kludge for G722. See RFC3551.
            else
                afvec.add(new AttributeField("rtpmap", String.format("%d %s/%d", c.number, c.codec.userName(), c.codec.samp_rate())));
        }
        if (user_profile.dtmf_avp != 0){
            //avpvec.add(String.valueOf(user_profile.dtmf_avp));
            //afvec.add(new AttributeField("rtpmap", String.format("%d telephone-event/%d", user_profile.dtmf_avp, user_profile.audio_sample_rate)));
            //afvec.add(new AttributeField("fmtp", String.format("%d 0-15", user_profile.dtmf_avp)));

            //avpvec.add(String.valueOf(user_profile.dtmf_avp));
            //afvec.add(new AttributeField("rtpmap", String.format("%d g729/%d", 18, user_profile.audio_sample_rate)));
            afvec.add(new AttributeField("fmtp", String.format("%d annexb=no", 18)));
            //afvec.add(new AttributeField("a", String.format("sendrecv")));
            //afvec.add(new AttributeField("rtpmap", String.format("%d telephone-event/%d", user_profile.dtmf_avp, user_profile.audio_sample_rate)));
            //afvec.add(new AttributeField("fmtp", String.format("%d 0-15", user_profile.dtmf_avp)));
        }

        //String attr_param = String.valueOf(avp);

        sdp.addMedia(new MediaField(media, port, 0, "RTP/AVP", avpvec), afvec);

        local_session = sdp.toString();
    }

i think its work fine..........

Original comment by ocean.ra...@gmail.com on 9 Feb 2011 at 8:14

GoogleCodeExporter commented 8 years ago
Hi! what happened about g729 codec. are you complete g729 codec

Original comment by ocean.ra...@gmail.com on 5 Mar 2011 at 12:15

GoogleCodeExporter commented 8 years ago
I vote for ilbc and g.726 as next codecs to add ...

Original comment by lishtva...@gmail.com on 24 Mar 2011 at 7:18

GoogleCodeExporter commented 8 years ago
Issue 897 has been merged into this issue.

Original comment by pmerl...@googlemail.com on 15 Apr 2011 at 8:24

GoogleCodeExporter commented 8 years ago
Hi all..
this is the full library file for g729 codec.Already i discuss it how to add 
g729 codec in sipdroid.you only need G729.java wrapper.i gave it to all in 
previous.you just add "libs" folder into your project directory.

Original comment by ocean.ra...@gmail.com on 26 May 2011 at 9:05

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,

I am novice here.

I have added the library to my lib directory in Samsung Galaxy and changed the 
rights, owner and group as other codecs:

# pwd
/data/data/org.sipdroid.sipua/lib
# ls -l
-rwxr-xr-x system   system      92503 2010-10-03 18:59 libbv16_jni.so
-rwxr-xr-x system   system      27903 2010-10-03 18:59 libg722_jni.so
-rwxr-xr-x system   system      75472 2010-10-03 19:00 libgsm_jni.so
-rwxr-xr-x system   system      50938 2010-10-03 18:56 libOSNetworkSystem.so
-rwxr-xr-x system   system      94100 2010-10-03 18:57 libspeex_jni.so
-rwxr-xr-x system   system      83715 2010-10-16 16:47 libg729_jni.so

However, I still don't see G729 codec in the list of my codecs in Sipdroid. 
What else need to be changed? What I suppose to do with G729.java wrapper?

Original comment by kszarkow...@gmail.com on 15 Aug 2011 at 8:26

GoogleCodeExporter commented 8 years ago
we are running a Brekeke SIP Server and SIPDROID on many phones which works 
very well, especially with residential and commercial VOIP/SIP gateways. 
However we cannot get SIPDROID Audio working on the Freescale IMX51 chipset, as 
Freescale supports only  g.722/723/726/729. Any advise Kind Rgeards
Neoi technology Singapore - Robert  

Original comment by neoigerm...@gmail.com on 19 Aug 2011 at 8:12

GoogleCodeExporter commented 8 years ago
please you follow my previous mail how to add g729 codec.you need to add 
G729.java wrapper and some change needed in Codecs.java,UserAgentProfile.java 
and UserAgent.java file

Original comment by ocean.ra...@gmail.com on 11 Oct 2011 at 8:47

GoogleCodeExporter commented 8 years ago
ocean.ra: It seems the developers entirely forgot about us and never integrated 
it into official Sipdroid?

Meanwhile I have a new phone which should be better compatible with it.

However, your instructions are spread all over this issue report - could you 
please make ONE post, with all the required modified files, and instructions to 
follow?

Thank you!

Original comment by carmageddon on 6 Dec 2011 at 4:25

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
where do i find basic_op.h, ld8a.h ,g729a.h files and where to put those files?

Original comment by jkhan6...@gmail.com on 10 Apr 2012 at 6:15

GoogleCodeExporter commented 8 years ago
@ocean I have successfully added g729 codec in SipDroid.
thanks a lot

Original comment by jkhan6...@gmail.com on 13 Apr 2012 at 7:39

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
great job!!! Now you upload a patch that how to add g729 codec support for 
sipdroid community.

Original comment by ocean.ra...@gmail.com on 16 Apr 2012 at 10:19

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
@ocean i have successfully added g729 codec in sipdroid, but it works only in 
ARMV7 devices. for ARMV5 devices i need ITU g729annexA codec. can you provide 
me the link to get the source of ITU g729annexA codec? if i have to change 
anything in g729_jni.java file to run the codec?

Original comment by shoulder...@gmail.com on 19 May 2012 at 6:21

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I have created shell script to add a g729 codec in Sipdroid so if anyone needed 
just inform me !
@ocean thanks

Original comment by jkhan6...@gmail.com on 28 Jun 2012 at 11:23

GoogleCodeExporter commented 8 years ago
Juned,  can you just attach the script here?  That way others can use it at 
their discretion.

thanks!

Original comment by ak.hep...@gmail.com on 28 Jun 2012 at 6:06

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hello juned, your script is only working in sipdroid but if i will change the 
package name then it will not work.So is it required to change the name at 
anywhere in script or .so file? 

Original comment by jugni1sm...@gmail.com on 2 Jul 2012 at 12:54

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
anyone can just publish working sipdroid APK with g729 inside?

Original comment by Spon4ik on 2 Jul 2012 at 10:26

GoogleCodeExporter commented 8 years ago
working Sipdroid APK with g729 codec

Original comment by jkhan6...@gmail.com on 3 Jul 2012 at 6:09

Attachments:

GoogleCodeExporter commented 8 years ago
Finally, about $#@! time!
Too sad by now, flat-fee unlimited programs become almost de-facto in the world 
except international calls perhaps...

Thanks!

Original comment by carmageddon on 3 Jul 2012 at 6:54

GoogleCodeExporter commented 8 years ago
Comment 186 by jkhan6...@gmail.com, Today (13 hours ago)
working Sipdroid APK with g729 codec
    sipdroid-read-only.apk 
774 KB   Download

thanks, but have you 2.7 instead 2.4?
thanks in advance

Original comment by Spon4ik on 3 Jul 2012 at 7:20

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
i will upload 2.7 soon

Original comment by jkhan6...@gmail.com on 6 Jul 2012 at 10:22

GoogleCodeExporter commented 8 years ago
Looking forward to it, jkhan6; and a big thanks!!!

[Now if only we can get proper multi-account support .... (I can dream, can't 
I?)]

Original comment by jbr...@gmail.com on 6 Jul 2012 at 3:59

GoogleCodeExporter commented 8 years ago
definitely you can dream it ! 

Original comment by jkhan6...@gmail.com on 9 Jul 2012 at 1:54

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
tried to make by myself 2.7 with G.729
but it not appears in codec selection menu
how do I compile it correctly?

Original comment by Spon4ik on 9 Jul 2012 at 7:40

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
in Codecs.java(org.sipdroid.codecs) add following line.
add(new G729());

Original comment by jkhan6...@gmail.com on 11 Jul 2012 at 12:12

GoogleCodeExporter commented 8 years ago
here is the sipdroid 2.7 with G729 codec.

Original comment by jkhan6...@gmail.com on 12 Jul 2012 at 6:18

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]