From 9a4fd369481a1f8d46a078a86047e4c44d586691 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Fri, 14 Mar 2014 17:07:12 +0100 Subject: [PATCH] Configure the RTCP XR parameters of the rtp session. --- coreapi/bellesip_sal/sal_sdp.c | 10 ++++++---- coreapi/linphonecall.c | 5 ++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/coreapi/bellesip_sal/sal_sdp.c b/coreapi/bellesip_sal/sal_sdp.c index b6981b567..383c0cdd3 100644 --- a/coreapi/bellesip_sal/sal_sdp.c +++ b/coreapi/bellesip_sal/sal_sdp.c @@ -409,11 +409,12 @@ static void sal_init_rtcp_xr_description(OrtpRtcpXrConfiguration *config) { } static void sdp_parse_rtcp_xr_parameters(const belle_sdp_attribute_t *attribute, OrtpRtcpXrConfiguration *config) { - sal_init_rtcp_xr_description(config); - if (attribute != NULL) { - const belle_sdp_rtcp_xr_attribute_t *xr_attr = BELLE_SDP_RTCP_XR_ATTRIBUTE(attribute); - const char *rcvr_rtt_mode = belle_sdp_rtcp_xr_attribute_get_rcvr_rtt_mode(xr_attr); + const belle_sdp_rtcp_xr_attribute_t *xr_attr; + const char *rcvr_rtt_mode; + sal_init_rtcp_xr_description(config); + xr_attr = BELLE_SDP_RTCP_XR_ATTRIBUTE(attribute); + rcvr_rtt_mode = belle_sdp_rtcp_xr_attribute_get_rcvr_rtt_mode(xr_attr); if (rcvr_rtt_mode != NULL) { if (strcasecmp(rcvr_rtt_mode, "all") == 0) { config->rcvr_rtt_mode = OrtpRtcpXrRcvrRttAll; @@ -540,6 +541,7 @@ static SalStreamDescription * sdp_to_stream_description(SalMediaDescription *md, sdp_parse_media_ice_parameters(media_desc, stream); /* Get RTCP-XR attributes if any */ + stream->rtcp_xr = md->rtcp_xr; // Use session parameters if no stream parameters are defined sdp_parse_media_rtcp_xr_parameters(media_desc, &stream->rtcp_xr); md->n_total_streams++; diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 1c88b8531..87dcf5e66 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -1508,6 +1508,7 @@ void linphone_call_init_video_stream(LinphoneCall *call){ ice_check_list_set_rtp_session(call->videostream->ms.ice_check_list, call->videostream->ms.session); ms_message ("creating new ice video check list [%p] for session [%p]",call->videostream->ms.ice_check_list,call->videostream->ms.session); } + call->videostream_app_evq = ortp_ev_queue_new(); rtp_session_register_event_queue(call->videostream->ms.session,call->videostream_app_evq); #ifdef TEST_EXT_RENDERER @@ -1811,6 +1812,7 @@ static void linphone_call_start_audio_stream(LinphoneCall *call, const char *cna call->audiostream_encrypted=FALSE; } }else call->audiostream_encrypted=FALSE; + rtp_session_configure_rtcp_xr(call->audiostream->ms.session, &stream->rtcp_xr); audio_stream_start_full( call->audiostream, call->audio_profile, @@ -1932,7 +1934,8 @@ static void linphone_call_start_video_stream(LinphoneCall *call, const char *cna }else{ call->videostream_encrypted=FALSE; } - + rtp_session_configure_rtcp_xr(call->videostream->ms.session, &vstream->rtcp_xr); + call->log->video_enabled = TRUE; video_stream_set_direction (call->videostream, dir); ms_message("%s lc rotation:%d\n", __FUNCTION__, lc->device_rotation);