From 34e84d785998d96a4d46b31b66fbc0ec3d11c905 Mon Sep 17 00:00:00 2001
From: smorlat <smorlat@3f6dc0c8-ddfe-455d-9043-3cd528dc4637>
Date: Mon, 27 Apr 2009 09:22:26 +0000
Subject: [PATCH] add evrcb0 wizard in progress improve theora packer add \n to
 dtmf printout.

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@440 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
---
 linphone/NEWS                            |   4 +
 linphone/console/linphonec.c             |   2 +-
 linphone/coreapi/linphonecore.c          |   1 -
 linphone/coreapi/linphonecore.h          |   3 +
 linphone/coreapi/sipsetup.c              |   8 ++
 linphone/coreapi/sipsetup.h              |   1 +
 linphone/gtk-glade/main.c                |  19 ++-
 linphone/gtk-glade/main.glade            | 148 +++++++++++++----------
 linphone/gtk-glade/setupwizard.c         |  18 ++-
 linphone/mediastreamer2/acinclude.m4     |  21 ++++
 linphone/mediastreamer2/configure.ac     |  52 +++++++-
 linphone/mediastreamer2/src/theora.c     |  19 ++-
 linphone/oRTP/include/ortp/payloadtype.h |   1 +
 linphone/oRTP/src/avprofile.c            |  10 ++
 14 files changed, 233 insertions(+), 74 deletions(-)

diff --git a/linphone/NEWS b/linphone/NEWS
index c3355328b6..29b4cdcabb 100644
--- a/linphone/NEWS
+++ b/linphone/NEWS
@@ -1,3 +1,7 @@
+linphone-3.1.2 --
+	* make it work with lastest ffmpeg swscale
+	* improve theora packer
+
 linphone-3.1.1 -- April 14, 2009
 	* fix crash when opening property box, in some rare case
 	* windows version uses the new libmsdscap plugin (video capture using directshow)
diff --git a/linphone/console/linphonec.c b/linphone/console/linphonec.c
index 6618ce3b55..69742f09fb 100644
--- a/linphone/console/linphonec.c
+++ b/linphone/console/linphonec.c
@@ -300,7 +300,7 @@ linphonec_text_received(LinphoneCore *lc, LinphoneChatRoom *cr,
 
 
 static void linphonec_dtmf_received(LinphoneCore *lc, int dtmf){
-	printf("Receiving tone %c",dtmf);
+	printf("Receiving tone %c\n",dtmf);
 }
 
 static void 
diff --git a/linphone/coreapi/linphonecore.c b/linphone/coreapi/linphonecore.c
index cea010d91e..01b078e33a 100644
--- a/linphone/coreapi/linphonecore.c
+++ b/linphone/coreapi/linphonecore.c
@@ -2333,7 +2333,6 @@ void linphone_core_stop_waiting(LinphoneCore *lc){
 	}
 }
 
-
 void net_config_uninit(LinphoneCore *lc)
 {
 	net_config_t *config=&lc->net_conf;
diff --git a/linphone/coreapi/linphonecore.h b/linphone/coreapi/linphonecore.h
index bb95b7a9b4..7b9afc8165 100644
--- a/linphone/coreapi/linphonecore.h
+++ b/linphone/coreapi/linphonecore.h
@@ -762,6 +762,9 @@ The "show" callback is called for the other linphone, causing gui to show up.
 The method returns 0 if an already running linphone was found*/
 int linphone_core_wake_up_possible_already_running_instance(const char *config_file);
 
+/*returns the list of registered SipSetup (linphonecore plugins) */
+const MSList * linphone_core_get_sip_setups(LinphoneCore *lc);
+
 void linphone_core_uninit(LinphoneCore *lc);
 void linphone_core_destroy(LinphoneCore *lc);
 
diff --git a/linphone/coreapi/sipsetup.c b/linphone/coreapi/sipsetup.c
index 56ea939461..790474f771 100644
--- a/linphone/coreapi/sipsetup.c
+++ b/linphone/coreapi/sipsetup.c
@@ -49,6 +49,10 @@ void sip_setup_register_all(void){
 	}
 }
 
+const MSList * linphone_core_get_sip_setups(LinphoneCore *lc){
+	return registered_sip_setups;
+}
+
 SipSetup *sip_setup_lookup(const char *type_name){
 	MSList *elem;
 	for(elem=registered_sip_setups;elem!=NULL;elem=elem->next){
@@ -94,6 +98,10 @@ SipSetupContext *sip_setup_context_new(SipSetup *s, struct _LinphoneProxyConfig
 	return obj;
 }
 
+unsigned int sip_setup_get_capabilities(SipSetup *s){
+	return s->capabilities;
+}
+
 int sip_setup_context_get_capabilities(SipSetupContext *ctx){
 	return ctx->funcs->capabilities;
 }
diff --git a/linphone/coreapi/sipsetup.h b/linphone/coreapi/sipsetup.h
index 0e39debc7c..6cde352cb2 100644
--- a/linphone/coreapi/sipsetup.h
+++ b/linphone/coreapi/sipsetup.h
@@ -100,6 +100,7 @@ void sip_setup_register(SipSetup *ss);
 void sip_setup_register_all(void);
 SipSetup *sip_setup_lookup(const char *type_name);
 void sip_setup_unregister_all(void);
+unsigned int sip_setup_get_capabilities(SipSetup *s);
 
 SipSetupContext * sip_setup_context_new(SipSetup *s, struct _LinphoneProxyConfig *cfg);
 int sip_setup_context_create_account(SipSetupContext *ctx, const char *uri, const char *passwd);
diff --git a/linphone/gtk-glade/main.c b/linphone/gtk-glade/main.c
index e11f0dc8bc..84a9390e74 100644
--- a/linphone/gtk-glade/main.c
+++ b/linphone/gtk-glade/main.c
@@ -794,6 +794,18 @@ static void linphone_gtk_check_menu_items(void){
 					audio_only ? "audio_only_item" : "video_item")), TRUE);
 }
 
+static gboolean linphone_gtk_can_manage_accounts(){
+	LinphoneCore *lc=linphone_gtk_get_core();
+	const MSList *elem;
+	for(elem=linphone_core_get_sip_setups(lc);elem!=NULL;elem=elem->next){
+		SipSetup *ss=(SipSetup*)elem->data;
+		if (sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_ACCOUNT_MANAGER){
+			return TRUE;
+		}
+	}
+	return FALSE;
+}
+
 static void linphone_gtk_configure_main_window(){
 	static gboolean config_loaded=FALSE;
 	static const char *title;
@@ -809,7 +821,10 @@ static void linphone_gtk_configure_main_window(){
 		config_loaded=TRUE;
 	}
 	linphone_gtk_configure_window(w,"main_window");
-	if (title) gtk_window_set_title(GTK_WINDOW(w),title);
+	if (title) {
+		gtk_window_set_title(GTK_WINDOW(w),title);
+		gtk_menu_item_set_label(GTK_MENU_ITEM(linphone_gtk_get_widget(w,"main_menu")),title);
+	}
 	if (start_call_icon){
 		GdkPixbuf *pbuf=create_pixbuf(start_call_icon);
 		gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"start_call_icon")),pbuf);
@@ -826,6 +841,8 @@ static void linphone_gtk_configure_main_window(){
 		tmp=g_strdup(home);
 		g_object_set_data(G_OBJECT(menu_item),"home",tmp);
 	}
+	if (!linphone_gtk_can_manage_accounts())
+		gtk_widget_hide(linphone_gtk_get_widget(w,"run_assistant"));
 }
 
 static void linphone_gtk_init_main_window(){
diff --git a/linphone/gtk-glade/main.glade b/linphone/gtk-glade/main.glade
index e408f8d87b..99c662ca6f 100644
--- a/linphone/gtk-glade/main.glade
+++ b/linphone/gtk-glade/main.glade
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Sun Mar 29 23:23:26 2009 -->
+<?xml version="1.0"?>
 <glade-interface>
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy toplevel-contextual -->
   <widget class="GtkWindow" id="main">
     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
     <property name="icon">linphone2.png</property>
@@ -15,19 +15,33 @@
             <property name="visible">True</property>
             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
             <child>
-              <widget class="GtkMenuItem" id="menuitem2">
+              <widget class="GtkMenuItem" id="main_menu">
                 <property name="visible">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="label" translatable="yes">_View</property>
-                <property name="use_underline">True</property>
+                <property name="label" translatable="yes">Linphone</property>
                 <child>
                   <widget class="GtkMenu" id="menu2">
                     <property name="visible">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <widget class="GtkImageMenuItem" id="run_assistant">
+                        <property name="label" translatable="yes">Assistant</property>
+                        <property name="visible">True</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="linphone_gtk_create_assistant"/>
+                        <child internal-child="image">
+                          <widget class="GtkImage" id="image1">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-preferences</property>
+                            <property name="icon-size">1</property>
+                          </widget>
+                        </child>
+                      </widget>
+                    </child>
                     <child>
                       <widget class="GtkImageMenuItem" id="menuitem5">
+                        <property name="label">gtk-preferences</property>
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">gtk-preferences</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
                         <signal name="activate" handler="linphone_gtk_show_parameters"/>
@@ -35,22 +49,28 @@
                     </child>
                     <child>
                       <widget class="GtkImageMenuItem" id="menuitem1">
+                        <property name="label">Call history</property>
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">Call history</property>
-                        <property name="use_underline">True</property>
+                        <property name="use_stock">False</property>
                         <signal name="activate" handler="linphone_gtk_show_call_logs"/>
                         <child internal-child="image">
-                          <widget class="GtkImage" id="menu-item-image4">
+                          <widget class="GtkImage" id="image2">
                             <property name="visible">True</property>
-                            <property name="stock">gtk-info</property>
+                            <property name="stock">gtk-justify-fill</property>
+                            <property name="icon-size">1</property>
                           </widget>
                         </child>
                       </widget>
                     </child>
+                    <child>
+                      <widget class="GtkSeparatorMenuItem" id="separatormenuitem2">
+                        <property name="visible">True</property>
+                      </widget>
+                    </child>
                     <child>
                       <widget class="GtkImageMenuItem" id="quit">
+                        <property name="label">gtk-quit</property>
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">gtk-quit</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
                         <signal name="activate" handler="gtk_main_quit"/>
@@ -113,9 +133,9 @@
             </child>
             <child>
               <widget class="GtkImageMenuItem" id="menuitem4">
+                <property name="label">gtk-help</property>
                 <property name="visible">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="label" translatable="yes">gtk-help</property>
                 <property name="use_underline">True</property>
                 <property name="use_stock">True</property>
                 <child>
@@ -124,22 +144,24 @@
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <child>
                       <widget class="GtkImageMenuItem" id="show_logs">
+                        <property name="label">Show debug messages</property>
                         <property name="visible">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="label" translatable="yes">Show debug window</property>
-                        <property name="use_underline">True</property>
+                        <property name="use_stock">False</property>
                         <signal name="activate" handler="linphone_gtk_log_show"/>
                         <child internal-child="image">
-                          <widget class="GtkImage" id="menu-item-image1">
-                            <property name="stock">gtk-dialog-info</property>
+                          <widget class="GtkImage" id="image3">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-info</property>
+                            <property name="icon-size">1</property>
                           </widget>
                         </child>
                       </widget>
                     </child>
                     <child>
                       <widget class="GtkImageMenuItem" id="menuitem6">
+                        <property name="label">gtk-about</property>
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">gtk-about</property>
                         <property name="use_underline">True</property>
                         <property name="use_stock">True</property>
                         <signal name="activate" handler="linphone_gtk_show_about"/>
@@ -147,14 +169,15 @@
                     </child>
                     <child>
                       <widget class="GtkImageMenuItem" id="home_item">
+                        <property name="label">Homepage</property>
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">Homepage</property>
-                        <property name="use_underline">True</property>
+                        <property name="use_stock">False</property>
                         <signal name="activate" handler="linphone_gtk_link_to_website"/>
                         <child internal-child="image">
-                          <widget class="GtkImage" id="menu-item-image3">
+                          <widget class="GtkImage" id="image4">
                             <property name="visible">True</property>
-                            <property name="stock">gtk-info</property>
+                            <property name="stock">gtk-home</property>
+                            <property name="icon-size">1</property>
                           </widget>
                         </child>
                       </widget>
@@ -166,6 +189,7 @@
           </widget>
           <packing>
             <property name="expand">False</property>
+            <property name="position">0</property>
           </packing>
         </child>
         <child>
@@ -192,13 +216,15 @@
                             <property name="can_focus">True</property>
                             <signal name="activate" handler="linphone_gtk_uri_bar_activate"/>
                           </widget>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
                         </child>
                         <child>
                           <widget class="GtkButton" id="terminate_call">
                             <property name="can_focus">True</property>
                             <property name="receives_default">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="response_id">0</property>
                             <signal name="clicked" handler="linphone_gtk_terminate_call"/>
                             <child>
                               <widget class="GtkHBox" id="hbox21">
@@ -210,6 +236,9 @@
                                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                                     <property name="stock">gtk-close</property>
                                   </widget>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
                                 </child>
                                 <child>
                                   <widget class="GtkLabel" id="terminate_call_label">
@@ -227,7 +256,7 @@
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
-                            <property name="pack_type">GTK_PACK_END</property>
+                            <property name="pack_type">end</property>
                             <property name="position">2</property>
                           </packing>
                         </child>
@@ -237,7 +266,6 @@
                             <property name="can_focus">True</property>
                             <property name="receives_default">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="response_id">0</property>
                             <signal name="clicked" handler="linphone_gtk_start_call"/>
                             <child>
                               <widget class="GtkHBox" id="hbox3">
@@ -249,6 +277,9 @@
                                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                                     <property name="stock">gtk-go-forward</property>
                                   </widget>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
                                 </child>
                                 <child>
                                   <widget class="GtkLabel" id="start_call_label">
@@ -266,7 +297,7 @@
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
-                            <property name="pack_type">GTK_PACK_END</property>
+                            <property name="pack_type">end</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
@@ -288,6 +319,7 @@
               </widget>
               <packing>
                 <property name="expand">False</property>
+                <property name="position">0</property>
               </packing>
             </child>
             <child>
@@ -319,6 +351,7 @@
                                   </widget>
                                   <packing>
                                     <property name="padding">12</property>
+                                    <property name="position">0</property>
                                   </packing>
                                 </child>
                                 <child>
@@ -361,24 +394,25 @@ Online users</property>
                               </widget>
                               <packing>
                                 <property name="expand">False</property>
+                                <property name="position">0</property>
                               </packing>
                             </child>
                             <child>
                               <widget class="GtkScrolledWindow" id="scrolledwindow1">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
-                                <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-                                <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+                                <property name="hscrollbar_policy">automatic</property>
+                                <property name="vscrollbar_policy">automatic</property>
                                 <child>
                                   <widget class="GtkTreeView" id="contact_list">
                                     <property name="height_request">120</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>
-                                    <signal name="popup_menu" handler="linphone_gtk_popup_contact_menu"/>
                                     <signal name="button_press_event" handler="linphone_gtk_contact_list_button_pressed"/>
-                                    <signal name="row_activated" handler="linphone_gtk_contact_activated"/>
                                     <signal name="cursor_changed" handler="linphone_gtk_contact_clicked"/>
+                                    <signal name="row_activated" handler="linphone_gtk_contact_activated"/>
+                                    <signal name="popup_menu" handler="linphone_gtk_popup_contact_menu"/>
                                   </widget>
                                 </child>
                               </widget>
@@ -404,6 +438,7 @@ Online users</property>
                   </widget>
                   <packing>
                     <property name="padding">8</property>
+                    <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
@@ -429,12 +464,11 @@ Online users</property>
                                 <property name="homogeneous">True</property>
                                 <child>
                                   <widget class="GtkButton" id="dtmf_D">
+                                    <property name="label" translatable="yes">D</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">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="label" translatable="yes">D</property>
-                                    <property name="response_id">0</property>
                                   </widget>
                                   <packing>
                                     <property name="left_attach">3</property>
@@ -447,12 +481,11 @@ Online users</property>
                                 </child>
                                 <child>
                                   <widget class="GtkButton" id="dtmf_hash">
+                                    <property name="label" translatable="yes">#</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">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="label" translatable="yes">#</property>
-                                    <property name="response_id">0</property>
                                   </widget>
                                   <packing>
                                     <property name="left_attach">2</property>
@@ -465,12 +498,11 @@ Online users</property>
                                 </child>
                                 <child>
                                   <widget class="GtkButton" id="dtmf_0">
+                                    <property name="label" translatable="yes">0</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">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="label" translatable="yes">0</property>
-                                    <property name="response_id">0</property>
                                   </widget>
                                   <packing>
                                     <property name="left_attach">1</property>
@@ -483,12 +515,11 @@ Online users</property>
                                 </child>
                                 <child>
                                   <widget class="GtkButton" id="dtmf_star">
+                                    <property name="label" translatable="yes">*</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">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="label" translatable="yes">*</property>
-                                    <property name="response_id">0</property>
                                   </widget>
                                   <packing>
                                     <property name="top_attach">3</property>
@@ -499,12 +530,11 @@ Online users</property>
                                 </child>
                                 <child>
                                   <widget class="GtkButton" id="dtmf_C">
+                                    <property name="label" translatable="yes">C</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">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="label" translatable="yes">C</property>
-                                    <property name="response_id">0</property>
                                   </widget>
                                   <packing>
                                     <property name="left_attach">3</property>
@@ -517,12 +547,11 @@ Online users</property>
                                 </child>
                                 <child>
                                   <widget class="GtkButton" id="dtmf_9">
+                                    <property name="label" translatable="yes">9</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">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="label" translatable="yes">9</property>
-                                    <property name="response_id">0</property>
                                   </widget>
                                   <packing>
                                     <property name="left_attach">2</property>
@@ -535,12 +564,11 @@ Online users</property>
                                 </child>
                                 <child>
                                   <widget class="GtkButton" id="dtmf_8">
+                                    <property name="label" translatable="yes">8</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">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="label" translatable="yes">8</property>
-                                    <property name="response_id">0</property>
                                   </widget>
                                   <packing>
                                     <property name="left_attach">1</property>
@@ -553,12 +581,11 @@ Online users</property>
                                 </child>
                                 <child>
                                   <widget class="GtkButton" id="dtmf_7">
+                                    <property name="label" translatable="yes">7</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">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="label" translatable="yes">7</property>
-                                    <property name="response_id">0</property>
                                   </widget>
                                   <packing>
                                     <property name="top_attach">2</property>
@@ -569,12 +596,11 @@ Online users</property>
                                 </child>
                                 <child>
                                   <widget class="GtkButton" id="dtmf_B">
+                                    <property name="label" translatable="yes">B</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">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="label" translatable="yes">B</property>
-                                    <property name="response_id">0</property>
                                   </widget>
                                   <packing>
                                     <property name="left_attach">3</property>
@@ -587,12 +613,11 @@ Online users</property>
                                 </child>
                                 <child>
                                   <widget class="GtkButton" id="dtmf_6">
+                                    <property name="label" translatable="yes">6</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">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="label" translatable="yes">6</property>
-                                    <property name="response_id">0</property>
                                   </widget>
                                   <packing>
                                     <property name="left_attach">2</property>
@@ -605,12 +630,11 @@ Online users</property>
                                 </child>
                                 <child>
                                   <widget class="GtkButton" id="dtmf_5">
+                                    <property name="label" translatable="yes">5</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">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="label" translatable="yes">5</property>
-                                    <property name="response_id">0</property>
                                   </widget>
                                   <packing>
                                     <property name="left_attach">1</property>
@@ -623,12 +647,11 @@ Online users</property>
                                 </child>
                                 <child>
                                   <widget class="GtkButton" id="dtmf_4">
+                                    <property name="label" translatable="yes">4</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">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="label" translatable="yes">4</property>
-                                    <property name="response_id">0</property>
                                   </widget>
                                   <packing>
                                     <property name="top_attach">1</property>
@@ -639,12 +662,11 @@ Online users</property>
                                 </child>
                                 <child>
                                   <widget class="GtkButton" id="dtmf_A">
+                                    <property name="label" translatable="yes">A</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">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="label" translatable="yes">A</property>
-                                    <property name="response_id">0</property>
                                   </widget>
                                   <packing>
                                     <property name="left_attach">3</property>
@@ -655,12 +677,11 @@ Online users</property>
                                 </child>
                                 <child>
                                   <widget class="GtkButton" id="dtmf_3">
+                                    <property name="label" translatable="yes">3</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">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="label" translatable="yes">3</property>
-                                    <property name="response_id">0</property>
                                   </widget>
                                   <packing>
                                     <property name="left_attach">2</property>
@@ -671,12 +692,11 @@ Online users</property>
                                 </child>
                                 <child>
                                   <widget class="GtkButton" id="dtmf_2">
+                                    <property name="label" translatable="yes">2</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">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="label" translatable="yes">2</property>
-                                    <property name="response_id">0</property>
                                   </widget>
                                   <packing>
                                     <property name="left_attach">1</property>
@@ -687,12 +707,11 @@ Online users</property>
                                 </child>
                                 <child>
                                   <widget class="GtkButton" id="dtmf_1">
+                                    <property name="label" translatable="yes">1</property>
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">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="label" translatable="yes">1</property>
-                                    <property name="response_id">0</property>
                                   </widget>
                                   <packing>
                                     <property name="x_options"></property>
@@ -718,6 +737,7 @@ Online users</property>
                       <packing>
                         <property name="expand">False</property>
                         <property name="fill">False</property>
+                        <property name="position">0</property>
                       </packing>
                     </child>
                   </widget>
@@ -755,13 +775,15 @@ Online users</property>
                           </widget>
                         </child>
                       </widget>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
                     </child>
                     <child>
                       <widget class="GtkButton" id="presence_button">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">True</property>
-                        <property name="response_id">0</property>
                         <signal name="clicked" handler="linphone_gtk_my_presence_clicked"/>
                         <child>
                           <placeholder/>
diff --git a/linphone/gtk-glade/setupwizard.c b/linphone/gtk-glade/setupwizard.c
index 46c92cb404..1546ef036f 100644
--- a/linphone/gtk-glade/setupwizard.c
+++ b/linphone/gtk-glade/setupwizard.c
@@ -65,7 +65,15 @@ GtkWidget *create_finish_page(){
 	return vbox;
 }
 
-GtkWidget * linphone_gtk_create_setup_wizard(void){
+static int next_page_handler(int curpage, gpointer data){
+	return curpage+1;
+}
+
+static void linphone_gtk_assistant_closed(GtkWidget *w){
+	gtk_widget_destroy(w);
+}
+
+GtkWidget * linphone_gtk_create_assistant(void){
 	GtkWidget *w=gtk_assistant_new();
 	GtkWidget *p1=create_intro();
 	GtkWidget *p2=create_setup_signin_choice();
@@ -74,15 +82,23 @@ GtkWidget * linphone_gtk_create_setup_wizard(void){
 	gtk_assistant_append_page(GTK_ASSISTANT(w),p1);
 	gtk_assistant_set_page_type(GTK_ASSISTANT(w),p1,GTK_ASSISTANT_PAGE_INTRO);
 	gtk_assistant_set_page_title(GTK_ASSISTANT(w),p1,_("Welcome to the account setup assistant"));
+	gtk_assistant_set_page_complete(GTK_ASSISTANT(w),p1,TRUE);
 	gtk_assistant_append_page(GTK_ASSISTANT(w),p2);
 	gtk_assistant_set_page_type(GTK_ASSISTANT(w),p2,GTK_ASSISTANT_PAGE_CONTENT);
 	gtk_assistant_set_page_title(GTK_ASSISTANT(w),p2,_("Account setup assistant"));
+	gtk_assistant_set_page_complete(GTK_ASSISTANT(w),p2,TRUE);
 	gtk_assistant_append_page(GTK_ASSISTANT(w),p3);
 	gtk_assistant_set_page_type(GTK_ASSISTANT(w),p3,GTK_ASSISTANT_PAGE_CONTENT);
 	gtk_assistant_set_page_title(GTK_ASSISTANT(w),p3,_("Account setup assistant - enter your information"));
 	gtk_assistant_append_page(GTK_ASSISTANT(w),p4);
 	gtk_assistant_set_page_type(GTK_ASSISTANT(w),p4,GTK_ASSISTANT_PAGE_SUMMARY);
 	gtk_assistant_set_page_title(GTK_ASSISTANT(w),p4,_("Now ready !"));
+	
+	gtk_assistant_set_forward_page_func(GTK_ASSISTANT(w),next_page_handler,w,NULL);
+	g_signal_connect(G_OBJECT(w),"close",(GCallback)linphone_gtk_assistant_closed,NULL);
+	g_signal_connect(G_OBJECT(w),"cancel",(GCallback)linphone_gtk_assistant_closed,NULL);
+	gtk_widget_show(w);
+	
 	return w;
 }
 
diff --git a/linphone/mediastreamer2/acinclude.m4 b/linphone/mediastreamer2/acinclude.m4
index d596f7f64a..09ae71f6c3 100644
--- a/linphone/mediastreamer2/acinclude.m4
+++ b/linphone/mediastreamer2/acinclude.m4
@@ -108,9 +108,30 @@ AC_DEFUN([MS_CHECK_VIDEO],[
 			fi
 		fi
 
+		AC_ARG_ENABLE(theora,
+		  [  --disable-theora    Disable theora support],
+		  [case "${enableval}" in
+			yes) theora=true ;;
+			no)  theora=false ;;
+			*) AC_MSG_ERROR(bad value ${enableval} for --disable-theora) ;;
+		  esac],[theora=true])
+
+		if test x$theora = xtrue; then
 		PKG_CHECK_MODULES(THEORA, [theora >= 1.0alpha7 ], [have_theora=yes],
 					[have_theora=no])
+		fi
+
+		AC_ARG_ENABLE(x11,
+		  [  --disable-x11    Disable X11 support],
+		  [case "${enableval}" in
+			yes) enable_x11=true ;;
+			no)  enable_x11=false ;;
+			*) AC_MSG_ERROR(bad value ${enableval} for --disable-x11) ;;
+		  esac],[enable_x11=true])
+
+		if test "$enable_x11" = "true"; then
 		AC_CHECK_HEADERS(X11/Xlib.h)
+		fi
 		
 		VIDEO_CFLAGS=" $FFMPEG_CFLAGS -DVIDEO_ENABLED"
 		VIDEO_LIBS=" $FFMPEG_LIBS $SWSCALE_LIBS"
diff --git a/linphone/mediastreamer2/configure.ac b/linphone/mediastreamer2/configure.ac
index 214d0c068f..ff26e2e2a6 100644
--- a/linphone/mediastreamer2/configure.ac
+++ b/linphone/mediastreamer2/configure.ac
@@ -152,6 +152,15 @@ dnl	*********************************
 
 found_sound=no
 
+AC_ARG_ENABLE(oss,
+      [  --enable-oss    Disable oss support],
+      [case "${enableval}" in
+        yes) oss=true ;;
+        no)  oss=false ;;
+        *) AC_MSG_ERROR(bad value ${enableval} for --disable-oss) ;;
+      esac],[oss=true])
+
+if "$oss" = "true"; then
 AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h sys/audio.h)
 if test "${ac_cv_header_sys_soundcard_h}" = "yes" || \
 	test "${ac_cv_header_soundcard_h}" = "yes" || \
@@ -159,6 +168,7 @@ if test "${ac_cv_header_sys_soundcard_h}" = "yes" || \
 	test "${ac_cv_header_machine_soundcard_h}" = "yes"; then
 	found_sound=yes
 fi
+fi
 
 AM_CONDITIONAL(BUILD_OSS, test x$found_sound = xyes)
 
@@ -188,12 +198,12 @@ AM_CONDITIONAL(BUILD_ALSA, test x$alsa_enabled = xtrue)
 
 
 AC_ARG_ENABLE(artsc,
-      [  --enable-artsc    Turn on artsc (kde) sound input/output (auto) ],
+      [  --enable-artsc    Turn on artsc (kde<4) sound input/output (no) ],
       [case "${enableval}" in
         yes) artsc=true ;;
         no)  artsc=false ;;
         *) AC_MSG_ERROR(bad value ${enableval} for --enable-artsc) ;;
-      esac],[artsc=true])
+      esac],[artsc=no])
 
 arts_enabled=false
 
@@ -280,6 +290,16 @@ fi
 
 AM_CONDITIONAL(BUILD_MACAQSND, test x$macaqsnd_enabled = xtrue)
 
+AC_ARG_ENABLE(jack,
+      [  --disable-jack    Disable jack support],
+      [case "${enableval}" in
+        yes) jack=true ;;
+        no)  jack=false ;;
+        *) AC_MSG_ERROR(bad value ${enableval} for --disable-jack) ;;
+      esac],[jack=true])
+
+if test x$jack = xtrue; then
+
 dnl Check for samplerate libraries
 dnl Check for jack libraries (sound output plugin)
 PKG_CHECK_MODULES(JACK,jack >= 0.15.0, 
@@ -306,6 +326,8 @@ fi
 AC_SUBST(JACK_CFLAGS)
 AC_SUBST(JACK_LIBS) 
 
+fi
+
 if test "$found_sound" = "no"; then
 	AC_MSG_ERROR([Could not find a support sound driver API])
 fi
@@ -315,6 +337,16 @@ dnl	*************************************
 dnl	check for various codecs libraries
 dnl	*************************************
 
+AC_ARG_ENABLE(speex,
+      [  --disable-speex    Disable speex support],
+      [case "${enableval}" in
+        yes) speex=true ;;
+        no)  speex=false ;;
+        *) AC_MSG_ERROR(bad value ${enableval} for --disable-speex) ;;
+      esac],[speex=true])
+
+if test x$speex = xtrue; then
+
 dnl check for installed version of speex
 PKG_CHECK_MODULES(SPEEX, speex >= 1.2beta3,
 	[ AC_DEFINE(HAVE_SPEEX_NOISE,1,[tells whether the noise arg of speex_echo_cancel can be used]) ],
@@ -331,9 +363,22 @@ PKG_CHECK_MODULES(SPEEXDSP, speexdsp >= 1.2beta3,
 )
 AC_SUBST(SPEEX_CFLAGS)
 AC_SUBST(SPEEX_LIBS)
+
+fi
+
 AM_CONDITIONAL(BUILD_SPEEX, test x$build_speex = xyes )
 AM_CONDITIONAL(BUILD_RESAMPLE, test x$build_resample = xyes )
 
+AC_ARG_ENABLE(gsm,
+      [  --disable-gsm    Disable gsm support],
+      [case "${enableval}" in
+        yes) gsm=true ;;
+        no)  gsm=false ;;
+        *) AC_MSG_ERROR(bad value ${enableval} for --disable-gsm) ;;
+      esac],[gsm=true])
+
+if test x$gsm = xtrue; then
+
 dnl check for gsm
 build_gsm=no
 AC_ARG_WITH( gsm,
@@ -350,6 +395,9 @@ if test x"$gsmdir" != xno ; then
 else
 	build_gsm=no
 fi
+
+fi
+
 AM_CONDITIONAL(BUILD_GSM, test x$build_gsm = xyes )
 
 MS_CHECK_VIDEO
diff --git a/linphone/mediastreamer2/src/theora.c b/linphone/mediastreamer2/src/theora.c
index 356ef66d72..ffcc9d3f66 100644
--- a/linphone/mediastreamer2/src/theora.c
+++ b/linphone/mediastreamer2/src/theora.c
@@ -31,6 +31,7 @@ typedef struct EncState{
 	uint64_t start_time;
 	uint64_t conf_time;
 	unsigned int mtu;
+	unsigned int nframes;
 } EncState;
 
 static void enc_init(MSFilter *f){
@@ -63,6 +64,7 @@ static void enc_init(MSFilter *f){
 	s->start_time=0;
 	s->conf_time=0;
 	s->mtu=ms_get_payload_max_size()-6;
+	s->nframes=0;
 	f->data=s;
 }
 
@@ -121,7 +123,7 @@ static int enc_set_br(MSFilter *f, void*data){
 	vsize.width=s->tinfo.width;
 	vsize.height=s->tinfo.height;
 	fps=s->tinfo.fps_numerator;
-	s->tinfo.target_bitrate=codecbr*0.8;
+	s->tinfo.target_bitrate=codecbr*0.9;
 	s->tinfo.keyframe_data_target_bitrate=codecbr;
 	/*those default settings would need to be affined*/
 	if (br>=1024000){
@@ -237,7 +239,7 @@ static void enc_preprocess(MSFilter *f){
 	s->yuv.uv_stride=s->tinfo.width/2;
 	create_packed_conf(s);
 	s->conf_time=0;
-	s->start_time=f->ticker->time;
+	s->nframes=0;
 }
 
 static void enc_postprocess(MSFilter *f){
@@ -306,8 +308,9 @@ bool_t need_send_conf(EncState *s, uint64_t elapsed){
 	}
 #else
 	/*send immediately then 10 seconds later */
-	if ( (elapsed<1000 && s->conf_time==0)
-		|| (elapsed>10000 && s->conf_time==1)){
+	if ( (elapsed==0 && s->conf_time==0)
+		|| (elapsed>=3000 && s->conf_time==1)
+		|| (elapsed>=10000 && s->conf_time==2)){
 		s->conf_time++;
 		return TRUE;
 	}
@@ -321,10 +324,16 @@ static void enc_process(MSFilter *f){
 	EncState *s=(EncState*)f->data;
 	uint64_t timems=f->ticker->time;
 	uint32_t timestamp=timems*90;
-	uint64_t elapsed=timems-s->start_time;
+	uint64_t elapsed;
+
+	
 	while((im=ms_queue_get(f->inputs[0]))!=NULL){
 		/*for the firsts frames only send theora packed conf*/
 		om=NULL;
+		if (s->nframes==0){
+			s->start_time=timems;
+		}
+		elapsed=timems-s->start_time;
 
 		if (need_send_conf(s,elapsed)){
 			if (s->packed_conf) {
diff --git a/linphone/oRTP/include/ortp/payloadtype.h b/linphone/oRTP/include/ortp/payloadtype.h
index 2d77094885..91e11d5091 100644
--- a/linphone/oRTP/include/ortp/payloadtype.h
+++ b/linphone/oRTP/include/ortp/payloadtype.h
@@ -183,6 +183,7 @@ VAR_DECLSPEC PayloadType payload_type_amr;
 VAR_DECLSPEC PayloadType payload_type_amrwb;
 VAR_DECLSPEC PayloadType payload_type_truespeech;
 VAR_DECLSPEC PayloadType payload_type_evrc0;
+VAR_DECLSPEC PayloadType payload_type_evrcb0;
 
 /* video */
 VAR_DECLSPEC PayloadType payload_type_mpv;
diff --git a/linphone/oRTP/src/avprofile.c b/linphone/oRTP/src/avprofile.c
index a751ce95f8..cd86eb29de 100644
--- a/linphone/oRTP/src/avprofile.c
+++ b/linphone/oRTP/src/avprofile.c
@@ -412,6 +412,16 @@ PayloadType payload_type_evrc0={
 	CHANNELS(1)
 };
 
+PayloadType payload_type_evrcb0={
+	TYPE(PAYLOAD_AUDIO_PACKETIZED),
+	CLOCK_RATE(8000),
+	BITS_PER_SAMPLE(0),
+	ZERO_PATTERN(NULL),
+	PATTERN_LENGTH(0),
+	NORMAL_BITRATE(0),
+	MIME_TYPE ("EVRCB0"),
+	CHANNELS(1)
+};
  
 PayloadType payload_type_h263_1998={
 	TYPE( PAYLOAD_VIDEO),
-- 
GitLab