summaryrefslogtreecommitdiff
path: root/pjmedia/include
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2015-10-06 05:57:51 +0000
committerLiong Sauw Ming <ming@teluu.com>2015-10-06 05:57:51 +0000
commite5906b82cd39fc0e4f6ab7e0138e6e81da7ab8ef (patch)
tree859a56ff1f82672f1c7912155fbfa20f70d8f9c4 /pjmedia/include
parent17276f318cc81d64c26aa766ae763b2773659dbf (diff)
Fixed #1888: Support for WebRtc AEC
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5186 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r--pjmedia/include/pjmedia/config.h18
-rw-r--r--pjmedia/include/pjmedia/echo.h53
2 files changed, 68 insertions, 3 deletions
diff --git a/pjmedia/include/pjmedia/config.h b/pjmedia/include/pjmedia/config.h
index 8bd622ba..f2f8e829 100644
--- a/pjmedia/include/pjmedia/config.h
+++ b/pjmedia/include/pjmedia/config.h
@@ -657,6 +657,24 @@
/**
+ * WebRtc Accoustic Echo Cancellation (AEC).
+ * By default is disabled.
+ */
+#ifndef PJMEDIA_HAS_WEBRTC_AEC
+# define PJMEDIA_HAS_WEBRTC_AEC 0
+#endif
+
+/**
+ * Specify whether WebRtc EC should use its mobile version AEC.
+ *
+ * Default: 0 (no)
+ */
+#ifndef PJMEDIA_WEBRTC_AEC_USE_MOBILE
+# define PJMEDIA_WEBRTC_AEC_USE_MOBILE 0
+#endif
+
+
+/**
* Maximum number of parameters in SDP fmtp attribute.
*
* Default: 16
diff --git a/pjmedia/include/pjmedia/echo.h b/pjmedia/include/pjmedia/echo.h
index 4ed62ee9..82c6809c 100644
--- a/pjmedia/include/pjmedia/echo.h
+++ b/pjmedia/include/pjmedia/echo.h
@@ -66,7 +66,8 @@ typedef enum pjmedia_echo_flag
/**
* Force to use Speex AEC as the backend echo canceller algorithm.
- * This setting is mutually exclusive with PJMEDIA_ECHO_SIMPLE.
+ * This setting is mutually exclusive with PJMEDIA_ECHO_SIMPLE and
+ * PJMEDIA_ECHO_WEBRTC.
*/
PJMEDIA_ECHO_SPEEX = 1,
@@ -74,11 +75,18 @@ typedef enum pjmedia_echo_flag
* If PJMEDIA_ECHO_SIMPLE flag is specified during echo canceller
* creation, then a simple echo suppressor will be used instead of
* an accoustic echo cancellation. This setting is mutually exclusive
- * with PJMEDIA_ECHO_SPEEX.
+ * with PJMEDIA_ECHO_SPEEX and PJMEDIA_ECHO_WEBRTC.
*/
PJMEDIA_ECHO_SIMPLE = 2,
/**
+ * Force to use WebRTC AEC as the backend echo canceller algorithm.
+ * This setting is mutually exclusive with PJMEDIA_ECHO_SIMPLE and
+ * PJMEDIA_ECHO_SPEEX.
+ */
+ PJMEDIA_ECHO_WEBRTC = 3,
+
+ /**
* For internal use.
*/
PJMEDIA_ECHO_ALGO_MASK = 15,
@@ -101,7 +109,46 @@ typedef enum pjmedia_echo_flag
* If PJMEDIA_ECHO_USE_SW_ECHO flag is specified, software echo canceller
* will be used instead of device EC.
*/
- PJMEDIA_ECHO_USE_SW_ECHO = 64
+ PJMEDIA_ECHO_USE_SW_ECHO = 64,
+
+ /**
+ * If PJMEDIA_ECHO_USE_NOISE_SUPPRESSOR flag is specified, the echo
+ * canceller will also apply noise suppressor method to reduce noise.
+ */
+ PJMEDIA_ECHO_USE_NOISE_SUPPRESSOR = 128,
+
+ /**
+ * Use default aggressiveness setting for the echo canceller algorithm.
+ * This setting is mutually exclusive with the other aggressiveness
+ * settings.
+ */
+ PJMEDIA_ECHO_AGGRESSIVENESS_DEFAULT = 0,
+
+ /**
+ * Use conservative aggressiveness setting for the echo canceller
+ * algorithm. This setting is mutually exclusive with the other
+ * aggressiveness settings.
+ */
+ PJMEDIA_ECHO_AGGRESSIVENESS_CONSERVATIVE = 0x100,
+
+ /**
+ * Use moderate aggressiveness setting for the echo canceller algorithm.
+ * This setting is mutually exclusive with the other aggressiveness
+ * settings.
+ */
+ PJMEDIA_ECHO_AGGRESSIVENESS_MODERATE = 0x200,
+
+ /**
+ * Use aggressive aggressiveness setting for the echo canceller
+ * algorithm. This setting is mutually exclusive with the other
+ * aggressiveness settings.
+ */
+ PJMEDIA_ECHO_AGGRESSIVENESS_AGGRESSIVE = 0x300,
+
+ /**
+ * For internal use.
+ */
+ PJMEDIA_ECHO_AGGRESSIVENESS_MASK = 0xF00
} pjmedia_echo_flag;