]> sjero.net Git - linphone/commitdiff
bugfixes in bw
authorSimon Morlat <simon.morlat@linphone.org>
Mon, 13 Dec 2010 13:24:33 +0000 (14:24 +0100)
committerSimon Morlat <simon.morlat@linphone.org>
Mon, 13 Dec 2010 13:24:33 +0000 (14:24 +0100)
coreapi/linphonecall.c
coreapi/misc.c
coreapi/offeranswer.c
coreapi/sal_eXosip2.c

index 63d881bba8701f642f6b4b292639efcfc792226f..bd62d6c834b747154f3e38c82bbe74dc69f91064 100644 (file)
@@ -738,7 +738,7 @@ static RtpProfile *make_profile(LinphoneCall *call, const SalMediaDescription *m
                        /*case where b=AS is given globally, not per stream*/
                        remote_bw=md->bandwidth;
                        if (desc->type==SalVideo){
-                               remote_bw-=call->audio_bw-10;
+                               remote_bw-=call->audio_bw+10;
                        }
                }
                
index c2e1ae211e6e20da959c30923c67b7dab8a016c5..4ee5347f415a628dbd5dbe9b87d9f9ce3719562b 100644 (file)
@@ -235,6 +235,7 @@ static double get_audio_payload_bandwidth(LinphoneCore *lc, const PayloadType *p
 
 void linphone_core_update_allocated_audio_bandwidth_in_call(LinphoneCall *call, const PayloadType *pt){
        call->audio_bw=(int)(get_audio_payload_bandwidth(call->core,pt)/1000.0);
+       ms_message("Audio bandwidth for this call is %i",call->audio_bw);
 }
 
 void linphone_core_update_allocated_audio_bandwidth(LinphoneCore *lc){
index 0db6b08a4fdd0be276c31f90a5ce0ece6a206692..91de86e2933b77ce8e0490b80ac4d5f9fee985d6 100644 (file)
@@ -161,7 +161,7 @@ static void initiate_incoming(const SalStreamDescription *local_cap,
                strcpy(result->addr,local_cap->addr);
                result->port=local_cap->port;
                result->bandwidth=local_cap->bandwidth;
-               result->ptime=local_cap->ptime;         
+               result->ptime=local_cap->ptime; 
        }else{
                result->port=0;
        }
@@ -187,6 +187,7 @@ int offer_answer_initiate_outgoing(const SalMediaDescription *local_offer,
                else ms_warning("No matching stream for %i",i);
     }
        result->nstreams=j;
+       result->bandwidth=remote_answer->bandwidth;
        strcpy(result->addr,remote_answer->addr);
        return 0;
 }
@@ -214,6 +215,7 @@ int offer_answer_initiate_incoming(const SalMediaDescription *local_capabilities
        result->nstreams=j;
        strcpy(result->username, local_capabilities->username);
        strcpy(result->addr,local_capabilities->addr);
+       result->bandwidth=local_capabilities->bandwidth;
        return 0;
 }
                                        
index fb0eb49ea518051adf1a1b853b4680eed1e137ba..69a281537f8fe9746c3d7a5de275f34bfa8d41c7 100644 (file)
@@ -455,6 +455,8 @@ static void sdp_process(SalOp *h){
                int i;
                offer_answer_initiate_incoming(h->base.local_media,h->base.remote_media,h->result,h->base.root->one_matching_codec);
                h->sdp_answer=media_description_to_sdp(h->result);
+               /*once we have generated the SDP answer, we modify the result description for processing by the upper layer.
+                It should contains media parameters constraint from the remote offer, not our response*/
                strcpy(h->result->addr,h->base.remote_media->addr);
                h->result->bandwidth=h->base.remote_media->bandwidth;
                for(i=0;i<h->result->nstreams;++i){
@@ -637,6 +639,7 @@ int sal_ping(SalOp *op, const char *from, const char *to){
        
        sal_op_set_from(op,from);
        sal_op_set_to(op,to);
+       /*bug here: eXosip2 does not honor the route argument*/
        eXosip_options_build_request (&options, sal_op_get_to(op),
                        sal_op_get_from(op),sal_op_get_route(op));
        if (options){