Commit 1d3ba8e0 authored by Yann Diorcet's avatar Yann Diorcet
Browse files

Merge branch 'master' of git.linphone.org:linphone into belle-sip

parents b5db1828 a8f757be
......@@ -55,22 +55,38 @@ static void remove_local_endpoint(LinphoneConference *ctx){
}
}
static int linphone_conference_get_size(LinphoneConference *conf){
if (conf->conf == NULL) {
return 0;
}
return ms_audio_conference_get_size(conf->conf) - (conf->record_endpoint ? 1 : 0);
}
static int remote_participants_count(LinphoneConference *ctx) {
if (!ctx->conf || ms_audio_conference_get_size(ctx->conf)==0) return 0;
if (!ctx->local_participant) return ms_audio_conference_get_size(ctx->conf);
return ms_audio_conference_get_size(ctx->conf) -1;
int count=linphone_conference_get_size(ctx);
if (count==0) return 0;
if (!ctx->local_participant) return count;
return count -1;
}
void linphone_core_conference_check_uninit(LinphoneCore *lc){
LinphoneConference *ctx=&lc->conf_ctx;
if (ctx->conf){
ms_message("conference_check_uninit(): nmembers=%i",ms_audio_conference_get_size(ctx->conf));
if (remote_participants_count(ctx)==1){
int remote_count=remote_participants_count(ctx);
ms_message("conference_check_uninit(): size=%i",linphone_conference_get_size(ctx));
if (remote_count==1){
convert_conference_to_call(lc);
}
if (ms_audio_conference_get_size(ctx->conf)==1 && ctx->local_participant!=NULL){
remove_local_endpoint(ctx);
if (remote_count==0){
if (ctx->local_participant!=NULL)
remove_local_endpoint(ctx);
if (ctx->record_endpoint){
ms_audio_conference_remove_member(ctx->conf,ctx->record_endpoint);
ms_audio_endpoint_destroy(ctx->record_endpoint);
ctx->record_endpoint=NULL;
}
}
if (ms_audio_conference_get_size(ctx->conf)==0){
ms_audio_conference_destroy(ctx->conf);
ctx->conf=NULL;
......@@ -381,10 +397,37 @@ int linphone_core_terminate_conference(LinphoneCore *lc) {
* @returns the number of participants to the conference
**/
int linphone_core_get_conference_size(LinphoneCore *lc) {
if (lc->conf_ctx.conf == NULL) {
return 0;
LinphoneConference *conf=&lc->conf_ctx;
return linphone_conference_get_size(conf);
}
int linphone_core_start_conference_recording(LinphoneCore *lc, const char *path){
LinphoneConference *conf=&lc->conf_ctx;
if (conf->conf == NULL) {
ms_warning("linphone_core_start_conference_recording(): no conference now.");
return -1;
}
if (conf->record_endpoint==NULL){
conf->record_endpoint=ms_audio_endpoint_new_recorder();
ms_audio_conference_add_member(conf->conf,conf->record_endpoint);
}
return ms_audio_conference_get_size(lc->conf_ctx.conf);
ms_audio_recorder_endpoint_start(conf->record_endpoint,path);
return 0;
}
int linphone_core_stop_conference_recording(LinphoneCore *lc){
LinphoneConference *conf=&lc->conf_ctx;
if (conf->conf == NULL) {
ms_warning("linphone_core_stop_conference_recording(): no conference now.");
return -1;
}
if (conf->record_endpoint==NULL){
ms_warning("linphone_core_stop_conference_recording(): no record active.");
return -1;
}
ms_audio_recorder_endpoint_stop(conf->record_endpoint);
return 0;
}
/**
......
......@@ -92,12 +92,7 @@ int lc_callback_obj_invoke(LCCallbackObj *obj, LinphoneCore *lc){
/*prevent a gcc bug with %c*/
static size_t my_strftime(char *s, size_t max, const char *fmt, const struct tm *tm){
#if !defined(_WIN32_WCE)
return strftime(s, max, fmt, tm);
#else
return 0;
/*FIXME*/
#endif /*_WIN32_WCE*/
}
static void set_call_log_date(LinphoneCallLog *cl, time_t start_time){
......@@ -120,7 +115,7 @@ LinphoneCallLog * linphone_call_log_new(LinphoneCall *call, LinphoneAddress *fro
set_call_log_date(cl,cl->start_date_time);
cl->from=from;
cl->to=to;
cl->status=LinphoneCallAborted; /*default status*/
cl->status=LinphoneCallAborted; /*default status*/
return cl;
}
......@@ -2887,8 +2882,8 @@ int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const Linpho
}
#endif //BUILD_UPNP
}
call->params = *params;
_linphone_call_params_copy(&call->params,params);
linphone_call_make_local_media_description(lc, call);
// Video adding
......
......@@ -1368,6 +1368,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_start_conference_recording(LinphoneCore *lc, const char *path);
int linphone_core_stop_conference_recording(LinphoneCore *lc);
int linphone_core_get_max_calls(LinphoneCore *lc);
void linphone_core_set_max_calls(LinphoneCore *lc, int max);
......
......@@ -2060,9 +2060,11 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_leaveConference(JNIEnv *
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_addAllToConference(JNIEnv *env,jobject thiz,jlong pCore) {
linphone_core_add_all_to_conference((LinphoneCore *) pCore);
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_addToConference(JNIEnv *env,jobject thiz,jlong pCore, jlong pCall) {
linphone_core_add_to_conference((LinphoneCore *) pCore, (LinphoneCall *) pCall);
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_removeFromConference(JNIEnv *env,jobject thiz,jlong pCore, jlong pCall) {
linphone_core_remove_from_conference((LinphoneCore *) pCore, (LinphoneCall *) pCall);
}
......@@ -2073,6 +2075,22 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_terminateConference(JNIE
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getConferenceSize(JNIEnv *env,jobject thiz,jlong pCore) {
return (jint)linphone_core_get_conference_size((LinphoneCore *) pCore);
}
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_startConferenceRecording(JNIEnv *env,jobject thiz,jlong pCore, jstring jpath){
int err=-1;
if (jpath){
const char *path=env->GetStringUTFChars(jpath, NULL);
err=linphone_core_start_conference_recording((LinphoneCore*)pCore,path);
env->ReleaseStringUTFChars(jpath,path);
}
return err;
}
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_stopConferenceRecording(JNIEnv *env,jobject thiz,jlong pCore){
int err=linphone_core_stop_conference_recording((LinphoneCore*)pCore);
return err;
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_terminateAllCalls(JNIEnv *env,jobject thiz,jlong pCore) {
linphone_core_terminate_all_calls((LinphoneCore *) pCore);
}
......
......@@ -537,6 +537,7 @@ struct _LinphoneConference{
MSAudioConference *conf;
AudioStream *local_participant;
MSAudioEndpoint *local_endpoint;
MSAudioEndpoint *record_endpoint;
RtpProfile *local_dummy_profile;
bool_t local_muted;
};
......
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.24"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkDialog" id="call_statistics">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Call statistics</property>
<property name="type_hint">dialog</property>
<signal name="response" handler="linphone_gtk_call_statistics_closed"/>
<signal name="response" handler="linphone_gtk_call_statistics_closed" swapped="no"/>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkButton" id="button1">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkTable" id="table1">
<property name="visible">True</property>
<property name="n_rows">6</property>
<property name="can_focus">False</property>
<property name="n_rows">7</property>
<property name="n_columns">2</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkLabel" id="audio_codec_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Audio codec</property>
</object>
<packing>
......@@ -38,6 +75,7 @@
<child>
<object class="GtkLabel" id="video_codec_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Video codec</property>
</object>
<packing>
......@@ -49,6 +87,7 @@
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Audio IP bandwidth usage</property>
</object>
<packing>
......@@ -60,6 +99,7 @@
<child>
<object class="GtkLabel" id="audio_codec">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">1</property>
......@@ -69,6 +109,7 @@
<child>
<object class="GtkLabel" id="video_codec">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">1</property>
......@@ -80,6 +121,7 @@
<child>
<object class="GtkLabel" id="audio_bandwidth_usage">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">1</property>
......@@ -91,6 +133,7 @@
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Audio Media connectivity</property>
</object>
<packing>
......@@ -102,6 +145,7 @@
<child>
<object class="GtkLabel" id="audio_media_connectivity">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">1</property>
......@@ -113,6 +157,7 @@
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Video IP bandwidth usage</property>
</object>
<packing>
......@@ -124,6 +169,7 @@
<child>
<object class="GtkLabel" id="video_bandwidth_usage">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">1</property>
......@@ -135,6 +181,7 @@
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Video Media connectivity</property>
</object>
<packing>
......@@ -145,6 +192,7 @@
<child>
<object class="GtkLabel" id="video_media_connectivity">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">1</property>
......@@ -153,6 +201,29 @@
<property name="bottom_attach">6</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">Round trip time</property>
</object>
<packing>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="round_trip_time">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
</packing>
</child>
</object>
</child>
</object>
......@@ -160,6 +231,7 @@
<child type="label">
<object class="GtkLabel" id="call_statistics_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Call statistics and information&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
......@@ -171,34 +243,6 @@
<property name="position">1</property>
</packing>
</child>
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area1">
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkButton" id="button1">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
<action-widgets>
......
......@@ -27,6 +27,11 @@
#define PADDING_PIXELS 4
/*
* conferencee_box = a vbox where participants are added or removed
* conf_frame = the conference tab
*/
static GtkWidget *create_conference_label(void){
GtkWidget *box=gtk_hbox_new(FALSE,0);
gtk_box_pack_start(GTK_BOX(box),gtk_image_new_from_stock(GTK_STOCK_ADD,GTK_ICON_SIZE_MENU),FALSE,FALSE,0);
......@@ -46,34 +51,21 @@ static void init_local_participant(GtkWidget *participant){
linphone_gtk_init_audio_meter(sound_meter, (get_volume_t) linphone_core_get_conference_local_input_volume, linphone_gtk_get_core());
}
static GtkWidget *get_conference_tab(GtkWidget *mw){
GtkWidget *box=(GtkWidget*)g_object_get_data(G_OBJECT(mw),"conference_tab");
GtkWidget *conf_frame=(GtkWidget*)g_object_get_data(G_OBJECT(mw),"conf_frame");
if(conf_frame!=NULL){
if (box==NULL){
GtkWidget *conf_box=linphone_gtk_get_widget(conf_frame,"conf_box");
box=gtk_vbox_new(FALSE,0);
GtkWidget *participant=linphone_gtk_create_widget("main","callee_frame");
gtk_box_set_homogeneous(GTK_BOX(box),TRUE);
init_local_participant(participant);
gtk_box_pack_start(GTK_BOX(box),participant,FALSE,FALSE,PADDING_PIXELS);
gtk_widget_show(box);
g_object_set_data(G_OBJECT(mw),"conference_tab",box);
gtk_box_pack_start(GTK_BOX(conf_box),box,FALSE,FALSE,PADDING_PIXELS);
}
}
static GtkWidget *get_conferencee_box(GtkWidget *mw){
GtkWidget *box=(GtkWidget*)g_object_get_data(G_OBJECT(mw),"conferencee_box");
return box;
}
static GtkWidget *find_conferencee_from_call(LinphoneCall *call){
GtkWidget *mw=linphone_gtk_get_main_window();
get_conference_tab(mw);
GtkWidget *conf_frame=(GtkWidget *)g_object_get_data(G_OBJECT(mw),"conf_frame");
GtkWidget *conf_box=linphone_gtk_get_widget(conf_frame,"conf_box");
GtkWidget *conferencee_box=get_conferencee_box(mw);
GList *elem;
GtkWidget *ret=NULL;
if (conferencee_box==NULL) return NULL;
if (call!=NULL){
GList *l=gtk_container_get_children(GTK_CONTAINER(conf_box));
GList *l=gtk_container_get_children(GTK_CONTAINER(conferencee_box));
for(elem=l;elem!=NULL;elem=elem->next){
GtkWidget *frame=(GtkWidget*)elem->data;
if (call==g_object_get_data(G_OBJECT(frame),"call")){
......@@ -87,28 +79,53 @@ static GtkWidget *find_conferencee_from_call(LinphoneCall *call){
return ret;
}
void linphone_gtk_set_in_conference(LinphoneCall *call){
static GtkWidget * create_conference_panel(void){
GtkWidget *mw=linphone_gtk_get_main_window();
GtkWidget *conf_frame=linphone_gtk_create_widget("main","conf_frame");
GtkWidget *conf_box=linphone_gtk_get_widget(conf_frame,"conf_box");
GtkWidget *button_conf=linphone_gtk_get_widget(conf_frame,"terminate_conf");
GtkWidget *image=create_pixmap("stopcall-small.png");
GtkWidget *box;
GtkWidget *viewswitch=linphone_gtk_get_widget(mw,"viewswitch");
gtk_button_set_image(GTK_BUTTON(button_conf),image);
g_signal_connect_swapped(G_OBJECT(button_conf),"clicked",(GCallback)linphone_gtk_terminate_call,NULL);
g_object_set_data(G_OBJECT(mw),"conf_frame",(gpointer)conf_frame);
box=gtk_vbox_new(FALSE,0);
GtkWidget *participant=linphone_gtk_create_widget("main","callee_frame");
gtk_widget_show(participant);
gtk_box_set_homogeneous(GTK_BOX(box),TRUE);
init_local_participant(participant);
gtk_box_pack_start(GTK_BOX(box),participant,FALSE,FALSE,PADDING_PIXELS);
gtk_widget_show(box);
g_object_set_data(G_OBJECT(mw),"conferencee_box",box);
gtk_box_pack_start(GTK_BOX(conf_box),box,FALSE,FALSE,PADDING_PIXELS);
gtk_notebook_append_page(GTK_NOTEBOOK(viewswitch),conf_frame,
create_conference_label());
return conf_frame;
}
void linphone_gtk_set_in_conference(LinphoneCall *call){
GtkWidget *mw=linphone_gtk_get_main_window();
GtkWidget *conf_frame=(GtkWidget *)g_object_get_data(G_OBJECT(mw),"conf_frame");
g_object_set_data(G_OBJECT(mw),"is_conf",GINT_TO_POINTER(TRUE));
GtkWidget *viewswitch=linphone_gtk_get_widget(mw,"viewswitch");
if(conf_frame==NULL){
conf_frame=linphone_gtk_create_widget("main","conf_frame");
GtkWidget *button_conf=linphone_gtk_get_widget(conf_frame,"terminate_conf");
GtkWidget *image=create_pixmap("stopcall-small.png");
gtk_button_set_image(GTK_BUTTON(button_conf),image);
g_signal_connect_swapped(G_OBJECT(button_conf),"clicked",(GCallback)linphone_gtk_terminate_call,NULL);
g_object_set_data(G_OBJECT(mw),"conf_frame",(gpointer)conf_frame);
gtk_notebook_append_page(GTK_NOTEBOOK(viewswitch),conf_frame,
create_conference_label());
conf_frame=create_conference_panel();
}
GtkWidget *participant=find_conferencee_from_call(call);
GtkWidget *conf_box=linphone_gtk_get_widget(conf_frame,"conf_box");
GtkWidget *participant=find_conferencee_from_call(call);
if (participant==NULL){
const LinphoneAddress *addr=linphone_call_get_remote_address(call);
participant=linphone_gtk_create_widget("main","callee_frame");
/*create and add it */
GtkWidget *conferencee_box=get_conferencee_box(mw);
GtkWidget *sound_meter;
const LinphoneAddress *addr=linphone_call_get_remote_address(call);
gchar *markup;
participant=linphone_gtk_create_widget("main","callee_frame");
gtk_widget_show(participant);
if (linphone_address_get_display_name(addr)!=NULL){
markup=g_strdup_printf("<b>%s</b>",linphone_address_get_display_name(addr));
}else{
......@@ -119,11 +136,11 @@ void linphone_gtk_set_in_conference(LinphoneCall *call){
gtk_label_set_markup(GTK_LABEL(linphone_gtk_get_widget(participant,"callee_name_label")),markup);
g_free(markup);
sound_meter=linphone_gtk_get_widget(participant,"sound_indicator");
linphone_gtk_init_audio_meter(sound_meter, (get_volume_t) linphone_call_get_play_volume, call);
gtk_box_pack_start(GTK_BOX(conf_box),participant,FALSE,FALSE,PADDING_PIXELS);
linphone_gtk_init_audio_meter(sound_meter, (get_volume_t) linphone_call_get_play_volume, call);
gtk_box_pack_start(GTK_BOX(conferencee_box),participant,FALSE,FALSE,PADDING_PIXELS);
g_object_set_data_full(G_OBJECT(participant),"call",linphone_call_ref(call),(GDestroyNotify)linphone_call_unref);
gtk_notebook_set_current_page(GTK_NOTEBOOK(viewswitch),
gtk_notebook_page_num(GTK_NOTEBOOK(viewswitch),conf_frame));
gtk_notebook_page_num(GTK_NOTEBOOK(viewswitch),conf_frame));
}
}
......@@ -135,24 +152,26 @@ void linphone_gtk_terminate_conference_participant(LinphoneCall *call){
}
void linphone_gtk_unset_from_conference(LinphoneCall *call){
GtkWidget *mw=linphone_gtk_get_main_window();
GtkWidget *conf_frame=(GtkWidget *)g_object_get_data(G_OBJECT(mw),"conf_frame");
GtkWidget *conf_box=linphone_gtk_get_widget(conf_frame,"conf_box");
GtkWidget *frame;
if (conf_box==NULL) return; /*conference tab already destroyed*/
frame=find_conferencee_from_call(call);
GList *children;
GtkWidget *frame=find_conferencee_from_call(call);
if (frame){
GtkWidget *mw=linphone_gtk_get_main_window();
GtkWidget *conf_frame=(GtkWidget *)g_object_get_data(G_OBJECT(mw),"conf_frame");
GtkWidget *conferencee_box=g_object_get_data(G_OBJECT(mw),"conferencee_box");
GList *children;
g_message("Removing a participant from conference");
gtk_widget_destroy(frame);
children=gtk_container_get_children(GTK_CONTAINER(conferencee_box));
if (g_list_length(children)==1){ /* only local participant */
/*the conference is terminated */
g_message("The conference is terminated");
g_object_set_data(G_OBJECT(mw),"conferencee_box",NULL);
gtk_widget_destroy(conf_frame);
g_object_set_data(G_OBJECT(mw),"conf_frame",NULL);
}
g_list_free(children);
}
children=gtk_container_get_children(GTK_CONTAINER(conf_box));
if (g_list_length(children)==2){
/*the conference is terminated */
gtk_widget_destroy(conf_box);
g_object_set_data(G_OBJECT(mw),"conference_tab",NULL);
}
gtk_widget_destroy(conf_frame);
g_list_free(children);
g_object_set_data(G_OBJECT(mw),"is_conf",GINT_TO_POINTER(FALSE));
g_object_set_data(G_OBJECT(mw),"conf_frame",NULL);
}
......@@ -50,7 +50,8 @@ LinphoneCall *linphone_gtk_get_currently_displayed_call(gboolean *is_conf){
if (page!=NULL){
LinphoneCall *call=(LinphoneCall*)g_object_get_data(G_OBJECT(page),"call");
if (call==NULL){
if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(main_window),"is_conf"))){
GtkWidget *conf_frame=(GtkWidget *)g_object_get_data(G_OBJECT(main_window),"conf_frame");
if (conf_frame==page){
if (is_conf)
*is_conf=TRUE;
return NULL;
......@@ -75,25 +76,28 @@ static GtkWidget *make_tab_header(int number){
}
void update_tab_header(LinphoneCall *call,gboolean pause){
GtkWidget *w=(GtkWidget*)linphone_call_get_user_pointer(call);
GtkWidget *main_window=linphone_gtk_get_main_window();
GtkNotebook *notebook=GTK_NOTEBOOK(linphone_gtk_get_widget(main_window,"viewswitch"));
gint call_index=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"call_index"));
GtkWidget *new_label=gtk_hbox_new (FALSE,0);
GtkWidget *i=NULL;
if(pause){
i=gtk_image_new_from_stock(GTK_STOCK_MEDIA_PAUSE,GTK_ICON_SIZE_SMALL_TOOLBAR);
} else {
i=create_pixmap ("startcall-small.png");
}
GtkWidget *w=(GtkWidget*)linphone_call_get_user_pointer(call);
GtkWidget *main_window=linphone_gtk_get_main_window();
GtkNotebook *notebook=GTK_NOTEBOOK(linphone_gtk_get_widget(main_window,"viewswitch"));