mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 19:18:06 +00:00
Fix linphone_core_create_call_params(), who should set avpf_rr_interval in all cases.
This solves bugs lots of RTCP spam when call params are not created appropriately.
This commit is contained in:
parent
7559624f53
commit
8cd3fc9bfa
4 changed files with 41 additions and 8 deletions
|
|
@ -1187,13 +1187,12 @@ static void linphone_call_incoming_select_ip_version(LinphoneCall *call, Linphon
|
|||
void linphone_call_set_compatible_incoming_call_parameters(LinphoneCall *call, SalMediaDescription *md) {
|
||||
/* Handle AVPF, SRTP and DTLS. */
|
||||
call->params->avpf_enabled = sal_media_description_has_avpf(md);
|
||||
if (call->params->avpf_enabled == TRUE) {
|
||||
if (call->dest_proxy != NULL) {
|
||||
call->params->avpf_rr_interval = linphone_proxy_config_get_avpf_rr_interval(call->dest_proxy) * 1000;
|
||||
} else {
|
||||
call->params->avpf_rr_interval = linphone_core_get_avpf_rr_interval(call->core)*1000;
|
||||
}
|
||||
if (call->dest_proxy != NULL) {
|
||||
call->params->avpf_rr_interval = linphone_proxy_config_get_avpf_rr_interval(call->dest_proxy) * 1000;
|
||||
} else {
|
||||
call->params->avpf_rr_interval = linphone_core_get_avpf_rr_interval(call->core)*1000;
|
||||
}
|
||||
|
||||
if ((sal_media_description_has_zrtp(md) == TRUE) && (ms_zrtp_available() == TRUE)) {
|
||||
call->params->media_encryption = LinphoneMediaEncryptionZRTP;
|
||||
}else if ((sal_media_description_has_dtls(md) == TRUE) && (media_stream_dtls_supported() == TRUE)) {
|
||||
|
|
|
|||
|
|
@ -7296,6 +7296,7 @@ void linphone_core_init_default_params(LinphoneCore*lc, LinphoneCallParams *para
|
|||
params->privacy=LinphonePrivacyDefault;
|
||||
params->avpf_enabled=linphone_core_get_avpf_mode(lc);
|
||||
params->implicit_rtcp_fb = lp_config_get_int(lc->config,"rtp","rtcp_fb_implicit_rtcp_fb",TRUE);
|
||||
params->avpf_rr_interval = linphone_core_get_avpf_rr_interval(lc);
|
||||
params->audio_dir=LinphoneMediaDirectionSendRecv;
|
||||
params->video_dir=LinphoneMediaDirectionSendRecv;
|
||||
params->real_early_media=lp_config_get_int(lc->config,"misc","real_early_media",FALSE);
|
||||
|
|
|
|||
|
|
@ -205,8 +205,8 @@ static MSList *match_payloads(MSFactory *factory, const MSList *local, const MSL
|
|||
matched->avpf.features &= p2->avpf.features;
|
||||
matched->avpf.rpsi_compatibility = p2->avpf.rpsi_compatibility;
|
||||
/* Take bigger AVPF trr interval */
|
||||
if (p2->avpf.trr_interval < matched->avpf.trr_interval) {
|
||||
matched->avpf.trr_interval = matched->avpf.trr_interval;
|
||||
if (p2->avpf.trr_interval > matched->avpf.trr_interval) {
|
||||
matched->avpf.trr_interval = p2->avpf.trr_interval;
|
||||
}
|
||||
}else{
|
||||
payload_type_unset_flag(matched, PAYLOAD_TYPE_RTCP_FEEDBACK_ENABLED);
|
||||
|
|
|
|||
|
|
@ -233,6 +233,17 @@ static void setup_sdp_handling(const LinphoneCallTestParams* params, LinphoneCor
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* CAUTION this function is error prone. you should not use it anymore in new tests.
|
||||
* Creating callee call params before the call is actually received is not the good way
|
||||
* to use the Liblinphone API. Indeed, call params used for receiving calls shall be created by linphone_core_create_call_params() by passing
|
||||
* the call object for which params are to be created.
|
||||
* This function should be used only in test case where the programmer exactly knows the caller params, and then can deduce how
|
||||
* callee params will be set by linphone_core_create_call_params().
|
||||
* This function was developped at a time where the use of the API about incoming params was not yet clarified.
|
||||
* Tests relying on this function are then not testing the correct way to use the api (through linphone_core_create_call_params()), and so
|
||||
* it is not a so good idea to build new tests based on this function.
|
||||
**/
|
||||
bool_t call_with_params2(LinphoneCoreManager* caller_mgr
|
||||
,LinphoneCoreManager* callee_mgr
|
||||
, const LinphoneCallTestParams *caller_test_params
|
||||
|
|
@ -382,6 +393,17 @@ bool_t call_with_params2(LinphoneCoreManager* caller_mgr
|
|||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* CAUTION this function is error prone. you should not use it anymore in new tests.
|
||||
* Creating callee call params before the call is actually received is not the good way
|
||||
* to use the Liblinphone API. Indeed, call params used for receiving calls shall be created by linphone_core_create_call_params() by passing
|
||||
* the call object for which params are to be created.
|
||||
* This function should be used only in test case where the programmer exactly knows the caller params, and then can deduce how
|
||||
* callee params will be set by linphone_core_create_call_params().
|
||||
* This function was developped at a time where the use of the API about incoming params was not yet clarified.
|
||||
* Tests relying on this function are then not testing the correct way to use the api (through linphone_core_create_call_params()), and so
|
||||
* it is not a so good idea to build new tests based on this function.
|
||||
**/
|
||||
bool_t call_with_params(LinphoneCoreManager* caller_mgr
|
||||
,LinphoneCoreManager* callee_mgr
|
||||
,const LinphoneCallParams *caller_params
|
||||
|
|
@ -392,6 +414,17 @@ bool_t call_with_params(LinphoneCoreManager* caller_mgr
|
|||
return call_with_params2(caller_mgr,callee_mgr,&caller_test_params,&callee_test_params,FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* CAUTION this function is error prone. you should not use it anymore in new tests.
|
||||
* Creating callee call params before the call is actually received is not the good way
|
||||
* to use the Liblinphone API. Indeed, call params used for receiving calls shall be created by linphone_core_create_call_params() by passing
|
||||
* the call object for which params are to be created.
|
||||
* This function should be used only in test case where the programmer exactly knows the caller params, and then can deduce how
|
||||
* callee params will be set by linphone_core_create_call_params().
|
||||
* This function was developped at a time where the use of the API about incoming params was not yet clarified.
|
||||
* Tests relying on this function are then not testing the correct way to use the api (through linphone_core_create_call_params()), and so
|
||||
* it is not a so good idea to build new tests based on this function.
|
||||
**/
|
||||
bool_t call_with_test_params(LinphoneCoreManager* caller_mgr
|
||||
,LinphoneCoreManager* callee_mgr
|
||||
,const LinphoneCallTestParams *caller_test_params
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue