Commit 3b7c61e6 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Merge branch 'master' into dev_vcard

Conflicts:
	coreapi/CMakeLists.txt
	coreapi/Makefile.am
	coreapi/linphonecore.h
	java/common/org/linphone/core/LinphoneCore.java
	java/impl/org/linphone/core/LinphoneCoreImpl.java
parents bfc7630a 92f74dcb
......@@ -44,7 +44,7 @@ option(ENABLE_GTK_UI "Turn on or off compilation of gtk interface." YES)
option(ENABLE_LDAP "Enable LDAP support." NO)
option(ENABLE_LIME "Enable Instant Messaging Encryption." NO)
option(ENABLE_MSG_STORAGE "Turn on compilation of message storage." YES)
cmake_dependent_option(ENABLE_NOTIFY "Enable libnotify support." YES "ENABLE_GTK_UI" NO)
cmake_dependent_option(ENABLE_NOTIFY "Enable libnotify support." YES "ENABLE_GTK_UI;NOT APPLE" NO)
option(ENABLE_RELATIVE_PREFIX "Find resources relatively to the installation directory." NO)
option(ENABLE_STRICT "Build with strict compile options." YES)
option(ENABLE_TOOLS "Turn on or off compilation of tools." YES)
......@@ -255,6 +255,9 @@ if(NOT MSVC)
list(APPEND STRICT_OPTIONS_CPP "-Werror" "-fno-strict-aliasing")
endif()
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
list(APPEND STRICT_OPTIONS_CPP "/wd4996")
endif()
if(STRICT_OPTIONS_CPP)
list(REMOVE_DUPLICATES STRICT_OPTIONS_CPP)
endif()
......
......@@ -17,7 +17,7 @@ if test "$LINPHONE_EXTRA_VERSION" != "" ;then
LINPHONE_VERSION=$LINPHONE_VERSION.${LINPHONE_EXTRA_VERSION}
fi
LIBLINPHONE_SO_CURRENT=8 dnl increment this number when you add/change/remove an interface
LIBLINPHONE_SO_CURRENT=9 dnl increment this number when you add/change/remove an interface
LIBLINPHONE_SO_REVISION=0 dnl increment this number when you change source code, without changing interfaces; set to 0 when incrementing CURRENT
LIBLINPHONE_SO_AGE=0 dnl increment this number when you add an interface, set to 0 if you remove an interface
......
......@@ -20,7 +20,7 @@
#
############################################################################
if(MSVC AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone")
if(MSVC AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
find_library(LIBGCC NAMES gcc)
find_library(LIBMINGWEX NAMES mingwex)
endif()
......@@ -36,6 +36,7 @@ set(LINPHONE_HEADER_FILES
call_log.h
call_params.h
carddav.h
conference.h
content.h
event.h
friendlist.h
......@@ -163,10 +164,10 @@ endif()
if(ENABLE_TUNNEL)
list(APPEND LIBS ${TUNNEL_LIBRARIES})
endif()
if(MSVC AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone")
if(MSVC AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
list(APPEND LIBS ${LIBGCC} ${LIBMINGWEX})
endif()
if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone")
if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
list(APPEND LIBS shlwapi)
endif()
if(INTL_FOUND)
......@@ -203,7 +204,7 @@ if(IOS)
target_link_libraries(linphone "-framework Foundation" "-framework AVFoundation")
endif()
add_dependencies(linphone liblinphone-git-version)
if(WIN32 AND CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone")
if(WIN32 AND CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
set_target_properties(linphone PROPERTIES PREFIX "lib")
endif()
if(ICONV_FOUND)
......
......@@ -29,6 +29,7 @@ linphone_include_HEADERS=\
buffer.h \
call_log.h \
call_params.h \
conference.h \
content.h \
event.h \
friendlist.h \
......@@ -44,8 +45,7 @@ linphone_include_HEADERS=\
xml2lpc.h \
xmlrpc.h \
vcard.h \
carddav.h \
conference.h
carddav.h
lib_LTLIBRARIES=liblinphone.la
......@@ -59,7 +59,7 @@ liblinphone_la_SOURCES=\
call_params.c \
chat.c \
chat_file_transfer.c \
conference.cc conference.h conference_private.h \
conference.cc conference_private.h \
contactprovider.c contactprovider.h contact_providers_priv.h \
content.c \
dict.c \
......
......@@ -163,7 +163,7 @@ TunnelManager::~TunnelManager(){
void TunnelManager::doRegistration(){
LinphoneProxyConfig* lProxy;
linphone_core_get_default_proxy(mCore, &lProxy);
lProxy = linphone_core_get_default_proxy_config(mCore);
if (lProxy) {
ms_message("TunnelManager: New registration");
lProxy->commit = TRUE;
......@@ -172,7 +172,7 @@ void TunnelManager::doRegistration(){
void TunnelManager::doUnregistration() {
LinphoneProxyConfig *lProxy;
linphone_core_get_default_proxy(mCore, &lProxy);
lProxy = linphone_core_get_default_proxy_config(mCore);
if(lProxy) {
_linphone_proxy_config_unregister(lProxy);
}
......
......@@ -82,8 +82,8 @@ void _belle_sip_log(belle_sip_log_level lev, const char *fmt, va_list args) {
ortp_level=ORTP_DEBUG;
break;
}
if (ortp_log_level_enabled(ortp_level)){
ortp_logv(ortp_level,fmt,args);
if (ortp_log_level_enabled("belle-sip", ortp_level)){
ortp_logv("belle-sip", ortp_level,fmt,args);
}
}
......
......@@ -423,6 +423,9 @@ static int create_call_log(void *data, int argc, char **argv, char **colName) {
unsigned int storage_id = atoi(argv[0]);
from = linphone_address_new(argv[1]);
to = linphone_address_new(argv[2]);
if (from == NULL || to == NULL) goto error;
dir = (LinphoneCallDir) atoi(argv[3]);
log = linphone_call_log_new(dir, from, to);
......@@ -445,7 +448,16 @@ static int create_call_log(void *data, int argc, char **argv, char **colName) {
}
*list = ms_list_append(*list, log);
return 0;
error:
if (from){
linphone_address_destroy(from);
}
if (to){
linphone_address_destroy(to);
}
ms_error("Bad call log at storage_id %u", storage_id);
return 0;
}
......
......@@ -675,7 +675,7 @@ bool_t linphone_chat_room_is_remote_composing(const LinphoneChatRoom *cr) {
}
LinphoneCore *linphone_chat_room_get_lc(LinphoneChatRoom *cr) {
return cr->lc;
return linphone_chat_room_get_core(cr);
}
LinphoneCore *linphone_chat_room_get_core(LinphoneChatRoom *cr) {
......@@ -704,7 +704,7 @@ LinphoneChatMessage *linphone_chat_room_create_message_2(LinphoneChatRoom *cr, c
const char *external_body_url, LinphoneChatMessageState state,
time_t time, bool_t is_read, bool_t is_incoming) {
LinphoneChatMessage *msg = linphone_chat_room_create_message(cr, message);
LinphoneCore *lc = linphone_chat_room_get_lc(cr);
LinphoneCore *lc = linphone_chat_room_get_core(cr);
msg->external_body_url = external_body_url ? ms_strdup(external_body_url) : NULL;
msg->time = time;
msg->is_read = is_read;
......
......@@ -460,7 +460,7 @@ static void linphone_chat_process_response_from_get_file(void *data, const belle
int _linphone_chat_room_start_http_transfer(LinphoneChatMessage *msg, const char* url, const char* action, const belle_http_request_listener_callbacks_t *cbs) {
belle_generic_uri_t *uri = NULL;
char* ua;
const char* ua = linphone_core_get_user_agent(msg->chat_room->lc);
if (url == NULL) {
ms_warning("Cannot process file transfer msg: no file remote URI configured.");
......@@ -472,9 +472,7 @@ int _linphone_chat_room_start_http_transfer(LinphoneChatMessage *msg, const char
goto error;
}
ua = ms_strdup_printf("%s/%s", linphone_core_get_user_agent_name(), linphone_core_get_user_agent_version());
msg->http_request = belle_http_request_create(action, uri, belle_sip_header_create("User-Agent", ua), NULL);
ms_free(ua);
if (msg->http_request == NULL) {
ms_warning("Could not create http request for uri %s", url);
......
......@@ -89,7 +89,7 @@ public:
virtual void onCallTerminating(LinphoneCall *call) {};
protected:
Participant *find_participant(const LinphoneAddress *uri);
const Participant *findParticipant(const LinphoneAddress* uri) const;
LinphoneCore *m_core;
AudioStream *m_localParticipantStream;
......@@ -162,6 +162,7 @@ private:
void onFocusCallSateChanged(LinphoneCallState state);
void onPendingCallStateChanged(LinphoneCall *call, LinphoneCallState state);
void onTransferingCallStateChanged(LinphoneCall *transfered, LinphoneCallState newCallState);
static void callStateChangedCb(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cstate, const char *message);
static void transferStateChanged(LinphoneCore *lc, LinphoneCall *transfered, LinphoneCallState new_call_state);
......@@ -233,8 +234,16 @@ int Conference::removeParticipant(LinphoneCall *call) {
return 0;
}
int Conference::terminate() {
for(list<Participant>::iterator it = m_participants.begin(); it!=m_participants.end(); it++) {
it->getCall()->conf_ref = NULL;
}
m_participants.clear();
return 0;
}
int Conference::removeParticipant(const LinphoneAddress *uri) {
Participant *participant = find_participant(uri);
const Participant *participant = findParticipant(uri);
if(participant == NULL) return -1;
LinphoneCall *call = participant->getCall();
if(call) call->conf_ref = NULL;
......@@ -266,8 +275,8 @@ float Conference::getInputVolume() const {
return LINPHONE_VOLUME_DB_LOWEST;
}
Participant *Conference::find_participant(const LinphoneAddress *uri) {
list<Participant>::iterator it = m_participants.begin();
const Participant *Conference::findParticipant(const LinphoneAddress *uri) const {
list<Participant>::const_iterator it = m_participants.begin();
while(it!=m_participants.end()) {
if(linphone_address_equal(uri, it->getUri())) break;
it++;
......@@ -291,7 +300,8 @@ LocalConference::LocalConference(LinphoneCore *core, const Conference::Params *p
}
LocalConference::~LocalConference() {
if(m_conf) terminate();
terminate();
ms_audio_conference_destroy(m_conf);
}
RtpProfile *LocalConference::sMakeDummyProfile(int samplerate){
......@@ -452,7 +462,7 @@ int LocalConference::removeParticipant(LinphoneCall *call) {
}
int LocalConference::removeParticipant(const LinphoneAddress *uri) {
Participant *participant = find_participant(uri);
const Participant *participant = findParticipant(uri);
if(participant == NULL) return -1;
LinphoneCall *call = participant->getCall();
if(call == NULL) return -1;
......@@ -470,6 +480,9 @@ int LocalConference::terminate() {
linphone_core_terminate_call(m_core, call);
}
}
Conference::terminate();
return 0;
}
......@@ -563,11 +576,6 @@ void LocalConference::onCallTerminating(LinphoneCall *call) {
ms_audio_endpoint_destroy(m_recordEndpoint);
}
}
if (ms_audio_conference_get_size(m_conf)==0){
ms_audio_conference_destroy(m_conf);
m_core->conf_ctx = NULL;
delete this;
}
}
......@@ -608,10 +616,10 @@ int RemoteConference::addParticipant(LinphoneCall *call) {
params = linphone_core_create_call_params(m_core, NULL);
linphone_call_params_enable_video(params, m_currentParams.videoRequested());
m_focusCall = linphone_call_ref(linphone_core_invite_address_with_params(m_core, addr, params));
m_focusCall->conf_ref = (LinphoneConference *)this;
m_localParticipantStream = m_focusCall->audiostream;
m_pendingCalls = ms_list_append(m_pendingCalls, linphone_call_ref(call));
m_pendingCalls = ms_list_append(m_pendingCalls, call);
m_state = ConnectingToFocus;
call->conf_ref = (LinphoneConference *)this;
LinphoneCallLog *callLog = linphone_call_get_call_log(m_focusCall);
callLog->was_conference = TRUE;
linphone_address_unref(addr);
......@@ -621,12 +629,12 @@ int RemoteConference::addParticipant(LinphoneCall *call) {
case ConnectingToFocus:
Conference::addParticipant(call);
m_pendingCalls = ms_list_append(m_pendingCalls, linphone_call_ref(call));
m_pendingCalls = ms_list_append(m_pendingCalls, call);
return 0;
case ConnectedToFocus:
Conference::addParticipant(call);
m_transferingCalls = ms_list_append(m_transferingCalls, linphone_call_ref(call));
m_transferingCalls = ms_list_append(m_transferingCalls, call);
linphone_core_transfer_call(m_core, call, m_focusContact);
return 0;
......@@ -661,12 +669,12 @@ int RemoteConference::terminate() {
switch(m_state) {
case ConnectingToFocus:
case ConnectedToFocus:
Conference::removeParticipant(m_focusCall);
linphone_core_terminate_call(m_core, m_focusCall);
break;
default:
break;
}
Conference::terminate();
return 0;
}
......@@ -746,7 +754,6 @@ void RemoteConference::onFocusCallSateChanged(LinphoneCallState state) {
case LinphoneCallError:
case LinphoneCallEnd:
Conference::removeParticipant(m_focusCall);
m_state = NotConnectedToFocus;
linphone_call_unref(m_focusCall);
m_focusCall = NULL;
......@@ -755,8 +762,9 @@ void RemoteConference::onFocusCallSateChanged(LinphoneCallState state) {
ms_free(m_focusContact);
m_focusContact = NULL;
}
m_pendingCalls = ms_list_free_with_data(m_pendingCalls, (void (*)(void *))linphone_call_unref);
m_transferingCalls = ms_list_free_with_data(m_transferingCalls, (void (*)(void *))linphone_call_unref);
m_pendingCalls = ms_list_free(m_pendingCalls);
m_transferingCalls = ms_list_free(m_transferingCalls);
Conference::terminate();
break;
default: break;
......@@ -776,15 +784,27 @@ void RemoteConference::onPendingCallStateChanged(LinphoneCall *call, LinphoneCal
case LinphoneCallError:
case LinphoneCallEnd:
Conference::removeParticipant(call);
m_pendingCalls = ms_list_remove(m_pendingCalls, call);
linphone_call_unref(call);
Conference::removeParticipant(call);
break;
default: break;
}
}
void RemoteConference::onTransferingCallStateChanged(LinphoneCall* transfered, LinphoneCallState newCallState) {
switch (newCallState) {
case LinphoneCallConnected:
case LinphoneCallError:
m_transferingCalls = ms_list_remove(m_transferingCalls, transfered);
if(newCallState == LinphoneCallError) Conference::removeParticipant(transfered);
break;
default:
break;
}
}
void RemoteConference::callStateChangedCb(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cstate, const char *message) {
LinphoneCoreVTable *vtable = linphone_core_get_current_vtable(lc);
RemoteConference *conf = (RemoteConference *)linphone_core_v_table_get_user_data(vtable);
......@@ -799,16 +819,7 @@ void RemoteConference::transferStateChanged(LinphoneCore *lc, LinphoneCall *tran
LinphoneCoreVTable *vtable = linphone_core_get_current_vtable(lc);
RemoteConference *conf = (RemoteConference *)linphone_core_v_table_get_user_data(vtable);
if (ms_list_find(conf->m_transferingCalls, transfered)) {
switch (new_call_state) {
case LinphoneCallConnected:
case LinphoneCallError:
conf->m_transferingCalls = ms_list_remove(conf->m_transferingCalls, transfered);
linphone_call_unref(transfered);
break;
default:
break;
}
conf->onTransferingCallStateChanged(transfered, new_call_state);
}
}
......
......@@ -37,6 +37,11 @@ extern "C" {
* @{
*/
/**
* Parameters for initialization of conferences
*/
typedef struct _LinphoneCorferenceParams LinphoneConferenceParams;
/**
* Create a #LinphoneConferenceParams with default parameters set.
* @param core #LinphoneCore to use to find out the default parameters. Can be NULL.
......@@ -67,6 +72,12 @@ LINPHONE_PUBLIC void linphone_conference_params_enable_video(LinphoneConferenceP
LINPHONE_PUBLIC bool_t linphone_conference_params_video_requested(const LinphoneConferenceParams *params);
/**
* LinphoneConference class
*/
typedef struct _LinphoneConference LinphoneConference;
/**
* Remove a participant from a conference
* @param obj A #LinphoneConference
......
......@@ -526,7 +526,7 @@ LINPHONE_PUBLIC void linphone_proxy_config_set_custom_header(LinphoneProxyConfig
* @param[in] cfg #LinphoneProxyConfig object.
* @return a #LinphoneAuthInfo matching proxy config criteria if possible, NULL if nothing can be found.
**/
LINPHONE_PUBLIC const struct _LinphoneAuthInfo* linphone_proxy_config_find_auth_info(const LinphoneProxyConfig *cfg);
LINPHONE_PUBLIC const LinphoneAuthInfo* linphone_proxy_config_find_auth_info(const LinphoneProxyConfig *cfg);
/**
* @}
......
......@@ -289,7 +289,7 @@ static void tunnelLogHandler(int level, const char *fmt, va_list l){
ms_fatal("Unexepcted tunnel log %i: %s",level,fmt);
break;
}
tunnelOrtpLogHandler(ortp_level,fmt,l);
tunnelOrtpLogHandler("tunnel", ortp_level,fmt,l);
}
}
......@@ -330,8 +330,8 @@ bool_t linphone_tunnel_sip_enabled(const LinphoneTunnel *tunnel) {
return bcTunnel(tunnel)->tunnelizeSipPacketsEnabled() ? TRUE : FALSE;
}
static void my_ortp_logv(OrtpLogLevel level, const char *fmt, va_list args){
ortp_logv(level,fmt,args);
static void my_ortp_logv(const char *domain, OrtpLogLevel level, const char *fmt, va_list args){
ortp_logv(domain, level,fmt,args);
}
......
......@@ -185,6 +185,11 @@ static void propagate_encryption_changed(LinphoneCall *call){
}
ms_message("All streams are encrypted key exchanged using %s", call->current_params->media_encryption==LinphoneMediaEncryptionZRTP?"ZRTP":call->current_params->media_encryption==LinphoneMediaEncryptionDTLS?"DTLS":"Unknown mechanism");
linphone_core_notify_call_encryption_changed(call->core, call, TRUE, call->auth_token);
#ifdef VIDEO_ENABLED
if (call->current_params->encryption_mandatory && call->videostream && media_stream_started((MediaStream *)call->videostream)) {
video_stream_send_vfu(call->videostream); /*nothing could have been sent yet so generating key frame*/
}
#endif
}
}
......@@ -300,7 +305,7 @@ static void linphone_core_assign_payload_type_numbers(LinphoneCore *lc, MSList *
MSList *elem;
int dyn_number=lc->codecs_conf.dyn_pt;
PayloadType *red = NULL, *t140 = NULL;
for (elem=codecs; elem!=NULL; elem=elem->next){
PayloadType *pt=(PayloadType*)elem->data;
int number=payload_type_get_number(pt);
......@@ -327,14 +332,14 @@ static void linphone_core_assign_payload_type_numbers(LinphoneCore *lc, MSList *
payload_type_set_enable(pt, FALSE);
}
}
if (strcmp(pt->mime_type, payload_type_t140_red.mime_type) == 0) {
red = pt;
} else if (strcmp(pt->mime_type, payload_type_t140.mime_type) == 0) {
t140 = pt;
}
}
if (t140 && red) {
int t140_payload_type_number = payload_type_get_number(t140);
const char *red_fmtp = ms_strdup_printf("%i/%i/%i", t140_payload_type_number, t140_payload_type_number, t140_payload_type_number);
......@@ -527,22 +532,19 @@ static void setup_rtcp_fb(LinphoneCall *call, SalMediaDescription *md) {
if (!sal_stream_description_active(&md->streams[i])) continue;
md->streams[i].rtcp_fb.generic_nack_enabled = lp_config_get_int(lc->config, "rtp", "rtcp_fb_generic_nack_enabled", 0);
md->streams[i].rtcp_fb.tmmbr_enabled = lp_config_get_int(lc->config, "rtp", "rtcp_fb_tmmbr_enabled", 0);
md->streams[i].implicit_rtcp_fb = call->params->implicit_rtcp_fb;
for (pt_it = md->streams[i].payloads; pt_it != NULL; pt_it = pt_it->next) {
md->streams[i].implicit_rtcp_fb = call->params->implicit_rtcp_fb;
for (pt_it = md->streams[i].payloads; pt_it != NULL; pt_it = pt_it->next) {
pt = (PayloadType *)pt_it->data;
if (call->params->avpf_enabled == FALSE && call->params->implicit_rtcp_fb == FALSE) {
payload_type_unset_flag(pt, PAYLOAD_TYPE_RTCP_FEEDBACK_ENABLED);
memset(&avpf_params, 0, sizeof(avpf_params));
}
else {
payload_type_set_flag(pt, PAYLOAD_TYPE_RTCP_FEEDBACK_ENABLED);
avpf_params = payload_type_get_avpf_params(pt);
avpf_params.trr_interval = call->params->avpf_rr_interval;
}
if (call->params->avpf_enabled == FALSE && call->params->implicit_rtcp_fb == FALSE) {
payload_type_unset_flag(pt, PAYLOAD_TYPE_RTCP_FEEDBACK_ENABLED);
memset(&avpf_params, 0, sizeof(avpf_params));
}else {
payload_type_set_flag(pt, PAYLOAD_TYPE_RTCP_FEEDBACK_ENABLED);
avpf_params = payload_type_get_avpf_params(pt);
avpf_params.trr_interval = call->params->avpf_rr_interval;
}
payload_type_set_avpf_params(pt, avpf_params);
}
}
......@@ -712,12 +714,12 @@ void linphone_call_make_local_media_description(LinphoneCall *call) {
md->custom_sdp_attributes = sal_custom_sdp_attribute_clone(params->custom_sdp_attributes);
/*set audio capabilities */
codec_hints.bandwidth_limit=params->audio_bw;
codec_hints.max_codecs=-1;
codec_hints.previously_used=old_md ? old_md->streams[call->main_audio_stream_index].already_assigned_payloads : NULL;
l=make_codec_list(lc, &codec_hints, SalAudio, lc->codecs_conf.audio_codecs);
if (params->has_audio && l != NULL) {
strncpy(md->streams[call->main_audio_stream_index].rtp_addr,linphone_call_get_public_ip_for_stream(call,call->main_audio_stream_index),sizeof(md->streams[call->main_audio_stream_index].rtp_addr));
strncpy(md->streams[call->main_audio_stream_index].rtcp_addr,linphone_call_get_public_ip_for_stream(call,call->main_audio_stream_index),sizeof(md->streams[call->main_audio_stream_index].rtcp_addr));
......@@ -761,7 +763,7 @@ void linphone_call_make_local_media_description(LinphoneCall *call) {
codec_hints.max_codecs=-1;
codec_hints.previously_used=old_md ? old_md->streams[call->main_video_stream_index].already_assigned_payloads : NULL;
l=make_codec_list(lc, &codec_hints, SalVideo, lc->codecs_conf.video_codecs);
if (params->has_video && l != NULL){
strncpy(md->streams[call->main_video_stream_index].rtp_addr,linphone_call_get_public_ip_for_stream(call,call->main_video_stream_index),sizeof(md->streams[call->main_video_stream_index].rtp_addr));
strncpy(md->streams[call->main_video_stream_index].rtcp_addr,linphone_call_get_public_ip_for_stream(call,call->main_video_stream_index),sizeof(md->streams[call->main_video_stream_index].rtcp_addr));
......@@ -833,7 +835,7 @@ void linphone_call_make_local_media_description(LinphoneCall *call) {
}
setup_encryption_keys(call,md);
setup_dtls_keys(call,md);
setup_rtcp_fb(call, md);
setup_rtcp_xr(call, md);
......@@ -1095,9 +1097,9 @@ LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddr
linphone_call_get_local_ip(call, to);
call->params = linphone_call_params_copy(params);
linphone_call_init_common(call, from, to);
call->current_params->update_call_when_ice_completed = call->params->update_call_when_ice_completed; /*copy param*/
linphone_call_fill_media_multicast_addr(call);
if (linphone_core_get_firewall_policy(call->core) == LinphonePolicyUseIce) {
......@@ -1307,7 +1309,7 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro
call->current_params->privacy=(LinphonePrivacyMask)sal_op_get_privacy(call->op);
/*config params*/
call->current_params->update_call_when_ice_completed = call->params->update_call_when_ice_completed; /*copy config params*/
/*set video support */
call->params->has_video = linphone_core_video_enabled(lc) && lc->video_policy.automatically_accept;
if (md) {
......@@ -1382,7 +1384,7 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro
*/
void linphone_call_free_media_resources(LinphoneCall *call){
int i;
linphone_call_stop_media_streams(call);
for (i = 0; i < SAL_MEDIA_DESCRIPTION_MAX_STREAMS; ++i){
ms_media_stream_sessions_uninit(&call->sessions[i]);
......@@ -1478,12 +1480,12 @@ void linphone_call_fix_call_parameters(LinphoneCall *call, SalMediaDescription *
ms_message("Call [%p]: disabling video in our call params because the remote doesn't want it.", call);
call->params->has_video = FALSE;
}
if (rcp->has_video && call->core->video_policy.automatically_accept && linphone_core_video_enabled(call->core) && !call->params->has_video){
ms_message("Call [%p]: re-enabling video in our call params because the remote wants it and the policy allows to automatically accept.", call);
linphone_call_params_enable_video(call->params, TRUE);
}
if (rcp->realtimetext_enabled && !call->params->realtimetext_enabled) {
call->params->realtimetext_enabled = TRUE;
}
......@@ -1796,7 +1798,7 @@ const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call){
const char *rtp_addr;
SalStreamDescription *sd=sal_media_description_find_best_stream(md,SalAudio);
call->current_params->audio_dir=sd ? media_direction_from_sal_stream_dir(sd->dir) : LinphoneMediaDirectionInactive;
if (call->current_params->audio_dir != LinphoneMediaDirectionInactive) {
rtp_addr = sd->rtp_addr[0]!='\0' ? sd->rtp_addr : call->resultdesc->addr;
......@@ -1813,7 +1815,7 @@ const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call){
} else
call->current_params->video_multicast_enabled = FALSE;
}
......@@ -2246,7 +2248,7 @@ int linphone_call_prepare_ice(LinphoneCall *call, bool_t incoming_offer){
if (call->params->realtimetext_enabled)