Debian Codegraph @

Xpjproject/pjmedia/include/pjmedia-codec/audio_codecs.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2011-2011 Teluu Inc. (http://www.teluu.com)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18 #ifndef __PJMEDIA_CODEC_ALL_CODECS_H__
19 #define __PJMEDIA_CODEC_ALL_CODECS_H__
20
21 /**
22 * @file pjmedia-codec/audio_codecs.h
23 * @brief Helper function to register all codecs
24 */
25 #include <pjmedia/endpoint.h>
26 #include <pjmedia-codec/passthrough.h>
27
28
29 PJ_BEGIN_DECL
30
31 /**
32 * @defgroup PJMEDIA_CODEC_REGISTER_ALL Codec registration helper
33 * @ingroup PJMEDIA_CODEC_CODECS
34 * @brief Helper function to register all codecs
35 * @{
36 *
37 * Helper function to register all codecs that are implemented in
38 * PJMEDIA-CODEC library.
39 */
40
41 /**
42 * Codec configuration. Call #pjmedia_audio_codec_config_default() to initialize
43 * this structure with the default values.
44 */
45 typedef struct pjmedia_audio_codec_config
46 {
47 /** Speex codec settings. See #pjmedia_codec_speex_init() for more info */
48 struct {
49 unsigned option; /**< Bitmask of options. */
50 int quality; /**< Codec quality. */
51 int complexity; /**< Codec complexity. */
52 } speex;
53
54 /** iLBC settings */
55 struct {
56 unsigned mode; /**< iLBC mode. */
57 } ilbc;
58
59 /** Passthrough */
60 struct {
61 pjmedia_codec_passthrough_setting setting; /**< Passthrough */
62 } passthrough;
63
64 } pjmedia_audio_codec_config;
65
66
67 /**
68 * Initialize pjmedia_audio_codec_config structure with default values.
69 *
70 * @param cfg The codec config to be initialized.
71 */
72 PJ_DECL(void)
73 pjmedia_audio_codec_config_default(pjmedia_audio_codec_config *cfg);
74
75 /**
76 * Register all known audio codecs implemented in PJMEDA-CODEC library to the
77 * specified media endpoint.
78 *
79 * @param endpt The media endpoint.
80 * @param c Optional codec configuration, or NULL to use default
81 * values.
82 *
83 * @return PJ_SUCCESS on success or the appropriate error code.
84 */
85 PJ_DECL(pj_status_t)
86 pjmedia_codec_register_audio_codecs(pjmedia_endpt *endpt,
87 const pjmedia_audio_codec_config *c);
88
89
90 /**
91 * @} PJMEDIA_CODEC_REGISTER_ALL
92 */
93
94
95 PJ_END_DECL
96
97 #endif /* __PJMEDIA_CODEC_ALL_CODECS_H__ */