summaryrefslogtreecommitdiff
path: root/pjmedia/include/pjmedia-audiodev/audiodev.h
diff options
context:
space:
mode:
Diffstat (limited to 'pjmedia/include/pjmedia-audiodev/audiodev.h')
-rw-r--r--pjmedia/include/pjmedia-audiodev/audiodev.h35
1 files changed, 34 insertions, 1 deletions
diff --git a/pjmedia/include/pjmedia-audiodev/audiodev.h b/pjmedia/include/pjmedia-audiodev/audiodev.h
index 8f2ab783..5a523ca8 100644
--- a/pjmedia/include/pjmedia-audiodev/audiodev.h
+++ b/pjmedia/include/pjmedia-audiodev/audiodev.h
@@ -39,7 +39,7 @@ PJ_BEGIN_DECL
* @{
*/
-/**
+/**
* Type for device index.
*/
typedef pj_int32_t pjmedia_aud_dev_index;
@@ -428,6 +428,11 @@ typedef struct pjmedia_aud_stream pjmedia_aud_stream;
/** Forward declaration for audio device factory */
typedef struct pjmedia_aud_dev_factory pjmedia_aud_dev_factory;
+/* typedef for factory creation function */
+typedef pjmedia_aud_dev_factory*
+(*pjmedia_aud_dev_factory_create_func_ptr)(pj_pool_factory*);
+
+
/**
* Get string info for the specified capability.
*
@@ -510,6 +515,34 @@ PJ_DECL(pj_status_t) pjmedia_aud_subsys_shutdown(void);
/**
+ * Register a supported audio device factory to the audio subsystem. This
+ * function can only be called after calling #pjmedia_aud_subsys_init().
+ *
+ * @param adf The audio device factory.
+ *
+ * @return PJ_SUCCESS on successful operation or the appropriate
+ * error code.
+ */
+PJ_DECL(pj_status_t)
+pjmedia_aud_register_factory(pjmedia_aud_dev_factory_create_func_ptr adf);
+
+
+/**
+ * Unregister an audio device factory from the audio subsystem. This
+ * function can only be called after calling #pjmedia_aud_subsys_init().
+ * Devices from this factory will be unlisted. If a device from this factory
+ * is currently in use, then the behavior is undefined.
+ *
+ * @param adf The audio device factory.
+ *
+ * @return PJ_SUCCESS on successful operation or the appropriate
+ * error code.
+ */
+PJ_DECL(pj_status_t)
+pjmedia_aud_unregister_factory(pjmedia_aud_dev_factory_create_func_ptr adf);
+
+
+/**
* Get the number of sound devices installed in the system.
*
* @return The number of sound devices installed in the system.