Ignore:
Timestamp:
Mar 10, 2016 5:02:07 AM (8 years ago)
Author:
ming
Message:

Fixed #1907: Remove pjmedia* circular dependency

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/endpoint.c

    r5242 r5255  
    106106 * Initialize and get the instance of media endpoint. 
    107107 */ 
    108 PJ_DEF(pj_status_t) pjmedia_endpt_create(pj_pool_factory *pf, 
    109                                          pj_ioqueue_t *ioqueue, 
    110                                          unsigned worker_cnt, 
    111                                          pjmedia_endpt **p_endpt) 
     108PJ_DEF(pj_status_t) pjmedia_endpt_create2(pj_pool_factory *pf, 
     109                                          pj_ioqueue_t *ioqueue, 
     110                                          unsigned worker_cnt, 
     111                                          pjmedia_endpt **p_endpt) 
    112112{ 
    113113    pj_pool_t *pool; 
     
    134134    endpt->has_telephone_event = PJ_TRUE; 
    135135 
    136     /* Sound */ 
    137     status = pjmedia_aud_subsys_init(pf); 
    138     if (status != PJ_SUCCESS) 
    139         goto on_error; 
     136    /* Initialize audio subsystem. 
     137     * To avoid pjmedia's dependendy on pjmedia-audiodev, the initialization 
     138     * (and shutdown) of audio subsystem will be done in the application 
     139     * level instead, when it calls inline functions pjmedia_endpt_create() 
     140     * and pjmedia_endpt_destroy(). 
     141     */ 
     142    //status = pjmedia_aud_subsys_init(pf); 
     143    //if (status != PJ_SUCCESS) 
     144    //  goto on_error; 
    140145 
    141146    /* Init codec manager. */ 
     
    189194 
    190195    pjmedia_codec_mgr_destroy(&endpt->codec_mgr); 
    191     pjmedia_aud_subsys_shutdown(); 
     196    //pjmedia_aud_subsys_shutdown(); 
    192197    pj_pool_release(pool); 
    193198    return status; 
     
    205210 * Deinitialize media endpoint. 
    206211 */ 
    207 PJ_DEF(pj_status_t) pjmedia_endpt_destroy (pjmedia_endpt *endpt) 
     212PJ_DEF(pj_status_t) pjmedia_endpt_destroy2 (pjmedia_endpt *endpt) 
    208213{ 
    209214    exit_cb *ecb; 
     
    220225 
    221226    pjmedia_codec_mgr_destroy(&endpt->codec_mgr); 
    222     pjmedia_aud_subsys_shutdown(); 
     227    //pjmedia_aud_subsys_shutdown(); 
    223228 
    224229    /* Call all registered exit callbacks */ 
Note: See TracChangeset for help on using the changeset viewer.