mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
Handle conference and on hold music.
When hosting a conference, mute conference participant when he pauses us to prevent his holding music to be played to all participants. When resuming a call, stop immediately sending the hold music, even before receiving the 200OK. When the paused call is a conference, it prevents the conference participants to hear the hold music while the 200OK is back.
This commit is contained in:
parent
6892c98ccd
commit
b59cdd29c0
5 changed files with 15 additions and 5 deletions
|
|
@ -60,8 +60,7 @@ void linphone_core_conference_check_uninit(LinphoneConference *ctx){
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void linphone_call_add_to_conf(LinphoneCall *call){
|
||||
void linphone_call_add_to_conf(LinphoneCall *call, bool_t muted){
|
||||
LinphoneCore *lc=call->core;
|
||||
LinphoneConference *conf=&lc->conf_ctx;
|
||||
MSAudioEndpoint *ep;
|
||||
|
|
@ -69,6 +68,7 @@ void linphone_call_add_to_conf(LinphoneCall *call){
|
|||
call->camera_active = FALSE;
|
||||
ep=ms_audio_endpoint_get_from_stream(call->audiostream,TRUE);
|
||||
ms_audio_conference_add_member(conf->conf,ep);
|
||||
ms_audio_conference_mute_member(conf->conf,ep,muted);
|
||||
call->endpoint=ep;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1140,7 +1140,8 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cna
|
|||
}else call->audiostream_encrypted=FALSE;
|
||||
if (call->params.in_conference){
|
||||
/*transform the graph to connect it to the conference filter */
|
||||
linphone_call_add_to_conf(call);
|
||||
bool_t mute=stream->dir==SalStreamRecvOnly;
|
||||
linphone_call_add_to_conf(call, mute);
|
||||
}
|
||||
call->current_params.in_conference=call->params.in_conference;
|
||||
}else ms_warning("No audio stream accepted ?");
|
||||
|
|
|
|||
|
|
@ -2581,6 +2581,11 @@ int linphone_core_resume_call(LinphoneCore *lc, LinphoneCall *the_call)
|
|||
linphone_core_preempt_sound_resources(lc);
|
||||
ms_message("Resuming call %p",call);
|
||||
}
|
||||
|
||||
// Stop playing music immediately. If remote side is a conference it
|
||||
// prevents the participants to hear it while the 200OK comes back.
|
||||
audio_stream_play(call->audiostream, NULL);
|
||||
|
||||
update_local_media_description(lc,the_call,&call->localdesc);
|
||||
sal_call_set_local_media_description(call->op,call->localdesc);
|
||||
sal_media_description_set_dir(call->localdesc,SalStreamSendRecv);
|
||||
|
|
|
|||
|
|
@ -520,7 +520,11 @@ void linphone_call_background_tasks(LinphoneCall *call, bool_t one_second_elapse
|
|||
void linphone_core_preempt_sound_resources(LinphoneCore *lc);
|
||||
/*conferencing subsystem*/
|
||||
void _post_configure_audio_stream(AudioStream *st, LinphoneCore *lc, bool_t muted);
|
||||
void linphone_call_add_to_conf(LinphoneCall *call);
|
||||
/* When a conference participant pause the conference he may send a music.
|
||||
* We don't want to hear that music or to send it to the other participants.
|
||||
* Use muted=yes to handle this case.
|
||||
*/
|
||||
void linphone_call_add_to_conf(LinphoneCall *call, bool_t muted);
|
||||
void linphone_call_remove_from_conf(LinphoneCall *call);
|
||||
void linphone_core_conference_check_uninit(LinphoneConference *ctx);
|
||||
bool_t linphone_core_sound_resources_available(LinphoneCore *lc);
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit f27d83cdfd08bd590d73a3e6f632a6237acbf0e7
|
||||
Subproject commit c53138bdb19b50f7357d0bee621de0a7be9bd601
|
||||
Loading…
Add table
Reference in a new issue