mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 19:18:06 +00:00
Fixes regression about early-media call
The camera was not enabled again after recieving the 200 Ok response while an outgoing early media call establishment.
This commit is contained in:
parent
991f4338e4
commit
3858fcdb0f
2 changed files with 19 additions and 11 deletions
|
|
@ -158,12 +158,12 @@ void linphone_core_update_streams(LinphoneCore *lc, LinphoneCall *call, SalMedia
|
|||
if (call->all_muted){
|
||||
ms_message("Early media finished, unmuting inputs...");
|
||||
/*we were in early media, now we want to enable real media */
|
||||
linphone_call_enable_camera (call,linphone_call_camera_enabled (call));
|
||||
call->all_muted = FALSE;
|
||||
if (call->audiostream)
|
||||
linphone_core_enable_mic(lc, linphone_core_mic_enabled(lc));
|
||||
#ifdef VIDEO_ENABLED
|
||||
if (call->videostream && call->camera_enabled)
|
||||
video_stream_change_camera(call->videostream,linphone_call_get_video_device(call));
|
||||
linphone_call_enable_camera(call, linphone_call_camera_enabled(call));
|
||||
#endif
|
||||
}
|
||||
/*FIXME ZRTP, might be restarted in any cases ? */
|
||||
|
|
|
|||
|
|
@ -2054,15 +2054,23 @@ LinphoneCall *linphone_call_get_replaced_call(LinphoneCall *call){
|
|||
void linphone_call_enable_camera (LinphoneCall *call, bool_t enable){
|
||||
#ifdef VIDEO_ENABLED
|
||||
call->camera_enabled=enable;
|
||||
if ((call->state==LinphoneCallStreamsRunning || call->state==LinphoneCallOutgoingEarlyMedia || call->state==LinphoneCallIncomingEarlyMedia)
|
||||
&& call->videostream!=NULL && video_stream_started(call->videostream) ){
|
||||
if (video_stream_get_camera(call->videostream) != linphone_call_get_video_device(call)) {
|
||||
const char *cur_cam, *new_cam;
|
||||
cur_cam = video_stream_get_camera(call->videostream) ? ms_web_cam_get_name(video_stream_get_camera(call->videostream)) : "NULL";
|
||||
new_cam = linphone_call_get_video_device(call) ? ms_web_cam_get_name(linphone_call_get_video_device(call)) : "NULL";
|
||||
ms_message("Switching video cam from [%s] to [%s] on call [%p]" , cur_cam, new_cam, call);
|
||||
video_stream_change_camera(call->videostream, linphone_call_get_video_device(call));
|
||||
}
|
||||
switch(call->state) {
|
||||
case LinphoneCallStreamsRunning:
|
||||
case LinphoneCallOutgoingEarlyMedia:
|
||||
case LinphoneCallIncomingEarlyMedia:
|
||||
case LinphoneCallConnected:
|
||||
if(call->videostream!=NULL
|
||||
&& video_stream_started(call->videostream)
|
||||
&& video_stream_get_camera(call->videostream) != linphone_call_get_video_device(call)) {
|
||||
const char *cur_cam, *new_cam;
|
||||
cur_cam = video_stream_get_camera(call->videostream) ? ms_web_cam_get_name(video_stream_get_camera(call->videostream)) : "NULL";
|
||||
new_cam = linphone_call_get_video_device(call) ? ms_web_cam_get_name(linphone_call_get_video_device(call)) : "NULL";
|
||||
ms_message("Switching video cam from [%s] to [%s] on call [%p]" , cur_cam, new_cam, call);
|
||||
video_stream_change_camera(call->videostream, linphone_call_get_video_device(call));
|
||||
}
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue