Changeset 5842


Ignore:
Timestamp:
Jul 26, 2018 3:05:10 AM (6 years ago)
Author:
ming
Message:

Re #2126: re 5841: move the event manager creation and destruction in pjsua_media instead

Location:
pjproject/trunk/pjsip/src/pjsua-lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_aud.c

    r5841 r5842  
    237237    /* To suppress warning about unused var when all codecs are disabled */ 
    238238    PJ_UNUSED_ARG(codec_id); 
    239  
    240     PJ_LOG(4,(THIS_FILE, "Initializing audio subsystem..")); 
    241  
    242     if (!pjmedia_event_mgr_instance()) { 
    243         status = pjmedia_event_mgr_create(pjsua_var.pool, 0, NULL); 
    244         if (status != PJ_SUCCESS) { 
    245             pjsua_perror(THIS_FILE, "Error creating PJMEDIA event manager", 
    246                          status); 
    247             goto on_error; 
    248         } 
    249     } 
    250239 
    251240    /* 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c

    r5839 r5842  
    111111#endif 
    112112 
    113     /* Create event manager (if not yet, e.g: PJMEDIA_HAS_VIDEO==0) */ 
     113    /* Create event manager */ 
    114114    if (!pjmedia_event_mgr_instance()) { 
    115115        status = pjmedia_event_mgr_create(pjsua_var.pool,  
     
    232232        //pjmedia_snd_deinit(); 
    233233    } 
     234 
     235    if (pjmedia_event_mgr_instance()) 
     236        pjmedia_event_mgr_destroy(NULL); 
    234237 
    235238    pj_log_pop_indent(); 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_vid.c

    r5841 r5842  
    6262    } 
    6363 
    64     if (!pjmedia_event_mgr_instance()) { 
    65         status = pjmedia_event_mgr_create(pjsua_var.pool, 0, NULL); 
    66         if (status != PJ_SUCCESS) { 
    67             PJ_PERROR(1,(THIS_FILE, status, 
    68                          "Error creating PJMEDIA event manager")); 
    69             goto on_error; 
    70         } 
    71     } 
    72  
    7364    status = pjmedia_vid_codec_mgr_create(pjsua_var.pool, NULL); 
    7465    if (status != PJ_SUCCESS) { 
     
    169160    if (pjmedia_converter_mgr_instance()) 
    170161        pjmedia_converter_mgr_destroy(NULL); 
    171  
    172     if (pjmedia_event_mgr_instance()) 
    173         pjmedia_event_mgr_destroy(NULL); 
    174162 
    175163    if (pjmedia_video_format_mgr_instance()) 
Note: See TracChangeset for help on using the changeset viewer.