diff options
author | Liong Sauw Ming <ming@teluu.com> | 2011-03-11 06:57:24 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2011-03-11 06:57:24 +0000 |
commit | c44da2d6d7f8a991cd8143f97acda117a4e0a422 (patch) | |
tree | e57adad451551e486fdbb8f4de0b2240978d091d /pjmedia/include/pjmedia-audiodev | |
parent | a71c9ccfea1d7d9e7999037a8ee13820eb0e16e2 (diff) |
Fixed #1204: Support for refreshing audio device list.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3438 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include/pjmedia-audiodev')
-rw-r--r-- | pjmedia/include/pjmedia-audiodev/audiodev.h | 14 | ||||
-rw-r--r-- | pjmedia/include/pjmedia-audiodev/audiodev_imp.h | 7 |
2 files changed, 21 insertions, 0 deletions
diff --git a/pjmedia/include/pjmedia-audiodev/audiodev.h b/pjmedia/include/pjmedia-audiodev/audiodev.h index ba28bc0f..1d1c39c0 100644 --- a/pjmedia/include/pjmedia-audiodev/audiodev.h +++ b/pjmedia/include/pjmedia-audiodev/audiodev.h @@ -546,6 +546,20 @@ pjmedia_aud_unregister_factory(pjmedia_aud_dev_factory_create_func_ptr adf); /** + * Refresh the list of sound devices installed in the system. This function + * will only refresh the list of audio device so all active audio streams will + * be unaffected. After refreshing the device list, application MUST make sure + * to update all index references to audio devices (i.e. all variables of type + * pjmedia_aud_dev_index) before calling any function that accepts audio device + * index as its parameter. + * + * @return PJ_SUCCESS on successful operation or the appropriate + * error code. + */ +PJ_DECL(pj_status_t) pjmedia_aud_dev_refresh(void); + + +/** * Get the number of sound devices installed in the system. * * @return The number of sound devices installed in the system. diff --git a/pjmedia/include/pjmedia-audiodev/audiodev_imp.h b/pjmedia/include/pjmedia-audiodev/audiodev_imp.h index e12c0f21..172c1279 100644 --- a/pjmedia/include/pjmedia-audiodev/audiodev_imp.h +++ b/pjmedia/include/pjmedia-audiodev/audiodev_imp.h @@ -92,6 +92,13 @@ typedef struct pjmedia_aud_dev_factory_op void *user_data, pjmedia_aud_stream **p_aud_strm); + /** + * Refresh the list of audio devices installed in the system. + * + * @param f The audio device factory. + */ + pj_status_t (*refresh)(pjmedia_aud_dev_factory *f); + } pjmedia_aud_dev_factory_op; |