diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2010-06-11 13:38:42 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2010-06-11 13:38:42 +0000 |
commit | 478d7fed9b2d5713500c91dd296356b7ea939502 (patch) | |
tree | 8e2b057e5f4838a51e5ab954cf3e683f830ebb69 /pjmedia/include/pjmedia-codec/g722.h | |
parent | f58cd5dab31fb33928ff092f534b4145873c8dad (diff) |
Close #1072:
- Added API pjmedia_codec_g722_set_pcm_shift() to enable configurable level-adjusment setting.
- Also added macro PJMEDIA_G722_DEFAULT_PCM_SHIFT (default value is 2) to accomplish 14-16 bit PCM conversion for G722 input/output.
- Added a feature in G722 to stop level-adjusment/PCM-shifting when clipping occured, compile-time configurable via PJMEDIA_G722_STOP_PCM_SHIFT_ON_CLIPPING macro.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3202 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include/pjmedia-codec/g722.h')
-rw-r--r-- | pjmedia/include/pjmedia-codec/g722.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pjmedia/include/pjmedia-codec/g722.h b/pjmedia/include/pjmedia-codec/g722.h index 71a5bb5b..594d5a5e 100644 --- a/pjmedia/include/pjmedia-codec/g722.h +++ b/pjmedia/include/pjmedia-codec/g722.h @@ -78,6 +78,21 @@ PJ_DECL(pj_status_t) pjmedia_codec_g722_init(pjmedia_endpt *endpt); PJ_DECL(pj_status_t) pjmedia_codec_g722_deinit(void); +/** + * Set the G.722 codec encoder and decoder level adjustment. + * If the value is non-zero, then PCM input samples to the encoder will + * be shifted right by this value, and similarly PCM output samples from + * the decoder will be shifted left by this value. + * + * Default value is PJMEDIA_G722_DEFAULT_PCM_SHIFT. + * + * @param val The value + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) pjmedia_codec_g722_set_pcm_shift(unsigned val); + + PJ_END_DECL |