From f2789756099a7e82d27b7de9a96606fa6ed73e31 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 17 Sep 2012 15:59:36 +0200 Subject: [PATCH 01/15] deprecate method --- java/common/org/linphone/core/LinphoneCore.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/java/common/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java index 9e2af91b7..ce476c738 100644 --- a/java/common/org/linphone/core/LinphoneCore.java +++ b/java/common/org/linphone/core/LinphoneCore.java @@ -677,6 +677,10 @@ public interface LinphoneCore { void startEchoCalibration(Object data) throws LinphoneCoreException; void enableIpv6(boolean enable); + /** + * @deprecated + * @param i + */ void adjustSoftwareVolume(int i); boolean pauseCall(LinphoneCall call); From b70085becb6f6838589d0179172366db6de20069 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 17 Sep 2012 15:57:11 +0200 Subject: [PATCH 02/15] set processing of tunnel udp mirror callback on main thread. --- coreapi/TunnelManager.cc | 68 +++++++++++++++++++++++++++------------ coreapi/TunnelManager.hh | 23 ++++++++++--- coreapi/linphone_tunnel.h | 27 ++++++++++++++-- 3 files changed, 91 insertions(+), 27 deletions(-) diff --git a/coreapi/TunnelManager.cc b/coreapi/TunnelManager.cc index e3c7e6595..2165a2bf4 100644 --- a/coreapi/TunnelManager.cc +++ b/coreapi/TunnelManager.cc @@ -212,7 +212,6 @@ TunnelManager::TunnelManager(LinphoneCore* lc) :TunnelClientController() mExosipTransport.recvfrom=eXosipRecvfrom; mExosipTransport.sendto=eXosipSendto; mExosipTransport.select=eXosipSelect; - mStateChanged=false; linphone_core_add_iterate_hook(mCore,(LinphoneCoreIterateHook)sOnIterate,this); mTransportFactories.audio_rtcp_func=sCreateRtpTransport; mTransportFactories.audio_rtcp_func_data=this; @@ -242,7 +241,7 @@ void TunnelManager::stopClient(){ } } -void TunnelManager::processTunnelEvent(){ +void TunnelManager::processTunnelEvent(const Event &ev){ LinphoneProxyConfig* lProxy; linphone_core_get_default_proxy(mCore, &lProxy); @@ -325,15 +324,31 @@ void TunnelManager::enable(bool isEnable) { } void TunnelManager::tunnelCallback(bool connected, TunnelManager *zis){ - zis->mStateChanged=true; + Event ev; + ev.mType=TunnelEvent; + ev.mData.mConnected=connected; + zis->postEvent(ev); +} + +void TunnelManager::onIterate(){ + mMutex.lock(); + while(!mEvq.empty()){ + Event ev=mEvq.front(); + mEvq.pop(); + mMutex.unlock(); + if (ev.mType==TunnelEvent) + processTunnelEvent(ev); + else if (ev.mType==UdpMirrorClientEvent){ + processUdpMirrorEvent(ev); + } + mMutex.lock(); + } + mMutex.unlock(); } /*invoked from linphone_core_iterate() */ void TunnelManager::sOnIterate(TunnelManager *zis){ - if (zis->mStateChanged){ - zis->mStateChanged=false; - zis->processTunnelEvent(); - } + zis->onIterate(); } #ifdef ANDROID @@ -374,26 +389,39 @@ void TunnelManager::enableLogs(bool isEnabled,LogHandler logHandler) { bool TunnelManager::isEnabled() { return mEnabled; } -void TunnelManager::UdpMirrorClientListener(bool isUdpAvailable, void* data) { - TunnelManager* thiz = (TunnelManager*)data; - if (isUdpAvailable) { + +void TunnelManager::processUdpMirrorEvent(const Event &ev){ + if (ev.mData.mHaveUdp) { LOGI("Tunnel is not required, disabling"); - thiz->enable(false); - thiz->mAutoDetectStarted = false; + enable(false); + mAutoDetectStarted = false; } else { - if (++thiz->mCurrentUdpMirrorClient !=thiz->mUdpMirrorClients.end()) { - //1 enable tunnable but also try backup server + if (mCurrentUdpMirrorClient !=mUdpMirrorClients.end()) { + // enable tunnel but also try backup server LOGI("Tunnel is required, enabling; Trying backup udp mirror"); - UdpMirrorClient &lUdpMirrorClient=*thiz->mCurrentUdpMirrorClient; - lUdpMirrorClient.start(TunnelManager::UdpMirrorClientListener,(void*)thiz); + UdpMirrorClient &lUdpMirrorClient=*mCurrentUdpMirrorClient; + lUdpMirrorClient.start(TunnelManager::sUdpMirrorClientCallback,(void*)this); } else { LOGI("Tunnel is required, enabling; no backup udp mirror available"); - thiz->mAutoDetectStarted = false; + mAutoDetectStarted = false; } - thiz->enable(true); + enable(true); } - return; +} + +void TunnelManager::postEvent(const Event &ev){ + mMutex.lock(); + mEvq.push(ev); + mMutex.unlock(); +} + +void TunnelManager::sUdpMirrorClientCallback(bool isUdpAvailable, void* data) { + TunnelManager* thiz = (TunnelManager*)data; + Event ev; + ev.mType=UdpMirrorClientEvent; + ev.mData.mHaveUdp=isUdpAvailable; + thiz->postEvent(ev); } void TunnelManager::autoDetect() { @@ -409,7 +437,7 @@ void TunnelManager::autoDetect() { mAutoDetectStarted=true; mCurrentUdpMirrorClient =mUdpMirrorClients.begin(); UdpMirrorClient &lUdpMirrorClient=*mCurrentUdpMirrorClient; - lUdpMirrorClient.start(TunnelManager::UdpMirrorClientListener,(void*)this); + lUdpMirrorClient.start(TunnelManager::sUdpMirrorClientCallback,(void*)this); } diff --git a/coreapi/TunnelManager.hh b/coreapi/TunnelManager.hh index 1fb55429e..6df99192a 100644 --- a/coreapi/TunnelManager.hh +++ b/coreapi/TunnelManager.hh @@ -130,9 +130,21 @@ class UdpMirrorClient; LinphoneCore *getLinphoneCore(); virtual void setHttpProxy(const char *host,int port, const char *username, const char *passwd); private: + enum EventType{ + UdpMirrorClientEvent, + TunnelEvent, + }; + struct Event{ + EventType mType; + union EventData{ + bool mConnected; + bool mHaveUdp; + }mData; + }; typedef std::list UdpMirrorClientList; virtual bool isStarted(); virtual bool isReady() const; + void onIterate(); static int customSendto(struct _RtpTransport *t, mblk_t *msg , int flags, const struct sockaddr *to, socklen_t tolen); static int customRecvfrom(struct _RtpTransport *t, mblk_t *msg, int flags, struct sockaddr *from, socklen_t *fromlen); static int eXosipSendto(int fd,const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen,void* userdata); @@ -140,9 +152,11 @@ class UdpMirrorClient; static int eXosipSelect(int nfds, fd_set *s1, fd_set *s2, fd_set *s3, struct timeval *tv,void* userdata); static void tunnelCallback(bool connected, TunnelManager *zis); static void sOnIterate(TunnelManager *zis); - static void UdpMirrorClientListener(bool result, void* data); + static void sUdpMirrorClientCallback(bool result, void* data); void waitUnRegistration(); - void processTunnelEvent(); + void processTunnelEvent(const Event &ev); + void processUdpMirrorEvent(const Event &ev); + void postEvent(const Event &ev); LinphoneCore* mCore; LCSipTransports mRegularTransport; TunnelSocket *mSipSocket; @@ -150,19 +164,20 @@ class UdpMirrorClient; StateCallback mCallback; void * mCallbackData; bool mEnabled; - bool mStateChanged; + std::queue mEvq; std::list mServerAddrs; UdpMirrorClientList mUdpMirrorClients; UdpMirrorClientList::iterator mCurrentUdpMirrorClient; TunnelClient* mTunnelClient; void stopClient(); + Mutex mMutex; static Mutex sMutex; bool mAutoDetectStarted; LinphoneRtpTransportFactories mTransportFactories; std::string mHttpUserName; std::string mHttpPasswd; std::string mHttpProxyHost; - int mHttpProxyPort; + int mHttpProxyPort; }; /** diff --git a/coreapi/linphone_tunnel.h b/coreapi/linphone_tunnel.h index 5d78fe8f6..bb343008a 100644 --- a/coreapi/linphone_tunnel.h +++ b/coreapi/linphone_tunnel.h @@ -62,10 +62,10 @@ void linphone_tunnel_add_server(LinphoneTunnel *tunnel, const char *host, int po * @param tunnel object * @param host tunnel server ip address * @param port tunnel server tls port, recommended value is 443 - * @param remote_udp_mirror remote port on the tunnel server side used to test udp reachability + * @param remote_udp_mirror_port remote port on the tunnel server side used to test udp reachability * @param delay udp packet round trip delay in ms considered as acceptable. recommended value is 1000 ms. */ -void linphone_tunnel_add_server_and_mirror(LinphoneTunnel *tunnel, const char *host, int port, int remote_udp_mirror, int delay); +void linphone_tunnel_add_server_and_mirror(LinphoneTunnel *tunnel, const char *host, int port, int remote_udp_mirror_port, int delay); /** * @param tunnel object * returns a string of space separated list of host:port of tunnel server addresses @@ -98,16 +98,37 @@ bool_t linphone_tunnel_enabled(LinphoneTunnel *tunnel); **/ void linphone_tunnel_reconnect(LinphoneTunnel *tunnel); /** + * Start tunnel need detection. * @param tunnel object * In auto detect mode, the tunnel manager try to establish a real time rtp cummunication with the tunnel server on specified port. *
In case of success, the tunnel is automatically turned off. Otherwise, if no udp commmunication is feasible, tunnel mode is turned on. *
Call this method each time to run the auto detection algorithm */ void linphone_tunnel_auto_detect(LinphoneTunnel *tunnel); + +/** + * Set an optional http proxy to go through when connecting to tunnel server. + * @param tunnel LinphoneTunnel object + * @param host Http proxy host. + * @param port http proxy port. + * @param username optional http proxy username if the proxy request authentication. Currently only basic authentication is supported. Use NULL if not needed. + * @param password optional http proxy password. Use NULL if not needed. + **/ void linphone_tunnel_set_http_proxy(LinphoneTunnel *tunnel, const char *host, int port, const char* username,const char* passwd); -void linphone_tunnel_set_http_proxy_auth_info(LinphoneTunnel*tunnel, const char* username,const char* passwd); + +/** + * Retrieve optional http proxy configuration previously set with linphone_tunnel_set_http_proxy(). + * @param tunnel LinphoneTunnel object + * @param host Http proxy host. + * @param port http proxy port. + * @param username optional http proxy username if the proxy request authentication. Currently only basic authentication is supported. Use NULL if not needed. + * @param password optional http proxy password. Use NULL if not needed. + **/ void linphone_tunnel_get_http_proxy(LinphoneTunnel*tunnel,const char **host, int *port, const char **username, const char **passwd); +void linphone_tunnel_set_http_proxy_auth_info(LinphoneTunnel*tunnel, const char* username,const char* passwd); + + void linphone_tunnel_enable_logs(LinphoneTunnel *tunnel, bool_t enabled); /** From 35d223adee65f659e984d031b67f549e6fff2d1a Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 17 Sep 2012 16:02:29 +0200 Subject: [PATCH 03/15] fix bug with preview setting --- coreapi/linphonecore.c | 1 + 1 file changed, 1 insertion(+) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 152ccf80c..a907f3255 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -844,6 +844,7 @@ static void video_config_read(LinphoneCore *lc){ ms_message("we are using a specific display:%s\n",lc->video_conf.displaytype); linphone_core_enable_video(lc,capture,display); + linphone_core_enable_video_preview(lc,lp_config_get_int(lc->config,"video","show_local",0)); linphone_core_enable_self_view(lc,self_view); linphone_core_set_video_policy(lc,&vpol); #endif From 7256d4b28e7288697536de357289315922bb74b2 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 17 Sep 2012 16:23:22 +0200 Subject: [PATCH 04/15] set video preview window id effective immediately when possible --- coreapi/linphonecore.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index a907f3255..99482f620 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -4096,6 +4096,8 @@ void linphone_core_set_native_preview_window_id(LinphoneCore *lc, unsigned long LinphoneCall *call=linphone_core_get_current_call(lc); if (call!=NULL && call->videostream){ video_stream_set_native_preview_window_id(call->videostream,id); + }else if (lc->previewstream){ + video_preview_set_native_window_id(lc->previewstream,id); } #endif } From aaa06771f21ae7d895901eb8463976bb250b1c6f Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 17 Sep 2012 18:36:06 +0200 Subject: [PATCH 05/15] avoid using strtok --- coreapi/linphone_tunnel.cc | 39 +++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/coreapi/linphone_tunnel.cc b/coreapi/linphone_tunnel.cc index 6a47e83ab..f5a5d361f 100644 --- a/coreapi/linphone_tunnel.cc +++ b/coreapi/linphone_tunnel.cc @@ -173,17 +173,26 @@ void linphone_tunnel_auto_detect(LinphoneTunnel *tunnel){ bcTunnel(tunnel)->autoDetect(); } -static void tunnel_add_servers_from_config(LinphoneTunnel *tunnel, char* confaddress){ - char *str1; - for(str1=confaddress;;str1=NULL){ - char *port; - char *address=strtok(str1," "); // Not thread safe - if (!address) break; - port=strchr(address, ':'); - if (!port) ms_fatal("Bad tunnel address %s",confaddress); - *port++='\0'; - linphone_tunnel_add_server(tunnel, address, atoi(port)); - } +static void tunnel_add_servers_from_config(LinphoneTunnel *tunnel, const char* confaddress){ + char *tmp=(char*)ms_malloc0(strlen(confaddress)+1); + const char *it=confaddress; + int adv; + do{ + int ret=sscanf(it,"%s%n",tmp,&adv); + if (ret>=1){ + it+=adv; + char *port=strchr(tmp,':'); + if (!port){ + ms_error("Tunnel server addresses incorrectly specified from config file: %s",it); + break; + }else{ + *port='\0'; + port++; + bcTunnel(tunnel)->addServer(tmp, atoi(port)); + } + }else break; + }while(1); + ms_free(tmp); } static void my_ortp_logv(OrtpLogLevel level, const char *fmt, va_list args){ @@ -197,13 +206,9 @@ static void my_ortp_logv(OrtpLogLevel level, const char *fmt, va_list args){ void linphone_tunnel_configure(LinphoneTunnel *tunnel){ bool_t enabled=(bool_t)lp_config_get_int(config(tunnel),"tunnel","enabled",FALSE); const char* addresses=lp_config_get_string(config(tunnel),"tunnel","server_addresses", NULL); - char *copy=addresses ? ms_strdup(addresses) : NULL; linphone_tunnel_enable_logs_with_handler(tunnel,TRUE,my_ortp_logv); - linphone_tunnel_clean_servers(tunnel); - if (copy){ - tunnel_add_servers_from_config(tunnel,copy); - ms_free(copy); - } + if (addresses) + tunnel_add_servers_from_config(tunnel,addresses); linphone_tunnel_enable(tunnel, enabled); } From da68646e0987d238ee30fdf5235b1024f3bd5dbf Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 17 Sep 2012 20:52:29 +0200 Subject: [PATCH 06/15] backward compat fixes --- .../org/linphone/core/tutorials/TutorialBuddyStatus.java | 7 +++++++ .../org/linphone/core/tutorials/TutorialChatRoom.java | 8 ++++++++ .../org/linphone/core/tutorials/TutorialHelloWorld.java | 8 ++++++++ .../org/linphone/core/tutorials/TutorialRegistration.java | 8 ++++++++ coreapi/linphonecore_jni.cc | 5 ++--- java/common/org/linphone/core/LinphoneChatRoom.java | 6 ------ java/common/org/linphone/core/LinphoneCore.java | 8 +++++++- java/common/org/linphone/core/LinphoneCoreListener.java | 3 +-- 8 files changed, 41 insertions(+), 12 deletions(-) diff --git a/coreapi/help/java/org/linphone/core/tutorials/TutorialBuddyStatus.java b/coreapi/help/java/org/linphone/core/tutorials/TutorialBuddyStatus.java index 58a75e56b..1d86d482b 100644 --- a/coreapi/help/java/org/linphone/core/tutorials/TutorialBuddyStatus.java +++ b/coreapi/help/java/org/linphone/core/tutorials/TutorialBuddyStatus.java @@ -20,6 +20,7 @@ package org.linphone.core.tutorials; import org.linphone.core.LinphoneAddress; import org.linphone.core.LinphoneCall; +import org.linphone.core.LinphoneChatMessage; import org.linphone.core.LinphoneChatRoom; import org.linphone.core.LinphoneCore; import org.linphone.core.LinphoneCore.EcCalibratorStatus; @@ -231,5 +232,11 @@ public class TutorialBuddyStatus implements LinphoneCoreListener { TutorialNotifier.notify(s); } + @Override + public void messageReceived(LinphoneCore lc, LinphoneChatRoom cr, LinphoneChatMessage message) { + // TODO Auto-generated method stub + + } + } diff --git a/coreapi/help/java/org/linphone/core/tutorials/TutorialChatRoom.java b/coreapi/help/java/org/linphone/core/tutorials/TutorialChatRoom.java index c81823e8a..91dc0f247 100644 --- a/coreapi/help/java/org/linphone/core/tutorials/TutorialChatRoom.java +++ b/coreapi/help/java/org/linphone/core/tutorials/TutorialChatRoom.java @@ -20,6 +20,7 @@ package org.linphone.core.tutorials; import org.linphone.core.LinphoneAddress; import org.linphone.core.LinphoneCall; +import org.linphone.core.LinphoneChatMessage; import org.linphone.core.LinphoneChatRoom; import org.linphone.core.LinphoneCore; import org.linphone.core.LinphoneCore.EcCalibratorStatus; @@ -146,5 +147,12 @@ public class TutorialChatRoom implements LinphoneCoreListener { TutorialNotifier.notify(s); } + @Override + public void messageReceived(LinphoneCore lc, LinphoneChatRoom cr, + LinphoneChatMessage message) { + // TODO Auto-generated method stub + + } + } diff --git a/coreapi/help/java/org/linphone/core/tutorials/TutorialHelloWorld.java b/coreapi/help/java/org/linphone/core/tutorials/TutorialHelloWorld.java index 6daa65711..354f97501 100644 --- a/coreapi/help/java/org/linphone/core/tutorials/TutorialHelloWorld.java +++ b/coreapi/help/java/org/linphone/core/tutorials/TutorialHelloWorld.java @@ -20,6 +20,7 @@ package org.linphone.core.tutorials; import org.linphone.core.LinphoneAddress; import org.linphone.core.LinphoneCall; +import org.linphone.core.LinphoneChatMessage; import org.linphone.core.LinphoneChatRoom; import org.linphone.core.LinphoneCore; import org.linphone.core.LinphoneCore.EcCalibratorStatus; @@ -156,5 +157,12 @@ public class TutorialHelloWorld implements LinphoneCoreListener { TutorialNotifier.notify(s); } + @Override + public void messageReceived(LinphoneCore lc, LinphoneChatRoom cr, + LinphoneChatMessage message) { + // TODO Auto-generated method stub + + } + } diff --git a/coreapi/help/java/org/linphone/core/tutorials/TutorialRegistration.java b/coreapi/help/java/org/linphone/core/tutorials/TutorialRegistration.java index 674044471..48e473d61 100644 --- a/coreapi/help/java/org/linphone/core/tutorials/TutorialRegistration.java +++ b/coreapi/help/java/org/linphone/core/tutorials/TutorialRegistration.java @@ -20,6 +20,7 @@ package org.linphone.core.tutorials; import org.linphone.core.LinphoneAddress; import org.linphone.core.LinphoneCall; +import org.linphone.core.LinphoneChatMessage; import org.linphone.core.LinphoneChatRoom; import org.linphone.core.LinphoneCore; import org.linphone.core.LinphoneCore.EcCalibratorStatus; @@ -187,6 +188,13 @@ public class TutorialRegistration implements LinphoneCoreListener { TutorialNotifier.notify(s); } + @Override + public void messageReceived(LinphoneCore lc, LinphoneChatRoom cr, + LinphoneChatMessage message) { + // TODO Auto-generated method stub + + } + } diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 440afcbc6..eacb220e0 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -152,7 +152,7 @@ public: /*void textReceived(LinphoneCore lc, LinphoneChatRoom cr,LinphoneAddress from,String message);*/ textReceivedId = env->GetMethodID(listenerClass,"textReceived","(Lorg/linphone/core/LinphoneCore;Lorg/linphone/core/LinphoneChatRoom;Lorg/linphone/core/LinphoneAddress;Ljava/lang/String;)V"); - messageReceivedId = env->GetMethodID(listenerClass,"messageReceived","(Lorg/linphone/core/LinphoneCore;Lorg/linphone/core/LinphoneChatRoom;Lorg/linphone/core/LinphoneAddress;Lorg/linphone/core/LinphoneChatMessage;)V"); + messageReceivedId = env->GetMethodID(listenerClass,"messageReceived","(Lorg/linphone/core/LinphoneCore;Lorg/linphone/core/LinphoneChatRoom;Lorg/linphone/core/LinphoneChatMessage;)V"); proxyClass = (jclass)env->NewGlobalRef(env->FindClass("org/linphone/core/LinphoneProxyConfigImpl")); proxyCtrId = env->GetMethodID(proxyClass,"", "(J)V"); @@ -161,7 +161,7 @@ public: callCtrId = env->GetMethodID(callClass,"", "(J)V"); chatMessageClass = (jclass)env->NewGlobalRef(env->FindClass("org/linphone/core/LinphoneChatMessageImpl")); - chatMessageCtrId = env->GetMethodID(chatMessageClass,"", "(J)V"); + if (chatMessageClass) chatMessageCtrId = env->GetMethodID(chatMessageClass,"", "(J)V"); chatRoomClass = (jclass)env->NewGlobalRef(env->FindClass("org/linphone/core/LinphoneChatRoomImpl")); chatRoomCtrId = env->GetMethodID(chatRoomClass,"", "(J)V"); @@ -402,7 +402,6 @@ public: ,lcData->messageReceivedId ,lcData->core ,env->NewObject(lcData->chatRoomClass,lcData->chatRoomCtrId,(jlong)room) - ,env->NewObject(lcData->addressClass,lcData->addressCtrId,(jlong)msg->from) ,env->NewObject(lcData->chatMessageClass,lcData->chatMessageCtrId,(jlong)msg)); } static void ecCalibrationStatus(LinphoneCore *lc, LinphoneEcCalibratorStatus status, int delay_ms, void *data) { diff --git a/java/common/org/linphone/core/LinphoneChatRoom.java b/java/common/org/linphone/core/LinphoneChatRoom.java index 102a03c21..d6512f170 100644 --- a/java/common/org/linphone/core/LinphoneChatRoom.java +++ b/java/common/org/linphone/core/LinphoneChatRoom.java @@ -40,12 +40,6 @@ public interface LinphoneChatRoom { * @param chat message */ void sendMessage(LinphoneChatMessage message, LinphoneChatMessage.StateListener listener); - /** - * DEPRECATED - * @param opaque - * @param message - */ - void sendMessage(Object opaque, String message); /** * Create a LinphoneChatMessage diff --git a/java/common/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java index ce476c738..6ac821322 100644 --- a/java/common/org/linphone/core/LinphoneCore.java +++ b/java/common/org/linphone/core/LinphoneCore.java @@ -491,11 +491,17 @@ public interface LinphoneCore { */ void clearCallLogs(); /*** - * get payload type from mime type an clock rate + * get payload type from mime type, clock rate, and number of channels.- * * return null if not found */ PayloadType findPayloadType(String mime, int clockRate, int channels); + /*** + * get payload type from mime type and clock rate.. + * + * return null if not found + */ + PayloadType findPayloadType(String mime, int clockRate); /** * not implemented yet * @param pt diff --git a/java/common/org/linphone/core/LinphoneCoreListener.java b/java/common/org/linphone/core/LinphoneCoreListener.java index 150141ffe..a84f736d2 100644 --- a/java/common/org/linphone/core/LinphoneCoreListener.java +++ b/java/common/org/linphone/core/LinphoneCoreListener.java @@ -82,10 +82,9 @@ public interface LinphoneCoreListener { * invoked when a new linphone chat message is received * @param lc LinphoneCore * @param room LinphoneChatRoom involved in this conversation. Can be be created by the framework in case the from is not present in any chat room. - * @param from LinphoneAddress from * @param message incoming linphone chat message message */ - void messageReceived(LinphoneCore lc, LinphoneChatRoom cr, LinphoneAddress from, LinphoneChatMessage message); + void messageReceived(LinphoneCore lc, LinphoneChatRoom cr, LinphoneChatMessage message); /** * Invoked when echo cancalation calibration is completed From 239e4f553b425ab09ac097b8b2cfbb4d75cf2047 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 18 Sep 2012 12:24:31 +0200 Subject: [PATCH 07/15] do not use ICE while in tunnel mode --- coreapi/TunnelManager.cc | 9 ++++++--- coreapi/TunnelManager.hh | 1 + mediastreamer2 | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/coreapi/TunnelManager.cc b/coreapi/TunnelManager.cc index 2165a2bf4..9b5dffd29 100644 --- a/coreapi/TunnelManager.cc +++ b/coreapi/TunnelManager.cc @@ -246,7 +246,8 @@ void TunnelManager::processTunnelEvent(const Event &ev){ linphone_core_get_default_proxy(mCore, &lProxy); if (mEnabled && mTunnelClient->isReady()){ - ms_message("Tunnel is up, registering now"); + ms_message("Tunnel is up, registering now"); + linphone_core_set_firewall_policy(mCore,LinphonePolicyNoFirewall); linphone_core_set_rtp_transport_factories(mCore,&mTransportFactories); eXosip_transport_hook_register(&mExosipTransport); //force transport to udp @@ -295,8 +296,9 @@ void TunnelManager::enable(bool isEnable) { ms_message("Turning tunnel [%s]",(isEnable?"on":"off")); if (isEnable && !mEnabled){ mEnabled=true; - //1 save transport + //1 save transport and firewall policy linphone_core_get_sip_transports(mCore, &mRegularTransport); + mPreviousFirewallPolicy=linphone_core_get_firewall_policy(mCore); //2 unregister waitUnRegistration(); //3 insert tunnel @@ -311,8 +313,9 @@ void TunnelManager::enable(bool isEnable) { linphone_core_set_rtp_transport_factories(mCore,NULL); eXosip_transport_hook_register(NULL); - //Restore transport + //Restore transport and firewall policy linphone_core_set_sip_transports(mCore, &mRegularTransport); + linphone_core_set_firewall_policy(mCore, mPreviousFirewallPolicy); //register LinphoneProxyConfig* lProxy; linphone_core_get_default_proxy(mCore, &lProxy); diff --git a/coreapi/TunnelManager.hh b/coreapi/TunnelManager.hh index 6df99192a..d4c1458fc 100644 --- a/coreapi/TunnelManager.hh +++ b/coreapi/TunnelManager.hh @@ -178,6 +178,7 @@ class UdpMirrorClient; std::string mHttpPasswd; std::string mHttpProxyHost; int mHttpProxyPort; + LinphoneFirewallPolicy mPreviousFirewallPolicy; }; /** diff --git a/mediastreamer2 b/mediastreamer2 index 88b9146cc..bc1d91a89 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 88b9146ccbd33c9d8d3317be92078f6211498907 +Subproject commit bc1d91a891a04858b43d6e08fa1136d2c3b9c6a2 From a1961faa44b1306e5c04285a00ec98ccd9328ff9 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 18 Sep 2012 15:32:29 +0200 Subject: [PATCH 08/15] Added JNI getFrom to LinphoneChatMessage --- coreapi/linphonecore_jni.cc | 9 +++++++-- java/common/org/linphone/core/LinphoneChatMessage.java | 7 +++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index eacb220e0..fda8c861f 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -1425,10 +1425,15 @@ extern "C" void Java_org_linphone_core_LinphoneChatMessageImpl_setExternalBodyUr linphone_chat_message_set_external_body_url((LinphoneChatMessage *)ptr, url); env->ReleaseStringUTFChars(jurl, url); } -extern "C" long Java_org_linphone_core_LinphoneChatMessageImpl_getPeerAddress(JNIEnv* env +extern "C" jlong Java_org_linphone_core_LinphoneChatMessageImpl_getFrom(JNIEnv* env ,jobject thiz ,jlong ptr) { - return (long) linphone_chat_message_get_peer_address((LinphoneChatMessage*)ptr); + return (jlong) linphone_chat_message_get_from((LinphoneChatMessage*)ptr); +} +extern "C" jlong Java_org_linphone_core_LinphoneChatMessageImpl_getPeerAddress(JNIEnv* env + ,jobject thiz + ,jlong ptr) { + return (jlong) linphone_chat_message_get_peer_address((LinphoneChatMessage*)ptr); } extern "C" void Java_org_linphone_core_LinphoneChatRoomImpl_sendMessage(JNIEnv* env ,jobject thiz diff --git a/java/common/org/linphone/core/LinphoneChatMessage.java b/java/common/org/linphone/core/LinphoneChatMessage.java index 3b135fc65..db75f9116 100644 --- a/java/common/org/linphone/core/LinphoneChatMessage.java +++ b/java/common/org/linphone/core/LinphoneChatMessage.java @@ -74,6 +74,13 @@ public interface LinphoneChatMessage { */ LinphoneAddress getPeerAddress(); + /** + * get from address associated to this LinphoneChatMessage + * + * @return LinphoneAddress from address + */ + LinphoneAddress getFrom(); + /** * Linphone message can carry external body as defined by rfc2017 * @param message #LinphoneChatMessage From 296b5671ae42dbfbb28e1c30e8c79ecdbe60ebc5 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Tue, 18 Sep 2012 08:21:51 +0200 Subject: [PATCH 09/15] add armv7s support for IOS Conflicts: mediastreamer2 --- configure.ac | 2 +- m4/exosip.m4 | 8 +------- mediastreamer2 | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 6e68f7ba1..4c4bab882 100644 --- a/configure.ac +++ b/configure.ac @@ -61,7 +61,7 @@ case $target in CONSOLE_FLAGS="-mconsole" mingw_found=yes ;; - armv6-apple-darwin|armv7-apple-darwin|i386-apple-darwin) + armv6-apple-darwin|armv7-apple-darwin|i386-apple-darwin|armv7s-apple-darwin) CFLAGS="$CFLAGS -DTARGET_OS_IPHONE " build_tests=no ios_found=yes diff --git a/m4/exosip.m4 b/m4/exosip.m4 index 129b28570..aa4b7a9c3 100644 --- a/m4/exosip.m4 +++ b/m4/exosip.m4 @@ -5,13 +5,7 @@ AC_REQUIRE([LP_CHECK_OSIP2]) case $host_alias in - i386-apple*) - OSIP_LIBS="$OSIP_LIBS -framework CoreFoundation -framework CFNetwork -lresolv" - ;; - armv6-apple*) - OSIP_LIBS="$OSIP_LIBS -framework CoreFoundation -framework CFNetwork -lresolv" - ;; - armv7-apple*) + i386-apple*|armv6-apple*|armv7-apple*|armv7s-apple*) OSIP_LIBS="$OSIP_LIBS -framework CoreFoundation -framework CFNetwork -lresolv" ;; x86_64-apple*) diff --git a/mediastreamer2 b/mediastreamer2 index bc1d91a89..02dc872f0 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit bc1d91a891a04858b43d6e08fa1136d2c3b9c6a2 +Subproject commit 02dc872f0f85986b7691b4ac911da7825f185a3e From 10849040c30e20062e9a7553c04d43cd0731632a Mon Sep 17 00:00:00 2001 From: Diorcet Yann Date: Tue, 18 Sep 2012 20:36:53 +0200 Subject: [PATCH 10/15] Update ms2 --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 02dc872f0..f225ee612 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 02dc872f0f85986b7691b4ac911da7825f185a3e +Subproject commit f225ee612009009075ab6caf7ef91bb3a21fa25f From 3cd49ea4bdeb67924a43e6142deb5578ecb9d8a5 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 19 Sep 2012 10:31:14 +0200 Subject: [PATCH 11/15] Deactivate ICE if the remote does not support it. --- coreapi/misc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/coreapi/misc.c b/coreapi/misc.c index d05a275ba..b4a8479c5 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -879,6 +879,10 @@ void linphone_core_update_ice_from_remote_media_description(LinphoneCall *call, ice_session_remove_check_list(call->ice_session, ice_session_check_list(call->ice_session, i - 1)); } ice_session_check_mismatch(call->ice_session); + } else { + /* Response from remote does not contain mandatory ICE attributes, delete the session. */ + linphone_call_delete_ice_session(call); + return; } if (ice_session_nb_check_lists(call->ice_session) == 0) { linphone_call_delete_ice_session(call); From 0b475524e734ae0b17326ee4398f96d7dd7da119 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 19 Sep 2012 17:14:49 +0200 Subject: [PATCH 12/15] add call statistics window to gtk --- coreapi/linphonecall.c | 17 +- coreapi/linphonecore.h | 2 + gtk/Makefile.am | 3 +- gtk/call_statistics.ui | 212 ++++ gtk/incall_view.c | 102 ++ gtk/main.ui | 2593 ++++++++++++++++++++++------------------ 6 files changed, 1756 insertions(+), 1173 deletions(-) create mode 100644 gtk/call_statistics.ui diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 9243be084..a714ad7f7 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -1732,12 +1732,17 @@ const LinphoneCallStats *linphone_call_get_video_stats(const LinphoneCall *call) * @} **/ -static void display_bandwidth(RtpSession *as, RtpSession *vs){ +static void report_bandwidth(LinphoneCall *call, RtpSession *as, RtpSession *vs){ + call->stats[LINPHONE_CALL_STATS_AUDIO].download_bandwidth=(as!=NULL) ? (rtp_session_compute_recv_bandwidth(as)*1e-3) : 0; + call->stats[LINPHONE_CALL_STATS_AUDIO].upload_bandwidth=(as!=NULL) ? (rtp_session_compute_send_bandwidth(as)*1e-3) : 0; + call->stats[LINPHONE_CALL_STATS_VIDEO].download_bandwidth=(vs!=NULL) ? (rtp_session_compute_recv_bandwidth(vs)*1e-3) : 0; + call->stats[LINPHONE_CALL_STATS_VIDEO].upload_bandwidth=(vs!=NULL) ? (rtp_session_compute_send_bandwidth(vs)*1e-3) : 0; ms_message("bandwidth usage: audio=[d=%.1f,u=%.1f] video=[d=%.1f,u=%.1f] kbit/sec", - (as!=NULL) ? (rtp_session_compute_recv_bandwidth(as)*1e-3) : 0, - (as!=NULL) ? (rtp_session_compute_send_bandwidth(as)*1e-3) : 0, - (vs!=NULL) ? (rtp_session_compute_recv_bandwidth(vs)*1e-3) : 0, - (vs!=NULL) ? (rtp_session_compute_send_bandwidth(vs)*1e-3) : 0); + call->stats[LINPHONE_CALL_STATS_AUDIO].download_bandwidth, + call->stats[LINPHONE_CALL_STATS_AUDIO].upload_bandwidth , + call->stats[LINPHONE_CALL_STATS_VIDEO].download_bandwidth, + call->stats[LINPHONE_CALL_STATS_VIDEO].upload_bandwidth + ); } static void linphone_core_disconnected(LinphoneCore *lc, LinphoneCall *call){ @@ -1848,7 +1853,7 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse video_load=ms_ticker_get_average_load(call->videostream->ticker); vs=call->videostream->session; } - display_bandwidth(as,vs); + report_bandwidth(call,as,vs); ms_message("Thread processing load: audio=%f\tvideo=%f",audio_load,video_load); } #ifdef VIDEO_ENABLED diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index acf81f1df..9a5792a75 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -304,6 +304,8 @@ struct _LinphoneCallStats { mblk_t* sent_rtcp;/** + + + + + False + 5 + Call statistics + dialog + + + + True + False + 2 + + + True + False + end + + + + + + gtk-close + True + True + True + False + True + + + False + False + 1 + + + + + False + True + end + 0 + + + + + True + False + 0 + none + + + True + False + 12 + + + True + False + 6 + 2 + True + + + True + False + Audio codec + + + + + + + + True + False + Video codec + + + 1 + 2 + + + + + + True + False + Audio IP bandwidth usage + + + 2 + 3 + + + + + + True + False + + + 1 + 2 + + + + + True + False + + + 1 + 2 + 1 + 2 + + + + + True + False + + + 1 + 2 + 2 + 3 + + + + + True + False + Media connectivity + + + 4 + 5 + + + + + + + + + + + + True + False + + + 1 + 2 + 4 + 5 + + + + + True + False + Video IP bandwidth usage + + + 3 + 4 + + + + + + True + False + + + 1 + 2 + 3 + 4 + + + + + + + + + True + False + <b>Call statistics and information</b> + True + + + + + False + False + 1 + + + + + + button1 + + + diff --git a/gtk/incall_view.c b/gtk/incall_view.c index 7e8eb683f..90c080be1 100644 --- a/gtk/incall_view.c +++ b/gtk/incall_view.c @@ -193,6 +193,100 @@ void linphone_gtk_enable_conference_button(LinphoneCore *lc, gboolean value){ } } +static void show_used_codecs(GtkWidget *callstats, LinphoneCall *call){ + const LinphoneCallParams *params=linphone_call_get_current_params(call); + if (params){ + const PayloadType *acodec=linphone_call_params_get_used_audio_codec(params); + const PayloadType *vcodec=linphone_call_params_get_used_video_codec(params); + GtkWidget *acodec_ui=linphone_gtk_get_widget(callstats,"audio_codec"); + GtkWidget *vcodec_ui=linphone_gtk_get_widget(callstats,"video_codec"); + if (acodec){ + + char tmp[64]={0}; + snprintf(tmp,sizeof(tmp)-1,"%s/%i/%i",acodec->mime_type,acodec->clock_rate,acodec->channels); + gtk_label_set_label(GTK_LABEL(acodec_ui),tmp); + }else gtk_label_set_label(GTK_LABEL(acodec_ui),_("Not used")); + if (vcodec){ + gtk_label_set_label(GTK_LABEL(vcodec_ui),vcodec->mime_type); + }else gtk_label_set_label(GTK_LABEL(vcodec_ui),_("Not used")); + } +} + +static const char *ice_state_to_string(LinphoneIceState ice_state){ + switch(ice_state){ + case LinphoneIceStateNotActivated: + return _("Ice not activated"); + case LinphoneIceStateInProgress: + return _("ICE in progress"); + case LinphoneIceStateReflexiveConnection: + return _("Going through one or more NATs"); + case LinphoneIceStateHostConnection: + return _("Direct"); + case LinphoneIceStateRelayConnection: + return _("Through a relay server"); + } + return "invalid"; +} + +static void _refresh_call_stats(GtkWidget *callstats, LinphoneCall *call){ + const LinphoneCallStats *as=linphone_call_get_audio_stats(call); + const LinphoneCallStats *vs=linphone_call_get_video_stats(call); + LinphoneIceState ice_state=as->ice_state; + gchar *tmp=g_strdup_printf(_("download: %f\nupload: %f (kbit/s)"), + as->download_bandwidth,as->upload_bandwidth); + gtk_label_set_markup(GTK_LABEL(linphone_gtk_get_widget(callstats,"audio_bandwidth_usage")),tmp); + g_free(tmp); + tmp=g_strdup_printf(_("download: %f\nupload: %f (kbit/s)"), + vs->download_bandwidth,vs->upload_bandwidth); + gtk_label_set_markup(GTK_LABEL(linphone_gtk_get_widget(callstats,"video_bandwidth_usage")),tmp); + g_free(tmp); + gtk_label_set_text(GTK_LABEL(linphone_gtk_get_widget(callstats,"media_connectivity")),ice_state_to_string(ice_state)); +} + +static gboolean refresh_call_stats(GtkWidget *callstats){ + LinphoneCall *call=(LinphoneCall*)g_object_get_data(G_OBJECT(callstats),"call"); + switch (linphone_call_get_state(call)){ + case LinphoneCallError: + case LinphoneCallEnd: + case LinphoneCallReleased: + gtk_widget_destroy(callstats); + return FALSE; + break; + case LinphoneCallStreamsRunning: + _refresh_call_stats(callstats,call); + break; + default: + break; + } + return TRUE; +} + +static void on_call_stats_destroyed(GtkWidget *call_view){ + GtkWidget *call_stats=(GtkWidget*)g_object_get_data(G_OBJECT(call_view),"call_stats"); + LinphoneCall *call=(LinphoneCall*)g_object_get_data(G_OBJECT(call_stats),"call"); + g_source_remove(GPOINTER_TO_INT(g_object_get_data(G_OBJECT(call_stats),"tid"))); + g_object_set_data(G_OBJECT(call_view),"call_stats",NULL); + linphone_call_unref(call); +} + +static void linphone_gtk_show_call_stats(LinphoneCall *call){ + GtkWidget *w=(GtkWidget*)linphone_call_get_user_pointer(call); + GtkWidget *call_stats=(GtkWidget*)g_object_get_data(G_OBJECT(w),"call_stats"); + if (call_stats==NULL){ + guint tid; + call_stats=linphone_gtk_create_window("call_statistics"); + g_object_set_data(G_OBJECT(w),"call_stats",call_stats); + g_object_set_data(G_OBJECT(call_stats),"call",linphone_call_ref(call)); + tid=g_timeout_add(1000,(GSourceFunc)refresh_call_stats,call_stats); + g_object_set_data(G_OBJECT(call_stats),"tid",GINT_TO_POINTER(tid)); + g_signal_connect_swapped(G_OBJECT(call_stats),"destroy",(GCallback)on_call_stats_destroyed,(gpointer)w); + show_used_codecs(call_stats,call); + refresh_call_stats(call_stats); + gtk_widget_show(call_stats); + } + +} + void linphone_gtk_create_in_call_view(LinphoneCall *call){ GtkWidget *call_view=linphone_gtk_create_widget("main","in_call_frame"); GtkWidget *main_window=linphone_gtk_get_main_window (); @@ -217,6 +311,7 @@ void linphone_gtk_create_in_call_view(LinphoneCall *call){ linphone_gtk_enable_hold_button (call,FALSE,TRUE); linphone_gtk_enable_mute_button( GTK_BUTTON(linphone_gtk_get_widget(call_view,"incall_mute")),FALSE); + g_signal_connect_swapped(G_OBJECT(linphone_gtk_get_widget(call_view,"quality_indicator")),"button-press-event",(GCallback)linphone_gtk_show_call_stats,call); } static void video_button_clicked(GtkWidget *button, LinphoneCall *call){ @@ -506,6 +601,7 @@ void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call){ GtkWidget *duration=linphone_gtk_get_widget(callview,"in_call_duration"); guint taskid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(callview),"taskid")); gboolean in_conf=linphone_call_params_local_conference_mode(linphone_call_get_current_params(call)); + GtkWidget *call_stats=(GtkWidget*)g_object_get_data(G_OBJECT(callview),"call_stats"); display_peer_name_in_label(callee,linphone_call_get_remote_address (call)); @@ -524,6 +620,7 @@ void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call){ linphone_gtk_in_call_view_enable_audio_view(call, !in_conf); linphone_gtk_in_call_view_show_encryption(call); if (in_conf) linphone_gtk_set_in_conference(call); + if (call_stats) show_used_codecs(call_stats,call); } void linphone_gtk_in_call_view_set_paused(LinphoneCall *call){ @@ -676,3 +773,8 @@ void linphone_gtk_enable_hold_button(LinphoneCall *call, gboolean sensitive, gbo gtk_widget_set_visible(GTK_WIDGET(button),sensitive); linphone_gtk_draw_hold_button(GTK_BUTTON(button),!holdon); } + +void linphone_gtk_call_statistics_closed(GtkWidget *call_stats){ + gtk_widget_destroy(call_stats); +} + diff --git a/gtk/main.ui b/gtk/main.ui index 9a458dbc0..a57b79966 100644 --- a/gtk/main.ui +++ b/gtk/main.ui @@ -1,27 +1,49 @@ - + + False True + False 0 none True + False 12 True + False True + False + + + True + False + <b>Callee name</b> + True + right + end + + + True + True + end + 0 + + True True + False False @@ -29,21 +51,10 @@ 1 - - - True - <b>Callee name</b> - True - right - end - - - end - 0 - - + True + True 0 @@ -52,6 +63,7 @@ 170 30 True + False False @@ -71,21 +83,26 @@ + False + False 0.5 none True + False 12 12 True + False True + False @@ -99,18 +116,23 @@ True + False label center + True + True 1 + False True + False gtk-dialog-authentication 1 @@ -123,6 +145,7 @@ True + False gtk-apply @@ -134,9 +157,12 @@ True + False label + True + True 2 @@ -146,7 +172,8 @@ True True True - + False + False @@ -163,14 +190,17 @@ + False True True + False half - + + True False 0 @@ -178,6 +208,7 @@ True + False False @@ -188,10 +219,12 @@ True + False gtk-missing-image 1 + True False 2 @@ -199,6 +232,7 @@ True + False False @@ -216,6 +250,7 @@ + False spread @@ -223,7 +258,8 @@ True True True - + False + False @@ -237,7 +273,8 @@ True True True - + False + False @@ -255,6 +292,7 @@ True + False True spread @@ -262,7 +300,8 @@ Pause True True - + False + False @@ -276,6 +315,7 @@ True True True + False False @@ -297,34 +337,45 @@ True + False True True + False In call True center + True + True 0 True + False Duration center + True + True 1 True + False + GDK_BUTTON_PRESS_MASK | GDK_STRUCTURE_MASK Call quality rating + True + True 2 @@ -335,52 +386,1409 @@ True + False gtk-info True + False gtk-add True + False gtk-clear True + False gtk-connect True + False gtk-refresh True + False gtk-properties True + False gtk-home True + False gtk-execute True + False gtk-add True + False gtk-add True + False gtk-add True + False gtk-add + + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + False + + + True + False + False + _Options + True + + + + True + False + + + gtk-preferences + True + False + False + True + True + + + + + + gtk-disconnect + False + False + True + True + + + + + + True + False + + + + + True + False + False + Always start video + True + + + + + + True + False + False + Enable self-view + True + True + + + + + + True + False + + + + + gtk-quit + False + False + True + True + + + + + + + + + + True + False + False + _Help + True + + + True + False + + + gtk-about + True + False + False + True + True + + + + + + Show debug window + True + False + False + image1 + False + + + + + + _Homepage + True + False + False + True + image4 + False + + + + + + Check _Updates + False + False + True + image5 + False + + + + + + Account assistant + False + False + image12 + False + + + + + + + + + + False + True + 0 + + + + + True + False + + + True + False + + + True + False + + + True + True + True + False + + + + False + False + 0 + + + + + True + True + Initiate a new call + False + + + + False + False + 1 + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + none + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + 5 + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + True + True + Enter username, phone number, or full sip address + + False + False + True + True + + + + True + True + 0 + + + + + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + SIP address or phone number: + True + + + + + True + True + 2 + + + + + True + True + True + False + + + + False + False + 3 + + + + + False + True + 8 + 0 + + + + + True + True + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + False + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Lookup: + + + True + True + 12 + 0 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + True + False + False + True + True + + + + True + True + 4 + 1 + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + in + + + True + True + 8 + 2 + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + model1 + 0 + + + + + 0 + + + + + True + True + 4 + 3 + + + + + False + True + 0 + + + + + True + True + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + 0 + + + + + + + + + True + True + 1 + + + + + False + 0 + none + + + False + + + True + True + + True + False + False + True + True + + + + + + + True + True + 0 + + + + + True + True + True + False + none + + + + True + False + + + True + False + gtk-find + + + True + True + 0 + + + + + True + False + Search + + + True + True + 1 + + + + + + + False + True + 1 + + + + + + + True + False + <b>Add contacts from directory</b> + True + + + + + False + False + 5 + 2 + + + + + True + False + + + Add contact + True + True + False + image10 + + + + False + False + 0 + + + + + False + False + 3 + + + + + True + True + 0 + + + + + + + True + False + + + True + False + gtk-directory + 1 + + + True + True + 0 + + + + + True + False + Contacts + + + True + True + 1 + + + + + False + + + + + True + False + + + True + False + 2 + + + True + False + end + + + gtk-clear + True + True + True + False + True + + + + False + False + 0 + + + + + + + + + + + False + True + end + 0 + + + + + True + True + never + + + True + True + False + + + + + + + True + True + 1 + + + + + True + True + 0 + + + + + 1 + + + + + True + False + + + True + False + gtk-refresh + 1 + + + True + True + 0 + + + + + True + False + 0.49000000953674316 + Recent calls + + + True + True + 1 + + + + + 1 + False + + + + + True + False + 0.5 + none + + + True + False + 0 + 0 + + + True + False + 0 + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 4 + 4 + 4 + True + + + D + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 3 + 4 + 3 + 4 + + + + + # + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 2 + 3 + 3 + 4 + + + + + 0 + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 1 + 2 + 3 + 4 + + + + + * + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 3 + 4 + + + + + C + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 3 + 4 + 2 + 3 + + + + + 9 + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 2 + 3 + 2 + 3 + + + + + 8 + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 1 + 2 + 2 + 3 + + + + + 7 + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 2 + 3 + + + + + B + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 3 + 4 + 1 + 2 + + + + + 6 + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 2 + 3 + 1 + 2 + + + + + 5 + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 1 + 2 + 1 + 2 + + + + + 4 + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 1 + 2 + + + + + A + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 3 + 4 + + + + + 3 + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 2 + 3 + + + + + 2 + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + 1 + 2 + + + + + 1 + 40 + 40 + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + + + + + + + + + + + + 2 + + + + + True + False + + + True + False + gtk-missing-image + 1 + + + True + True + 0 + + + + + True + False + Keypad + + + True + True + 1 + + + + + 2 + False + + + + + True + True + 1 + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + none + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + model3 + 0 + + + + + 0 + + + + + + + True + False + 5 + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + My current identity: + True + + + True + True + 0 + + + + + True + True + False + none + + + + True + False + gtk-refresh + + + + + True + True + 1 + + + + + + + False + False + 2 + + + + + True + True + 0 + + + + + False + 0 + etched-out + + + True + False + 12 + + + True + False + + + True + False + gtk-missing-image + + + True + True + 0 + + + + + True + False + 0 + none + + + True + False + 12 + 12 + + + True + False + 4 + 2 + + + True + False + Username + + + + + True + False + Password + + + 1 + 2 + + + + + True + False + Internet connection: + + + 2 + 3 + + + + + True + True + + False + False + True + True + + + 1 + 2 + + + + + True + True + False + + False + False + True + True + + + 1 + 2 + 1 + 2 + + + + + True + False + model4 + 0 + + + + + 0 + + + + + 1 + 2 + 2 + 3 + + + + + Automatically log me in + True + True + False + False + True + + + 1 + 2 + 3 + 4 + + + + + + + + + + + + True + False + Login information + True + + + + + True + True + 10 + 1 + + + + + True + False + + + gtk-connect + True + True + True + False + True + + + + False + False + 0 + + + + + True + True + 2 + + + + + + + + + True + False + <b>Welcome !</b> + True + + + + + True + True + 1 + + + + + True + True + 1 + + + + + True + False + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 2 + + + True + True + 0 + + + + + True + True + True + False + none + + + + False + True + 5 + 1 + + + + + False + False + 2 + + + + + @@ -434,1151 +1842,4 @@ - - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - - - True - _Options - True - - - - True - - - gtk-preferences - True - True - True - - - - - - gtk-disconnect - True - True - - - - - - True - - - - - True - Always start video - True - - - - - - True - Enable self-view - True - True - - - - - - True - - - - - gtk-quit - True - True - - - - - - - - - - True - _Help - True - - - True - - - gtk-about - True - True - True - - - - - - Show debug window - True - image1 - False - - - - - - _Homepage - True - True - image4 - False - - - - - - Check _Updates - True - image5 - False - - - - - - Account assistant - image12 - False - - - - - - - - - - False - 0 - - - - - True - - - True - - - True - - - True - True - True - - - - False - False - 0 - - - - - True - True - Initiate a new call - - - - False - False - 1 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - none - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - 5 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - True - True - Enter username, phone number, or full sip address - - - - - 0 - - - - - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - SIP address or phone number: - True - - - - - 2 - - - - - True - True - True - - - - False - False - 3 - - - - - False - 8 - 0 - - - - - True - True - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Lookup: - - - 12 - 0 - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - True - - - - 4 - 1 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - in - - - 8 - 2 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - model1 - 0 - - - - - 0 - - - - - 4 - 3 - - - - - False - 0 - - - - - True - True - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - 0 - - - - - - - - - 1 - - - - - 0 - none - - - - - True - True - - True - - - - - - - 0 - - - - - True - True - True - none - - - - True - - - True - gtk-find - - - 0 - - - - - True - Search - - - 1 - - - - - - - False - 1 - - - - - - - True - <b>Add contacts from directory</b> - True - - - - - False - False - 5 - 2 - - - - - True - - - Add contact - True - True - image10 - - - - False - False - 0 - - - - - False - False - 3 - - - - - 0 - - - - - - - True - - - True - gtk-directory - 1 - - - 0 - - - - - True - Contacts - - - 1 - - - - - False - - - - - True - - - True - 2 - - - True - True - never - - - True - True - False - - - - - - - 1 - - - - - True - end - - - gtk-clear - True - True - True - True - - - - False - False - 0 - - - - - - - - - - - False - end - 0 - - - - - 0 - - - - - 1 - - - - - True - - - True - gtk-refresh - 1 - - - 0 - - - - - True - 0.49000000953674316 - Recent calls - - - 1 - - - - - 1 - False - - - - - True - 0.5 - none - - - True - 0 - 0 - - - True - 0 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 4 - 4 - 4 - True - - - D - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - 3 - 4 - 3 - 4 - - - - - # - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - 2 - 3 - 3 - 4 - - - - - 0 - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - 1 - 2 - 3 - 4 - - - - - * - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - 3 - 4 - - - - - C - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - 3 - 4 - 2 - 3 - - - - - 9 - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - 2 - 3 - 2 - 3 - - - - - 8 - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - 1 - 2 - 2 - 3 - - - - - 7 - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - 2 - 3 - - - - - B - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - 3 - 4 - 1 - 2 - - - - - 6 - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - 2 - 3 - 1 - 2 - - - - - 5 - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - 1 - 2 - 1 - 2 - - - - - 4 - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - 1 - 2 - - - - - A - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - 3 - 4 - - - - - 3 - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - 2 - 3 - - - - - 2 - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - 1 - 2 - - - - - 1 - 40 - 40 - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - - - - - - - - - - - - 2 - - - - - True - - - True - gtk-missing-image - 1 - - - 0 - - - - - True - Keypad - - - 1 - - - - - 2 - False - - - - - 1 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - none - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - model3 - 0 - - - - - 0 - - - - - - - True - 5 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - My current identity: - True - - - 0 - - - - - True - True - none - - - - True - gtk-refresh - - - - - 1 - - - - - - - False - False - 2 - - - - - 0 - - - - - 0 - etched-out - - - True - 12 - - - True - - - True - gtk-missing-image - - - 0 - - - - - True - 0 - none - - - True - 12 - 12 - - - True - 4 - 2 - - - True - Username - - - - - True - Password - - - 1 - 2 - - - - - True - Internet connection: - - - 2 - 3 - - - - - True - True - - - - 1 - 2 - - - - - True - True - False - - - - 1 - 2 - 1 - 2 - - - - - True - model4 - 0 - - - - - 0 - - - - - 1 - 2 - 2 - 3 - - - - - Automatically log me in - True - True - False - True - - - 1 - 2 - 3 - 4 - - - - - - - - - - - - True - Login information - True - - - - - 10 - 1 - - - - - True - - - gtk-connect - True - True - True - True - - - - False - False - 0 - - - - - 2 - - - - - - - - - True - <b>Welcome !</b> - True - - - - - 1 - - - - - 1 - - - - - True - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 2 - - - 0 - - - - - True - True - True - none - - - - False - 5 - 1 - - - - - False - False - 2 - - - - - From cd0becf3297f9042e844acf3a32bbce6813149f3 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 19 Sep 2012 17:43:22 +0200 Subject: [PATCH 13/15] add call statistics to translated ui files --- po/POTFILES.in | 1 + 1 file changed, 1 insertion(+) diff --git a/po/POTFILES.in b/po/POTFILES.in index ac50ac8aa..fdc209b3c 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -25,6 +25,7 @@ gtk/loginframe.c [type: gettext/glade]gtk/buddylookup.ui [type: gettext/glade]gtk/waiting.ui [type: gettext/glade]gtk/dscp_settings.ui +[type: gettext/glade]gtk/call_statistics.ui [type: gettext/glade]gtk/tunnel_config.ui coreapi/linphonecore.c coreapi/misc.c From c6d9b71cb585f13078ecea36f387c3621da4f914 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 19 Sep 2012 17:58:05 +0200 Subject: [PATCH 14/15] Add ICE failed state. --- coreapi/linphonecall.c | 3 +-- coreapi/linphonecore.h | 1 + coreapi/misc.c | 43 +++++++++++++++++++++++++----------------- 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index a714ad7f7..7166d1c13 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -1774,7 +1774,6 @@ static void handle_ice_events(LinphoneCall *call, OrtpEvent *ev){ if (ice_session_role(call->ice_session) == IR_Controlling) { ice_session_select_candidates(call->ice_session); linphone_core_update_call(call->core, call, &call->current_params); - linphone_core_update_ice_state_in_call_stats(call); } break; case IS_Failed: @@ -1783,13 +1782,13 @@ static void handle_ice_events(LinphoneCall *call, OrtpEvent *ev){ /* At least one ICE session has succeeded, so perform a call update. */ ice_session_select_candidates(call->ice_session); linphone_core_update_call(call->core, call, &call->current_params); - linphone_core_update_ice_state_in_call_stats(call); } } break; default: break; } + linphone_core_update_ice_state_in_call_stats(call); } else if (evt == ORTP_EVENT_ICE_GATHERING_FINISHED) { int ping_time = -1; if (evd->info.ice_processing_successful==TRUE) { diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 9a5792a75..583d66356 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -267,6 +267,7 @@ typedef struct _LinphoneCall LinphoneCall; **/ enum _LinphoneIceState{ LinphoneIceStateNotActivated, /**< ICE has not been activated for this call */ + LinphoneIceStateFailed, /**< ICE processing has failed */ LinphoneIceStateInProgress, /**< ICE process is in progress */ LinphoneIceStateHostConnection, /**< ICE has established a direct connection to the remote host */ LinphoneIceStateReflexiveConnection, /**< ICE has established a connection to the remote host through one or several NATs */ diff --git a/coreapi/misc.c b/coreapi/misc.c index b4a8479c5..6da750a0d 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -641,37 +641,46 @@ void linphone_core_update_ice_state_in_call_stats(LinphoneCall *call) { IceCheckList *audio_check_list; IceCheckList *video_check_list; + IceSessionState session_state; if (call->ice_session == NULL) return; audio_check_list = ice_session_check_list(call->ice_session, 0); video_check_list = ice_session_check_list(call->ice_session, 1); if (audio_check_list == NULL) return; - switch (ice_check_list_selected_valid_candidate_type(audio_check_list)) { - case ICT_HostCandidate: - call->stats[LINPHONE_CALL_STATS_AUDIO].ice_state = LinphoneIceStateHostConnection; - break; - case ICT_ServerReflexiveCandidate: - case ICT_PeerReflexiveCandidate: - call->stats[LINPHONE_CALL_STATS_AUDIO].ice_state = LinphoneIceStateReflexiveConnection; - break; - case ICT_RelayedCandidate: - call->stats[LINPHONE_CALL_STATS_AUDIO].ice_state = LinphoneIceStateRelayConnection; - break; - } - if (call->params.has_video && (video_check_list != NULL)) { - switch (ice_check_list_selected_valid_candidate_type(video_check_list)) { + session_state = ice_session_state(call->ice_session); + if ((session_state == IS_Completed) || ((session_state == IS_Failed) && (ice_session_has_completed_check_list(call->ice_session) == TRUE))) { + switch (ice_check_list_selected_valid_candidate_type(audio_check_list)) { case ICT_HostCandidate: - call->stats[LINPHONE_CALL_STATS_VIDEO].ice_state = LinphoneIceStateHostConnection; + call->stats[LINPHONE_CALL_STATS_AUDIO].ice_state = LinphoneIceStateHostConnection; break; case ICT_ServerReflexiveCandidate: case ICT_PeerReflexiveCandidate: - call->stats[LINPHONE_CALL_STATS_VIDEO].ice_state = LinphoneIceStateReflexiveConnection; + call->stats[LINPHONE_CALL_STATS_AUDIO].ice_state = LinphoneIceStateReflexiveConnection; break; case ICT_RelayedCandidate: - call->stats[LINPHONE_CALL_STATS_VIDEO].ice_state = LinphoneIceStateRelayConnection; + call->stats[LINPHONE_CALL_STATS_AUDIO].ice_state = LinphoneIceStateRelayConnection; break; } + if (call->params.has_video && (video_check_list != NULL)) { + switch (ice_check_list_selected_valid_candidate_type(video_check_list)) { + case ICT_HostCandidate: + call->stats[LINPHONE_CALL_STATS_VIDEO].ice_state = LinphoneIceStateHostConnection; + break; + case ICT_ServerReflexiveCandidate: + case ICT_PeerReflexiveCandidate: + call->stats[LINPHONE_CALL_STATS_VIDEO].ice_state = LinphoneIceStateReflexiveConnection; + break; + case ICT_RelayedCandidate: + call->stats[LINPHONE_CALL_STATS_VIDEO].ice_state = LinphoneIceStateRelayConnection; + break; + } + } + } else { + call->stats[LINPHONE_CALL_STATS_AUDIO].ice_state = LinphoneIceStateFailed; + if (call->params.has_video && (video_check_list != NULL)) { + call->stats[LINPHONE_CALL_STATS_VIDEO].ice_state = LinphoneIceStateFailed; + } } } From 92600fc6bbd33cce321516342941da04d170bb4f Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Wed, 19 Sep 2012 17:58:33 +0200 Subject: [PATCH 15/15] Add check to prevent crash. --- coreapi/misc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/coreapi/misc.c b/coreapi/misc.c index 6da750a0d..8cdf2bb27 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -694,8 +694,12 @@ void linphone_core_update_local_media_description_from_ice(SalMediaDescription * if (session_state == IS_Completed) { desc->ice_completed = TRUE; - ice_check_list_selected_valid_local_candidate(ice_session_check_list(session, 0), &rtp_addr, NULL, NULL, NULL); - strncpy(desc->addr, rtp_addr, sizeof(desc->addr)); + result = ice_check_list_selected_valid_local_candidate(ice_session_check_list(session, 0), &rtp_addr, NULL, NULL, NULL); + if (result == TRUE) { + strncpy(desc->addr, rtp_addr, sizeof(desc->addr)); + } else { + ms_warning("If ICE has completed successfully, rtp_addr should be set!"); + } } else { desc->ice_completed = FALSE;