WARNING: The online documentation has moved to https://docs.pjsip.org.

Visit the new documentation at https://docs.pjsip.org:

BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJMEDIA Reference

Audio Subsystem API Reference

API Reference. More...

Functions

pj_status_t pjmedia_aud_subsys_init (pj_pool_factory *pf)
 
pj_pool_factorypjmedia_aud_subsys_get_pool_factory (void)
 
pj_status_t pjmedia_aud_subsys_shutdown (void)
 
pj_status_t pjmedia_aud_register_factory (pjmedia_aud_dev_factory_create_func_ptr adf)
 
pj_status_t pjmedia_aud_unregister_factory (pjmedia_aud_dev_factory_create_func_ptr adf)
 

Detailed Description

Function Documentation

◆ pjmedia_aud_subsys_init()

pj_status_t pjmedia_aud_subsys_init ( pj_pool_factory pf)

Initialize the audio subsystem. This will register all supported audio device factories to the audio subsystem. This function may be called more than once, but each call to this function must have the corresponding pjmedia_aud_subsys_shutdown() call.

Parameters
pfThe pool factory.
Returns
PJ_SUCCESS on successful operation or the appropriate error code.

Referenced by pjmedia_endpt_create(), and pjmedia_snd_init().

◆ pjmedia_aud_subsys_get_pool_factory()

pj_pool_factory * pjmedia_aud_subsys_get_pool_factory ( void  )

Get the pool factory registered to the audio subsystem.

Returns
The pool factory.

◆ pjmedia_aud_subsys_shutdown()

pj_status_t pjmedia_aud_subsys_shutdown ( void  )

Shutdown the audio subsystem. This will destroy all audio device factories registered in the audio subsystem. Note that currently opened audio streams may or may not be closed, depending on the implementation of the audio device factories.

Returns
PJ_SUCCESS on successful operation or the appropriate error code.

Referenced by pjmedia_endpt_create(), pjmedia_endpt_destroy(), and pjmedia_snd_deinit().

◆ pjmedia_aud_register_factory()

pj_status_t pjmedia_aud_register_factory ( pjmedia_aud_dev_factory_create_func_ptr  adf)

Register a supported audio device factory to the audio subsystem. This function can only be called after calling pjmedia_aud_subsys_init().

Parameters
adfThe audio device factory.
Returns
PJ_SUCCESS on successful operation or the appropriate error code.

◆ pjmedia_aud_unregister_factory()

pj_status_t pjmedia_aud_unregister_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.

Parameters
adfThe audio device factory.
Returns
PJ_SUCCESS on successful operation or the appropriate error code.

 


PJMEDIA small footprint Open Source media stack
Copyright (C) 2006-2008 Teluu Inc.