Ignore:
Timestamp:
Dec 13, 2018 6:57:23 AM (3 years ago)
Author:
nanang
Message:

Re #2168:

  • Added a new PJSUA callback on_media_event().
  • Added audio device error handling into PJSUA2.
File:
1 edited

Legend:

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

    r5792 r5923  
    17301730} 
    17311731 
     1732/////////////////////////////////////////////////////////////////////////////// 
     1733void MediaEvent::fromPj(const pjmedia_event &ev) 
     1734{ 
     1735    type = ev.type; 
     1736    if (type == PJMEDIA_EVENT_FMT_CHANGED) { 
     1737        data.fmtChanged.newWidth = ev.data.fmt_changed.new_fmt.det.vid.size.w; 
     1738        data.fmtChanged.newHeight = ev.data.fmt_changed.new_fmt.det.vid.size.h; 
     1739    } else if (type == PJMEDIA_EVENT_AUD_DEV_ERROR) { 
     1740        data.audDevError.dir = ev.data.aud_dev_err.dir; 
     1741        data.audDevError.id = ev.data.aud_dev_err.id; 
     1742        data.audDevError.status = ev.data.aud_dev_err.status; 
     1743    } 
     1744    pjMediaEvent = (void *)&ev; 
     1745} 
     1746 
Note: See TracChangeset for help on using the changeset viewer.