mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-26 23:58:17 +00:00
add apis to control upload ptime
This commit is contained in:
parent
5d7a240bfc
commit
451c2ae3a3
4 changed files with 32 additions and 5 deletions
|
|
@ -793,6 +793,7 @@ static RtpProfile *make_profile(LinphoneCall *call, const SalMediaDescription *m
|
|||
bool_t first=TRUE;
|
||||
int remote_bw=0;
|
||||
LinphoneCore *lc=call->core;
|
||||
int up_ptime=0;
|
||||
*used_pt=-1;
|
||||
|
||||
for(elem=desc->payloads;elem!=NULL;elem=elem->next){
|
||||
|
|
@ -802,6 +803,7 @@ static RtpProfile *make_profile(LinphoneCall *call, const SalMediaDescription *m
|
|||
if (first) {
|
||||
if (desc->type==SalAudio){
|
||||
linphone_core_update_allocated_audio_bandwidth_in_call(call,pt);
|
||||
up_ptime=linphone_core_get_upload_ptime(lc);
|
||||
}
|
||||
*used_pt=payload_type_get_number(pt);
|
||||
first=FALSE;
|
||||
|
|
@ -823,8 +825,11 @@ static RtpProfile *make_profile(LinphoneCall *call, const SalMediaDescription *m
|
|||
pt->normal_bitrate=-1;
|
||||
}
|
||||
if (desc->ptime>0){
|
||||
up_ptime=desc->ptime;
|
||||
}
|
||||
if (up_ptime>0){
|
||||
char tmp[40];
|
||||
snprintf(tmp,sizeof(tmp),"ptime=%i",desc->ptime);
|
||||
snprintf(tmp,sizeof(tmp),"ptime=%i",up_ptime);
|
||||
payload_type_append_send_fmtp(pt,tmp);
|
||||
}
|
||||
number=payload_type_get_number(pt);
|
||||
|
|
|
|||
|
|
@ -861,16 +861,38 @@ int linphone_core_get_upload_bandwidth(const LinphoneCore *lc){
|
|||
return lc->net_conf.upload_bw;
|
||||
}
|
||||
/**
|
||||
* set audio packetization time linphone expect to received from peer
|
||||
* Set audio packetization time linphone expects to receive from peer
|
||||
*/
|
||||
void linphone_core_set_download_ptime(LinphoneCore *lc, int ptime) {
|
||||
lc->net_conf.down_ptime=ptime;
|
||||
}
|
||||
|
||||
int linphone_core_get_download_ptime(LinphoneCore *lc) {
|
||||
/**
|
||||
* Get audio packetization time linphone expects to receive from peer
|
||||
*/
|
||||
int linphone_core_get_download_ptime(LinphoneCore *lc) {
|
||||
return lc->net_conf.down_ptime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set audio packetization time linphone will send (in absence of requirement from peer)
|
||||
* A value of 0 stands for the current codec default packetization time.
|
||||
*
|
||||
**/
|
||||
void linphone_core_set_upload_ptime(LinphoneCore *lc, int ptime){
|
||||
lp_config_set_int(lc->config,"rtp","up_ptime",ptime);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set audio packetization time linphone will send (in absence of requirement from peer)
|
||||
* A value of 0 stands for the current codec default packetization time.
|
||||
*
|
||||
**/
|
||||
int linphone_core_get_upload_ptime(LinphoneCore *lc){
|
||||
return lp_config_get_int(lc->config,"rtp","up_ptime",0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns liblinphone's version as a string.
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit fd74240c297e33c7e96d14dc5f7ed5d3dbdb8dc0
|
||||
Subproject commit 07d1b02eb57b7fc5cc8e4821c6485df2f138906e
|
||||
2
oRTP
2
oRTP
|
|
@ -1 +1 @@
|
|||
Subproject commit 6e9ac1d1f7c60f60bd67656c92ae801c61f41b27
|
||||
Subproject commit 3af8aa68f253d802b674cc1807115e4556c0fafa
|
||||
Loading…
Add table
Reference in a new issue