mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-30 17:59:21 +00:00
Bugfixing of dynamic video add/remove
This commit is contained in:
parent
15453f7044
commit
20d21f4b5b
3 changed files with 8 additions and 2 deletions
|
|
@ -1218,7 +1218,7 @@ static void linphone_call_start_video_stream(LinphoneCall *call, const char *cna
|
|||
video_preview_stop(lc->previewstream);
|
||||
lc->previewstream=NULL;
|
||||
}
|
||||
call->current_params.has_video=FALSE;
|
||||
|
||||
if (vstream!=NULL && vstream->dir!=SalStreamInactive && vstream->port!=0) {
|
||||
const char *addr=vstream->addr[0]!='\0' ? vstream->addr : call->resultdesc->addr;
|
||||
call->video_profile=make_profile(call,call->resultdesc,vstream,&used_pt);
|
||||
|
|
@ -1315,6 +1315,7 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut
|
|||
}
|
||||
#endif
|
||||
linphone_call_start_audio_stream(call,cname,all_inputs_muted,send_ringbacktone,use_arc);
|
||||
call->current_params.has_video=FALSE;
|
||||
if (call->videostream!=NULL) {
|
||||
linphone_call_start_video_stream(call,cname,all_inputs_muted);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2294,6 +2294,7 @@ int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const Linpho
|
|||
if (params!=NULL){
|
||||
const char *subject;
|
||||
call->params=*params;
|
||||
call->camera_active=call->params.has_video;
|
||||
update_local_media_description(lc,call);
|
||||
|
||||
if (params->in_conference){
|
||||
|
|
@ -2370,6 +2371,7 @@ int linphone_core_accept_call_update(LinphoneCore *lc, LinphoneCall *call, const
|
|||
}
|
||||
if (params){
|
||||
call->params=*params;
|
||||
call->camera_active=call->params.has_video;
|
||||
update_local_media_description(lc,call);
|
||||
sal_call_set_local_media_description(call->op,call->localdesc);
|
||||
}
|
||||
|
|
@ -2476,6 +2478,7 @@ int linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call,
|
|||
|
||||
if (params){
|
||||
call->params=*params;
|
||||
call->camera_active=call->params.has_video;
|
||||
update_local_media_description(lc,call);
|
||||
sal_call_set_local_media_description(call->op,call->localdesc);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -231,9 +231,11 @@ static void video_button_clicked(GtkWidget *button, LinphoneCall *call){
|
|||
|
||||
void linphone_gtk_update_video_button(LinphoneCall *call){
|
||||
GtkWidget *call_view=(GtkWidget*)linphone_call_get_user_pointer(call);
|
||||
GtkWidget *button=linphone_gtk_get_widget(call_view,"video_button");
|
||||
GtkWidget *button;
|
||||
const LinphoneCallParams *params=linphone_call_get_current_params(call);
|
||||
gboolean has_video=linphone_call_params_video_enabled(params);
|
||||
if (call_view==NULL) return;
|
||||
button=linphone_gtk_get_widget(call_view,"video_button");
|
||||
|
||||
gtk_button_set_image(GTK_BUTTON(button),
|
||||
gtk_image_new_from_stock(has_video ? GTK_STOCK_REMOVE : GTK_STOCK_ADD,GTK_ICON_SIZE_BUTTON));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue