diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-07-27 22:04:56 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-07-27 22:04:56 +0000 |
commit | 34520eaca94bf5e4edb9fe37301c72f5b57aa7e2 (patch) | |
tree | db0fde4c8e5ab0b422a079309877bfe9e376f845 /pjsip/include | |
parent | 9716653fda5019f1c944b0e1dafe304ab14e5aa3 (diff) |
Added capability in pjsua to add application created media port to pjsua's conference bridge, also capability to use custom sound device in pjsua.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@632 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua.h | 41 | ||||
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua_internal.h | 1 |
2 files changed, 42 insertions, 0 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index 07287a0a..6958bc4f 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -2247,6 +2247,36 @@ PJ_DECL(pj_status_t) pjsua_conf_get_port_info( pjsua_conf_port_id id, /** + * Add arbitrary media port to PJSUA's conference bridge. Application + * can use this function to add the media port that it creates. For + * media ports that are created by PJSUA-LIB (such as calls, file player, + * or file recorder), PJSUA-LIB will automatically add the port to + * the bridge. + * + * @param pool Pool to use. + * @param port Media port to be added to the bridge. + * @param p_id Optional pointer to receive the conference + * slot id. + * + * @return PJ_SUCCESS on success, or the appropriate error code. + */ +PJ_DECL(pj_status_t) pjsua_conf_add_port(pj_pool_t *pool, + pjmedia_port *port, + pjsua_conf_port_id *p_id); + + +/** + * Remove arbitrary slot from the conference bridge. Application should only + * call this function if it registered the port manually. + * + * @param id The slot id of the port to be removed. + * + * @return PJ_SUCCESS on success, or the appropriate error code. + */ +PJ_DECL(pj_status_t) pjsua_conf_remove_port(pjsua_conf_port_id id); + + +/** * Establish unidirectional media flow from souce to sink. One source * may transmit to multiple destinations/sink. And if multiple * sources are transmitting to the same sink, the media will be mixed @@ -2424,6 +2454,17 @@ PJ_DECL(pj_status_t) pjsua_set_snd_dev(int capture_dev, PJ_DECL(pj_status_t) pjsua_set_null_snd_dev(void); +/** + * Disconnect the main conference bridge from any sound devices, and let + * application connect the bridge to it's own sound device/master port. + * + * @return The port interface of the conference bridge, + * so that application can connect this to it's own + * sound device or master port. + */ +PJ_DECL(pjmedia_port*) pjsua_set_no_snd_dev(void); + + /***************************************************************************** * Codecs. */ diff --git a/pjsip/include/pjsua-lib/pjsua_internal.h b/pjsip/include/pjsua-lib/pjsua_internal.h index fe57b451..c862219f 100644 --- a/pjsip/include/pjsua-lib/pjsua_internal.h +++ b/pjsip/include/pjsua-lib/pjsua_internal.h @@ -204,6 +204,7 @@ struct pjsua_data pjmedia_conf *mconf; /**< Conference bridge. */ int cap_dev; /**< Capture device ID. */ int play_dev; /**< Playback device ID. */ + pj_bool_t no_snd; /**< No sound (app will manage it) */ pjmedia_snd_port *snd_port; /**< Sound port. */ pjmedia_master_port *null_snd; /**< Master port for null sound. */ pjmedia_port *null_port; /**< Null port. */ |