Changeset 3263


Ignore:
Timestamp:
Aug 11, 2010 7:18:08 AM (14 years ago)
Author:
nanang
Message:

Re #1106: Reverted back the IPP codec APIs pjmedia_codec_ipp_set/get_config() as currently to set PCM signal level adjustment can be done using the existing G722.1 API pjmedia_codec_g7221_set_pcm_shift().

Location:
pjproject/trunk/pjmedia
Files:
3 edited

Legend:

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

    r3083 r3263  
    130130 * the decoder will be shifted left by this value. 
    131131 * 
     132 * \note 
     133 * This function is also applicable for G722.1 implementation with IPP 
     134 * back-end. 
     135 * 
    132136 * Default value is PJMEDIA_G7221_DEFAULT_PCM_SHIFT. 
    133137 * 
  • pjproject/trunk/pjmedia/include/pjmedia-codec/ipp_codecs.h

    r3261 r3263  
    292292PJ_BEGIN_DECL 
    293293 
    294 /**  
    295  * IPP codecs configuration settings. 
    296  */ 
    297 typedef struct pjmedia_codec_ipp_config 
    298 { 
    299     /** 
    300      * Specifies the G.722.1 codec encoder and decoder level adjustment.  
    301      * If the value is non-zero, then PCM input samples to the encoder will  
    302      * be shifted right by this value, and similarly PCM output samples from 
    303      * the decoder will be shifted left by this value. 
    304      * 
    305      * Default value is PJMEDIA_G7221_DEFAULT_PCM_SHIFT. 
    306      */ 
    307     unsigned             g7221_pcm_shift; 
    308  
    309 } pjmedia_codec_ipp_config; 
    310  
    311294 
    312295/** 
     
    318301 */ 
    319302PJ_DECL(pj_status_t) pjmedia_codec_ipp_init( pjmedia_endpt *endpt ); 
    320  
    321  
    322 /** 
    323  * Get current IPP codecs configuration settings. 
    324  * 
    325  * @param cfg       The IPP codecs configuration settings buffer. 
    326  * 
    327  * @return          PJ_SUCCESS on success. 
    328  */ 
    329 PJ_DECL(pj_status_t) pjmedia_codec_ipp_get_config( 
    330                                 pjmedia_codec_ipp_config *cfg); 
    331  
    332  
    333 /** 
    334  * Set IPP codecs configuration settings. 
    335  * 
    336  * @param setting   The IPP codecs configuration settings to be applied. 
    337  * 
    338  * @return          PJ_SUCCESS on success. 
    339  */ 
    340 PJ_DECL(pj_status_t) pjmedia_codec_ipp_set_config( 
    341                                 const pjmedia_codec_ipp_config *cfg); 
    342303 
    343304 
  • pjproject/trunk/pjmedia/src/pjmedia-codec/ipp_codecs.c

    r3261 r3263  
    645645} 
    646646 
     647 
     648#include <pjmedia-codec/g7221.h> 
     649 
     650 
     651PJ_DEF(pj_status_t) pjmedia_codec_g7221_set_pcm_shift(int val) 
     652{ 
     653    PJ_ASSERT_RETURN(val >= 0, PJ_EINVAL); 
     654 
     655    ipp_factory.g7221_pcm_shift = val; 
     656    return PJ_SUCCESS; 
     657} 
     658 
     659 
    647660#endif /* PJMEDIA_HAS_INTEL_IPP_CODEC_G722_1 */ 
    648661 
     
    733746 
    734747    return status; 
    735 } 
    736  
    737 /* 
    738  * Get current IPP codecs configuration settings. 
    739  */ 
    740 PJ_DEF(pj_status_t) pjmedia_codec_ipp_get_config( 
    741                                 pjmedia_codec_ipp_config *cfg) 
    742 { 
    743     PJ_ASSERT_RETURN(cfg, PJ_EINVAL); 
    744  
    745     pj_bzero(cfg, sizeof(*cfg)); 
    746     cfg->g7221_pcm_shift = ipp_factory.g7221_pcm_shift; 
    747  
    748     return PJ_SUCCESS; 
    749 } 
    750  
    751  
    752 /* 
    753  * Set IPP codecs configuration settings. 
    754  */ 
    755 PJ_DECL(pj_status_t) pjmedia_codec_ipp_set_config( 
    756                                 const pjmedia_codec_ipp_config *cfg) 
    757 { 
    758     PJ_ASSERT_RETURN(cfg, PJ_EINVAL); 
    759  
    760     ipp_factory.g7221_pcm_shift = cfg->g7221_pcm_shift; 
    761      
    762     return PJ_SUCCESS; 
    763748} 
    764749 
Note: See TracChangeset for help on using the changeset viewer.