diff options
Diffstat (limited to 'pjmedia')
-rw-r--r-- | pjmedia/build/pjmedia.dsp | 4 | ||||
-rw-r--r-- | pjmedia/include/pjmedia/conference.h | 18 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/conference.c | 25 |
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; |