summaryrefslogtreecommitdiff
path: root/pjmedia
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-06-06 18:40:40 +0000
committerBenny Prijono <bennylp@teluu.com>2006-06-06 18:40:40 +0000
commit8db4ef281d67eee2ebeac22a31bc1961e96d78b2 (patch)
treeb910ef526c864da15ab3d05840fc78ff8c6c7608 /pjmedia
parent40d75a0cb404fc0bafa20934e992befd0eab673b (diff)
Another huge chunks of modifications in PJSUA API, too many things to mention!
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@492 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r--pjmedia/build/pjmedia.dsp4
-rw-r--r--pjmedia/include/pjmedia/conference.h18
-rw-r--r--pjmedia/src/pjmedia/conference.c25
3 files changed, 47 insertions, 0 deletions
diff --git a/pjmedia/build/pjmedia.dsp b/pjmedia/build/pjmedia.dsp
index dce99cff..a6050c1b 100644
--- a/pjmedia/build/pjmedia.dsp
+++ b/pjmedia/build/pjmedia.dsp
@@ -303,6 +303,10 @@ SOURCE=..\include\pjmedia\sound_port.h
# End Source File
# Begin Source File
+SOURCE=..\include\pjmedia\splitcomb.h
+# End Source File
+# Begin Source File
+
SOURCE=..\include\pjmedia\stream.h
# End Source File
# Begin Source File
diff --git a/pjmedia/include/pjmedia/conference.h b/pjmedia/include/pjmedia/conference.h
index bde63f77..208a8743 100644
--- a/pjmedia/include/pjmedia/conference.h
+++ b/pjmedia/include/pjmedia/conference.h
@@ -46,7 +46,9 @@ typedef struct pjmedia_conf_port_info
pjmedia_port_op rx_setting; /**< Receive settings. */
pj_bool_t *listener; /**< Array of listeners. */
unsigned clock_rate; /**< Clock rate of the port. */
+ unsigned channel_count; /**< Number of channels. */
unsigned samples_per_frame; /**< Samples per frame */
+ unsigned bits_per_sample; /**< Bits per sample. */
int tx_adj_level; /**< Tx level adjustment. */
int rx_adj_level; /**< Rx level adjustment. */
} pjmedia_conf_port_info;
@@ -254,6 +256,22 @@ PJ_DECL(pj_status_t) pjmedia_conf_remove_port( pjmedia_conf *conf,
/**
+ * Enumerate occupied ports in the bridge.
+ *
+ * @param conf The conference bridge.
+ * @param ports Array of port numbers to be filled in.
+ * @param count On input, specifies the maximum number of ports
+ * in the array. On return, it will be filled with
+ * the actual number of ports.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_conf_enum_ports( pjmedia_conf *conf,
+ unsigned ports[],
+ unsigned *count );
+
+
+/**
* Get port info.
*
* @param conf The conference bridge.
diff --git a/pjmedia/src/pjmedia/conference.c b/pjmedia/src/pjmedia/conference.c
index 6dd1b66e..d175213f 100644
--- a/pjmedia/src/pjmedia/conference.c
+++ b/pjmedia/src/pjmedia/conference.c
@@ -820,6 +820,29 @@ PJ_DEF(pj_status_t) pjmedia_conf_remove_port( pjmedia_conf *conf,
return PJ_SUCCESS;
}
+
+/*
+ * Enum ports.
+ */
+PJ_DEF(pj_status_t) pjmedia_conf_enum_ports( pjmedia_conf *conf,
+ unsigned ports[],
+ unsigned *p_count )
+{
+ unsigned i, count=0;
+
+ PJ_ASSERT_RETURN(conf && p_count && ports, PJ_EINVAL);
+
+ for (i=0; i<conf->max_ports && count<*p_count; ++i) {
+ if (!conf->ports[i])
+ continue;
+
+ ports[count++] = i;
+ }
+
+ *p_count = count;
+ return PJ_SUCCESS;
+}
+
/*
* Get port info
*/
@@ -843,7 +866,9 @@ PJ_DEF(pj_status_t) pjmedia_conf_get_port_info( pjmedia_conf *conf,
info->rx_setting = conf_port->rx_setting;
info->listener = conf_port->listeners;
info->clock_rate = conf_port->clock_rate;
+ info->channel_count = conf->channel_count;
info->samples_per_frame = conf_port->samples_per_frame;
+ info->bits_per_sample = conf->bits_per_sample;
info->tx_adj_level = conf_port->tx_adj_level - NORMAL_LEVEL;
info->rx_adj_level = conf_port->rx_adj_level - NORMAL_LEVEL;