Changeset 3694


Ignore:
Timestamp:
Aug 15, 2011 9:38:42 AM (8 years ago)
Author:
bennylp
Message:

Re #1263 (Video API):

  • Added PJSUA_CALL_VID_STRM_NO_OP to occupy value 0 for the enum
  • Added pjsua_call_vid_strm_op_param_default() to initialize pjsua_call_vid_strm_op_param
  • Renamed pjsua_call_get_transport_info() to pjsua_call_get_med_transport_info()
Location:
pjproject/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c

    r3666 r3694  
    37793779        pjsua_call_vid_strm_op_param param; 
    37803780 
     3781        pjsua_call_vid_strm_op_param_default(&param); 
     3782 
    37813783        if (argc == 5 && strcmp(argv[2], "rx")==0) { 
    37823784            pjsua_stream_info si; 
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r3685 r3694  
    33043304{ 
    33053305    /** 
     3306     * No operation 
     3307     */ 
     3308    PJSUA_CALL_VID_STRM_NO_OP, 
     3309 
     3310    /** 
    33063311     * Add a new video stream. This will add a new m=video line to 
    33073312     * the media, regardless of whether existing video is/are present 
     
    33513356 
    33523357/** 
    3353  * Parameters for video stream operation on a call. 
     3358 * Parameters for video stream operation on a call. Application should 
     3359 * use #pjsua_call_vid_strm_op_param_default() to initialize this structure 
     3360 * with its default values. 
    33543361 */ 
    33553362typedef struct pjsua_call_vid_strm_op_param 
     
    33863393     * PJSUA_CALL_VID_STRM_ADD and PJSUA_CALL_VID_STRM_CHANGE_CAP_DEV. 
    33873394     * 
    3388      * Default: capture device configured in account. 
     3395     * Default: PJMEDIA_VID_DEFAULT_CAPTURE_DEV. 
    33893396     */ 
    33903397    pjmedia_vid_dev_index cap_dev; 
    33913398 
    33923399} pjsua_call_vid_strm_op_param; 
     3400 
     3401 
     3402/** 
     3403 * Initialize video stream operation param with default values. 
     3404 * 
     3405 * @param param         The video stream operation param to be initialized. 
     3406 */ 
     3407PJ_DECL(void) 
     3408pjsua_call_vid_strm_op_param_default(pjsua_call_vid_strm_op_param *param); 
    33933409 
    33943410 
     
    38893905 * @return              PJ_SUCCESS on success or the appropriate error. 
    38903906 */ 
    3891 PJ_DECL(pj_status_t) pjsua_call_get_transport_info(pjsua_call_id call_id, 
    3892                                                    unsigned med_idx, 
    3893                                                    pjmedia_transport_info *t); 
     3907PJ_DECL(pj_status_t)  
     3908pjsua_call_get_med_transport_info(pjsua_call_id call_id, 
     3909                                  unsigned med_idx, 
     3910                                  pjmedia_transport_info *t); 
    38943911 
    38953912 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r3667 r3694  
    15371537 * Get media transport info for the specified media index. 
    15381538 */ 
    1539 PJ_DEF(pj_status_t) pjsua_call_get_transport_info( pjsua_call_id call_id, 
    1540                                                    unsigned med_idx, 
    1541                                                    pjmedia_transport_info *t) 
     1539PJ_DEF(pj_status_t)  
     1540pjsua_call_get_med_transport_info(pjsua_call_id call_id, 
     1541                                  unsigned med_idx, 
     1542                                  pjmedia_transport_info *t) 
    15421543{ 
    15431544    pjsua_call *call; 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_vid.c

    r3684 r3694  
    108108} 
    109109 
     110PJ_DEF(void) 
     111pjsua_call_vid_strm_op_param_default(pjsua_call_vid_strm_op_param *param) 
     112{ 
     113    pj_bzero(param, sizeof(*param)); 
     114    param->med_idx = -1; 
     115    param->dir = PJMEDIA_DIR_ENCODING_DECODING; 
     116    param->cap_dev = PJMEDIA_VID_DEFAULT_CAPTURE_DEV; 
     117} 
    110118 
    111119/***************************************************************************** 
     
    15611569    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls, 
    15621570                     PJ_EINVAL); 
     1571    PJ_ASSERT_RETURN(op != PJSUA_CALL_VID_STRM_NO_OP, PJ_EINVAL); 
    15631572 
    15641573    PJSUA_LOCK(); 
     
    15691578        param_ = *param; 
    15701579    } else { 
    1571         param_.med_idx = -1; 
    1572         param_.cap_dev = PJMEDIA_VID_DEFAULT_CAPTURE_DEV; 
    1573         param_.dir = PJMEDIA_DIR_ENCODING_DECODING; 
     1580        pjsua_call_vid_strm_op_param_default(&param_); 
    15741581    } 
    15751582 
Note: See TracChangeset for help on using the changeset viewer.