From 18fd894546492261e3abff8d5d1d7b45c352e4cc Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Mon, 11 Sep 2006 19:55:41 +0000 Subject: Added EOF callback in memory playback port. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@704 74dad513-b988-da41-8d7b-12977e46ad98 --- pjmedia/include/pjmedia/mem_port.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'pjmedia/include') diff --git a/pjmedia/include/pjmedia/mem_port.h b/pjmedia/include/pjmedia/mem_port.h index 7c62b614..40c85999 100644 --- a/pjmedia/include/pjmedia/mem_port.h +++ b/pjmedia/include/pjmedia/mem_port.h @@ -69,6 +69,28 @@ PJ_DECL(pj_status_t) pjmedia_mem_player_create(pj_pool_t *pool, pjmedia_port **p_port ); +/** + * Register a callback to be called when the buffer reading has reached the + * end of buffer. If the player is set to play repeatedly, then the callback + * will be called multiple times. Note that only one callback can be + * registered for each player port. + * + * @param port The memory player port. + * @param user_data User data to be specified in the callback + * @param cb Callback to be called. If the callback returns non- + * PJ_SUCCESS, the playback will stop. Note that if + * application destroys the player port in the callback, + * it must return non-PJ_SUCCESS here. + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) +pjmedia_mem_player_set_eof_cb( pjmedia_port *port, + void *user_data, + pj_status_t (*cb)(pjmedia_port *port, + void *usr_data)); + + /** * @} */ -- cgit v1.2.3