diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-09-11 19:55:41 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-09-11 19:55:41 +0000 |
commit | 18fd894546492261e3abff8d5d1d7b45c352e4cc (patch) | |
tree | 3e1259c0654df2b1b5bc8d3a9cf5565ab4d45405 /pjmedia/include | |
parent | 785a7742999d3ffea53a4a24912174ce858e53f9 (diff) |
Added EOF callback in memory playback port.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@704 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r-- | pjmedia/include/pjmedia/mem_port.h | 22 |
1 files changed, 22 insertions, 0 deletions
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 @@ -70,6 +70,28 @@ PJ_DECL(pj_status_t) pjmedia_mem_player_create(pj_pool_t *pool, /** + * 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)); + + +/** * @} */ |