reduce sdp size (exceeds ethernet mtu!)

This commit is contained in:
Simon Morlat 2011-03-16 17:37:30 +01:00
parent a4dda1c048
commit 800c9a97b1
3 changed files with 10 additions and 5 deletions

View file

@ -110,7 +110,7 @@ void update_local_media_description(LinphoneCore *lc, LinphoneCall *call, SalMed
}
SalMediaDescription *create_local_media_description(LinphoneCore *lc, LinphoneCall *call){
unsigned int id=rand();
unsigned int id=rand() & 0xfff;
return _create_local_media_description(lc,call,id,id);
}

View file

@ -658,6 +658,7 @@ static const char *codec_pref_order[]={
"theora",
"H263-1998",
"H263",
"x-snow",
NULL,
};
@ -692,7 +693,10 @@ static MSList *add_missing_codecs(SalStreamType mtype, MSList *l){
}
if (pt && ms_filter_codec_supported(pt->mime_type)){
if (ms_list_find(l,pt)==NULL){
payload_type_set_flag(pt,PAYLOAD_TYPE_ENABLED);
/*do not enable old or experimental codecs by default*/
if (strcasecmp(pt->mime_type,"H263")!=0 && strcasecmp(pt->mime_type,"x-snow")!=0){
payload_type_set_flag(pt,PAYLOAD_TYPE_ENABLED);
}
ms_message("Adding new codec %s/%i with fmtp %s",
pt->mime_type,pt->clock_rate,pt->recv_fmtp ? pt->recv_fmtp : "");
l=ms_list_insert_sorted(l,pt,(int (*)(const void *, const void *))codec_compare);
@ -959,7 +963,8 @@ static void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vta
linphone_core_assign_payload_type(&payload_type_mp4v,99,"profile-level-id=3");
linphone_core_assign_payload_type(&payload_type_x_snow,100,NULL);
linphone_core_assign_payload_type(&payload_type_h264,102,"profile-level-id=428014");
linphone_core_assign_payload_type(&payload_type_h264,103,"packetization-mode=1;profile-level-id=428014");
/* due to limited space in SDP, we have to disable this h264 line which is normally no more necessary */
/* linphone_core_assign_payload_type(&payload_type_h264,103,"packetization-mode=1;profile-level-id=428014");*/
#endif
ms_init();

View file

@ -141,7 +141,7 @@ static sdp_message_t *create_generic_sdp(const SalMediaDescription *desc)
osip_strdup (sessid), osip_strdup (sessver),
osip_strdup ("IN"), inet6 ? osip_strdup("IP6") : osip_strdup ("IP4"),
osip_strdup (desc->addr));
sdp_message_s_name_set (local, osip_strdup ("A conversation"));
sdp_message_s_name_set (local, osip_strdup ("Talk"));
if(!sal_media_description_has_dir (desc,SalStreamSendOnly))
{
sdp_message_c_connection_add (local, -1,
@ -166,7 +166,7 @@ static void add_payload(sdp_message_t *msg, int line, const PayloadType *pt)
{
char attr[256];
sdp_message_m_payload_add (msg,line, int_2char (payload_type_get_number(pt)));
if (pt->channels>0)
if (pt->channels>1)
snprintf (attr,sizeof(attr),"%i %s/%i/%i", payload_type_get_number(pt),
pt->mime_type, pt->clock_rate,pt->channels);
else