Debian Codegraph @

Xpjproject/pjmedia/include/pjmedia-audiodev/audiodev.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
3 * Copyright (C) 2003-2008 Benny Prijono <[email protected]>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 #ifndef __PJMEDIA_AUDIODEV_AUDIODEV_H__
20 #define __PJMEDIA_AUDIODEV_AUDIODEV_H__
21
22 /**
23 * @file audiodev.h
24 * @brief Audio subsystem API.
25 */
26 #include <pj/pool.h>
27 #include <pjmedia/audiodev.h>
28
29
30 PJ_BEGIN_DECL
31
32 /**
33 * @defgroup PJMEDIA_AUDIODEV_SUBSYSTEM_API Audio Subsystem API Reference
34 * @ingroup audio_subsystem_api
35 * @brief API Reference
36 * @{
37 */
38
39
40 /**
41 * Initialize the audio subsystem. This will register all supported audio
42 * device factories to the audio subsystem. This function may be called
43 * more than once, but each call to this function must have the
44 * corresponding #pjmedia_aud_subsys_shutdown() call.
45 *
46 * @param pf The pool factory.
47 *
48 * @return PJ_SUCCESS on successful operation or the appropriate
49 * error code.
50 */
51 PJ_DECL(pj_status_t) pjmedia_aud_subsys_init(pj_pool_factory *pf);
52
53
54 /**
55 * Get the pool factory registered to the audio subsystem.
56 *
57 * @return The pool factory.
58 */
59 PJ_DECL(pj_pool_factory*) pjmedia_aud_subsys_get_pool_factory(void);
60
61
62 /**
63 * Shutdown the audio subsystem. This will destroy all audio device factories
64 * registered in the audio subsystem. Note that currently opened audio streams
65 * may or may not be closed, depending on the implementation of the audio
66 * device factories.
67 *
68 * @return PJ_SUCCESS on successful operation or the appropriate
69 * error code.
70 */
71 PJ_DECL(pj_status_t) pjmedia_aud_subsys_shutdown(void);
72
73
74 /**
75 * Register a supported audio device factory to the audio subsystem. This
76 * function can only be called after calling #pjmedia_aud_subsys_init().
77 *
78 * @param adf The audio device factory.
79 *
80 * @return PJ_SUCCESS on successful operation or the appropriate
81 * error code.
82 */
83 PJ_DECL(pj_status_t)
84 pjmedia_aud_register_factory(pjmedia_aud_dev_factory_create_func_ptr adf);
85
86
87 /**
88 * Unregister an audio device factory from the audio subsystem. This
89 * function can only be called after calling #pjmedia_aud_subsys_init().
90 * Devices from this factory will be unlisted. If a device from this factory
91 * is currently in use, then the behavior is undefined.
92 *
93 * @param adf The audio device factory.
94 *
95 * @return PJ_SUCCESS on successful operation or the appropriate
96 * error code.
97 */
98 PJ_DECL(pj_status_t)
99 pjmedia_aud_unregister_factory(pjmedia_aud_dev_factory_create_func_ptr adf);
100
101
102 /**
103 * @}
104 */
105
106 PJ_END_DECL
107
108
109 #endif /* __PJMEDIA_AUDIODEV_AUDIODEV_H__ */
110