1

I am developing SIP base application to make and receive a calls for that purpose i did analysis on an open source project Sipdroid. in addition to this i made this application to support a g729 codec. the application is working fine but when i modified the package name of the application i am getting the error with this new codec.while with other codecs the application works fine.here is my logcat of error.Here i have attached my java files
G729.java
Codec.java
Codecs.java
g729_jni.cpp

06-28 08:12:29.633: E/AndroidRuntime(712): java.lang.UnsatisfiedLinkError: open
06-28 08:12:29.633: E/AndroidRuntime(712):  at org.sipchat.codecs.G729.open(Native Method)
06-28 08:12:29.633: E/AndroidRuntime(712):  at org.sipchat.codecs.G729.init(G729.java:48)
06-28 08:12:29.633: E/AndroidRuntime(712):  at org.sipchat.codecs.Codecs$CodecSettings.onPreferenceTreeClick(Codecs.java:368)
06-28 08:12:29.633: E/AndroidRuntime(712):  at android.preference.Preference.performClick(Preference.java:820)
06-28 08:12:29.633: E/AndroidRuntime(712):  at android.preference.PreferenceScreen.onItemClick(PreferenceScreen.java:190)
06-28 08:12:29.633: E/AndroidRuntime(712):  at android.widget.AdapterView.performItemClick(AdapterView.java:284)
06-28 08:12:29.633: E/AndroidRuntime(712):  at android.widget.ListView.performItemClick(ListView.java:3513)
06-28 08:12:29.633: E/AndroidRuntime(712):  at android.widget.AbsListView$PerformClick.run(AbsListView.java:1812)
06-28 08:12:29.633: E/AndroidRuntime(712):  at android.os.Handler.handleCallback(Handler.java:587)
06-28 08:12:29.633: E/AndroidRuntime(712):  at android.os.Handler.dispatchMessage(Handler.java:92)
06-28 08:12:29.633: E/AndroidRuntime(712):  at android.os.Looper.loop(Looper.java:123)
06-28 08:12:29.633: E/AndroidRuntime(712):  at android.app.ActivityThread.main(ActivityThread.java:3683)
06-28 08:12:29.633: E/AndroidRuntime(712):  at java.lang.reflect.Method.invokeNative(Native Method)
06-28 08:12:29.633: E/AndroidRuntime(712):  at java.lang.reflect.Method.invoke(Method.java:507)
06-28 08:12:29.633: E/AndroidRuntime(712):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
06-28 08:12:29.633: E/AndroidRuntime(712):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
06-28 08:12:29.633: E/AndroidRuntime(712):  at dalvik.system.NativeStart.main(Native Method)

I have .so file to support a g729 codec but after changing the package name that .so file is not working.Because this .so file is built using different package name. so i must have a source file and need to compile it again to make it working. how to do that?

if anyone have a idea about this then please give me some suggestion about this error. how to deal with this error?
Thanks

Juned
  • 6,290
  • 7
  • 45
  • 93
  • 1
    The name of the native function must match the full package.class name of the class of which it is a method. However, an app can contain packages that do not match the overall package name of the app. – Chris Stratton Jul 13 '12 at 05:36
  • yeah after changing the package name in linker file the error is gone. this was the line which causing the error `const char *kInterfacePath = "org/sipdroid/pjlib/g729";` – Juned Sep 25 '12 at 05:09

1 Answers1

2

As i have faced with same problem... its not matching with your JNi or whatevr Codec with your actual java code

G M Ramesh
  • 3,420
  • 9
  • 37
  • 53
  • yeah thanks,Actually that codec was built using different package name as compare to current package name.After changing the package name the error is gone. this is the line which i have modified according to my requirements. `const char *kInterfacePath = "org/sipdroid/pjlib/g729";` – Juned Sep 25 '12 at 05:07
  • I want to build g729 codec for my application.with different package name. do you have any idea about this? – Juned Sep 25 '12 at 05:12
  • yeah i was familiar with csipsimple... but for sipdroid i have no idea how to build the same codec....for csipsimple i used to have build in linux OS to build G729 codec – G M Ramesh Sep 25 '12 at 05:15
  • yeah in Csipsimple they have implemented G729 codec but in the source code of that project i didn't able to find the linker file of G729 codec(g729_jni.cpp). meanwhile i have created the .so file of g729 codec but problem is that its working only in armeabi-v7a powered devices.i want to build a codec which supports all version. – Juned Sep 25 '12 at 05:21
  • As per my knowledge, i dont think it supports all versions as the device manufacturers used to change the audio hardware stack once they have different versions of android OS... It differs from company to company... – G M Ramesh Sep 25 '12 at 05:27
  • 1
    Nope its possible i have succesfully i added g729 codec in Sipdroid and its working in both architectures armeabi as well as armeabi-v7a, but now i want to create the so file with different package name see [this link](http://code.google.com/p/sipdroid/issues/detail?id=49#c171) – Juned Sep 25 '12 at 05:32
  • hi junaid, can u check this link and help me...http://stackoverflow.com/questions/12577171/how-to-send-rtppackets-in-sip-call-invite-request-method – G M Ramesh Sep 25 '12 at 06:20
  • hi junaid, can u check the following and can u give me any solution : http://stackoverflow.com/questions/12618790/how-to-play-every-5-chunk-of-bytes-using-bytebuffer-till-it-finishes-1024-bytes – G M Ramesh Sep 27 '12 at 10:17