Ignore:
Timestamp:
Mar 15, 2018 3:00:59 AM (7 years ago)
Author:
nanang
Message:

Close #2100:

  • Added new APIs:
    • PJMEDIA: pjmedia_srtp_enum_crypto(), pjmedia_srtp_enum_keying()
    • PJSUA: pjsua_config.srtp_opt, pjsua_acc_config.srtp_opt, pjsua_srtp_opt_default()
    • PJSUA2: AccountMediaConfig::srtpOpt, Endpoint::srtpCryptoEnum()
  • Deprecated PJSUA callback on_create_media_transport_srtp() (not removed yet, just warnings).
  • Slightly refactored SRTP code:
    • Fixed potential issue with on_create_media_transport_srtp(), some PJSUA internal values in pjmedia_srtp_setting may be overridden by app.
    • Fixed few issues in SRTP and keying mechanism, e.g: premature local SDP modification (it should be done after verification).
    • Potential minor backward compatibility issue: default value of pjmedia_srtp_setting.crypto_count is now zero, previously it was initialized with all crypto via pjmedia_srtp_setting_default(), actually zero and all cryptos in this setting semantically are the same.
File:
1 edited

Legend:

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

    r5704 r5755  
    10921092    prm.stream = param->stream; 
    10931093    prm.streamIdx = param->stream_idx; 
    1094     prm.destroyPort = param->destroy_port; 
     1094    prm.destroyPort = (param->destroy_port != PJ_FALSE); 
    10951095    prm.pPort = (MediaPort)param->port; 
    10961096     
     
    20822082} 
    20832083 
     2084/* 
     2085 * Enumerate all SRTP crypto-suite names. 
     2086 */ 
     2087StringVector Endpoint::srtpCryptoEnum() throw(Error) 
     2088{ 
     2089    unsigned cnt = PJMEDIA_SRTP_MAX_CRYPTOS; 
     2090    pjmedia_srtp_crypto cryptos[PJMEDIA_SRTP_MAX_CRYPTOS]; 
     2091    StringVector result; 
     2092 
     2093    PJSUA2_CHECK_EXPR(pjmedia_srtp_enum_crypto(&cnt, cryptos)); 
     2094 
     2095    for (unsigned i = 0; i < cnt; ++i) 
     2096        result.push_back(pj2Str(cryptos[i].name)); 
     2097 
     2098    return result; 
     2099} 
     2100 
    20842101void Endpoint::handleIpChange(const IpChangeParam &param) throw(Error) 
    20852102{ 
Note: See TracChangeset for help on using the changeset viewer.