mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-20 20:48:07 +00:00
improvements in bandwidth management
This commit is contained in:
parent
0c98e9b8f6
commit
ff08abbb6a
2 changed files with 14 additions and 9 deletions
|
|
@ -2198,7 +2198,7 @@ int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const Linpho
|
|||
**/
|
||||
int linphone_core_accept_call(LinphoneCore *lc, LinphoneCall *call)
|
||||
{
|
||||
LinphoneProxyConfig *cfg=NULL;
|
||||
LinphoneProxyConfig *cfg=NULL,*dest_proxy=NULL;
|
||||
const char *contact=NULL;
|
||||
SalOp *replaced;
|
||||
SalMediaDescription *new_md;
|
||||
|
|
@ -2253,8 +2253,15 @@ int linphone_core_accept_call(LinphoneCore *lc, LinphoneCall *call)
|
|||
}
|
||||
|
||||
linphone_core_get_default_proxy(lc,&cfg);
|
||||
dest_proxy=cfg;
|
||||
dest_proxy=linphone_core_lookup_known_proxy(lc,call->log->to);
|
||||
|
||||
if (cfg!=dest_proxy && dest_proxy!=NULL) {
|
||||
ms_message("Overriding default proxy setting for this call:");
|
||||
ms_message("The used identity will be %s",linphone_proxy_config_get_identity(dest_proxy));
|
||||
}
|
||||
/*try to be best-effort in giving real local or routable contact address*/
|
||||
contact=get_fixed_contact(lc,call,cfg);
|
||||
contact=get_fixed_contact(lc,call,dest_proxy);
|
||||
if (contact)
|
||||
sal_op_set_contact(call->op,contact);
|
||||
|
||||
|
|
|
|||
|
|
@ -289,12 +289,8 @@ bool_t linphone_core_check_payload_type_usability(LinphoneCore *lc, PayloadType
|
|||
double codec_band;
|
||||
int allowed_bw,video_bw;
|
||||
bool_t ret=FALSE;
|
||||
/*
|
||||
update allocated audio bandwidth to allocate the remaining to video.
|
||||
This must be done outside calls, because after sdp negociation
|
||||
the audio bandwidth is refined to the selected codec
|
||||
*/
|
||||
if (!linphone_core_in_call(lc)) linphone_core_update_allocated_audio_bandwidth(lc);
|
||||
|
||||
linphone_core_update_allocated_audio_bandwidth(lc);
|
||||
allowed_bw=get_min_bandwidth(linphone_core_get_download_bandwidth(lc),
|
||||
linphone_core_get_upload_bandwidth(lc));
|
||||
if (allowed_bw==0) {
|
||||
|
|
@ -317,8 +313,10 @@ bool_t linphone_core_check_payload_type_usability(LinphoneCore *lc, PayloadType
|
|||
//ms_message("Payload %s: %g",pt->mime_type,codec_band);
|
||||
break;
|
||||
case PAYLOAD_VIDEO:
|
||||
if (video_bw>0)
|
||||
if (video_bw>0){
|
||||
pt->normal_bitrate=video_bw*1000;
|
||||
ret=TRUE;
|
||||
}
|
||||
else ret=FALSE;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue