Ignore:
Timestamp:
Mar 16, 2006 2:24:26 PM (18 years ago)
Author:
bennylp
Message:

Added misc flags and modify Makefiles to allow exclusion of PortAudio? and specific codec during compilation

File:
1 edited

Legend:

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

    r318 r320  
    618618    if (pjsua.codec_cnt == 0) { 
    619619 
     620#if PJMEDIA_HAS_SPEEX_CODEC 
    620621        unsigned option = PJMEDIA_SPEEX_NO_WB | PJMEDIA_SPEEX_NO_UWB; 
    621622 
     
    637638        pjsua.codec_deinit[pjsua.codec_cnt] = &pjmedia_codec_speex_deinit; 
    638639        pjsua.codec_cnt++; 
    639  
     640#endif /* PJMEDIA_HAS_SPEEX_CODEC */ 
     641 
     642#if PJMEDIA_HAS_GSM_CODEC 
    640643        /* Register GSM */ 
    641644        status = pjmedia_codec_gsm_init(pjsua.med_endpt); 
     
    649652        pjsua.codec_deinit[pjsua.codec_cnt] = &pjmedia_codec_gsm_deinit; 
    650653        pjsua.codec_cnt++; 
    651  
     654#endif /* PJMEDIA_HAS_GSM_CODEC */ 
     655 
     656#if PJMEDIA_HAS_G711_CODEC 
    652657        /* Register PCMA and PCMU */ 
    653658        status = pjmedia_codec_g711_init(pjsua.med_endpt); 
     
    664669        pjsua.codec_deinit[pjsua.codec_cnt] = &pjmedia_codec_g711_deinit; 
    665670        pjsua.codec_cnt++; 
     671#endif  /* PJMEDIA_HAS_G711_CODEC */ 
    666672 
    667673    } else { 
     
    674680        for (i=0; i<pjsua.codec_cnt; ++i) { 
    675681         
     682            if (0) { 
     683                /* Dummy */ 
     684            } 
     685#if PJMEDIA_HAS_SPEEX_CODEC 
    676686            /* Is it speex? */ 
    677             if (!pj_stricmp2(&pjsua.codec_arg[i], "speex")) { 
     687            else if (!pj_stricmp2(&pjsua.codec_arg[i], "speex")) { 
    678688 
    679689                unsigned option = PJMEDIA_SPEEX_NO_WB | PJMEDIA_SPEEX_NO_UWB; 
     
    695705                pjsua.codec_deinit[i] = &pjmedia_codec_speex_deinit; 
    696706            } 
     707#endif  /* PJMEDIA_HAS_SPEEX_CODEC */ 
     708 
     709#if PJMEDIA_HAS_GSM_CODEC 
    697710            /* Is it gsm? */ 
    698711            else if (!pj_stricmp2(&pjsua.codec_arg[i], "gsm")) { 
     
    708721 
    709722            } 
     723#endif  /* PJMEDIA_HAS_GSM_CODEC */ 
     724 
     725#if PJMEDIA_HAS_G711_CODEC 
    710726            /* Is it pcma/pcmu? */ 
    711727            else if (!pj_stricmp2(&pjsua.codec_arg[i], "pcmu") || 
     
    723739 
    724740            } 
     741#endif  /* PJMEDIA_HAS_G711_CODEC */ 
     742 
    725743            /* Don't know about this codec... */ 
    726744            else { 
     
    10591077 
    10601078    /* Destroy file port */ 
    1061     pjmedia_port_destroy(pjsua.file_port); 
     1079    if (pjsua.file_port) 
     1080        pjmedia_port_destroy(pjsua.file_port); 
    10621081 
    10631082    /* Destroy null port. */ 
    1064     pjmedia_port_destroy(pjsua.null_port); 
     1083    if (pjsua.null_port) 
     1084        pjmedia_port_destroy(pjsua.null_port); 
    10651085 
    10661086 
Note: See TracChangeset for help on using the changeset viewer.