Ignore:
Timestamp:
Jul 15, 2011 9:51:46 AM (10 years ago)
Author:
bennylp
Message:

Fixed #1294: New pjmedia_codec_register_audio_codecs() API to register all known codecs, and also added implementation to deregister all codecs when the media endpoint is destroyed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/2.0-dev/pjsip-apps/src/samples/jbsim.c

    r3392 r3661  
    473473 
    474474    /* Register codecs */ 
    475 #if defined(PJMEDIA_HAS_GSM_CODEC) && PJMEDIA_HAS_GSM_CODEC != 0 
    476     pjmedia_codec_gsm_init(g_app.endpt); 
    477 #endif 
    478 #if defined(PJMEDIA_HAS_G711_CODEC) && PJMEDIA_HAS_G711_CODEC!=0 
    479     pjmedia_codec_g711_init(g_app.endpt); 
    480 #endif 
    481 #if defined(PJMEDIA_HAS_SPEEX_CODEC) && PJMEDIA_HAS_SPEEX_CODEC!=0 
    482     pjmedia_codec_speex_init(g_app.endpt, 0, PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY, 
    483                              PJMEDIA_CODEC_SPEEX_DEFAULT_COMPLEXITY); 
    484 #endif 
    485 #if defined(PJMEDIA_HAS_G722_CODEC) && (PJMEDIA_HAS_G722_CODEC != 0) 
    486     pjmedia_codec_g722_init(g_app.endpt); 
    487 #endif 
    488 #if defined(PJMEDIA_HAS_ILBC_CODEC) && PJMEDIA_HAS_ILBC_CODEC != 0 
    489     /* Init ILBC with mode=20 to make the losts occur at the same 
    490      * places as other codecs. 
    491      */ 
    492     pjmedia_codec_ilbc_init(g_app.endpt, 20); 
    493 #endif 
    494 #if defined(PJMEDIA_HAS_INTEL_IPP) && PJMEDIA_HAS_INTEL_IPP != 0 
    495     pjmedia_codec_ipp_init(g_app.endpt); 
    496 #endif 
    497 #if defined(PJMEDIA_HAS_L16_CODEC) && PJMEDIA_HAS_L16_CODEC != 0 
    498     pjmedia_codec_l16_init(g_app.endpt, 0); 
    499 #endif 
     475    pjmedia_codec_register_audio_codecs(g_app.endpt, NULL); 
    500476 
    501477    /* Create the loop transport */ 
Note: See TracChangeset for help on using the changeset viewer.