From 1c7b679c6088f765c8577b6afd065fae9ebe4a68 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 17 Feb 2011 22:57:23 +0100 Subject: [PATCH 1/7] enhance README.mingw --- README.mingw | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.mingw b/README.mingw index 557a8e642..5fa56c844 100644 --- a/README.mingw +++ b/README.mingw @@ -49,6 +49,8 @@ rm /lib/libgcc.a /lib/libmingw32.a /lib/libmingwex.a #Remove libintl from gtk, we don't need it and it conflicts with the one supplied by mingw. rm /lib/libintl.dll.a +rm /lib/libintl.la +rm /lib/libintl.a rm /include/intl.h * Download and install Inno Setup Compiler (required only if you run 'make setup.exe'). Add it to your windows Path environment variable. @@ -56,7 +58,8 @@ rm /include/intl.h Get Linphone source code ************************ -Install msys-git from (http://code.google.com/p/msysgit/) +Install msys-git from (http://code.google.com/p/msysgit/). During installation you are asked to make a choice about how line endings are treated by git. +Choose "Checkout line endings as they are, commit as they are". THIS CHOICE IS VERY IMPORTANT. OTHERS BREAK AUTOMAKE. It is recommended that you create a directory somewhere with a path without any spaces or ~ characters, for example c:\sources\ From c0785a9ca6b3b1011962c97d8ccfb4418c2bff4d Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Wed, 23 Feb 2011 16:10:22 +0100 Subject: [PATCH 2/7] Moved Android video capture class. --- coreapi/linphonecore.c | 9 ++++++++- coreapi/linphonecore.h | 2 +- coreapi/linphonecore_jni.cc | 5 +++-- java/common/org/linphone/core/LinphoneCore.java | 3 ++- java/common/org/linphone/core/LinphoneCoreFactory.java | 4 ++-- mediastreamer2 | 2 +- oRTP | 2 +- 7 files changed, 18 insertions(+), 9 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index ef145c2fd..6af2fbfc9 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -3532,12 +3532,19 @@ static MSFilter *get_dtmf_gen(LinphoneCore *lc){ /** * Plays a dtmf to the local user. **/ -void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms){ +void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms, bool_t speaker){ MSFilter *f=get_dtmf_gen(lc); if (f==NULL){ ms_error("No dtmf generator at this time !"); return; } + + if (!speaker && !linphone_core_in_call(lc)) { + // If not in call and user doesn't want sound to go out from speaker + // TODO: update dtmf generator to only output on output stream if speaker is false. + return; + } + if (duration_ms>0) ms_filter_call_method(f, MS_DTMF_GEN_PLAY, &dtmf); else ms_filter_call_method(f, MS_DTMF_GEN_START, &dtmf); diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 0b9823f3c..a2f86f429 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -897,7 +897,7 @@ void linphone_core_use_files(LinphoneCore *lc, bool_t yesno); void linphone_core_set_play_file(LinphoneCore *lc, const char *file); void linphone_core_set_record_file(LinphoneCore *lc, const char *file); -void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms); +void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms, bool_t speaker); void linphone_core_stop_dtmf(LinphoneCore *lc); int linphone_core_get_current_call_duration(const LinphoneCore *lc); diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index fbd8f01ea..7eca2c823 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -480,8 +480,9 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_playDtmf( JNIEnv* env ,jobject thiz ,jlong lc ,jchar dtmf - ,jint duration) { - linphone_core_play_dtmf((LinphoneCore*)lc,dtmf,duration); + ,jint duration + ,jboolean speaker) { + linphone_core_play_dtmf((LinphoneCore*)lc,dtmf,duration,speaker); } extern "C" void Java_org_linphone_core_LinphoneCoreImpl_stopDtmf( JNIEnv* env ,jobject thiz diff --git a/java/common/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java index 3e33bdce6..2d5daff6d 100644 --- a/java/common/org/linphone/core/LinphoneCore.java +++ b/java/common/org/linphone/core/LinphoneCore.java @@ -350,8 +350,9 @@ public interface LinphoneCore { * Initiate a dtmf signal to the speqker if not in call * @param number * @param duration in ms , -1 for unlimited + * @param speaker play dtmf on speaker */ - public void playDtmf(char number,int duration); + public void playDtmf(char number,int duration, boolean speaker); /** * stop current dtmf */ diff --git a/java/common/org/linphone/core/LinphoneCoreFactory.java b/java/common/org/linphone/core/LinphoneCoreFactory.java index a4137ec91..5cbd5ac5e 100644 --- a/java/common/org/linphone/core/LinphoneCoreFactory.java +++ b/java/common/org/linphone/core/LinphoneCoreFactory.java @@ -36,14 +36,14 @@ abstract public class LinphoneCoreFactory { factoryName = className; } - public static LinphoneCoreFactory instance() { + public static final synchronized LinphoneCoreFactory instance() { try { if (theLinphoneCoreFactory == null) { Class lFactoryClass = Class.forName(factoryName); theLinphoneCoreFactory = (LinphoneCoreFactory) lFactoryClass.newInstance(); } } catch (Exception e) { - System.err.println("cannot instanciate factory ["+factoryName+"]"); + System.err.println("Cannot instanciate factory ["+factoryName+"]"); } return theLinphoneCoreFactory; } diff --git a/mediastreamer2 b/mediastreamer2 index dce5ac7d4..9412db625 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit dce5ac7d4dc8e298cdedd5dcef55c60d7485206e +Subproject commit 9412db625a9f00e6de4c612dbc69ab1f98822d63 diff --git a/oRTP b/oRTP index c8b487f32..4e61d05db 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit c8b487f32fe225f8b1961754db9140eb282a0d28 +Subproject commit 4e61d05db02318f44768458a69f29faec75c94c8 From a779c59e8b48b718fca3e4194b8485c1a7ad1258 Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Wed, 2 Mar 2011 13:09:02 +0100 Subject: [PATCH 3/7] Call duration accessor Revert speaker on dtmf Remove useless public on interfaces. --- coreapi/linphonecall.c | 2 +- coreapi/linphonecore.c | 7 +++-- coreapi/linphonecore.h | 2 +- coreapi/linphonecore_jni.cc | 8 +++--- .../org/linphone/core/LinphoneCall.java | 27 +++++++++++-------- .../org/linphone/core/LinphoneCore.java | 6 ++--- 6 files changed, 29 insertions(+), 23 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index d3935700d..899cb66cb 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -623,7 +623,7 @@ static void video_stream_event_cb(void *user_pointer, const MSFilter *f, const u ms_warning("In linphonecall.c: video_stream_event_cb"); switch (event_id) { case MS_VIDEO_DECODER_DECODING_ERRORS: - ms_warning("CAse is MS_VIDEO_DECODER_DECODING_ERRORS"); + ms_warning("Case is MS_VIDEO_DECODER_DECODING_ERRORS"); linphone_call_send_vfu_request((LinphoneCall*) user_pointer); break; default: diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 167630e1a..6815a833d 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -3584,16 +3584,15 @@ static MSFilter *get_dtmf_gen(LinphoneCore *lc){ /** * Plays a dtmf to the local user. **/ -void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms, bool_t speaker){ +void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms){ MSFilter *f=get_dtmf_gen(lc); if (f==NULL){ ms_error("No dtmf generator at this time !"); return; } - if (!speaker && !linphone_core_in_call(lc)) { - // If not in call and user doesn't want sound to go out from speaker - // TODO: update dtmf generator to only output on output stream if speaker is false. + // Play DTMF only when in call + if (!linphone_core_in_call(lc)) { return; } diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 5e83ba462..81ab3e949 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -911,7 +911,7 @@ void linphone_core_use_files(LinphoneCore *lc, bool_t yesno); void linphone_core_set_play_file(LinphoneCore *lc, const char *file); void linphone_core_set_record_file(LinphoneCore *lc, const char *file); -void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms, bool_t speaker); +void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms); void linphone_core_stop_dtmf(LinphoneCore *lc); int linphone_core_get_current_call_duration(const LinphoneCore *lc); diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 1876fb9ee..df1583c7b 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -508,9 +508,8 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_playDtmf( JNIEnv* env ,jobject thiz ,jlong lc ,jchar dtmf - ,jint duration - ,jboolean speaker) { - linphone_core_play_dtmf((LinphoneCore*)lc,dtmf,duration,speaker); + ,jint duration) { + linphone_core_play_dtmf((LinphoneCore*)lc,dtmf,duration); } extern "C" void Java_org_linphone_core_LinphoneCoreImpl_stopDtmf( JNIEnv* env ,jobject thiz @@ -1174,3 +1173,6 @@ extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_setExpires(JNIEnv linphone_proxy_config_expires((LinphoneProxyConfig *) ptr, (int) delay); } +extern "C" jint Java_org_linphone_core_LinphoneCallImpl_getDuration(JNIEnv* env,jobject thiz,jlong ptr) { + linphone_call_get_duration((LinphoneCall *) ptr); +} \ No newline at end of file diff --git a/java/common/org/linphone/core/LinphoneCall.java b/java/common/org/linphone/core/LinphoneCall.java index 171e2e6b4..b8e03ac1d 100644 --- a/java/common/org/linphone/core/LinphoneCall.java +++ b/java/common/org/linphone/core/LinphoneCall.java @@ -137,50 +137,55 @@ public interface LinphoneCall { /** * Retrieves the call's current state. **/ - public State getState(); + State getState(); /** * Returns the remote address associated to this call * **/ - public LinphoneAddress getRemoteAddress(); + LinphoneAddress getRemoteAddress(); /** * get direction of the call (incoming or outgoing). * @return CallDirection */ - public CallDirection getDirection(); + CallDirection getDirection(); /** * get the call log associated to this call. * @Return LinphoneCallLog **/ - public LinphoneCallLog getCallLog(); + LinphoneCallLog getCallLog(); - public LinphoneCallParams getCurrentParamsCopy(); + LinphoneCallParams getCurrentParamsCopy(); - public void enableCamera(boolean enabled); + void enableCamera(boolean enabled); /** * 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(); /** * Enables or disable echo limiter cancellation. * @param enable */ - public void enableEchoLimiter(boolean enable); + void enableEchoLimiter(boolean enable); /** * get EL status * @return true if echo limiter is enabled. */ - public boolean isEchoLimiterEnabled(); + boolean isEchoLimiterEnabled(); /** * Returns the object associated to a call this one is replacing. * Call replacement can occur during transfer scenarios. */ - public LinphoneCall getReplacedCall(); + LinphoneCall getReplacedCall(); + + /** + * @return call duration computed from media start + */ + int getDuration(); } diff --git a/java/common/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java index 3b63d0a14..db378d1ce 100644 --- a/java/common/org/linphone/core/LinphoneCore.java +++ b/java/common/org/linphone/core/LinphoneCore.java @@ -391,12 +391,12 @@ public interface LinphoneCore { */ public void sendDtmf(char number); /** - * Initiate a dtmf signal to the speqker if not in call + * 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 - * @param speaker play dtmf on speaker */ - public void playDtmf(char number,int duration, boolean speaker); + public void playDtmf(char number,int duration); /** * stop current dtmf */ From da92619552026d251e3d432ce213f96c5b8f3386 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 3 Mar 2011 13:20:03 +0100 Subject: [PATCH 4/7] ready for 3.4.2 --- NEWS | 4 ++++ configure.ac | 2 +- linphone-deps.filelist | 4 ++-- mediastreamer2 | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index a684b44af..687b27f98 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +linphone-3.4.2 -- March 3rd, 2011 + * fix problems with webcams on windows + Requires mediastreamer-2.7.2 + linphone-3.4.1 -- February 17th, 2011 * bugfixes * gtk executable is renamed "linphone" (was linphone-3 before) diff --git a/configure.ac b/configure.ac index 0615cc48f..d9f9efcc1 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([linphone],[3.4.1],[linphone-developers@nongnu.org]) +AC_INIT([linphone],[3.4.2],[linphone-developers@nongnu.org]) AC_CANONICAL_SYSTEM AC_CONFIG_SRCDIR([coreapi/linphonecore.c]) diff --git a/linphone-deps.filelist b/linphone-deps.filelist index 19ea6ecde..22e069ed8 100755 --- a/linphone-deps.filelist +++ b/linphone-deps.filelist @@ -1,8 +1,8 @@ ./bin/avcodec-52.dll ./bin/avutil-50.dll ./bin/libeXosip2-6.dll -./bin/libogg.dll -./bin/libtheora.dll +./bin/libogg-0.dll +./bin/libtheora-0.dll ./bin/libxml2-2.dll ./bin/libosip2-6.dll ./bin/libosipparser2-6.dll diff --git a/mediastreamer2 b/mediastreamer2 index 9412db625..ce716b126 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 9412db625a9f00e6de4c612dbc69ab1f98822d63 +Subproject commit ce716b12627c2d3d92f1559e6dea211f3a455923 From 9412a100bd745866eb36c19eb23f58d103e6dd18 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 3 Mar 2011 13:22:47 +0100 Subject: [PATCH 5/7] update ms2 --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index ce716b126..69ad7356c 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit ce716b12627c2d3d92f1559e6dea211f3a455923 +Subproject commit 69ad7356cd390413afce658e81cda8703509952d From e2249d10e4794353f846bdc8d8880cbbcc2bae42 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 8 Mar 2011 18:53:02 +0100 Subject: [PATCH 6/7] remove stupid ipv6 info message at first startup --- coreapi/linphonecore.c | 4 ---- coreapi/misc.c | 46 ------------------------------------------ 2 files changed, 50 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 6815a833d..062e345b0 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -496,10 +496,6 @@ static void sip_config_read(LinphoneCore *lc) ipv6=lp_config_get_int(lc->config,"sip","use_ipv6",-1); if (ipv6==-1){ ipv6=0; - if (host_has_ipv6_network()){ - if (lc->vtable.display_message) - lc->vtable.display_message(lc,_("Your machine appears to be connected to an IPv6 network. By default linphone always uses IPv4. Please update your configuration if you want to use IPv6")); - } } linphone_core_enable_ipv6(lc,ipv6); memset(&tr,0,sizeof(tr)); diff --git a/coreapi/misc.c b/coreapi/misc.c index 059c6228c..799de3aee 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -345,52 +345,6 @@ bool_t lp_spawn_command_line_sync(const char *command, char **result,int *comman return FALSE; } -#if defined(HAVE_GETIFADDRS) && defined(INET6) -#include -#include -#include -bool_t host_has_ipv6_network() -{ - struct ifaddrs *ifp; - struct ifaddrs *ifpstart; - bool_t ipv6_present=FALSE; - - if (getifaddrs (&ifpstart) < 0) - { - return FALSE; - } - - for (ifp=ifpstart; ifp != NULL; ifp = ifp->ifa_next) - { - if (!ifp->ifa_addr) - continue; - - switch (ifp->ifa_addr->sa_family) { - case AF_INET: - - break; - case AF_INET6: - ipv6_present=TRUE; - break; - default: - continue; - } - } - - freeifaddrs (ifpstart); - - return ipv6_present; -} -#else - -bool_t host_has_ipv6_network() -{ - return FALSE; -} - - -#endif - static ortp_socket_t create_socket(int local_port){ struct sockaddr_in laddr; ortp_socket_t sock; From b6dc3d446effd4cb7518db631e81177417b2997d Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Wed, 9 Mar 2011 09:56:18 +0100 Subject: [PATCH 7/7] update mediastreamer2 --- mediastreamer2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediastreamer2 b/mediastreamer2 index 69ad7356c..fee15bc17 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 69ad7356cd390413afce658e81cda8703509952d +Subproject commit fee15bc174996771973a27bf974d740e7f657bf6