Ignore:
Timestamp:
Dec 17, 2019 10:06:01 AM (5 years ago)
Author:
riza
Message:

Close #2258: Add PJSUA2 API to get and set OPUS codec setting.

File:
1 edited

Legend:

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

    r6117 r6119  
    18241824} 
    18251825 
     1826pjmedia_codec_opus_config CodecOpusConfig::toPj() const 
     1827{ 
     1828    pjmedia_codec_opus_config config; 
     1829 
     1830    config.sample_rate = sample_rate; 
     1831    config.channel_cnt = channel_cnt; 
     1832    config.frm_ptime = frm_ptime; 
     1833    config.bit_rate = bit_rate; 
     1834    config.packet_loss = packet_loss; 
     1835    config.complexity = complexity; 
     1836    config.cbr = cbr; 
     1837 
     1838    return config; 
     1839} 
     1840 
     1841void CodecOpusConfig::fromPj(const pjmedia_codec_opus_config &config) 
     1842{ 
     1843    sample_rate = config.sample_rate; 
     1844    channel_cnt = config.channel_cnt; 
     1845    frm_ptime = config.frm_ptime; 
     1846    bit_rate = config.bit_rate; 
     1847    packet_loss = config.packet_loss; 
     1848    complexity = config.complexity; 
     1849    cbr = config.cbr; 
     1850} 
     1851 
    18261852/////////////////////////////////////////////////////////////////////////////// 
    18271853void VidCodecParam::fromPj(const pjmedia_vid_codec_param &param) 
Note: See TracChangeset for help on using the changeset viewer.