From e56ea14ab8531ee3cec375460577d1b89bf62e26 Mon Sep 17 00:00:00 2001 From: Liong Sauw Ming Date: Thu, 16 Jan 2014 05:30:46 +0000 Subject: Closed #1723: Merging pjsua2 branch into trunk git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4704 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/include/pjsua-lib/pjsua.h | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'pjsip/include/pjsua-lib/pjsua.h') diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index bca343ba..7ee3d6cf 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -251,7 +251,10 @@ PJ_BEGIN_DECL */ /** Constant to identify invalid ID for all sorts of IDs. */ -#define PJSUA_INVALID_ID (-1) +enum pjsua_invalid_id_const_ +{ + PJSUA_INVALID_ID = -1 +}; /** Disabled features temporarily for media reorganization */ #define DISABLED_FOR_TICKET_1185 0 @@ -1879,6 +1882,26 @@ PJ_DECL(pj_status_t) pjsua_destroy2(unsigned flags); PJ_DECL(int) pjsua_handle_events(unsigned msec_timeout); +/** + * Register a thread to poll for events. This function should be + * called by an external worker thread, and it will block polling + * for events until the library is destroyed. + * + * @return PJ_SUCCESS if things are working correctly + * or an error polling cannot be done for some + * reason. + */ +PJ_DECL(pj_status_t) pjsua_register_worker_thread(const char *name); + + +/** + * Signal all worker threads to quit. This will only wait until internal + * threads are done. For external threads, application must perform + * its own waiting for the external threads to quit from + * pjsua_register_worker_thread() function. + */ +PJ_DECL(void) pjsua_stop_worker_threads(void); + /** * Create memory pool to be used by the application. Once application * finished using the pool, it must be released with pj_pool_release(). @@ -5777,6 +5800,9 @@ typedef struct pjsua_conf_port_info /** Port name. */ pj_str_t name; + /** Format. */ + pjmedia_format format; + /** Clock rate. */ unsigned clock_rate; @@ -5789,6 +5815,12 @@ typedef struct pjsua_conf_port_info /** Bits per sample */ unsigned bits_per_sample; + /** Tx level adjustment. */ + float tx_level_adj; + + /** Rx level adjustment. */ + float rx_level_adj; + /** Number of listeners in the array. */ unsigned listener_cnt; -- cgit v1.2.3