]> sjero.net Git - linphone/commitdiff
Merge remote-tracking branch 'origin/dev_opus'
authorJehan Monnier <jehan.monnier@linphone.org>
Fri, 24 May 2013 08:17:29 +0000 (10:17 +0200)
committerJehan Monnier <jehan.monnier@linphone.org>
Fri, 24 May 2013 08:17:29 +0000 (10:17 +0200)
1  2 
coreapi/linphonecore.c

diff --combined coreapi/linphonecore.c
index f60640160f3f9cb7d16a989afb4479e61100e133,186f6f976cc3de3dea3ca294919c3b65fe91da54..f4e5536ede8dd391335f2857492f411fcef5fb52
@@@ -825,6 -825,7 +825,7 @@@ typedef struct codec_desc
  }codec_desc_t;
  
  static codec_desc_t codec_pref_order[]={
+       {"opus", 48000},
        {"SILK", 16000},
        {"speex", 16000},
        {"speex", 8000},
@@@ -1287,6 -1288,7 +1288,7 @@@ static void linphone_core_init (Linphon
        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_assign_payload_type(lc,&payload_type_opus,-1,NULL);
        linphone_core_handle_static_payloads(lc);
        
        ms_init();
@@@ -2838,13 -2840,10 +2840,13 @@@ int linphone_core_start_update_call(Lin
  **/
  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) {
@@@ -4680,9 -4679,9 +4682,9 @@@ unsigned long linphone_core_get_native_
   * 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){
  **/
  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);
        }
@@@ -4733,11 -4732,9 +4735,11 @@@ void linphone_core_set_device_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
  }