From 0025ff06f61bfd9cc91637cc7bb23712eb837675 Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Wed, 6 Apr 2011 15:13:59 +0200 Subject: [PATCH] Enable ipv6 support for Android. --- build/android/Android.mk | 2 + coreapi/linphonecore_jni.cc | 5 ++ .../org/linphone/core/LinphoneCore.java | 62 ++++++++++--------- mediastreamer2 | 2 +- oRTP | 2 +- 5 files changed, 41 insertions(+), 32 deletions(-) diff --git a/build/android/Android.mk b/build/android/Android.mk index 87649a85a..4ac0b93a7 100755 --- a/build/android/Android.mk +++ b/build/android/Android.mk @@ -56,6 +56,8 @@ endif LOCAL_CFLAGS += \ -D_BYTE_ORDER=_LITTLE_ENDIAN \ -DORTP_INET6 \ + -DINET6 \ + -DOSIP_MT \ -DENABLE_TRACE \ -DLINPHONE_VERSION=\"3.4.0\" \ -DLINPHONE_PLUGINS_DIR=\"\\tmp\" \ diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 07acaf08a..91984104e 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -1203,3 +1203,8 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setSignalingTransportPor linphone_core_set_sip_transports(lc, &tr); // tr will be copied } + +extern "C" void Java_org_linphone_core_LinphoneCoreImpl_enableIpv6(JNIEnv* env,jobject thiz + ,jlong lc, jboolean enable) { + linphone_core_enable_ipv6((LinphoneCore*)lc,enable); +} diff --git a/java/common/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java index a85f2a86a..7ce7f0dbe 100644 --- a/java/common/org/linphone/core/LinphoneCore.java +++ b/java/common/org/linphone/core/LinphoneCore.java @@ -379,75 +379,75 @@ public interface LinphoneCore { * Mutes or unmutes the local microphone. * @param isMuted */ - public void muteMic(boolean isMuted); + void muteMic(boolean isMuted); /** * * @return true is mic is muted */ - public boolean isMicMuted(); + boolean isMicMuted(); /** * Initiate a dtmf signal if in call * @param number */ - public void sendDtmf(char number); + void sendDtmf(char number); /** * Initiate a dtmf signal to the speaker if not in call. * Sending of the DTMF is done in another function. * @param number * @param duration in ms , -1 for unlimited */ - public void playDtmf(char number,int duration); + void playDtmf(char number,int duration); /** * stop current dtmf */ - public void stopDtmf(); + void stopDtmf(); /** * remove all call logs */ - public void clearCallLogs(); + void clearCallLogs(); /*** * get payload type from mime type an clock rate * * return null if not found */ - public PayloadType findPayloadType(String mime,int clockRate); + PayloadType findPayloadType(String mime,int clockRate); /** * not implemented yet * @param pt * @param enable * @throws LinphoneCoreException */ - public void enablePayloadType(PayloadType pt, boolean enable) throws LinphoneCoreException; + void enablePayloadType(PayloadType pt, boolean enable) throws LinphoneCoreException; /** * Enables or disable echo cancellation. * @param enable */ - public void enableEchoCancellation(boolean enable); + void enableEchoCancellation(boolean enable); /** * get EC status * @return true if echo cancellation is enabled. */ - public boolean isEchoCancellationEnabled(); + boolean isEchoCancellationEnabled(); /** * @param transports used for signaling (TCP, UDP and TLS) */ - public void setSignalingTransportPorts(Transports transports); + void setSignalingTransportPorts(Transports transports); /** * @return transports used for signaling (TCP, UDP, TLS) */ - public Transports getSignalingTransportPorts(); + Transports getSignalingTransportPorts(); /** * not implemented * @param value */ - public void enableSpeaker(boolean value); + void enableSpeaker(boolean value); /** * not implemented * @return */ - public boolean isSpeakerEnabled(); + boolean isSpeakerEnabled(); /** * add a friend to the current buddy list, if subscription attribute is set, a SIP SUBSCRIBE message is sent. * @param lf LinphoenFriend to add @@ -469,8 +469,8 @@ public interface LinphoneCore { */ LinphoneChatRoom createChatRoom(String to); - public void setVideoWindow(Object w); - public void setPreviewWindow(Object w); + void setVideoWindow(Object w); + void setPreviewWindow(Object w); /** * Enables video globally. * @@ -494,49 +494,49 @@ public interface LinphoneCore { * Specify a STUN server to help firewall traversal. * @param stun_server Stun server address and port, such as stun.linphone.org or stun.linphone.org:3478 */ - public void setStunServer(String stun_server); + void setStunServer(String stun_server); /** * @return stun server address if previously set. */ - public String getStunServer(); + String getStunServer(); /** * Sets policy regarding workarounding NATs * @param pol one of the FirewallPolicy members. **/ - public void setFirewallPolicy(FirewallPolicy pol); + void setFirewallPolicy(FirewallPolicy pol); /** * @return previously set firewall policy. */ - public FirewallPolicy getFirewallPolicy(); + FirewallPolicy getFirewallPolicy(); - public LinphoneCall inviteAddressWithParams(LinphoneAddress destination, LinphoneCallParams params) throws LinphoneCoreException ; + LinphoneCall inviteAddressWithParams(LinphoneAddress destination, LinphoneCallParams params) throws LinphoneCoreException ; - public int updateCall(LinphoneCall call, LinphoneCallParams params); + int updateCall(LinphoneCall call, LinphoneCallParams params); - public LinphoneCallParams createDefaultCallParameters(); + LinphoneCallParams createDefaultCallParameters(); /** * Sets the path to a wav file used for ringing. * * @param path The file must be a wav 16bit linear. Local ring is disabled if null */ - public void setRing(String path); + void setRing(String path); /** * gets the path to a wav file used for ringing. * * @param null if not set */ - public String getRing(); - public void setUploadBandwidth(int bw); + String getRing(); + void setUploadBandwidth(int bw); - public void setDownloadBandwidth(int bw); + void setDownloadBandwidth(int bw); - public void setPreferredVideoSize(VideoSize vSize); + void setPreferredVideoSize(VideoSize vSize); - public VideoSize getPreferredVideoSize(); + VideoSize getPreferredVideoSize(); - public PayloadType[] listVideoCodecs(); + PayloadType[] listVideoCodecs(); /** * enable signaling keep alive. small udp packet sent periodically to keep udp NAT association */ @@ -553,4 +553,6 @@ public interface LinphoneCore { * @throws LinphoneCoreException if operation is still in progress; **/ void startEchoCalibration(Object data) throws LinphoneCoreException; + + void enableIpv6(boolean enable); } diff --git a/mediastreamer2 b/mediastreamer2 index 9c3a750b7..27a377065 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 9c3a750b794e161fcea2dd1e36f98f0c8b90eb88 +Subproject commit 27a377065ef52290f70074048fafde693f4da9b0 diff --git a/oRTP b/oRTP index 98c3a0cb9..d42e64bf9 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 98c3a0cb9b17568b1aabe038f8cb36caa9b1a147 +Subproject commit d42e64bf9791a8ca8a923db80d622a8e92b9fb28