summaryrefslogtreecommitdiff
path: root/pjmedia/include/pjmedia-codec
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2009-06-30 15:02:06 +0000
committerNanang Izzuddin <nanang@teluu.com>2009-06-30 15:02:06 +0000
commit5b976613819b6e2eb8c84fcf419633b33709f9ed (patch)
tree3cbffcb9761e36284f6575edbc1f4341038a0eea /pjmedia/include/pjmedia-codec
parentaa4f1f0840c92cc5af96be965099a6b7b1b1448b (diff)
Ticket #910:
- Added a new API pjmedia_codec_passthrough_init2(). - Updated the initialization steps of passthrough codec in pjsua_media.c, to configure the codecs (of passthrough codec) to be enabled based on audio device extended/encoded formats. - Minor update: added passthrough.h into pjmedia_codec.vcproj. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2825 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include/pjmedia-codec')
-rw-r--r--pjmedia/include/pjmedia-codec/passthrough.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/pjmedia/include/pjmedia-codec/passthrough.h b/pjmedia/include/pjmedia-codec/passthrough.h
index 0705690a..7b237c3c 100644
--- a/pjmedia/include/pjmedia-codec/passthrough.h
+++ b/pjmedia/include/pjmedia-codec/passthrough.h
@@ -48,8 +48,22 @@
PJ_BEGIN_DECL
+
+/**
+ * Codec passthrough configuration settings.
+ */
+typedef struct pjmedia_codec_passthrough_setting
+{
+ unsigned fmt_cnt; /**< Number of encoding formats
+ to be enabled. */
+ pjmedia_format *fmts; /**< Encoding formats to be
+ enabled. */
+} pjmedia_codec_passthrough_setting;
+
+
/**
- * Initialize and register passthrough codecs factory to pjmedia endpoint.
+ * Initialize and register passthrough codecs factory to pjmedia endpoint,
+ * all supported encoding formats will be enabled.
*
* @param endpt The pjmedia endpoint.
*
@@ -58,6 +72,19 @@ PJ_BEGIN_DECL
PJ_DECL(pj_status_t) pjmedia_codec_passthrough_init( pjmedia_endpt *endpt );
+/**
+ * Initialize and register passthrough codecs factory to pjmedia endpoint
+ * with only specified encoding formats enabled.
+ *
+ * @param endpt The pjmedia endpoint.
+ * @param setting The settings, see @pjmedia_codec_passthrough_setting.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_passthrough_init2(
+ pjmedia_endpt *endpt,
+ const pjmedia_codec_passthrough_setting *setting);
+
/**
* Unregister passthrough codecs factory from pjmedia endpoint.