From 6fa4d964245209d05d9c1cce6e8f12ab993a03a1 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Mon, 21 Jun 2010 09:10:44 +0000 Subject: Misc (re #1068): added new API pjmedia_master_port_wait() to poll master port clock when it is created with PJMEDIA_CLOCK_NO_ASYNC flag. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3214 74dad513-b988-da41-8d7b-12977e46ad98 --- pjmedia/include/pjmedia/master_port.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'pjmedia/include') diff --git a/pjmedia/include/pjmedia/master_port.h b/pjmedia/include/pjmedia/master_port.h index dd1b1de1..6ebad7af 100644 --- a/pjmedia/include/pjmedia/master_port.h +++ b/pjmedia/include/pjmedia/master_port.h @@ -105,6 +105,26 @@ PJ_DECL(pj_status_t) pjmedia_master_port_start(pjmedia_master_port *m); PJ_DECL(pj_status_t) pjmedia_master_port_stop(pjmedia_master_port *m); +/** + * Poll the master port clock and execute the callback when the clock tick has + * elapsed. This operation is only valid if the master port is created with + * #PJMEDIA_CLOCK_NO_ASYNC flag. + * + * @param m The master port. + * @param wait If non-zero, then the function will block until + * a clock tick elapsed and callback has been called. + * @param ts Optional argument to receive the current + * timestamp. + * + * @return Non-zero if clock tick has elapsed, or FALSE if + * the function returns before a clock tick has + * elapsed. + */ +PJ_DECL(pj_bool_t) pjmedia_master_port_wait(pjmedia_master_port *m, + pj_bool_t wait, + pj_timestamp *ts); + + /** * Change the upstream port. Note that application is responsible to destroy * current upstream port (the one that is going to be replaced with the -- cgit v1.2.3