Ignore:
Timestamp:
Dec 1, 2011 9:06:14 AM (12 years ago)
Author:
nanang
Message:

Re #1419, implement media count manipulation per call basis:

  • moved the media count setting from account setting to call setting
  • introduced pjsua_call_setting, to be used by pjsua_call_make_call() and some new APIs: pjsua_call_answer2(), pjsua_call_reinvite2(), pjsua_call_update2()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c

    r3878 r3891  
    384384    PJ_ASSERT_RETURN(pjsua_var.tpdata[0].data.ptr != NULL, PJ_EINVALIDOP); 
    385385 
    386     /* Verify media count */ 
    387 #if !defined(PJMEDIA_HAS_VIDEO) || (PJMEDIA_HAS_VIDEO == 0) 
    388     /* Enable PJMEDIA_HAS_VIDEO in your config_site.h! */ 
    389     PJ_ASSERT_RETURN(cfg->max_video_cnt == 0, PJ_EINVAL); 
    390 #endif 
    391     PJ_ASSERT_RETURN(cfg->max_audio_cnt + cfg->max_video_cnt <=  
    392                      PJSUA_MAX_CALL_MEDIA, PJ_ETOOMANY); 
    393  
    394386    PJ_LOG(4,(THIS_FILE, "Adding account: id=%.*s", 
    395387              (int)cfg->id.slen, cfg->id.ptr)); 
     
    674666    PJ_ASSERT_RETURN(acc_id>=0 && acc_id<(int)PJ_ARRAY_SIZE(pjsua_var.acc), 
    675667                     PJ_EINVAL); 
    676  
    677     /* Verify media count */ 
    678 #if !defined(PJMEDIA_HAS_VIDEO) || (PJMEDIA_HAS_VIDEO == 0) 
    679     PJ_ASSERT_RETURN(cfg->max_video_cnt == 0, PJ_EINVAL); 
    680 #endif 
    681     PJ_ASSERT_RETURN(cfg->max_audio_cnt + cfg->max_video_cnt <=  
    682                      PJSUA_MAX_CALL_MEDIA, PJ_ETOOMANY); 
    683668 
    684669    PJ_LOG(4,(THIS_FILE, "Modifying accunt %d", acc_id)); 
     
    10641049        } 
    10651050    } 
    1066  
    1067     /* Max number of audio and video stream in a call */ 
    1068     acc->cfg.max_audio_cnt = cfg->max_audio_cnt; 
    1069     acc->cfg.max_video_cnt = cfg->max_video_cnt; 
    10701051 
    10711052    /* Video settings */ 
Note: See TracChangeset for help on using the changeset viewer.