Ignore:
Timestamp:
Oct 4, 2019 4:26:39 AM (3 years ago)
Author:
nanang
Message:

Fixed #2239:

  • Deinit OpenGL immediately when initialization fails, so video device start() and put_frame() will return immediately.
  • Introduced new media event PJMEDIA_EVENT_VID_DEV_ERROR, used for notifying app when video device reinit (due to format change) fails.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/event.h

    r6005 r6085  
    2727#include <pjmedia/format.h> 
    2828#include <pjmedia/signatures.h> 
     29#include <pjmedia/videodev.h> 
    2930 
    3031PJ_BEGIN_DECL 
     
    9798 
    9899    /** 
     100     * Video device stopped on error. 
     101     */ 
     102    PJMEDIA_EVENT_VID_DEV_ERROR = PJMEDIA_FOURCC('V', 'E', 'R', 'R'), 
     103 
     104    /** 
    99105     * Transport media error. 
    100106     */ 
     
    159165    /** The error code */ 
    160166    pj_status_t              status; 
     167 
    161168} pjmedia_event_aud_dev_err_data; 
     169 
     170/** 
     171 * Additional data/parameters for video device error event. 
     172 */ 
     173typedef struct pjmedia_event_vid_dev_err_data 
     174{ 
     175    /** The media direction that fails */ 
     176    pjmedia_dir              dir; 
     177 
     178    /** The video device ID */ 
     179    pjmedia_vid_dev_index    id; 
     180 
     181    /** The error code */ 
     182    pj_status_t              status; 
     183 
     184} pjmedia_event_vid_dev_err_data; 
    162185 
    163186/** 
     
    265288        /** Audio device error event data */ 
    266289        pjmedia_event_aud_dev_err_data          aud_dev_err; 
     290 
     291        /** Video device error event data */ 
     292        pjmedia_event_vid_dev_err_data          vid_dev_err; 
    267293 
    268294        /** Storage for user event data */ 
Note: See TracChangeset for help on using the changeset viewer.