]> sjero.net Git - linphone/commitdiff
Merge branch 'master' of git.sv.gnu.org:/srv/git/linphone
authorSimon Morlat <simon.morlat@linphone.org>
Wed, 7 Sep 2011 15:17:53 +0000 (17:17 +0200)
committerSimon Morlat <simon.morlat@linphone.org>
Wed, 7 Sep 2011 15:17:53 +0000 (17:17 +0200)
README.macos
build/android/Android.mk
build/macos/linphone.bundle
coreapi/ec-calibrator.c
coreapi/linphonecore.c
coreapi/linphonecore_jni.cc
gtk/main.c
java/common/org/linphone/core/LinphoneCore.java
mediastreamer2

index aeefa08d6a8160978c94f36774c167de620e1916..e0878ee4e6bc0a6c37e9c4c9ebad45f93da1c29f 100644 (file)
@@ -12,8 +12,8 @@ You need:
 
 - Install some linphone dependencies with macports
  $ port install speex
- $ port install osip2
- $ port install eXosip2
+ $ port install libosip2
+ $ port install libeXosip2
  $ port install ffmpeg-devel
 
 - Install SDL (for video display)
@@ -33,6 +33,8 @@ When this version will be integrated into macports, only this will be necessary:
  $ port install sdl-devel
 
 - Install gtk. It is recommended to use the quartz backend for better integration.
+ $ port install cairo +quartz +no_x11
+ $ port install pango +quartz +no_x11
  $ port install gtk2 +quartz +no_x11
  $ port install ige-mac-integration
  $ port install hicolor-icon-theme
index 28878a5bc18bfcf808a3c331f8792f3be14e7fdd..1c7a611bfe306b954f4a2bf5515135476f04c65b 100755 (executable)
@@ -102,6 +102,7 @@ LOCAL_STATIC_LIBRARIES += \
 endif
 
 ifeq ($(LINPHONE_VIDEO),1)
+LOCAL_LDLIBS    += -lGLESv2
 LOCAL_STATIC_LIBRARIES += libvpx
 ifeq ($(BUILD_X264),1)
 LOCAL_STATIC_LIBRARIES += \
@@ -121,12 +122,12 @@ LOCAL_STATIC_LIBRARIES += libspeex
 ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
 LOCAL_CFLAGS += -DHAVE_ILBC=1
 LOCAL_STATIC_LIBRARIES += libmsilbc
-else
-LOCAL_STATIC_LIBRARIES += $(LIBLINPHONE_EXTENDED_STATIC_LIBS)
-LOCAL_SRC_FILES  += $(LIBLINPHONE_EXTENDED_SRC_FILES)
 LOCAL_C_INCLUDES += $(LIBLINPHONE_EXTENDED_C_INCLUDES) 
 endif
 
+LOCAL_STATIC_LIBRARIES += $(LIBLINPHONE_EXTENDED_STATIC_LIBS)
+LOCAL_SRC_FILES  += $(LIBLINPHONE_EXTENDED_SRC_FILES)
+
 LOCAL_LDLIBS    += -lGLESv2
 ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
        LOCAL_SHARED_LIBRARIES += liblinssl liblincrypto
index bf8e9c6f08d938aa354b5ec7457b4bce26635b13..59173bdd6abfe264e59972eba3a0ed0227ac0b0f 100644 (file)
@@ -83,9 +83,9 @@
      ${prefix}/lib/gdk-pixbuf-2.0
   </binary>
 
-  <binary>
+  <data>
     ${prefix}/share/mime/globs
-  </binary>
+  </data>
 
   <binary>
     ${prefix}/lib/pango/${pkg:pango:pango_module_version}/modules/*.so
        "${bundle}", which refers to the bundle root directory.
   -->
   <data>
-    ${prefix:linphone}/share
+    ${prefix:linphone}/share/linphone
+  </data>
+
+  <data>
+    ${prefix:linphone}/share/pixmaps/linphone
   </data>
 
   <!-- Copy in the themes data. You may want to trim this to save space
     ${project}/../../gtk/gtkrc.mac
   </data>
 
-  <data dest="${bundle}/Contents/Resources/share/sounds/linphone">
-      ${prefix:linphone}/share/sounds/linphone/
+  <data dest="${bundle}/Contents/Resources/share/sounds/linphone/rings/oldphone.wav">
+      ${prefix:linphone}/share/sounds/linphone/rings/oldphone.wav
+  </data>
+
+  <data dest="${bundle}/Contents/Resources/share/sounds/linphone/ringback.wav">
+      ${prefix:linphone}/share/sounds/linphone/ringback.wav
   </data>
 
   <!-- Icon themes to copy. The "icons" property can be either of
index 38b83f0d6065abd1c3257599df7594d438d27a71..2f4fa65009fa6376de46de262c4231426948055b 100644 (file)
@@ -185,3 +185,4 @@ int linphone_core_start_echo_calibration(LinphoneCore *lc, LinphoneEcCalibration
        lc->ecc=ec_calibrator_new(lc->sound_conf.play_sndcard,lc->sound_conf.capt_sndcard,rate,cb,cb_data);
        return 0;
 }
+
index aa33e668fbb7c4483cef62d88e1859581bf5e281..6abe85101f78764649486fa5f69d8ab4d16d7aa8 100644 (file)
@@ -1689,7 +1689,8 @@ void linphone_core_iterate(LinphoneCore *lc){
                        if (lc->ecc->cb)
                                lc->ecc->cb(lc,ecs,lc->ecc->delay,lc->ecc->cb_data);
                        if (ecs==LinphoneEcCalibratorDone){
-                               lp_config_set_int(lc->config, "sound", "ec_delay",MAX(lc->ecc->delay-10,0));
+                               int len=lp_config_get_int(lc->config,"sound","ec_tail_len",0);
+                               lp_config_set_int(lc->config, "sound", "ec_delay",MAX(lc->ecc->delay-(len/2),0));
                        }
                        ec_calibrator_destroy(lc->ecc);
                        lc->ecc=NULL;
index 349efb02cda00481556003dbd2e8409321bf72c4..7ce1959ffd915d1d9fc5c14585355181fab01153 100644 (file)
@@ -624,6 +624,12 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_enableEchoCancellation(J
                                                                                                                                                        ,jboolean enable) {
        linphone_core_enable_echo_cancellation((LinphoneCore*)lc,enable);
 }
+extern "C" void Java_org_linphone_core_LinphoneCoreImpl_enableEchoLimiter(JNIEnv*  env
+                                                                                                                                                       ,jobject  thiz
+                                                                                                                                                       ,jlong lc
+                                                                                                                                                       ,jboolean enable) {
+       linphone_core_enable_echo_limiter((LinphoneCore*)lc,enable);
+}
 extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_isEchoCancellationEnabled(JNIEnv*  env
                                                                                                                                                        ,jobject  thiz
                                                                                                                                                        ,jlong lc
index 95ce91d5b83dd558791e8a4a78b323a0da505d5d..8ec11cc9854e829918e4f94fbdaa297564b6233a 100644 (file)
@@ -65,7 +65,6 @@ static gboolean iconified=FALSE;
 static gchar *workingdir=NULL;
 static char *progpath=NULL;
 gchar *linphone_logfile=NULL;
-static gboolean app_terminated=FALSE;
 
 static GOptionEntry linphone_options[]={
        {
@@ -1284,7 +1283,7 @@ static gboolean on_window_state_event(GtkWidget *w, GdkEventWindowState *event){
                 linphone_core_enable_video_preview(linphone_gtk_get_core(),FALSE);
         }else{
                 linphone_core_enable_video_preview(linphone_gtk_get_core(),
-               linphone_gtk_get_ui_config_int("videoselfview",VIDEOSELFVIEW_DEFAULT));
+               linphone_gtk_get_ui_config_int("videoselfview",VIDEOSELFVIEW_DEFAULT) && linphone_core_video_enabled(linphone_gtk_get_core()));
         }
         return FALSE;
 }
@@ -1383,11 +1382,25 @@ static void linphone_gtk_check_soundcards(){
        }
 }
 
+static void linphone_gtk_quit(void){
+       gdk_threads_leave();
+        linphone_gtk_destroy_log_window();
+        linphone_core_destroy(the_core);
+        linphone_gtk_log_uninit();
+}
+
 #ifdef HAVE_GTK_OSX
+/*
+This is not the correct way to implement block termination.
+The good way would be to call gtk_main_quit(), and return TRUE.
+Unfortunately this does not work, because if we return TRUE the NSApplication sometimes calls the CFRunLoop recursively, which prevents gtk_main() to exit.
+As a result the program cannot exit at all.
+As a workaround we do all the cleanup (unregistration and config save) within the handler.
+*/
 static gboolean on_block_termination(void){
        gtk_main_quit();
-       g_message("Block termination returning %i",!app_terminated);
-       return !app_terminated;
+       linphone_gtk_quit();
+       return FALSE;
 }
 #endif
 
@@ -1514,11 +1527,7 @@ int main(int argc, char *argv[]){
                linphone_gtk_check_for_new_version();
 
        gtk_main();
-       gdk_threads_leave();
-       linphone_gtk_destroy_log_window();
-       linphone_core_destroy(the_core);
-       linphone_gtk_log_uninit();
-       app_terminated=TRUE;
+       linphone_gtk_quit();
 #ifndef HAVE_GTK_OSX
        /*workaround a bug on win32 that makes status icon still present in the systray even after program exit.*/
        gtk_status_icon_set_visible(icon,FALSE);
index 91f056c23999b2d6e64be318791bbac4a24c04ec..457a7c34ac5c9793a484bf3930c4e96a39e5cf3b 100644 (file)
@@ -186,18 +186,21 @@ public interface LinphoneCore {
        static public class EcCalibratorStatus {
                @SuppressWarnings("unchecked")
                static private Vector values = new Vector();
+               public static final int IN_PROGRESS_STATUS=0;
+               public static final int DONE_STATUS=1;
+               public static final int FAILED_STATUS=2;
                /**
                 * Calibration in progress
                 */
-               static public EcCalibratorStatus InProgress = new EcCalibratorStatus(0,"InProgress");       
+               static public EcCalibratorStatus InProgress = new EcCalibratorStatus(IN_PROGRESS_STATUS,"InProgress");       
                /**
                 * Calibration done
                 */
-               static public EcCalibratorStatus Done  = new EcCalibratorStatus(1,"Done");
+               static public EcCalibratorStatus Done  = new EcCalibratorStatus(DONE_STATUS,"Done");
                /**
                 * Calibration in progress
                 */
-               static public EcCalibratorStatus Failed = new EcCalibratorStatus(2,"Failed");
+               static public EcCalibratorStatus Failed = new EcCalibratorStatus(FAILED_STATUS,"Failed");
 
                private final int mValue;
                private final String mStringValue;
@@ -591,5 +594,6 @@ public interface LinphoneCore {
        boolean pauseAllCalls();
        
        void setZrtpSecretsCache(String file);
+       public void enableEchoLimiter(boolean val);
 
 }
index 7c091db48e2ac5b785ced3964a386ec51f695a60..bddf312c1b7852d1b29c6b476d207133c5f31ff2 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 7c091db48e2ac5b785ced3964a386ec51f695a60
+Subproject commit bddf312c1b7852d1b29c6b476d207133c5f31ff2