Ignore:
Timestamp:
Oct 14, 2011 4:15:15 AM (13 years ago)
Author:
bennylp
Message:

Committing re #1388: Support for OpenCORE AMR-NB codec (thank you Dan Arrhenius for the contribution!)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjmedia/src/test/mips_test.c

    r3553 r3816  
    917917#endif  /* PJMEDIA_HAS_G7221_CODEC */ 
    918918 
     919#if PJMEDIA_HAS_OPENCORE_AMRNB_CODEC 
     920/* AMR-NB benchmark benchmark */ 
     921static pjmedia_port* amr_encode_decode(pj_pool_t *pool, 
     922                                       unsigned clock_rate, 
     923                                       unsigned channel_count, 
     924                                       unsigned samples_per_frame, 
     925                                       unsigned flags, 
     926                                       struct test_entry *te) 
     927{ 
     928    return codec_encode_decode(pool, "AMR/8000",  
     929                               &pjmedia_codec_opencore_amrnb_init, 
     930                               &pjmedia_codec_opencore_amrnb_deinit, 
     931                               clock_rate, channel_count, 
     932                               samples_per_frame, flags, te); 
     933} 
     934#endif  /* PJMEDIA_HAS_OPENCORE_AMRNB_CODEC */ 
     935 
    919936#if defined(PJMEDIA_HAS_L16_CODEC) && PJMEDIA_HAS_L16_CODEC!=0 
    920937static pj_status_t init_l16_default(pjmedia_endpt *endpt) 
     
    19741991} 
    19751992#endif  /* PJMEDIA_HAS_G7221_CODEC */  
     1993 
     1994/* AMR-NB stream */ 
     1995#if PJMEDIA_HAS_OPENCORE_AMRNB_CODEC 
     1996static pjmedia_port* create_stream_amr( pj_pool_t *pool, 
     1997                                        unsigned clock_rate, 
     1998                                        unsigned channel_count, 
     1999                                        unsigned samples_per_frame, 
     2000                                        unsigned flags, 
     2001                                        struct test_entry *te) 
     2002{ 
     2003    return create_stream(pool, "AMR/8000", &pjmedia_codec_opencore_amrnb_init,  
     2004                         &pjmedia_codec_opencore_amrnb_deinit,  
     2005                         PJ_FALSE, PJ_FALSE, PJ_FALSE, 
     2006                         clock_rate, channel_count, 
     2007                         samples_per_frame, flags, te); 
     2008} 
     2009#endif  /* PJMEDIA_HAS_OPENCORE_AMRNB_CODEC */  
    19762010 
    19772011/***************************************************************************/ 
     
    23652399        { "codec encode/decode - G.722.1c", OP_PUT, K32, &g7221c_encode_decode}, 
    23662400#endif 
     2401#if PJMEDIA_HAS_OPENCORE_AMRNB_CODEC 
     2402        { "codec encode/decode - AMR-NB", OP_PUT, K8, &amr_encode_decode}, 
     2403#endif 
    23672404#if PJMEDIA_HAS_L16_CODEC 
    23682405        { "codec encode/decode - L16/8000/1", OP_PUT, K8, &l16_8_encode_decode}, 
     
    23902427        { "stream TX/RX - G.722.1c", OP_PUT_GET, K32, &create_stream_g7221c}, 
    23912428#endif 
     2429#if PJMEDIA_HAS_OPENCORE_AMRNB_CODEC 
     2430        { "stream TX/RX - AMR-NB", OP_PUT_GET, K8, &create_stream_amr}, 
     2431#endif 
    23922432    }; 
    23932433 
Note: See TracChangeset for help on using the changeset viewer.