]> sjero.net Git - linphone/commitdiff
Merge branch 'master' of git.sv.gnu.org:/srv/git/linphone
authorSimon Morlat <simon.morlat@linphone.org>
Wed, 19 Oct 2011 09:05:38 +0000 (11:05 +0200)
committerSimon Morlat <simon.morlat@linphone.org>
Wed, 19 Oct 2011 09:05:38 +0000 (11:05 +0200)
coreapi/linphonecall.c
coreapi/linphonecore.c
coreapi/linphonecore.h
coreapi/linphonecore_jni.cc
coreapi/private.h
gtk/parameters.ui
gtk/propertybox.c
java/common/org/linphone/core/LinphoneCore.java
m4/exosip.m4
mediastreamer2
oRTP

index cbe12af743f5d706b7332b5d34260630824c8742..685b62ccb7ec96b3f05947f3c70831d850abe2d4 100644 (file)
@@ -1092,7 +1092,9 @@ static void linphone_call_start_video_stream(LinphoneCall *call, const char *cna
                        bool_t is_inactive=FALSE;
 
                        call->current_params.has_video=TRUE;
-                       
+
+                       video_stream_enable_adaptive_bitrate_control(call->videostream,
+                                                                 linphone_core_adaptive_rate_control_enabled(lc));
                        video_stream_set_sent_video_size(call->videostream,linphone_core_get_preferred_video_size(lc));
                        video_stream_enable_self_view(call->videostream,lc->video_conf.selfview);
                        if (lc->video_window_id!=0)
index 3a21ae70135241ed9bf815d0012ea3ca8dc492fb..a8596dec461e4aa82e25f5185025760da059a6cb 100644 (file)
@@ -814,7 +814,7 @@ void linphone_core_enable_adaptive_rate_control(LinphoneCore *lc, bool_t enabled
  * See linphone_core_enable_adaptive_rate_control().
 **/
 bool_t linphone_core_adaptive_rate_control_enabled(const LinphoneCore *lc){
-       return lp_config_get_int(lc->config,"net","adaptive_rate_control",FALSE);
+       return lp_config_get_int(lc->config,"net","adaptive_rate_control",TRUE);
 }
 
 bool_t linphone_core_rtcp_enabled(const LinphoneCore *lc){
@@ -973,6 +973,7 @@ void linphone_core_set_state(LinphoneCore *lc, LinphoneGlobalState gstate, const
 static void misc_config_read (LinphoneCore *lc) {
        LpConfig *config=lc->config;
     lc->max_call_logs=lp_config_get_int(config,"misc","history_max_size",15);
+    lc->max_calls=lp_config_get_int(config,"misc","max_calls",NB_MAX_CALLS);
 }
 
 static void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vtable, const char *config_path,
@@ -4300,6 +4301,11 @@ void linphone_core_stop_dtmf_stream(LinphoneCore* lc) {
        lc->ringstream=NULL;
 }
 
+int linphone_core_get_max_calls(LinphoneCore *lc) {
+       return lc->max_calls;
+}
+
+
 typedef struct Hook{
        LinphoneCoreIterateHook fun;
        void *data;
index 65683870aea21808c513f78ff351fa415f39eca2..a85855def0f0722f793f2c98e46086f5cca7e1b9 100644 (file)
@@ -1030,6 +1030,8 @@ float linphone_core_get_conference_local_input_volume(LinphoneCore *lc);
 int linphone_core_terminate_conference(LinphoneCore *lc);
 int linphone_core_get_conference_size(LinphoneCore *lc);
 
+int linphone_core_get_max_calls(LinphoneCore *lc);
+
 #ifdef __cplusplus
 }
 #endif
index d351c77a839b19ee873ad4253dbcb5bc98587dbf..8713e86d20a04c8a8745def708b126b900d09c37 100644 (file)
@@ -1205,6 +1205,13 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setPreviewWindowId(JNIEn
                                                                                                                                                ,jobject thiz
                                                                                                                                                ,jlong lc
                                                                                                                                                ,jobject obj) {
+       jobject oldWindow = (jobject) linphone_core_get_native_preview_window_id((LinphoneCore*)lc);
+       if (oldWindow != NULL) {
+               env->DeleteGlobalRef(oldWindow);
+       }
+       if (obj != NULL) {
+               obj = env->NewGlobalRef(obj);
+       }
        linphone_core_set_native_preview_window_id((LinphoneCore*)lc,(unsigned long)obj);
 }
 
@@ -1499,5 +1506,10 @@ extern "C" void msandroid_hack_speaker_state(bool speakerOn);
 
 extern "C" void Java_org_linphone_LinphoneManager_hackSpeakerState(JNIEnv*  env,jobject thiz,jboolean speakerOn){
        msandroid_hack_speaker_state(speakerOn);
+}
 // End Galaxy S hack functions
+
+
+extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getMaxCalls(JNIEnv *env,jobject thiz,jlong pCore) {
+       return (jint) linphone_core_get_max_calls((LinphoneCore *) pCore);
 }
index d2b78942ea4bbc17f249ad56547decb90e2eec52..49c7c4016703525e135b778cb41df1e99fe58464 100644 (file)
@@ -467,6 +467,7 @@ struct _LinphoneCore
        bool_t use_preview_window;
        int device_rotation;
        bool_t ringstream_autorelease;
+       int max_calls;
 };
 
 bool_t linphone_core_can_we_add_call(LinphoneCore *lc);
index 9af426212d36886aa0f20ce92d24bc1b5ca844d6..ce9373dae81446bc5ce26536c5cc13a1ae3e69d5 100644 (file)
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk+" version="2.16"/>
-  <!-- interface-naming-policy toplevel-contextual -->
   <object class="GtkAdjustment" id="adjustment1">
     <property name="lower">500</property>
     <property name="upper">3001</property>
                                     <property name="can_focus">True</property>
                                     <property name="primary_icon_activatable">False</property>
                                     <property name="secondary_icon_activatable">False</property>
-                                    <property name="primary_icon_sensitive">True</property>
-                                    <property name="secondary_icon_sensitive">True</property>
                                     <property name="adjustment">adjustment1</property>
                                     <signal name="value-changed" handler="linphone_gtk_mtu_changed" swapped="no"/>
                                   </object>
                                     <property name="invisible_char_set">True</property>
                                     <property name="primary_icon_activatable">False</property>
                                     <property name="secondary_icon_activatable">False</property>
-                                    <property name="primary_icon_sensitive">True</property>
-                                    <property name="secondary_icon_sensitive">True</property>
                                     <property name="adjustment">adjustment7</property>
                                     <signal name="value-changed" handler="linphone_gtk_update_my_port" swapped="no"/>
                                   </object>
                                     <property name="invisible_char_set">True</property>
                                     <property name="primary_icon_activatable">False</property>
                                     <property name="secondary_icon_activatable">False</property>
-                                    <property name="primary_icon_sensitive">True</property>
-                                    <property name="secondary_icon_sensitive">True</property>
                                     <property name="adjustment">adjustment2</property>
                                     <signal name="value-changed" handler="linphone_gtk_video_port_changed" swapped="no"/>
                                   </object>
                                     <property name="invisible_char_set">True</property>
                                     <property name="primary_icon_activatable">False</property>
                                     <property name="secondary_icon_activatable">False</property>
-                                    <property name="primary_icon_sensitive">True</property>
-                                    <property name="secondary_icon_sensitive">True</property>
                                     <property name="adjustment">adjustment3</property>
                                     <signal name="value-changed" handler="linphone_gtk_audio_port_changed" swapped="no"/>
                                   </object>
                                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                                     <property name="primary_icon_activatable">False</property>
                                     <property name="secondary_icon_activatable">False</property>
-                                    <property name="primary_icon_sensitive">True</property>
-                                    <property name="secondary_icon_sensitive">True</property>
                                     <signal name="changed" handler="linphone_gtk_nat_address_changed" swapped="no"/>
                                   </object>
                                   <packing>
                                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                                     <property name="primary_icon_activatable">False</property>
                                     <property name="secondary_icon_activatable">False</property>
-                                    <property name="primary_icon_sensitive">True</property>
-                                    <property name="secondary_icon_sensitive">True</property>
                                     <signal name="changed" handler="linphone_gtk_stun_server_changed" swapped="no"/>
                                   </object>
                                   <packing>
                                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                                 <property name="primary_icon_activatable">False</property>
                                 <property name="secondary_icon_activatable">False</property>
-                                <property name="primary_icon_sensitive">True</property>
-                                <property name="secondary_icon_sensitive">True</property>
                                 <signal name="editing-done" handler="linphone_gtk_alsa_special_device_changed" swapped="no"/>
                               </object>
                               <packing>
                                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                                 <property name="primary_icon_activatable">False</property>
                                 <property name="secondary_icon_activatable">False</property>
-                                <property name="primary_icon_sensitive">True</property>
-                                <property name="secondary_icon_sensitive">True</property>
                                 <signal name="changed" handler="linphone_gtk_update_my_contact" swapped="no"/>
                               </object>
                               <packing>
                                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                                 <property name="primary_icon_activatable">False</property>
                                 <property name="secondary_icon_activatable">False</property>
-                                <property name="primary_icon_sensitive">True</property>
-                                <property name="secondary_icon_sensitive">True</property>
                                 <signal name="changed" handler="linphone_gtk_update_my_contact" swapped="no"/>
                               </object>
                               <packing>
                                 <property name="editable">False</property>
                                 <property name="primary_icon_activatable">False</property>
                                 <property name="secondary_icon_activatable">False</property>
-                                <property name="primary_icon_sensitive">True</property>
-                                <property name="secondary_icon_sensitive">True</property>
                               </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="hscrollbar_policy">automatic</property>
-                                <property name="vscrollbar_policy">automatic</property>
                                 <child>
                                   <object class="GtkTreeView" id="proxy_list">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <child internal-child="selection">
+                                      <object class="GtkTreeSelection" id="treeview-selection1"/>
+                                    </child>
                                   </object>
                                 </child>
                               </object>
@@ -1638,8 +1618,6 @@ virtual network !</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="hscrollbar_policy">automatic</property>
-                                    <property name="vscrollbar_policy">automatic</property>
                                     <property name="shadow_type">out</property>
                                     <child>
                                       <object class="GtkTreeView" id="codec_list">
@@ -1647,6 +1625,9 @@ virtual network !</property>
                                         <property name="can_focus">True</property>
                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                                         <property name="has_tooltip">True</property>
+                                        <child internal-child="selection">
+                                          <object class="GtkTreeSelection" id="treeview-selection2"/>
+                                        </child>
                                       </object>
                                     </child>
                                   </object>
@@ -1843,7 +1824,7 @@ virtual network !</property>
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="n_rows">2</property>
+                            <property name="n_rows">3</property>
                             <property name="n_columns">2</property>
                             <child>
                               <object class="GtkSpinButton" id="upload_bw">
@@ -1853,8 +1834,6 @@ virtual network !</property>
                                 <property name="tooltip_text" translatable="yes">0 stands for "unlimited"</property>
                                 <property name="primary_icon_activatable">False</property>
                                 <property name="secondary_icon_activatable">False</property>
-                                <property name="primary_icon_sensitive">True</property>
-                                <property name="secondary_icon_sensitive">True</property>
                                 <property name="adjustment">adjustment5</property>
                                 <signal name="value-changed" handler="linphone_gtk_upload_bw_changed" swapped="no"/>
                               </object>
@@ -1863,6 +1842,8 @@ virtual network !</property>
                                 <property name="right_attach">2</property>
                                 <property name="top_attach">1</property>
                                 <property name="bottom_attach">2</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"></property>
                               </packing>
                             </child>
                             <child>
@@ -1873,14 +1854,14 @@ virtual network !</property>
                                 <property name="tooltip_text" translatable="yes">0 stands for "unlimited"</property>
                                 <property name="primary_icon_activatable">False</property>
                                 <property name="secondary_icon_activatable">False</property>
-                                <property name="primary_icon_sensitive">True</property>
-                                <property name="secondary_icon_sensitive">True</property>
                                 <property name="adjustment">adjustment6</property>
                                 <signal name="value-changed" handler="linphone_gtk_download_bw_changed" swapped="no"/>
                               </object>
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options">GTK_EXPAND</property>
                               </packing>
                             </child>
                             <child>
@@ -1905,6 +1886,41 @@ virtual network !</property>
                                 <property name="justify">right</property>
                               </object>
                             </child>
+                            <child>
+                              <object class="GtkCheckButton" id="adaptive_rate_control">
+                                <property name="label" translatable="yes">Enable adaptive rate control</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
+                                <property name="xalign">0</property>
+                                <property name="draw_indicator">True</property>
+                                <signal name="toggled" handler="linphone_gtk_adaptive_rate_control_toggled" swapped="no"/>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label5">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">&lt;i&gt;Adaptive rate control is a technique to dynamically guess the available bandwidth during a call.&lt;/i&gt;</property>
+                                <property name="use_markup">True</property>
+                                <property name="wrap">True</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options"></property>
+                              </packing>
+                            </child>
                           </object>
                         </child>
                       </object>
index 193541029d847f6bd1c3f995a9bc4fc7a8bcc873..78a8ca4230f05c1d84431752a3c1855bbb88ca25 100644 (file)
@@ -453,6 +453,11 @@ void linphone_gtk_upload_bw_changed(GtkWidget *w){
        linphone_gtk_check_codec_bandwidth(v);
 }
 
+void linphone_gtk_adaptive_rate_control_toggled(GtkToggleButton *button){
+       gboolean active=gtk_toggle_button_get_active(button);
+       linphone_core_enable_adaptive_rate_control(linphone_gtk_get_core(),active);
+}
+
 static void linphone_gtk_codec_move(GtkWidget *button, int dir){
        GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(button),"codec_list"));
        GtkTreeSelection *sel=gtk_tree_view_get_selection(v);
@@ -899,6 +904,8 @@ void linphone_gtk_show_parameters(void){
                                linphone_core_get_download_bandwidth(lc));
        gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"upload_bw")),
                                linphone_core_get_upload_bandwidth(lc));
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"adaptive_rate_control")),
+                                linphone_core_adaptive_rate_control_enabled(lc));
 
 
        /* UI CONFIG */
index aef993ea055ca9d2c9f501582851c6094d3a99ff..88f1be6fff35ac58ccfdf000f2b4766f62d65549 100644 (file)
@@ -621,4 +621,7 @@ public interface LinphoneCore {
        void transferCallToAnother(LinphoneCall callToTransfer, LinphoneCall destination);
 
        LinphoneCall findCallFromUri(String uri);
+
+       int getMaxCalls();
+
 }
index 2c21b129dd9890dbb74146c7ad190d692ad4ee1a..8e469969cdd63638213438a61de8858561721c97 100644 (file)
@@ -4,9 +4,18 @@ AC_REQUIRE([AC_CANONICAL_HOST])
 AC_REQUIRE([LP_CHECK_OSIP2])
 
 
-case $target_os in
-       *darwin*)
-               OSIP_LIBS="$OSIP_LIBS  -framework CoreFoundation "
+case $host_alias in
+       i386-apple*)
+               OSIP_LIBS="$OSIP_LIBS  -framework CoreFoundation -framework CFNetwork"
+       ;;
+       armv6-apple*)
+               OSIP_LIBS="$OSIP_LIBS  -framework CoreFoundation -framework CFNetwork"
+       ;;
+       armv7-apple*)
+               OSIP_LIBS="$OSIP_LIBS  -framework CoreFoundation -framework CFNetwork"
+       ;;
+       x86_64-apple*)
+               OSIP_LIBS="$OSIP_LIBS  -framework CoreFoundation"
        ;;
 esac
 
index 3e62df330823c9efefaf314e894a6a7867f9ff76..954911c0dbdf7351cd82df70d0999a84d163db7f 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 3e62df330823c9efefaf314e894a6a7867f9ff76
+Subproject commit 954911c0dbdf7351cd82df70d0999a84d163db7f
diff --git a/oRTP b/oRTP
index 0a878baa150133e35acdfb7082ccc99a54be41fe..3256179b911975ce7d3556f8e2c00b21881a84d2 160000 (submodule)
--- a/oRTP
+++ b/oRTP
@@ -1 +1 @@
-Subproject commit 0a878baa150133e35acdfb7082ccc99a54be41fe
+Subproject commit 3256179b911975ce7d3556f8e2c00b21881a84d2