]> sjero.net Git - linphone/blobdiff - coreapi/linphonecore.c
AAC-EL: fix SDP/fmtp content according to new recommendation from Fraunhofer
[linphone] / coreapi / linphonecore.c
index edf11a4071d7ca2d6808442c3f95d0396ab1c926..12c8880b65a4068547ffacd35a07c984b4ab8304 100644 (file)
@@ -598,9 +598,6 @@ static void sip_config_read(LinphoneCore *lc)
        int ipv6;
        int random_port;
 
-       tmp=lp_config_get_int(lc->config,"sip","use_info",0);
-       linphone_core_set_use_info_for_dtmf(lc,tmp);
-
        if (lp_config_get_int(lc->config,"sip","use_session_timers",0)==1){
                sal_use_session_timers(lc->sal,200);
        }
@@ -610,9 +607,6 @@ static void sip_config_read(LinphoneCore *lc)
        sal_reuse_authorization(lc->sal, lp_config_get_int(lc->config,"sip","reuse_authorization",0));
        sal_expire_old_registration_contacts(lc->sal,lp_config_get_int(lc->config,"sip","expire_old_registration_contacts",0));
 
-       tmp=lp_config_get_int(lc->config,"sip","use_rfc2833",1);
-       linphone_core_set_use_rfc2833_for_dtmf(lc,tmp);
-
        ipv6=lp_config_get_int(lc->config,"sip","use_ipv6",-1);
        if (ipv6==-1){
                ipv6=0;
@@ -1291,6 +1285,8 @@ static void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vta
        linphone_core_assign_payload_type(lc,&payload_type_silk_wb,-1,NULL);
        linphone_core_assign_payload_type(lc,&payload_type_silk_swb,-1,NULL);
        linphone_core_assign_payload_type(lc,&payload_type_g729,18,"annexb=no");
+       linphone_core_assign_payload_type(lc,&payload_type_aaceld_22k,-1,"config=F8EE2000; constantDuration=512;  indexDeltaLength=3; indexLength=3; mode=AAC-hbr; profile-level-id=76; sizeLength=13; streamType=5");
+       linphone_core_assign_payload_type(lc,&payload_type_aaceld_44k,-1,"config=F8E82000; constantDuration=512;  indexDeltaLength=3; indexLength=3; mode=AAC-hbr; profile-level-id=76; sizeLength=13; streamType=5");
        linphone_core_handle_static_payloads(lc);
        
        ms_init();
@@ -1723,7 +1719,7 @@ void linphone_core_set_nortp_timeout(LinphoneCore *lc, int nortp_timeout){
 **/
 bool_t linphone_core_get_use_info_for_dtmf(LinphoneCore *lc)
 {
-       return lc->sip_conf.use_info;
+       return lp_config_get_int(lc->config, "sip", "use_info", 0);
 }
 
 /**
@@ -1733,7 +1729,9 @@ bool_t linphone_core_get_use_info_for_dtmf(LinphoneCore *lc)
 **/
 void linphone_core_set_use_info_for_dtmf(LinphoneCore *lc,bool_t use_info)
 {
-       lc->sip_conf.use_info=use_info;
+       if (linphone_core_ready(lc)) {
+               lp_config_set_int(lc->config, "sip", "use_info", use_info);
+       }
 }
 
 /**
@@ -1743,7 +1741,7 @@ void linphone_core_set_use_info_for_dtmf(LinphoneCore *lc,bool_t use_info)
 **/
 bool_t linphone_core_get_use_rfc2833_for_dtmf(LinphoneCore *lc)
 {
-       return lc->sip_conf.use_rfc2833;
+       return lp_config_get_int(lc->config, "sip", "use_rfc2833", 1);
 }
 
 /**
@@ -1753,7 +1751,9 @@ bool_t linphone_core_get_use_rfc2833_for_dtmf(LinphoneCore *lc)
 **/
 void linphone_core_set_use_rfc2833_for_dtmf(LinphoneCore *lc,bool_t use_rfc2833)
 {
-       lc->sip_conf.use_rfc2833=use_rfc2833;
+       if (linphone_core_ready(lc)) {
+               lp_config_set_int(lc->config, "sip", "use_rfc2833", use_rfc2833);
+       }
 }
 
 /**
@@ -4927,26 +4927,6 @@ void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms){
        else ms_filter_call_method(f, MS_DTMF_GEN_START, &dtmf);
 }
 
-/**
- * @ingroup media_parameters
- * Plays a repeated tone to the local user until next further call to #linphone_core_stop_dtmf()
- * @param lc #LinphoneCore
-**/
-void linphone_core_play_tone(LinphoneCore *lc){
-       MSFilter *f=get_dtmf_gen(lc);
-       MSDtmfGenCustomTone def;
-       if (f==NULL){
-               ms_error("No dtmf generator at this time !");
-               return;
-       }
-       memset(&def,0,sizeof(def));
-       def.duration=300;
-       def.frequencies[0]=500;
-       def.amplitude=1;
-       def.interval=2000;
-       ms_filter_call_method(f, MS_DTMF_GEN_PLAY_CUSTOM,&def);
-}
-
 void linphone_core_play_named_tone(LinphoneCore *lc, LinphoneToneID toneid){
        if (linphone_core_tone_indications_enabled(lc)){
                MSFilter *f=get_dtmf_gen(lc);
@@ -5126,8 +5106,6 @@ void sip_config_uninit(LinphoneCore *lc)
        lp_config_set_int(lc->config,"sip","inc_timeout",config->inc_timeout);
        lp_config_set_int(lc->config,"sip","in_call_timeout",config->in_call_timeout);
        lp_config_set_int(lc->config,"sip","delayed_timeout",config->delayed_timeout);
-       lp_config_set_int(lc->config,"sip","use_info",config->use_info);
-       lp_config_set_int(lc->config,"sip","use_rfc2833",config->use_rfc2833);
        lp_config_set_int(lc->config,"sip","use_ipv6",config->ipv6_enabled);
        lp_config_set_int(lc->config,"sip","register_only_when_network_is_up",config->register_only_when_network_is_up);
        lp_config_set_int(lc->config,"sip","register_only_when_upnp_is_ok",config->register_only_when_upnp_is_ok);