diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-09-12 11:33:22 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-09-12 11:33:22 +0000 |
commit | 95907d60dddd42b86fc9d45b1396b14a31ef8f15 (patch) | |
tree | 134254aa34db10d6a331f11fb3134a52787b361e /pjmedia/include | |
parent | 025890b11ac3daf0b3bfc5f7b002b48746c373c8 (diff) |
Added EOF callback and get_size() in pjmedia_mem_capture port.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@706 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r-- | pjmedia/include/pjmedia/mem_port.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/pjmedia/include/pjmedia/mem_port.h b/pjmedia/include/pjmedia/mem_port.h index 40c85999..fd0f0e88 100644 --- a/pjmedia/include/pjmedia/mem_port.h +++ b/pjmedia/include/pjmedia/mem_port.h @@ -134,6 +134,40 @@ PJ_DECL(pj_status_t) pjmedia_mem_capture_create(pj_pool_t *pool, /** + * Register a callback to be called when no space left in the buffer. + * Note that when a callback is registered, this callback will also be + * called when application destroys the port and the callback has not + * been called before. + * + * @param port The memory recorder 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 recording will stop. In other cases + * recording will be restarted and the rest of the frame + * will be stored starting from the beginning of the + * buffer. Note that if application destroys the capture + * port in the callback, it must return non-PJ_SUCCESS + * here. + * + * @return PJ_SUCCESS on success. + */ +PJ_DECL(pj_status_t) +pjmedia_mem_capture_set_eof_cb(pjmedia_port *port, + void *user_data, + pj_status_t (*cb)(pjmedia_port *port, + void *usr_data)); + +/** + * Return the current size of the recorded data in the buffer. + * + * @param port The memory recorder port. + * @return The size of buffer data.. + */ +PJ_DECL(pj_size_t) +pjmedia_mem_capture_get_size(pjmedia_port *port); + + +/** * @} */ |