mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Merge branch 'master' of git.linphone.org:linphone into dev_msfactory
# Conflicts: # mediastreamer2
This commit is contained in:
commit
de1ed36191
6 changed files with 35 additions and 32 deletions
|
|
@ -185,6 +185,9 @@ 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);
|
||||
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*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -300,7 +303,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 +330,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);
|
||||
|
|
@ -528,7 +531,7 @@ static void setup_rtcp_fb(LinphoneCall *call, SalMediaDescription *md) {
|
|||
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) {
|
||||
pt = (PayloadType *)pt_it->data;
|
||||
|
||||
|
|
@ -709,12 +712,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));
|
||||
|
|
@ -758,7 +761,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));
|
||||
|
|
@ -830,7 +833,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);
|
||||
|
||||
|
|
@ -1092,9 +1095,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) {
|
||||
|
|
@ -1304,7 +1307,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) {
|
||||
|
|
@ -1379,7 +1382,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]);
|
||||
|
|
@ -1475,12 +1478,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;
|
||||
}
|
||||
|
|
@ -1793,7 +1796,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;
|
||||
|
|
@ -1810,7 +1813,7 @@ const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call){
|
|||
} else
|
||||
call->current_params->video_multicast_enabled = FALSE;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -2243,7 +2246,7 @@ int linphone_call_prepare_ice(LinphoneCall *call, bool_t incoming_offer){
|
|||
if (call->params->realtimetext_enabled) {
|
||||
text_stream_prepare_text(call->textstream);
|
||||
}
|
||||
|
||||
|
||||
if (linphone_core_gather_ice_candidates(call->core,call)<0) {
|
||||
/* Ice candidates gathering failed, proceed with the call anyway. */
|
||||
linphone_call_delete_ice_session(call);
|
||||
|
|
@ -2965,7 +2968,6 @@ static void linphone_call_set_on_hold_file(LinphoneCall *call, const char *file)
|
|||
static void linphone_call_start_audio_stream(LinphoneCall *call, LinphoneCallState next_state, bool_t use_arc){
|
||||
LinphoneCore *lc=call->core;
|
||||
int used_pt=-1;
|
||||
char rtcp_tool[128]={0};
|
||||
const SalStreamDescription *stream;
|
||||
MSSndCard *playcard;
|
||||
MSSndCard *captcard;
|
||||
|
|
@ -2979,8 +2981,6 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, LinphoneCallSta
|
|||
MSMediaStreamIO io = MS_MEDIA_STREAM_IO_INITIALIZER;
|
||||
bool_t use_rtp_io = lp_config_get_int(lc->config, "sound", "rtp_io", FALSE);
|
||||
|
||||
snprintf(rtcp_tool,sizeof(rtcp_tool)-1,"%s-%s",linphone_core_get_user_agent_name(),linphone_core_get_user_agent_version());
|
||||
|
||||
stream = sal_media_description_find_best_stream(call->resultdesc, SalAudio);
|
||||
if (stream && stream->dir!=SalStreamInactive && stream->rtp_port!=0){
|
||||
const char *rtp_addr=stream->rtp_addr[0]!='\0' ? stream->rtp_addr : call->resultdesc->addr;
|
||||
|
|
@ -3332,7 +3332,7 @@ static void linphone_call_start_text_stream(LinphoneCall *call) {
|
|||
ms_media_stream_sessions_set_srtp_send_key_b64(&call->textstream->ms.sessions, tstream->crypto[0].algo, local_st_desc->crypto[crypto_idx].master_key);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
configure_rtp_session_for_rtcp_fb(call, tstream);
|
||||
configure_rtp_session_for_rtcp_xr(lc, call, SalText);
|
||||
rtp_session_enable_rtcp_mux(call->textstream->ms.sessions.rtp_session, tstream->rtcp_mux);
|
||||
|
|
@ -3445,13 +3445,13 @@ void linphone_call_start_media_streams(LinphoneCall *call, LinphoneCallState nex
|
|||
ms_fatal("start_media_stream() called without prior init !");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (call->ice_session != NULL){
|
||||
/*if there is an ICE session when we are about to start streams, then ICE will conduct the media path checking and authentication properly.
|
||||
* Symmetric RTP must be turned off*/
|
||||
linphone_call_set_symmetric_rtp(call, FALSE);
|
||||
}
|
||||
|
||||
|
||||
if (call->params->media_encryption==LinphoneMediaEncryptionDTLS) {
|
||||
call->current_params->encryption_mandatory = TRUE;
|
||||
ms_message("Forcing encryption mandatory on call [%p]",call);
|
||||
|
|
@ -4272,7 +4272,7 @@ static void handle_ice_events(LinphoneCall *call, OrtpEvent *ev){
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
linphone_core_update_ice_state_in_call_stats(call);
|
||||
linphone_call_params_unref(params);
|
||||
} else if (evt == ORTP_EVENT_ICE_GATHERING_FINISHED) {
|
||||
|
|
@ -4408,8 +4408,9 @@ void linphone_call_handle_stream_events(LinphoneCall *call, int stream_index){
|
|||
if (evt == ORTP_EVENT_ZRTP_ENCRYPTION_CHANGED){
|
||||
if (stream_index == call->main_audio_stream_index)
|
||||
linphone_call_audiostream_encryption_changed(call, evd->info.zrtp_stream_encrypted);
|
||||
else if (stream_index == call->main_video_stream_index)
|
||||
else if (stream_index == call->main_video_stream_index) {
|
||||
propagate_encryption_changed(call);
|
||||
}
|
||||
} else if (evt == ORTP_EVENT_ZRTP_SAS_READY) {
|
||||
if (stream_index == call->main_audio_stream_index)
|
||||
linphone_call_audiostream_auth_token_ready(call, evd->info.zrtp_sas.sas, evd->info.zrtp_sas.verified);
|
||||
|
|
|
|||
|
|
@ -6809,7 +6809,7 @@ extern "C" jobjectArray Java_org_linphone_core_LinphoneConferenceImpl_getPartici
|
|||
return jaddr_list;
|
||||
}
|
||||
|
||||
extern "C" jint Java_org_linphone_core_LinphoneConferenteImpl_removeParticipant(JNIEnv *env, jobject thiz, jlong pconference, jobject uri) {
|
||||
extern "C" jint Java_org_linphone_core_LinphoneConferenceImpl_removeParticipant(JNIEnv *env, jobject thiz, jlong pconference, jobject uri) {
|
||||
jfieldID native_ptr_attr = env->GetFieldID(env->GetObjectClass(uri), "nativePtr", "J");
|
||||
LinphoneAddress *addr = (LinphoneAddress *)env->GetLongField(uri, native_ptr_attr);
|
||||
return linphone_conference_remove_participant((LinphoneConference *)pconference, addr);
|
||||
|
|
|
|||
|
|
@ -100,7 +100,9 @@ static int processEntry(const char *section, const char *entry, xmlNode *node, l
|
|||
}
|
||||
|
||||
lpc2xml_log(ctx, LPC2XML_MESSAGE, "Set %s|%s = %s", section, entry, content);
|
||||
xmlNodeSetContent(node, (const xmlChar *) content);
|
||||
// xmlNodeSetContent expects special characters to be escaped, xmlNodeAddContent doesn't (and escapes what needs to be)
|
||||
xmlNodeSetContent(node, (const xmlChar *) "");
|
||||
xmlNodeAddContent(node, (const xmlChar *) content);
|
||||
|
||||
if (lp_config_get_overwrite_flag_for_entry(ctx->lpc, section, entry) || lp_config_get_overwrite_flag_for_section(ctx->lpc, section)) {
|
||||
xmlSetProp(node, (const xmlChar *)"overwrite", (const xmlChar *) "true");
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ static void append_to_buffer_valist(char **buff, size_t *buff_size, size_t *offs
|
|||
/*if we are out of memory, we add some size to buffer*/
|
||||
if (ret == BELLE_SIP_BUFFER_OVERFLOW) {
|
||||
/*some compilers complain that size_t cannot be formatted as unsigned long, hence forcing cast*/
|
||||
ms_warning("QualityReporting: Buffer was too small to contain the whole report - increasing its size from %lu to %lu",
|
||||
ms_debug("QualityReporting: Buffer was too small to contain the whole report - increasing its size from %lu to %lu",
|
||||
(unsigned long)*buff_size, (unsigned long)*buff_size + 2048);
|
||||
*buff_size += 2048;
|
||||
*buff = (char *) ms_realloc(*buff, *buff_size);
|
||||
|
|
@ -276,7 +276,7 @@ static int send_report(LinphoneCall* call, reporting_session_report_t * report,
|
|||
|
||||
/*if we are on a low bandwidth network, do not send reports to not overload it*/
|
||||
if (linphone_call_params_low_bandwidth_enabled(linphone_call_get_current_params(call))){
|
||||
ms_warning("QualityReporting[%p]: Avoid sending reports on low bandwidth network", call);
|
||||
ms_message("QualityReporting[%p]: Avoid sending reports on low bandwidth network", call);
|
||||
ret = 1;
|
||||
goto end;
|
||||
}
|
||||
|
|
@ -285,7 +285,7 @@ static int send_report(LinphoneCall* call, reporting_session_report_t * report,
|
|||
in that case, we abort the report since it's not useful data*/
|
||||
if (report->info.local_addr.ip == NULL || strlen(report->info.local_addr.ip) == 0
|
||||
|| report->info.remote_addr.ip == NULL || strlen(report->info.remote_addr.ip) == 0) {
|
||||
ms_warning("QualityReporting[%p]: Trying to submit a %s too early (call duration: %d sec) but %s IP could "
|
||||
ms_message("QualityReporting[%p]: Trying to submit a %s too early (call duration: %d sec) but %s IP could "
|
||||
"not be retrieved so dropping this report"
|
||||
, call
|
||||
, report_event
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 87f137fdc953f00f8e9043a63782debeb6715aa3
|
||||
Subproject commit 22bc24eaf3d6ac3617c37cd1948aae20fa0050d4
|
||||
2
oRTP
2
oRTP
|
|
@ -1 +1 @@
|
|||
Subproject commit 0c8d9ddaea8c1afdc0e9b8c37a31c9d158e57efd
|
||||
Subproject commit 424807194f472f929cd3d7b3d59f54d668897a6e
|
||||
Loading…
Add table
Reference in a new issue