From cfb3b3dfd5eed379ce773f4d3c8f415f452f23f1 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 31 Aug 2012 22:07:00 +0200 Subject: [PATCH 1/2] edge optimization in progress --- coreapi/linphonecall.c | 35 ++++++++++++++++++++++++++++++----- coreapi/misc.c | 39 ++++++++++++++++++++++++++++++++------- coreapi/private.h | 15 +++++++++------ 3 files changed, 71 insertions(+), 18 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 929814b52..9136eb1e4 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -333,9 +333,17 @@ static void discover_mtu(LinphoneCore *lc, const char *remote){ } } +static void update_sal_media_description_from_params(SalMediaDescription *md, const LinphoneCallParams *params){ + if (params->down_bw) + md->bandwidth=params->down_bw; + if (params->down_ptime) + md->streams[0].ptime=params->down_ptime; +} + LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, const LinphoneCallParams *params) { LinphoneCall *call=ms_new0(LinphoneCall,1); + int ping_time=-1; call->dir=LinphoneCallOutgoing; call->op=sal_op_new(lc->sal); sal_op_set_user_pointer(call->op,call); @@ -350,7 +358,11 @@ LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddr call->localdesc=create_local_media_description (lc,call); call->camera_active=params->has_video; if (linphone_core_get_firewall_policy(call->core) == LinphonePolicyUseStun) { - linphone_core_run_stun_tests(call->core,call); + ping_time=linphone_core_run_stun_tests(call->core,call); + } + if (ping_time>=0) { + linphone_core_adapt_to_network(lc,ping_time,&call->params); + update_sal_media_description_from_params(call->localdesc,&call->params); } discover_mtu(lc,linphone_address_get_domain (to)); if (params->referer){ @@ -363,6 +375,7 @@ LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddr LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, SalOp *op){ LinphoneCall *call=ms_new0(LinphoneCall,1); char *from_str; + int ping_time=-1; call->dir=LinphoneCallIncoming; sal_op_set_user_pointer(op,call); @@ -385,7 +398,7 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro linphone_call_init_common(call, from, to); linphone_core_init_default_params(lc, &call->params); call->params.has_video &= !!lc->video_policy.automatically_accept; - call->localdesc=create_local_media_description (lc,call); + call->localdesc=create_local_media_description(lc,call); call->camera_active=call->params.has_video; switch (linphone_core_get_firewall_policy(call->core)) { case LinphonePolicyUseIce: @@ -403,11 +416,15 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro } break; case LinphonePolicyUseStun: - linphone_core_run_stun_tests(call->core,call); + ping_time=linphone_core_run_stun_tests(call->core,call); /* No break to also destroy ice session in this case. */ default: break; } + if (ping_time>=0) { + linphone_core_adapt_to_network(lc,ping_time,&call->params); + update_sal_media_description_from_params(call->localdesc,&call->params); + }; discover_mtu(lc,linphone_address_get_domain(from)); return call; } @@ -1137,6 +1154,7 @@ static RtpProfile *make_profile(LinphoneCall *call, const SalMediaDescription *m int remote_bw=0; LinphoneCore *lc=call->core; int up_ptime=0; + const LinphoneCallParams *params=&call->params; *used_pt=-1; for(elem=desc->payloads;elem!=NULL;elem=elem->next){ @@ -1146,7 +1164,9 @@ static RtpProfile *make_profile(LinphoneCall *call, const SalMediaDescription *m if ((pt->flags & PAYLOAD_TYPE_FLAG_CAN_SEND) && first) { if (desc->type==SalAudio){ linphone_core_update_allocated_audio_bandwidth_in_call(call,pt); - up_ptime=linphone_core_get_upload_ptime(lc); + if (params->up_ptime) + up_ptime=params->up_ptime; + else up_ptime=linphone_core_get_upload_ptime(lc); } *used_pt=payload_type_get_number(pt); first=FALSE; @@ -1161,7 +1181,12 @@ static RtpProfile *make_profile(LinphoneCall *call, const SalMediaDescription *m } if (desc->type==SalAudio){ - bw=get_min_bandwidth(call->audio_bw,remote_bw); + int audio_bw=call->audio_bw; + if (params->up_bw){ + if (params->up_bw< audio_bw) + audio_bw=params->up_bw; + } + bw=get_min_bandwidth(audio_bw,remote_bw); }else bw=get_min_bandwidth(get_video_bandwidth(linphone_core_get_upload_bandwidth (lc),call->audio_bw),remote_bw); if (bw>0) pt->normal_bitrate=bw*1000; else if (desc->type==SalAudio){ diff --git a/coreapi/misc.c b/coreapi/misc.c index a22bbc1d9..a696cd7f4 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -466,12 +466,13 @@ static int recvStunResponse(ortp_socket_t sock, char *ipaddr, int *port, int *id return len; } -void linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call){ +/* this functions runs a simple stun test and return the number of milliseconds to complete the tests, or -1 if the test were failed.*/ +int linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call){ const char *server=linphone_core_get_stun_server(lc); - + if (lc->sip_conf.ipv6_enabled){ ms_warning("stun support is not implemented for ipv6"); - return; + return -1; } if (server!=NULL){ struct sockaddr_storage ss; @@ -483,29 +484,31 @@ void linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call){ bool_t cone_audio=FALSE,cone_video=FALSE; struct timeval init,cur; SalEndpointCandidate *ac,*vc; + double elapsed; + int ret=0; ac=&call->localdesc->streams[0].candidates[0]; vc=&call->localdesc->streams[1].candidates[0]; if (parse_hostname_to_addr(server,&ss,&ss_len)<0){ ms_error("Fail to parser stun server address: %s",server); - return; + return -1; } if (lc->vtable.display_status!=NULL) lc->vtable.display_status(lc,_("Stun lookup in progress...")); /*create the two audio and video RTP sockets, and send STUN message to our stun server */ sock1=create_socket(call->audio_port); - if (sock1==-1) return; + if (sock1==-1) return -1; if (video_enabled){ sock2=create_socket(call->video_port); - if (sock2==-1) return ; + if (sock2==-1) return -1; } got_audio=FALSE; got_video=FALSE; gettimeofday(&init,NULL); do{ - double elapsed; + int id; if (loops%20==0){ ms_message("Sending stun requests..."); @@ -544,10 +547,12 @@ void linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call){ elapsed=((cur.tv_sec-init.tv_sec)*1000.0) + ((cur.tv_usec-init.tv_usec)/1000.0); if (elapsed>2000) { ms_message("Stun responses timeout, going ahead."); + ret=-1; break; } loops++; }while(!(got_audio && (got_video||sock2==-1) ) ); + if (ret==0) ret=(int)elapsed; if (!got_audio){ ms_error("No stun server response for audio port."); }else{ @@ -570,9 +575,29 @@ void linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call){ } close_socket(sock1); if (sock2!=-1) close_socket(sock2); + return ret; + } + return -1; + +} + +void linphone_core_adapt_to_network(LinphoneCore *lc, int ping_time_ms, LinphoneCallParams *params){ + if (lp_config_get_int(lc->config,"net","activate_edge_workarounds",0)==1){ + int threshold=lp_config_get_int(lc->config,"net","edge_ping_time",500); + + if (ping_time_ms>threshold){ + int edge_ptime=lp_config_get_int(lc->config,"net","edge_ptime",100); + int edge_bw=lp_config_get_int(lc->config,"net","edge_bw",30); + /* we are in a 2G network*/ + params->up_bw=params->down_bw=edge_bw; + params->up_ptime=params->down_ptime=edge_ptime; + + }/*else use default settings */ } } + + int linphone_core_gather_ice_candidates(LinphoneCore *lc, LinphoneCall *call) { char local_addr[64]; diff --git a/coreapi/private.h b/coreapi/private.h index 6c9ba8d29..b1b16ed03 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -69,8 +69,12 @@ struct _LinphoneCallParams{ LinphoneCall *referer; /*in case this call creation is consecutive to an incoming transfer, this points to the original call */ int audio_bw; /* bandwidth limit for audio stream */ LinphoneMediaEncryption media_encryption; - PayloadType *audio_codec; - PayloadType *video_codec; + PayloadType *audio_codec; /*audio codec currently in use */ + PayloadType *video_codec; /*video codec currently in use */ + int down_bw; + int up_bw; + int down_ptime; + int up_ptime; bool_t has_video; bool_t real_early_media; /*send real media even during early media (for outgoing calls)*/ bool_t in_conference; /*in conference mode */ @@ -179,10 +183,7 @@ int parse_hostname_to_addr(const char *server, struct sockaddr_storage *ss, sock int set_lock_file(); int get_lock_file(); int remove_lock_file(); -int do_registration(LinphoneCore *lc, bool_t doit); -void check_for_registration(LinphoneCore *lc); void check_sound_device(LinphoneCore *lc); -void linphone_core_verify_codecs(LinphoneCore *lc); void linphone_core_get_local_ip(LinphoneCore *lc, const char *to, char *result); bool_t host_has_ipv6_network(); bool_t lp_spawn_command_line_sync(const char *command, char **result,int *command_ret); @@ -229,7 +230,8 @@ MSList *linphone_find_friend(MSList *fl, const LinphoneAddress *fri, LinphoneFri void linphone_core_update_allocated_audio_bandwidth(LinphoneCore *lc); void linphone_core_update_allocated_audio_bandwidth_in_call(LinphoneCall *call, const PayloadType *pt); -void linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call); +int linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call); +void linphone_core_adapt_to_network(LinphoneCore *lc, int ping_time_ms, LinphoneCallParams *params); int linphone_core_gather_ice_candidates(LinphoneCore *lc, LinphoneCall *call); void linphone_core_update_local_media_description_from_ice(SalMediaDescription *desc, IceSession *session); void linphone_core_update_ice_from_remote_media_description(LinphoneCall *call, const SalMediaDescription *md); @@ -386,6 +388,7 @@ typedef struct rtp_config /* stop rtp xmit when audio muted */ bool_t audio_adaptive_jitt_comp_enabled; bool_t video_adaptive_jitt_comp_enabled; + bool_t pad; }rtp_config_t; From 5e4ac070cc9fbf979ef789bb5f85b48859c7f4eb Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 4 Sep 2012 22:02:34 +0200 Subject: [PATCH 2/2] implement edge detection, and automatic configuration of call parameters for low bitrates --- coreapi/linphonecall.c | 60 +++++++++++++++++++++++++-------------- coreapi/misc.c | 15 +++------- coreapi/offeranswer.c | 1 - coreapi/private.h | 8 +++++- coreapi/sal.h | 6 ---- coreapi/sal_eXosip2_sdp.c | 4 --- mediastreamer2 | 2 +- 7 files changed, 51 insertions(+), 45 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index b60517136..9192a84b7 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -207,7 +207,10 @@ static SalMediaDescription *_create_local_media_description(LinphoneCore *lc, Li md->nstreams=1; strncpy(md->addr,call->localip,sizeof(md->addr)); strncpy(md->username,username,sizeof(md->username)); - md->bandwidth=linphone_core_get_download_bandwidth(lc); + + if (call->params.down_bw) + md->bandwidth=call->params.down_bw; + else md->bandwidth=linphone_core_get_download_bandwidth(lc); /*set audio capabilities */ strncpy(md->streams[0].rtp_addr,call->localip,sizeof(md->streams[0].rtp_addr)); @@ -217,7 +220,10 @@ static SalMediaDescription *_create_local_media_description(LinphoneCore *lc, Li md->streams[0].proto=(call->params.media_encryption == LinphoneMediaEncryptionSRTP) ? SalProtoRtpSavp : SalProtoRtpAvp; md->streams[0].type=SalAudio; - md->streams[0].ptime=lc->net_conf.down_ptime; + if (call->params.down_ptime) + md->streams[0].ptime=call->params.down_ptime; + else + md->streams[0].ptime=lc->net_conf.down_ptime; l=make_codec_list(lc,lc->codecs_conf.audio_codecs,call->params.audio_bw,&md->streams[0].max_rate); pt=payload_type_clone(rtp_profile_get_payload_from_mime(&av_profile,"telephone-event")); l=ms_list_append(l,pt); @@ -320,6 +326,21 @@ void linphone_call_init_stats(LinphoneCallStats *stats, int type) { stats->sent_rtcp = NULL; } +static void update_media_description_from_stun(SalMediaDescription *md, const StunCandidate *ac, const StunCandidate *vc){ + if (ac->port!=0){ + strcpy(md->streams[0].rtp_addr,ac->addr); + md->streams[0].rtp_port=ac->port; + if ((ac->addr[0]!='\0' && vc->addr[0]!='\0' && strcmp(ac->addr,vc->addr)==0) || md->nstreams==1){ + strcpy(md->addr,ac->addr); + } + } + if (vc->port!=0){ + strcpy(md->streams[1].rtp_addr,vc->addr); + md->streams[1].rtp_port=vc->port; + } + +} + static void discover_mtu(LinphoneCore *lc, const char *remote){ int mtu; if (lc->net_conf.mtu==0 ){ @@ -333,16 +354,12 @@ static void discover_mtu(LinphoneCore *lc, const char *remote){ } } -static void update_sal_media_description_from_params(SalMediaDescription *md, const LinphoneCallParams *params){ - if (params->down_bw) - md->bandwidth=params->down_bw; - if (params->down_ptime) - md->streams[0].ptime=params->down_ptime; -} +#define STUN_CANDIDATE_INIT {{0},0} LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, const LinphoneCallParams *params) { LinphoneCall *call=ms_new0(LinphoneCall,1); + StunCandidate ac=STUN_CANDIDATE_INIT,vc=STUN_CANDIDATE_INIT; int ping_time=-1; call->dir=LinphoneCallOutgoing; call->op=sal_op_new(lc->sal); @@ -355,15 +372,16 @@ LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddr call->ice_session = ice_session_new(); ice_session_set_role(call->ice_session, IR_Controlling); } - call->localdesc=create_local_media_description (lc,call); - call->camera_active=params->has_video; if (linphone_core_get_firewall_policy(call->core) == LinphonePolicyUseStun) { - ping_time=linphone_core_run_stun_tests(call->core,call); + ping_time=linphone_core_run_stun_tests(call->core,call,&ac, &vc); } if (ping_time>=0) { linphone_core_adapt_to_network(lc,ping_time,&call->params); - update_sal_media_description_from_params(call->localdesc,&call->params); } + call->localdesc=create_local_media_description(lc,call); + update_media_description_from_stun(call->localdesc,&ac,&vc); + call->camera_active=params->has_video; + discover_mtu(lc,linphone_address_get_domain (to)); if (params->referer){ sal_call_set_referer(call->op,params->referer->op); @@ -376,6 +394,7 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro LinphoneCall *call=ms_new0(LinphoneCall,1); char *from_str; int ping_time=-1; + StunCandidate ac=STUN_CANDIDATE_INIT,vc=STUN_CANDIDATE_INIT; call->dir=LinphoneCallIncoming; sal_op_set_user_pointer(op,call); @@ -398,8 +417,6 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro linphone_call_init_common(call, from, to); linphone_core_init_default_params(lc, &call->params); call->params.has_video &= !!lc->video_policy.automatically_accept; - call->localdesc=create_local_media_description(lc,call); - call->camera_active=call->params.has_video; switch (linphone_core_get_firewall_policy(call->core)) { case LinphonePolicyUseIce: call->ice_session = ice_session_new(); @@ -416,15 +433,18 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro } break; case LinphonePolicyUseStun: - ping_time=linphone_core_run_stun_tests(call->core,call); + ping_time=linphone_core_run_stun_tests(call->core,call,&ac, &vc); /* No break to also destroy ice session in this case. */ default: break; } if (ping_time>=0) { linphone_core_adapt_to_network(lc,ping_time,&call->params); - update_sal_media_description_from_params(call->localdesc,&call->params); }; + call->localdesc=create_local_media_description(lc,call); + update_media_description_from_stun(call->localdesc,&ac,&vc); + call->camera_active=call->params.has_video; + discover_mtu(lc,linphone_address_get_domain(from)); return call; } @@ -953,11 +973,10 @@ void linphone_call_set_next_video_frame_decoded_callback(LinphoneCall *call, Lin void linphone_call_init_audio_stream(LinphoneCall *call){ LinphoneCore *lc=call->core; - SalMediaDescription *md=call->localdesc; AudioStream *audiostream; int dscp=lp_config_get_int(lc->config,"rtp","audio_dscp",-1); - call->audiostream=audiostream=audio_stream_new(md->streams[0].rtp_port,md->streams[0].rtcp_port,linphone_core_ipv6_enabled(lc)); + call->audiostream=audiostream=audio_stream_new(call->audio_port,call->audio_port+1,linphone_core_ipv6_enabled(lc)); if (dscp!=-1) audio_stream_set_dscp(audiostream,dscp); if (linphone_core_echo_limiter_enabled(lc)){ @@ -1006,13 +1025,12 @@ void linphone_call_init_audio_stream(LinphoneCall *call){ void linphone_call_init_video_stream(LinphoneCall *call){ #ifdef VIDEO_ENABLED LinphoneCore *lc=call->core; - SalMediaDescription *md=call->localdesc; - if ((lc->video_conf.display || lc->video_conf.capture) && md->streams[1].rtp_port>0){ + if ((lc->video_conf.display || lc->video_conf.capture) && call->params.has_video){ int video_recv_buf_size=lp_config_get_int(lc->config,"video","recv_buf_size",0); int dscp=lp_config_get_int(lc->config,"rtp","video_dscp",-1); - call->videostream=video_stream_new(md->streams[1].rtp_port,md->streams[1].rtcp_port,linphone_core_ipv6_enabled(lc)); + call->videostream=video_stream_new(call->video_port,call->video_port+1,linphone_core_ipv6_enabled(lc)); if (dscp!=-1) video_stream_set_dscp(call->videostream,dscp); video_stream_enable_display_filter_auto_rotate(call->videostream, lp_config_get_int(lc->config,"video","display_filter_auto_rotate",0)); diff --git a/coreapi/misc.c b/coreapi/misc.c index a2a61ce85..1e7676bfa 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -467,7 +467,7 @@ static int recvStunResponse(ortp_socket_t sock, char *ipaddr, int *port, int *id } /* this functions runs a simple stun test and return the number of milliseconds to complete the tests, or -1 if the test were failed.*/ -int linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call){ +int linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call, StunCandidate *ac, StunCandidate *vc){ const char *server=linphone_core_get_stun_server(lc); if (lc->sip_conf.ipv6_enabled){ @@ -483,13 +483,9 @@ int linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call){ bool_t got_audio,got_video; bool_t cone_audio=FALSE,cone_video=FALSE; struct timeval init,cur; - SalEndpointCandidate *ac,*vc; double elapsed; int ret=0; - ac=&call->localdesc->streams[0].candidates[0]; - vc=&call->localdesc->streams[1].candidates[0]; - if (parse_hostname_to_addr(server,&ss,&ss_len)<0){ ms_error("Fail to parser stun server address: %s",server); return -1; @@ -569,28 +565,25 @@ int linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call){ } } } - if ((ac->addr[0]!='\0' && vc->addr[0]!='\0' && strcmp(ac->addr,vc->addr)==0) - || sock2==-1){ - strcpy(call->localdesc->addr,ac->addr); - } close_socket(sock1); if (sock2!=-1) close_socket(sock2); return ret; } return -1; - } void linphone_core_adapt_to_network(LinphoneCore *lc, int ping_time_ms, LinphoneCallParams *params){ if (lp_config_get_int(lc->config,"net","activate_edge_workarounds",0)==1){ + ms_message("Stun server ping time is %i ms",ping_time_ms); int threshold=lp_config_get_int(lc->config,"net","edge_ping_time",500); if (ping_time_ms>threshold){ int edge_ptime=lp_config_get_int(lc->config,"net","edge_ptime",100); - int edge_bw=lp_config_get_int(lc->config,"net","edge_bw",30); + int edge_bw=lp_config_get_int(lc->config,"net","edge_bw",20); /* we are in a 2G network*/ params->up_bw=params->down_bw=edge_bw; params->up_ptime=params->down_ptime=edge_ptime; + params->has_video=FALSE; }/*else use default settings */ } diff --git a/coreapi/offeranswer.c b/coreapi/offeranswer.c index f2cb836c2..541a1eee3 100644 --- a/coreapi/offeranswer.c +++ b/coreapi/offeranswer.c @@ -240,7 +240,6 @@ static void initiate_incoming(const SalStreamDescription *local_cap, if (result->payloads && !only_telephone_event(result->payloads) && (remote_offer->rtp_port!=0 || remote_offer->rtp_port==SalStreamSendOnly)){ strcpy(result->rtp_addr,local_cap->rtp_addr); strcpy(result->rtcp_addr,local_cap->rtcp_addr); - memcpy(result->candidates,local_cap->candidates,sizeof(result->candidates)); result->rtp_port=local_cap->rtp_port; result->rtcp_port=local_cap->rtcp_port; result->bandwidth=local_cap->bandwidth; diff --git a/coreapi/private.h b/coreapi/private.h index d5e98c956..2bf643d47 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -230,7 +230,13 @@ MSList *linphone_find_friend(MSList *fl, const LinphoneAddress *fri, LinphoneFri void linphone_core_update_allocated_audio_bandwidth(LinphoneCore *lc); void linphone_core_update_allocated_audio_bandwidth_in_call(LinphoneCall *call, const PayloadType *pt); -int linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call); + +typedef struct StunCandidate{ + char addr[64]; + int port; +}StunCandidate; + +int linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call, StunCandidate *ac, StunCandidate *vc); void linphone_core_adapt_to_network(LinphoneCore *lc, int ping_time_ms, LinphoneCallParams *params); int linphone_core_gather_ice_candidates(LinphoneCore *lc, LinphoneCall *call); void linphone_core_update_local_media_description_from_ice(SalMediaDescription *desc, IceSession *session); diff --git a/coreapi/sal.h b/coreapi/sal.h index 616b0aba9..8faa11375 100644 --- a/coreapi/sal.h +++ b/coreapi/sal.h @@ -105,11 +105,6 @@ typedef enum{ SalStreamInactive }SalStreamDir; -typedef struct SalEndpointCandidate{ - char addr[64]; - int port; -}SalEndpointCandidate; - #define SAL_ENDPOINT_CANDIDATE_MAX 2 #define SAL_MEDIA_DESCRIPTION_MAX_ICE_ADDR_LEN 64 @@ -159,7 +154,6 @@ typedef struct SalStreamDescription{ MSList *payloads; //rtcp_addr; rtp_port=desc->rtp_port; rtcp_port=desc->rtcp_port; - if (desc->candidates[0].addr[0]!='\0'){ - rtp_addr=desc->candidates[0].addr; - rtp_port=desc->candidates[0].port; - } if (desc->proto == SalProtoRtpSavp) { int i; diff --git a/mediastreamer2 b/mediastreamer2 index beb4318d1..18a6f4d86 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit beb4318d1e5eb282adc82967a9c80e89cd406045 +Subproject commit 18a6f4d8629593125cc7b707f5fdad1462b2dcd9