summaryrefslogtreecommitdiff
path: root/pjmedia/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-08-07 10:24:52 +0000
committerBenny Prijono <bennylp@teluu.com>2006-08-07 10:24:52 +0000
commitc14e6bf7c11fb28266cab45ccaa477a54fe3fd59 (patch)
treef05279a71b587759964bb0c16fee5259422f2c43 /pjmedia/include
parent7786b1e99d249798e0e394bf473b954b3a612072 (diff)
Change set_ec_tail() API to set_ec() in sound port, also change suppressor to reduce mic signal by division rather than zeroing the signal. Also moved out VAD and EC settings to config.h.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@658 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r--pjmedia/include/pjmedia/config.h31
-rw-r--r--pjmedia/include/pjmedia/silencedet.h7
-rw-r--r--pjmedia/include/pjmedia/sound_port.h8
3 files changed, 36 insertions, 10 deletions
diff --git a/pjmedia/include/pjmedia/config.h b/pjmedia/include/pjmedia/config.h
index 871177ae..344ef2c2 100644
--- a/pjmedia/include/pjmedia/config.h
+++ b/pjmedia/include/pjmedia/config.h
@@ -161,6 +161,16 @@
/**
+ * Suggested or default threshold to be set for fixed silence detection
+ * or as starting threshold for adaptive silence detection. The threshold
+ * has the range from zero to 255.
+ */
+#ifndef PJMEDIA_SILENCE_DET_THRESHOLD
+# define PJMEDIA_SILENCE_DET_THRESHOLD 4
+#endif
+
+
+/**
* G.711 Appendix I Packet Lost Concealment (PLC).
* Enabled only when floating point is enabled.
*/
@@ -179,6 +189,27 @@
/**
+ * Initial signal threshold to be applied to echo suppressor. When
+ * playback signal level is greater than this threshold, the microphone
+ * signal will be reduced or cut.
+ */
+#ifndef PJMEDIA_ECHO_SUPPRESS_THRESHOLD
+# define PJMEDIA_ECHO_SUPPRESS_THRESHOLD PJMEDIA_SILENCE_DET_THRESHOLD
+#endif
+
+
+/**
+ * The signal reduction factor to be applied into the microphone signal
+ * when the mic signal needs to be reduced. Valid values are [1-16], where
+ * 1 will leave signal as it is (thus probably transmitting the echo) and
+ * 16 will effectively zero the signal.
+ */
+#ifndef PJMEDIA_ECHO_SUPPRESS_FACTOR
+# define PJMEDIA_ECHO_SUPPRESS_FACTOR 4
+#endif
+
+
+/**
* Support for sending and decoding RTCP port in SDP (RFC 3605).
* Default is yes.
*/
diff --git a/pjmedia/include/pjmedia/silencedet.h b/pjmedia/include/pjmedia/silencedet.h
index 15cb8460..c4cfbaa8 100644
--- a/pjmedia/include/pjmedia/silencedet.h
+++ b/pjmedia/include/pjmedia/silencedet.h
@@ -44,13 +44,6 @@ PJ_BEGIN_DECL
typedef struct pjmedia_silence_det pjmedia_silence_det;
-/**
- * Suggested or default threshold to be set for fixed silence detection
- * or as starting threshold for adaptive silence detection. The threshold
- * has the range from zero to 255.
- */
-#define PJMEDIA_SILENCE_DET_THRESHOLD 4
-
/**
* Create voice activity detector with default settings. The default settings
diff --git a/pjmedia/include/pjmedia/sound_port.h b/pjmedia/include/pjmedia/sound_port.h
index 7653c35c..c65a11dc 100644
--- a/pjmedia/include/pjmedia/sound_port.h
+++ b/pjmedia/include/pjmedia/sound_port.h
@@ -197,12 +197,14 @@ PJ_DECL(pjmedia_snd_stream*) pjmedia_snd_port_get_snd_stream(
* @param tail_ms Maximum echo tail length to be supported, in
* miliseconds. If zero is specified, the EC would
* be disabled.
+ * @param options The options to be passed to #pjmedia_echo_create().
*
* @return PJ_SUCCESS on success.
*/
-PJ_DECL(pj_status_t) pjmedia_snd_port_set_ec_tail(pjmedia_snd_port *snd_port,
- pj_pool_t *pool,
- unsigned tail_ms);
+PJ_DECL(pj_status_t) pjmedia_snd_port_set_ec( pjmedia_snd_port *snd_port,
+ pj_pool_t *pool,
+ unsigned tail_ms,
+ unsigned options);
/**