summaryrefslogtreecommitdiff
path: root/pjmedia/include
diff options
context:
space:
mode:
authorJason Parker <jparker@digium.com>2013-03-11 15:09:56 -0500
committerJason Parker <jparker@digium.com>2013-03-11 15:09:56 -0500
commit483805f79570115ab95c69698792d238c1719b1b (patch)
tree6b53ab2fd2b2478f864ccc8bd1b0bfaedc4d2050 /pjmedia/include
parentf3ab456a17af1c89a6e3be4d20c5944853df1cb0 (diff)
Import pjproject-2.1
Diffstat (limited to 'pjmedia/include')
-rw-r--r--pjmedia/include/pjmedia-audiodev/audiodev.h8
-rw-r--r--pjmedia/include/pjmedia-codec.h5
-rw-r--r--pjmedia/include/pjmedia-codec/config.h48
-rw-r--r--pjmedia/include/pjmedia-codec/config_auto.h.in11
-rw-r--r--pjmedia/include/pjmedia-codec/opencore_amr.h146
-rw-r--r--pjmedia/include/pjmedia-codec/opencore_amrnb.h89
-rw-r--r--pjmedia/include/pjmedia-codec/silk.h133
-rw-r--r--pjmedia/include/pjmedia-codec/types.h30
-rw-r--r--pjmedia/include/pjmedia-videodev/config.h13
-rw-r--r--pjmedia/include/pjmedia/codec.h15
-rw-r--r--pjmedia/include/pjmedia/config.h34
-rw-r--r--pjmedia/include/pjmedia/sdp.h19
-rw-r--r--pjmedia/include/pjmedia/transport.h27
-rw-r--r--pjmedia/include/pjmedia/transport_ice.h8
14 files changed, 469 insertions, 117 deletions
diff --git a/pjmedia/include/pjmedia-audiodev/audiodev.h b/pjmedia/include/pjmedia-audiodev/audiodev.h
index f8edb0d..7e13d14 100644
--- a/pjmedia/include/pjmedia-audiodev/audiodev.h
+++ b/pjmedia/include/pjmedia-audiodev/audiodev.h
@@ -1,4 +1,4 @@
-/* $Id: audiodev.h 3664 2011-07-19 03:42:28Z nanang $ */
+/* $Id: audiodev.h 4243 2012-08-31 11:42:17Z nanang $ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
@@ -424,6 +424,12 @@ typedef struct pjmedia_aud_param
*/
pj_bool_t cng_enabled;
+ /**
+ * Enable/disable VAD. This setting is optional, and will only be used
+ * if PJMEDIA_AUD_DEV_CAP_VAD is set in the flags.
+ */
+ pj_bool_t vad_enabled;
+
} pjmedia_aud_param;
diff --git a/pjmedia/include/pjmedia-codec.h b/pjmedia/include/pjmedia-codec.h
index c666996..c63e46e 100644
--- a/pjmedia/include/pjmedia-codec.h
+++ b/pjmedia/include/pjmedia-codec.h
@@ -1,4 +1,4 @@
-/* $Id: pjmedia-codec.h 4049 2012-04-13 06:24:23Z ming $ */
+/* $Id: pjmedia-codec.h 4331 2013-01-23 06:18:18Z ming $ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
@@ -34,8 +34,9 @@
#include <pjmedia-codec/g722.h>
#include <pjmedia-codec/g7221.h>
#include <pjmedia-codec/ipp_codecs.h>
+#include <pjmedia-codec/opencore_amr.h>
#include <pjmedia-codec/passthrough.h>
-#include <pjmedia-codec/opencore_amrnb.h>
+#include <pjmedia-codec/silk.h>
#endif /* __PJMEDIA_CODEC_PJMEDIA_CODEC_H__ */
diff --git a/pjmedia/include/pjmedia-codec/config.h b/pjmedia/include/pjmedia-codec/config.h
index 2c71cc9..29350db 100644
--- a/pjmedia/include/pjmedia-codec/config.h
+++ b/pjmedia/include/pjmedia-codec/config.h
@@ -1,4 +1,4 @@
-/* $Id: config.h 4070 2012-04-23 13:48:10Z bennylp $ */
+/* $Id: config.h 4331 2013-01-23 06:18:18Z ming $ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
@@ -323,8 +323,18 @@
#endif
/**
+ * Enable OpenCORE AMR-WB codec.
+ * See https://trac.pjsip.org/repos/ticket/1608 for some info.
+ *
+ * Default: 0
+ */
+#ifndef PJMEDIA_HAS_OPENCORE_AMRWB_CODEC
+# define PJMEDIA_HAS_OPENCORE_AMRWB_CODEC 0
+#endif
+
+/**
* Link with libopencore-amrXX via pragma comment on Visual Studio.
- * This option only makes sense if PJMEDIA_HAS_OPENCORE_AMRNB_CODEC
+ * This option only makes sense if PJMEDIA_HAS_OPENCORE_AMRNB/WB_CODEC
* is enabled.
*
* Default: 1
@@ -335,7 +345,7 @@
/**
* Link with libopencore-amrXX.a that has been produced with gcc.
- * This option only makes sense if PJMEDIA_HAS_OPENCORE_AMRNB_CODEC
+ * This option only makes sense if PJMEDIA_HAS_OPENCORE_AMRNB/WB_CODEC
* and PJMEDIA_AUTO_LINK_OPENCORE_AMR_LIBS are enabled.
*
* Default: 1
@@ -378,6 +388,38 @@
/**
+ * Enable SILK codec.
+ *
+ * Default: 0
+ */
+#ifndef PJMEDIA_HAS_SILK_CODEC
+# define PJMEDIA_HAS_SILK_CODEC 0
+#endif
+
+
+/**
+ * SILK codec default complexity setting, valid values are 0 (lowest), 1,
+ * and 2.
+ *
+ * Default: 2
+ */
+#ifndef PJMEDIA_CODEC_SILK_DEFAULT_COMPLEXITY
+# define PJMEDIA_CODEC_SILK_DEFAULT_COMPLEXITY 2
+#endif
+
+/**
+ * SILK codec default quality setting, valid values are ranging from
+ * 0 (lowest) to 10. Please note that pjsua-lib may override this setting
+ * via its codec quality setting (i.e PJSUA_DEFAULT_CODEC_QUALITY).
+ *
+ * Default: 10
+ */
+#ifndef PJMEDIA_CODEC_SILK_DEFAULT_QUALITY
+# define PJMEDIA_CODEC_SILK_DEFAULT_QUALITY 10
+#endif
+
+
+/**
* Specify if FFMPEG codecs are available.
*
* Default: PJMEDIA_HAS_LIBAVCODEC
diff --git a/pjmedia/include/pjmedia-codec/config_auto.h.in b/pjmedia/include/pjmedia-codec/config_auto.h.in
index 887d083..11da110 100644
--- a/pjmedia/include/pjmedia-codec/config_auto.h.in
+++ b/pjmedia/include/pjmedia-codec/config_auto.h.in
@@ -1,4 +1,4 @@
-/* $Id: config_auto.h.in 3841 2011-10-24 09:28:13Z ming $ */
+/* $Id: config_auto.h.in 4331 2013-01-23 06:18:18Z ming $ */
/*
* Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
@@ -74,6 +74,15 @@
#undef PJMEDIA_HAS_OPENCORE_AMRNB_CODEC
#endif
+/* OpenCORE AMR-WB codec */
+#ifndef PJMEDIA_HAS_OPENCORE_AMRWB_CODEC
+#undef PJMEDIA_HAS_OPENCORE_AMRWB_CODEC
+#endif
+
+/* SILK codec */
+#ifndef PJMEDIA_HAS_SILK_CODEC
+#undef PJMEDIA_HAS_SILK_CODEC
+#endif
#endif /* __PJMEDIA_CODEC_CONFIG_AUTO_H_ */
diff --git a/pjmedia/include/pjmedia-codec/opencore_amr.h b/pjmedia/include/pjmedia-codec/opencore_amr.h
new file mode 100644
index 0000000..3d5049b
--- /dev/null
+++ b/pjmedia/include/pjmedia-codec/opencore_amr.h
@@ -0,0 +1,146 @@
+/* $Id: opencore_amr.h 4335 2013-01-29 08:09:15Z ming $ */
+/*
+ * Copyright (C) 2011-2013 Teluu Inc. (http://www.teluu.com)
+ * Copyright (C) 2011 Dan Arrhenius <dan@keystream.se>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef __PJMEDIA_CODEC_OPENCORE_AMR_H__
+#define __PJMEDIA_CODEC_OPENCORE_AMR_H__
+
+#include <pjmedia-codec/types.h>
+
+/**
+ * @defgroup PJMED_OC_AMR OpenCORE AMR Codec
+ * @ingroup PJMEDIA_CODEC_CODECS
+ * @brief AMRCodec wrapper for OpenCORE AMR codec
+ * @{
+ */
+
+PJ_BEGIN_DECL
+
+/**
+ * Bitmask options to be passed during AMR codec factory initialization.
+ */
+enum pjmedia_amr_options
+{
+ PJMEDIA_AMR_NO_NB = 1, /**< Disable narrowband mode. */
+ PJMEDIA_AMR_NO_WB = 2, /**< Disable wideband mode. */
+};
+
+/**
+ * Settings. Use #pjmedia_codec_opencore_amrnb/wb_set_config() to
+ * activate.
+ */
+typedef struct pjmedia_codec_amr_config
+{
+ /**
+ * Control whether to use octent align.
+ */
+ pj_bool_t octet_align;
+
+ /**
+ * Set the bitrate.
+ */
+ unsigned bitrate;
+
+} pjmedia_codec_amr_config;
+
+typedef pjmedia_codec_amr_config pjmedia_codec_amrnb_config;
+typedef pjmedia_codec_amr_config pjmedia_codec_amrwb_config;
+
+/**
+ * Initialize and register AMR codec factory to pjmedia endpoint.
+ *
+ * @param endpt The pjmedia endpoint.
+ * @param options Bitmask of pjmedia_amr_options (default=0).
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_opencore_amr_init(pjmedia_endpt* endpt,
+ unsigned options);
+
+/**
+ * Initialize and register AMR codec factory using default settings to
+ * pjmedia endpoint.
+ *
+ * @param endpt The pjmedia endpoint.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t)
+pjmedia_codec_opencore_amr_init_default(pjmedia_endpt* endpt);
+
+/**
+ * Unregister AMR codec factory from pjmedia endpoint and deinitialize
+ * the OpenCORE codec library.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_opencore_amr_deinit(void);
+
+/**
+ * Initialize and register AMR-NB codec factory to pjmedia endpoint. Calling
+ * this function will automatically initialize AMR codec factory without
+ * the wideband mode (i.e. it is equivalent to calling
+ * #pjmedia_codec_opencore_amr_init() with PJMEDIA_AMR_NO_WB). Application
+ * should call #pjmedia_codec_opencore_amr_init() instead if wishing to use
+ * both modes.
+ *
+ * @param endpt The pjmedia endpoint.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_opencore_amrnb_init(pjmedia_endpt* endpt);
+
+/**
+ * Unregister AMR-NB codec factory from pjmedia endpoint and deinitialize
+ * the OpenCORE codec library.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_opencore_amrnb_deinit(void);
+
+
+/**
+ * Set AMR-NB parameters.
+ *
+ * @param cfg The settings;
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_opencore_amrnb_set_config(
+ const pjmedia_codec_amrnb_config* cfg);
+
+
+/**
+ * Set AMR-WB parameters.
+ *
+ * @param cfg The settings;
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_opencore_amrwb_set_config(
+ const pjmedia_codec_amrwb_config* cfg);
+
+PJ_END_DECL
+
+
+/**
+ * @}
+ */
+
+#endif /* __PJMEDIA_CODEC_OPENCORE_AMRNB_H__ */
+
diff --git a/pjmedia/include/pjmedia-codec/opencore_amrnb.h b/pjmedia/include/pjmedia-codec/opencore_amrnb.h
deleted file mode 100644
index aedb460..0000000
--- a/pjmedia/include/pjmedia-codec/opencore_amrnb.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* $Id: opencore_amrnb.h 3841 2011-10-24 09:28:13Z ming $ */
-/*
- * Copyright (C) 2011 Teluu Inc. (http://www.teluu.com)
- * Copyright (C) 2011 Dan Arrhenius <dan@keystream.se>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#ifndef __PJMEDIA_CODEC_OPENCORE_AMRNB_H__
-#define __PJMEDIA_CODEC_OPENCORE_AMRNB_H__
-
-#include <pjmedia-codec/types.h>
-
-/**
- * @defgroup PJMED_OC_AMRNB OpenCORE AMR-NB Codec
- * @ingroup PJMEDIA_CODEC_CODECS
- * @brief AMRCodec wrapper for OpenCORE AMR-NB codec
- * @{
- */
-
-PJ_BEGIN_DECL
-
-/**
- * Settings. Use #pjmedia_codec_opencore_amrnb_set_config() to
- * activate.
- */
-typedef struct pjmedia_codec_amrnb_config
-{
- /**
- * Control whether to use octent align.
- */
- pj_bool_t octet_align;
-
- /**
- * Set the bitrate.
- */
- unsigned bitrate;
-
-} pjmedia_codec_amrnb_config;
-
-
-/**
- * Initialize and register AMR-NB codec factory to pjmedia endpoint.
- *
- * @param endpt The pjmedia endpoint.
- *
- * @return PJ_SUCCESS on success.
- */
-PJ_DECL(pj_status_t) pjmedia_codec_opencore_amrnb_init(pjmedia_endpt* endpt);
-
-/**
- * Unregister AMR-NB codec factory from pjmedia endpoint and deinitialize
- * the OpenCORE codec library.
- *
- * @return PJ_SUCCESS on success.
- */
-PJ_DECL(pj_status_t) pjmedia_codec_opencore_amrnb_deinit(void);
-
-
-/**
- * Set AMR-NB parameters.
- *
- * @param cfg The settings;
- *
- * @return PJ_SUCCESS on success.
- */
-PJ_DECL(pj_status_t) pjmedia_codec_opencore_amrnb_set_config(
- const pjmedia_codec_amrnb_config* cfg);
-
-PJ_END_DECL
-
-
-/**
- * @}
- */
-
-#endif /* __PJMEDIA_CODEC_OPENCORE_AMRNB_H__ */
-
diff --git a/pjmedia/include/pjmedia-codec/silk.h b/pjmedia/include/pjmedia-codec/silk.h
new file mode 100644
index 0000000..810faca
--- /dev/null
+++ b/pjmedia/include/pjmedia-codec/silk.h
@@ -0,0 +1,133 @@
+/* $Id: silk.h 4264 2012-09-24 06:58:16Z nanang $ */
+/*
+ * Copyright (C) 2012-2012 Teluu Inc. (http://www.teluu.com)
+ * Contributed by Regis Montoya (aka r3gis - www.r3gis.fr)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef __PJMEDIA_CODEC_SILK_H__
+#define __PJMEDIA_CODEC_SILK_H__
+
+/**
+ * @file silk.h
+ * @brief SILK codec.
+ */
+
+#include <pjmedia-codec/types.h>
+
+/**
+ * @defgroup PJMED_SILK SILK Codec Family
+ * @ingroup PJMEDIA_CODEC_CODECS
+ * @brief Implementation of SILK codecs (narrow/medium/wide/superwide-band).
+ * @{
+ *
+ * This section describes functions to initialize and register SILK codec
+ * factory to the codec manager. After the codec factory has been registered,
+ * application can use @ref PJMEDIA_CODEC API to manipulate the codec.
+ *
+ * The SILK codec uses multiple bit rates, and supports super wideband
+ * (24 kHz sampling rate), wideband (16 kHz sampling rate), medium (12kHz
+ * sampling rate), and narrowband (telephone quality, 8 kHz sampling rate).
+ *
+ * By default, the SILK codec factory registers two SILK codecs:
+ * "SILK/8000" narrowband codec and "SILK/16000" wideband codec. This behavior
+ * can be changed by specifying #pjmedia_codec_silk_options flags during
+ * initialization.
+ *
+ *
+ * \section codec_setting Codec Settings
+ *
+ * \subsection general_setting General Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ * \subsection specific_setting Codec Specific Settings
+ *
+ * The following settings are applicable for this codec.
+ *
+ * \subsubsection quality_vs_complexity Quality vs Complexity
+ *
+ * The SILK codec quality versus computational complexity and bandwidth
+ * requirement can be adjusted by modifying the quality and complexity
+ * setting, by calling #pjmedia_codec_silk_set_config().
+ *
+ * The default setting of quality is specified in
+ * #PJMEDIA_CODEC_SILK_DEFAULT_QUALITY. And the default setting of
+ * complexity is specified in #PJMEDIA_CODEC_SILK_DEFAULT_COMPLEXITY.
+ */
+
+PJ_BEGIN_DECL
+
+typedef struct pjmedia_codec_silk_setting
+{
+ pj_bool_t enabled; /**< Enable/disable. */
+ int quality; /**< Encoding quality, or use -1 for default
+ (@see PJMEDIA_CODEC_SILK_DEFAULT_QUALITY). */
+ int complexity; /**< Encoding complexity, or use -1 for default
+ (@see PJMEDIA_CODEC_SILK_DEFAULT_COMPLEXITY)*/
+} pjmedia_codec_silk_setting;
+
+
+/**
+ * Initialize and register SILK codec factory to pjmedia endpoint. By default,
+ * only narrowband (8kHz sampling rate) and wideband (16kHz sampling rate)
+ * will be enabled. Quality and complexity for those sampling rate modes
+ * will be set to the default values (see #PJMEDIA_CODEC_SILK_DEFAULT_QUALITY
+ * and #PJMEDIA_CODEC_SILK_DEFAULT_COMPLEXITY), application may modify these
+ * settings via #pjmedia_codec_silk_set_config().
+ *
+ * @param endpt The pjmedia endpoint.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_silk_init(pjmedia_endpt *endpt);
+
+
+/**
+ * Change the configuration setting of the SILK codec for the specified
+ * clock rate.
+ *
+ * @param clock_rate PCM sampling rate, in Hz, valid values are 8000,
+ * 12000, 16000 and 24000.
+ * @param opt The setting to be applied for the specified
+ * clock rate.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_silk_set_config(
+ unsigned clock_rate,
+ const pjmedia_codec_silk_setting *opt);
+
+
+/**
+ * Unregister SILK codec factory from pjmedia endpoint and deinitialize
+ * the SILK codec library.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_silk_deinit(void);
+
+
+PJ_END_DECL
+
+
+/**
+ * @}
+ */
+
+#endif /* __PJMEDIA_CODEC_SILK_H__ */
+
diff --git a/pjmedia/include/pjmedia-codec/types.h b/pjmedia/include/pjmedia-codec/types.h
index a18fa30..53e71e1 100644
--- a/pjmedia/include/pjmedia-codec/types.h
+++ b/pjmedia/include/pjmedia-codec/types.h
@@ -1,4 +1,4 @@
-/* $Id: types.h 3664 2011-07-19 03:42:28Z nanang $ */
+/* $Id: types.h 4264 2012-09-24 06:58:16Z nanang $ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
@@ -63,18 +63,10 @@ enum pjmedia_audio_pt
PJMEDIA_RTP_PT_SPEEX_NB, /**< Speex narrowband/8KHz */
PJMEDIA_RTP_PT_SPEEX_WB, /**< Speex wideband/16KHz */
PJMEDIA_RTP_PT_SPEEX_UWB, /**< Speex 32KHz */
- PJMEDIA_RTP_PT_L16_8KHZ_MONO, /**< L16 @ 8KHz, mono */
- PJMEDIA_RTP_PT_L16_8KHZ_STEREO, /**< L16 @ 8KHz, stereo */
- //PJMEDIA_RTP_PT_L16_11KHZ_MONO, /**< L16 @ 11KHz, mono */
- //PJMEDIA_RTP_PT_L16_11KHZ_STEREO, /**< L16 @ 11KHz, stereo */
- PJMEDIA_RTP_PT_L16_16KHZ_MONO, /**< L16 @ 16KHz, mono */
- PJMEDIA_RTP_PT_L16_16KHZ_STEREO, /**< L16 @ 16KHz, stereo */
- //PJMEDIA_RTP_PT_L16_22KHZ_MONO, /**< L16 @ 22KHz, mono */
- //PJMEDIA_RTP_PT_L16_22KHZ_STEREO, /**< L16 @ 22KHz, stereo */
- //PJMEDIA_RTP_PT_L16_32KHZ_MONO, /**< L16 @ 32KHz, mono */
- //PJMEDIA_RTP_PT_L16_32KHZ_STEREO, /**< L16 @ 32KHz, stereo */
- //PJMEDIA_RTP_PT_L16_48KHZ_MONO, /**< L16 @ 48KHz, mono */
- //PJMEDIA_RTP_PT_L16_48KHZ_STEREO, /**< L16 @ 48KHz, stereo */
+ PJMEDIA_RTP_PT_SILK_NB, /**< SILK narrowband/8KHz */
+ PJMEDIA_RTP_PT_SILK_MB, /**< SILK mediumband/12KHz */
+ PJMEDIA_RTP_PT_SILK_WB, /**< SILK wideband/16KHz */
+ PJMEDIA_RTP_PT_SILK_SWB, /**< SILK 24KHz */
PJMEDIA_RTP_PT_ILBC, /**< iLBC (13.3/15.2Kbps) */
PJMEDIA_RTP_PT_AMR, /**< AMR (4.75 - 12.2Kbps) */
PJMEDIA_RTP_PT_AMRWB, /**< AMRWB (6.6 - 23.85Kbps)*/
@@ -91,6 +83,18 @@ enum pjmedia_audio_pt
PJMEDIA_RTP_PT_G7221C_48, /**< G722.1 Annex C (48Kbps)*/
PJMEDIA_RTP_PT_G7221_RSV1, /**< G722.1 reserve */
PJMEDIA_RTP_PT_G7221_RSV2, /**< G722.1 reserve */
+ PJMEDIA_RTP_PT_L16_8KHZ_MONO, /**< L16 @ 8KHz, mono */
+ PJMEDIA_RTP_PT_L16_8KHZ_STEREO, /**< L16 @ 8KHz, stereo */
+ //PJMEDIA_RTP_PT_L16_11KHZ_MONO, /**< L16 @ 11KHz, mono */
+ //PJMEDIA_RTP_PT_L16_11KHZ_STEREO, /**< L16 @ 11KHz, stereo */
+ PJMEDIA_RTP_PT_L16_16KHZ_MONO, /**< L16 @ 16KHz, mono */
+ PJMEDIA_RTP_PT_L16_16KHZ_STEREO, /**< L16 @ 16KHz, stereo */
+ //PJMEDIA_RTP_PT_L16_22KHZ_MONO, /**< L16 @ 22KHz, mono */
+ //PJMEDIA_RTP_PT_L16_22KHZ_STEREO, /**< L16 @ 22KHz, stereo */
+ //PJMEDIA_RTP_PT_L16_32KHZ_MONO, /**< L16 @ 32KHz, mono */
+ //PJMEDIA_RTP_PT_L16_32KHZ_STEREO, /**< L16 @ 32KHz, stereo */
+ //PJMEDIA_RTP_PT_L16_48KHZ_MONO, /**< L16 @ 48KHz, mono */
+ //PJMEDIA_RTP_PT_L16_48KHZ_STEREO, /**< L16 @ 48KHz, stereo */
/* Caution!
* Ensure the value of the last pt above is <= 127.
diff --git a/pjmedia/include/pjmedia-videodev/config.h b/pjmedia/include/pjmedia-videodev/config.h
index 12a251a..ef161eb 100644
--- a/pjmedia/include/pjmedia-videodev/config.h
+++ b/pjmedia/include/pjmedia-videodev/config.h
@@ -1,4 +1,4 @@
-/* $Id: config.h 4016 2012-04-04 05:05:50Z bennylp $ */
+/* $Id: config.h 4414 2013-03-05 08:21:02Z riza $ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
*
@@ -132,6 +132,17 @@ PJ_BEGIN_DECL
# define PJMEDIA_VIDEO_DEV_HAS_AVI 1
#endif
+/**
+ * Specify the SDL library name to be linked with Visual Studio project.
+ * By default, the name is autodetected based on SDL version ("sdl.lib" or
+ * "sdl2.lib"), but application may explicitly specify the library name if this
+ * autodetection fails. Common names are: "sdl2.lib" or "sdl.lib".
+ *
+ * Default: undeclared.
+ */
+#ifndef PJMEDIA_SDL_LIB
+# undef PJMEDIA_SDL_LIB
+#endif
/**
* @}
diff --git a/pjmedia/include/pjmedia/codec.h b/pjmedia/include/pjmedia/codec.h
index 62c79e0..58fa7a1 100644
--- a/pjmedia/include/pjmedia/codec.h
+++ b/pjmedia/include/pjmedia/codec.h
@@ -1,4 +1,4 @@
-/* $Id: codec.h 3664 2011-07-19 03:42:28Z nanang $ */
+/* $Id: codec.h 4278 2012-10-05 10:04:54Z ming $ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
@@ -276,6 +276,7 @@ typedef struct pjmedia_codec_param
unsigned channel_cnt; /**< Channel count. */
pj_uint32_t avg_bps; /**< Average bandwidth in bits/sec */
pj_uint32_t max_bps; /**< Maximum bandwidth in bits/sec */
+ unsigned max_rx_frame_size; /**< Maximum frame size */
pj_uint16_t frm_ptime; /**< Decoder frame ptime in msec. */
pj_uint16_t enc_ptime; /**< Encoder ptime, or zero if it's
equal to decoder ptime. */
@@ -308,6 +309,18 @@ typedef struct pjmedia_codec_param
} pjmedia_codec_param;
+/**
+ * Duplicate codec parameter.
+ *
+ * @param pool The pool.
+ * @param src The codec parameter to be duplicated.
+ *
+ * @return Duplicated codec parameter.
+ */
+PJ_DECL(pjmedia_codec_param*) pjmedia_codec_param_clone(
+ pj_pool_t *pool,
+ const pjmedia_codec_param *src);
+
/*
* Forward declaration for pjmedia_codec.
diff --git a/pjmedia/include/pjmedia/config.h b/pjmedia/include/pjmedia/config.h
index d5a598f..b229eca 100644
--- a/pjmedia/include/pjmedia/config.h
+++ b/pjmedia/include/pjmedia/config.h
@@ -1,4 +1,4 @@
-/* $Id: config.h 4130 2012-05-17 08:35:51Z nanang $ */
+/* $Id: config.h 4240 2012-08-31 09:03:36Z ming $ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
@@ -371,7 +371,7 @@
/**
- * Max packet size to support.
+ * Max packet size for transmitting direction.
*/
#ifndef PJMEDIA_MAX_MTU
# define PJMEDIA_MAX_MTU 1500
@@ -379,6 +379,14 @@
/**
+ * Max packet size for receiving direction.
+ */
+#ifndef PJMEDIA_MAX_MRU
+# define PJMEDIA_MAX_MRU 2000
+#endif
+
+
+/**
* DTMF/telephone-event duration, in timestamp.
*/
#ifndef PJMEDIA_DTMF_DURATION
@@ -677,6 +685,28 @@
/**
+ * This macro controls whether pjmedia should include SDP
+ * bandwidth modifier "TIAS" (RFC3890).
+ *
+ * Note that there is also a run-time variable to turn this setting
+ * on or off, defined in endpoint.c. To access this variable, use
+ * the following construct
+ *
+ \verbatim
+ extern pj_bool_t pjmedia_add_bandwidth_tias_in_sdp;
+
+ // Do not enable bandwidth information inclusion in sdp
+ pjmedia_add_bandwidth_tias_in_sdp = PJ_FALSE;
+ \endverbatim
+ *
+ * Default: 1 (yes)
+ */
+#ifndef PJMEDIA_ADD_BANDWIDTH_TIAS_IN_SDP
+# define PJMEDIA_ADD_BANDWIDTH_TIAS_IN_SDP 1
+#endif
+
+
+/**
* This macro controls whether pjmedia should include SDP rtpmap
* attribute for static payload types. SDP rtpmap for static
* payload types are optional, although they are normally included
diff --git a/pjmedia/include/pjmedia/sdp.h b/pjmedia/include/pjmedia/sdp.h
index 2dc58d6..bababef 100644
--- a/pjmedia/include/pjmedia/sdp.h
+++ b/pjmedia/include/pjmedia/sdp.h
@@ -1,4 +1,4 @@
-/* $Id: sdp.h 3945 2012-01-27 09:12:59Z nanang $ */
+/* $Id: sdp.h 4367 2013-02-21 20:49:19Z nanang $ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
@@ -686,6 +686,23 @@ PJ_DECL(pj_status_t) pjmedia_sdp_validate(const pjmedia_sdp_session *sdp);
/**
+ * Perform semantic validation for the specified SDP session descriptor.
+ * This function perform validation beyond just syntactic verification,
+ * such as to verify the value of network type and address type, check
+ * the connection line, and verify that \a rtpmap attribute is present
+ * when dynamic payload type is used.
+ *
+ * @param sdp The SDP session descriptor to validate.
+ * @param strict Flag whether the check should be strict, i.e: allow
+ * media without connection line when port is zero.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_sdp_validate2(const pjmedia_sdp_session *sdp,
+ pj_bool_t strict);
+
+
+/**
* Clone SDP session descriptor.
*
* @param pool The pool used to clone the session.
diff --git a/pjmedia/include/pjmedia/transport.h b/pjmedia/include/pjmedia/transport.h
index dca9f29..e86c974 100644
--- a/pjmedia/include/pjmedia/transport.h
+++ b/pjmedia/include/pjmedia/transport.h
@@ -1,4 +1,4 @@
-/* $Id: transport.h 3664 2011-07-19 03:42:28Z nanang $ */
+/* $Id: transport.h 4345 2013-02-13 07:43:32Z nanang $ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
@@ -566,7 +566,7 @@ PJ_INLINE(void) pjmedia_transport_info_init(pjmedia_transport_info *info)
* for example to fill in the "c=" and "m=" line of local SDP.
*
* @param tp The transport.
- * @param info Media socket info to be initialized.
+ * @param info Media transport info to be initialized.
*
* @return PJ_SUCCESS on success.
*/
@@ -581,6 +581,29 @@ PJ_INLINE(pj_status_t) pjmedia_transport_get_info(pjmedia_transport *tp,
/**
+ * Utility API to get transport type specific info from the specified media
+ * transport info.
+ *
+ * @param info Media transport info.
+ * @param type Media transport type.
+ *
+ * @return Pointer to media transport specific info, or NULL if
+ * specific info for the transport type is not found.
+ */
+PJ_INLINE(void*) pjmedia_transport_info_get_spc_info(
+ pjmedia_transport_info *info,
+ pjmedia_transport_type type)
+{
+ unsigned i;
+ for (i = 0; i < info->specific_info_cnt; ++i) {
+ if (info->spc_info[i].type == type)
+ return (void*)info->spc_info[i].buffer;
+ }
+ return NULL;
+}
+
+
+/**
* Attach callbacks to be called on receipt of incoming RTP/RTCP packets.
* This is just a simple wrapper which calls <tt>attach()</tt> member of
* the transport.
diff --git a/pjmedia/include/pjmedia/transport_ice.h b/pjmedia/include/pjmedia/transport_ice.h
index 4500fae..417ee6d 100644
--- a/pjmedia/include/pjmedia/transport_ice.h
+++ b/pjmedia/include/pjmedia/transport_ice.h
@@ -1,4 +1,4 @@
-/* $Id: transport_ice.h 3872 2011-10-28 04:27:41Z bennylp $ */
+/* $Id: transport_ice.h 4350 2013-02-15 03:57:31Z nanang $ */
/*
* Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
* Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
@@ -69,6 +69,12 @@ typedef struct pjmedia_ice_cb
typedef struct pjmedia_ice_transport_info
{
/**
+ * Specifies whether ICE is used, i.e. SDP offer and answer indicates
+ * that both parties support ICE and ICE should be used for the session.
+ */
+ pj_bool_t active;
+
+ /**
* ICE sesion state.
*/
pj_ice_strans_state sess_state;