summaryrefslogtreecommitdiff
path: root/pjmedia/include/pjmedia-codec
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2010-08-10 15:06:40 +0000
committerNanang Izzuddin <nanang@teluu.com>2010-08-10 15:06:40 +0000
commit46dfd83eed46659d23790c39a17b4a3494440c98 (patch)
treead5b62d8f9c15e271d9cd7130b28380dd99a10cf /pjmedia/include/pjmedia-codec
parent52c88ba30cd5da601d77bdba0bd3e6d3179b72e4 (diff)
Fix #1106:
- Added PCM signal adjustment in IPP G722.1 implementation. The default setting is configurable via (the existing compile-time config) PJMEDIA_G7221_DEFAULT_PCM_SHIFT. - Added new APIs to get and set IPP codecs settings: pjmedia_codec_ipp_set/get_config(). At run-time, the G722.1 PCM signal adjustment setting can be set using these functions. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3261 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include/pjmedia-codec')
-rw-r--r--pjmedia/include/pjmedia-codec/ipp_codecs.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/pjmedia/include/pjmedia-codec/ipp_codecs.h b/pjmedia/include/pjmedia-codec/ipp_codecs.h
index 98eb8a87..42db8a0f 100644
--- a/pjmedia/include/pjmedia-codec/ipp_codecs.h
+++ b/pjmedia/include/pjmedia-codec/ipp_codecs.h
@@ -291,6 +291,24 @@
PJ_BEGIN_DECL
+/**
+ * IPP codecs configuration settings.
+ */
+typedef struct pjmedia_codec_ipp_config
+{
+ /**
+ * Specifies the G.722.1 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_G7221_DEFAULT_PCM_SHIFT.
+ */
+ unsigned g7221_pcm_shift;
+
+} pjmedia_codec_ipp_config;
+
+
/**
* Initialize and register IPP codecs factory to pjmedia endpoint.
*
@@ -301,6 +319,27 @@ PJ_BEGIN_DECL
PJ_DECL(pj_status_t) pjmedia_codec_ipp_init( pjmedia_endpt *endpt );
+/**
+ * Get current IPP codecs configuration settings.
+ *
+ * @param cfg The IPP codecs configuration settings buffer.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_ipp_get_config(
+ pjmedia_codec_ipp_config *cfg);
+
+
+/**
+ * Set IPP codecs configuration settings.
+ *
+ * @param setting The IPP codecs configuration settings to be applied.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_ipp_set_config(
+ const pjmedia_codec_ipp_config *cfg);
+
/**
* Unregister IPP codecs factory from pjmedia endpoint and deinitialize