From: Ghislain MARY Date: Fri, 10 Aug 2012 10:49:04 +0000 (+0200) Subject: Fix compilation when video is not enabled. X-Git-Url: http://sjero.net/git/?a=commitdiff_plain;h=66f80b83ffbb230c6f579daad0e06c9d328dd701;p=linphone Fix compilation when video is not enabled. --- diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index c5300bf9..74ef5487 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -1471,9 +1471,11 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut void linphone_call_start_media_streams_for_ice_gathering(LinphoneCall *call){ audio_stream_prepare_sound(call->audiostream, NULL, NULL); +#ifdef VIDEO_ENABLED if (call->videostream) { video_stream_prepare_video(call->videostream); } +#endif } void linphone_call_delete_ice_session(LinphoneCall *call){ diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 9ba19020..4e9198dc 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -2503,6 +2503,7 @@ int linphone_core_start_update_call(LinphoneCore *lc, LinphoneCall *call){ int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params){ int err=0; if (params!=NULL){ +#ifdef VIDEO_ENABLED if ((call->ice_session != NULL) && (call->videostream != NULL) && !params->has_video) { ice_session_remove_check_list(call->ice_session, call->videostream->ice_check_list); call->videostream->ice_check_list = NULL; @@ -2521,6 +2522,7 @@ int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const Linpho } else return err; } } +#endif err = linphone_core_start_update_call(lc, call); }else{ #ifdef VIDEO_ENABLED @@ -2616,6 +2618,7 @@ int linphone_core_accept_call_update(LinphoneCore *lc, LinphoneCall *call, const update_local_media_description(lc,call); if (call->ice_session != NULL) { linphone_core_update_ice_from_remote_media_description(call, sal_call_get_remote_media_description(call->op)); +#ifdef VIDEO_ENABLED if ((call->ice_session != NULL) &&!ice_session_candidates_gathered(call->ice_session)) { if ((call->params.has_video) && (call->params.has_video != old_has_video)) { linphone_call_init_video_stream(call); @@ -2626,6 +2629,7 @@ int linphone_core_accept_call_update(LinphoneCore *lc, LinphoneCall *call, const } else return 0; } } +#endif } linphone_core_start_accept_call_update(lc, call); return 0;