]> sjero.net Git - linphone/blobdiff - coreapi/linphonecore.c
Declare variables at the beginning of code blocks to fix compilation errors.
[linphone] / coreapi / linphonecore.c
index a17543d22da61ca1af021ab501f3531a13f70303..f60640160f3f9cb7d16a989afb4479e61100e133 100644 (file)
@@ -1285,8 +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=24; 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=24; sizeLength=13; streamType=5");
+       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();
@@ -1729,7 +1729,7 @@ 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)
 {
-       if (linphone_core_ready()) {
+       if (linphone_core_ready(lc)) {
                lp_config_set_int(lc->config, "sip", "use_info", use_info);
        }
 }
@@ -1751,7 +1751,7 @@ 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)
 {
-       if (linphone_core_ready()) {
+       if (linphone_core_ready(lc)) {
                lp_config_set_int(lc->config, "sip", "use_rfc2833", use_rfc2833);
        }
 }
@@ -2838,10 +2838,13 @@ int linphone_core_start_update_call(LinphoneCore *lc, LinphoneCall *call){
 **/
 int linphone_core_update_call(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params){
        int err=0;
+#ifdef VIDEO_ENABLED
+       bool_t has_video = FALSE;
+#endif
        if (params!=NULL){
                linphone_call_set_state(call,LinphoneCallUpdating,"Updating call");
 #ifdef VIDEO_ENABLED
-               bool_t has_video = call->params.has_video;
+               has_video = call->params.has_video;
 
                // Video removing
                if((call->videostream != NULL) && !params->has_video) {
@@ -4190,7 +4193,7 @@ const char * linphone_core_get_stun_server(const LinphoneCore *lc){
        return lc->net_conf.stun_server;
 }
 
-bool_t linphone_core_upnp_available(const LinphoneCore *lc){
+bool_t linphone_core_upnp_available(){
 #ifdef BUILD_UPNP
        return TRUE;
 #else
@@ -4677,9 +4680,9 @@ unsigned long linphone_core_get_native_preview_window_id(const LinphoneCore *lc)
  * If not set the core will create its own window.
 **/
 void linphone_core_set_native_preview_window_id(LinphoneCore *lc, unsigned long id){
-       lc->preview_window_id=id;
 #ifdef VIDEO_ENABLED
        LinphoneCall *call=linphone_core_get_current_call(lc);
+       lc->preview_window_id=id;
        if (call!=NULL && call->videostream){
                video_stream_set_native_preview_window_id(call->videostream,id);
        }else if (lc->previewstream){
@@ -4693,8 +4696,8 @@ void linphone_core_set_native_preview_window_id(LinphoneCore *lc, unsigned long
 **/
 void linphone_core_show_video(LinphoneCore *lc, bool_t show){
 #ifdef VIDEO_ENABLED
-       ms_error("linphone_core_show_video %d", show);
        LinphoneCall *call=linphone_core_get_current_call(lc);
+       ms_error("linphone_core_show_video %d", show);
        if (call!=NULL && call->videostream){
                video_stream_show_video(call->videostream,show);
        }
@@ -4730,9 +4733,11 @@ void linphone_core_set_device_rotation(LinphoneCore *lc, int rotation) {
        ms_message("%s : rotation=%d\n", __FUNCTION__, rotation);
        lc->device_rotation = rotation;
 #ifdef VIDEO_ENABLED
-       LinphoneCall *call=linphone_core_get_current_call(lc);
-       if (call!=NULL && call->videostream){
-               video_stream_set_device_rotation(call->videostream,rotation);
+       {
+               LinphoneCall *call=linphone_core_get_current_call(lc);
+               if (call!=NULL && call->videostream){
+                       video_stream_set_device_rotation(call->videostream,rotation);
+               }
        }
 #endif
 }
@@ -4927,26 +4932,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);