Ignore:
Timestamp:
Jan 29, 2013 8:09:15 AM (8 years ago)
Author:
ming
Message:

Re #1608: Fixed the way codec is initialized, enumerated, and deinit since both NB and WB use the same factory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia-codec/opencore_amr.h

    r4331 r4335  
    3333 
    3434/** 
     35 * Bitmask options to be passed during AMR codec factory initialization. 
     36 */ 
     37enum pjmedia_amr_options 
     38{ 
     39    PJMEDIA_AMR_NO_NB       = 1,    /**< Disable narrowband mode.       */ 
     40    PJMEDIA_AMR_NO_WB       = 2,    /**< Disable wideband mode.         */ 
     41}; 
     42 
     43/** 
    3544 * Settings. Use #pjmedia_codec_opencore_amrnb/wb_set_config() to 
    3645 * activate. 
     
    5463 
    5564/** 
    56  * Initialize and register AMR-NB codec factory to pjmedia endpoint. 
     65 * Initialize and register AMR codec factory to pjmedia endpoint. 
     66 * 
     67 * @param endpt     The pjmedia endpoint. 
     68 * @param options   Bitmask of pjmedia_amr_options (default=0). 
     69 * 
     70 * @return          PJ_SUCCESS on success. 
     71 */ 
     72PJ_DECL(pj_status_t) pjmedia_codec_opencore_amr_init(pjmedia_endpt* endpt, 
     73                                                     unsigned options); 
     74 
     75/** 
     76 * Initialize and register AMR codec factory using default settings to 
     77 * pjmedia endpoint. 
     78 * 
     79 * @param endpt The pjmedia endpoint. 
     80 * 
     81 * @return      PJ_SUCCESS on success. 
     82 */ 
     83PJ_DECL(pj_status_t) 
     84pjmedia_codec_opencore_amr_init_default(pjmedia_endpt* endpt); 
     85 
     86/** 
     87 * Unregister AMR codec factory from pjmedia endpoint and deinitialize 
     88 * the OpenCORE codec library. 
     89 * 
     90 * @return      PJ_SUCCESS on success. 
     91 */ 
     92PJ_DECL(pj_status_t) pjmedia_codec_opencore_amr_deinit(void); 
     93 
     94/** 
     95 * Initialize and register AMR-NB codec factory to pjmedia endpoint. Calling 
     96 * this function will automatically initialize AMR codec factory without 
     97 * the wideband mode (i.e. it is equivalent to calling 
     98 * #pjmedia_codec_opencore_amr_init() with PJMEDIA_AMR_NO_WB). Application 
     99 * should call #pjmedia_codec_opencore_amr_init() instead if wishing to use 
     100 * both modes. 
    57101 * 
    58102 * @param endpt The pjmedia endpoint. 
     
    81125                                const pjmedia_codec_amrnb_config* cfg); 
    82126 
    83 /** 
    84  * Initialize and register AMR-WB codec factory to pjmedia endpoint. 
    85  * 
    86  * @param endpt The pjmedia endpoint. 
    87  * 
    88  * @return      PJ_SUCCESS on success. 
    89  */ 
    90 PJ_DECL(pj_status_t) pjmedia_codec_opencore_amrwb_init(pjmedia_endpt* endpt); 
    91  
    92 /** 
    93  * Unregister AMR-WB codec factory from pjmedia endpoint and deinitialize 
    94  * the OpenCORE codec library. 
    95  * 
    96  * @return      PJ_SUCCESS on success. 
    97  */ 
    98 PJ_DECL(pj_status_t) pjmedia_codec_opencore_amrwb_deinit(void); 
    99  
    100127 
    101128/** 
Note: See TracChangeset for help on using the changeset viewer.