diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2015-02-11 05:15:29 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2015-02-11 05:15:29 +0000 |
commit | 33ccbcef51df23a167a5411ca97e7cdd9b604652 (patch) | |
tree | cfad58562a8431fe9fa3c761cec05e924140afcf /pjsip/include | |
parent | dbae9140153559747dcb6b12c3fda2c139836733 (diff) |
Close #1814: Add audio frame preview callbacks.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4982 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index 31c5378b..6325b70a 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -5811,6 +5811,31 @@ struct pjsua_media_config * Default: PJ_FALSE */ pj_bool_t no_rtcp_sdes_bye; + + /** + * Optional callback for audio frame preview right before queued to + * the speaker. + * Notes: + * - application MUST NOT block or perform long operation in the callback + * as the callback may be executed in sound device thread + * - when using software echo cancellation, application MUST NOT modify + * the audio data from within the callback, otherwise the echo canceller + * will not work properly. + */ + void (*on_aud_prev_play_frame)(pjmedia_frame *frame); + + /** + * Optional callback for audio frame preview recorded from the microphone + * before being processed by any media component such as software echo + * canceller. + * Notes: + * - application MUST NOT block or perform long operation in the callback + * as the callback may be executed in sound device thread + * - when using software echo cancellation, application MUST NOT modify + * the audio data from within the callback, otherwise the echo canceller + * will not work properly. + */ + void (*on_aud_prev_rec_frame)(pjmedia_frame *frame); }; |