Ignore:
Timestamp:
Sep 6, 2017 3:44:35 AM (6 years ago)
Author:
riza
Message:

Close #2040: Implement CodecParam? class as a wrapper for pjmedia_codec_param.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua2/endpoint.cpp

    r5636 r5645  
    18831883CodecParam Endpoint::codecGetParam(const string &codec_id) const throw(Error) 
    18841884{ 
    1885     pjmedia_codec_param *pj_param = NULL; 
     1885    CodecParam param; 
     1886    pjmedia_codec_param pj_param; 
    18861887    pj_str_t codec_str = str2Pj(codec_id); 
    18871888 
    1888     PJSUA2_CHECK_EXPR( pjsua_codec_get_param(&codec_str, pj_param) ); 
    1889  
    1890     return pj_param; 
     1889    PJSUA2_CHECK_EXPR( pjsua_codec_get_param(&codec_str, &pj_param) ); 
     1890 
     1891    param.fromPj(pj_param); 
     1892    return param; 
    18911893} 
    18921894 
     
    18951897{ 
    18961898    pj_str_t codec_str = str2Pj(codec_id); 
    1897     pjmedia_codec_param *pj_param = (pjmedia_codec_param*)param; 
    1898  
    1899     PJSUA2_CHECK_EXPR( pjsua_codec_set_param(&codec_str, pj_param) ); 
     1899    pjmedia_codec_param pj_param = param.toPj(); 
     1900 
     1901    PJSUA2_CHECK_EXPR( pjsua_codec_set_param(&codec_str, &pj_param) ); 
    19001902} 
    19011903 
Note: See TracChangeset for help on using the changeset viewer.