Debian Codegraph @

Xpjproject/pjmedia/include/pjmedia-codec/g722.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_CODEC_G722_H__
20 #define __PJMEDIA_CODEC_G722_H__
21
22 /**
23 * @file pjmedia-codec/g722.h
24 * @brief G.722 codec.
25 */
26
27 #include <pjmedia-codec/types.h>
28
29 /**
30 * @defgroup PJMED_G722 G.722 Codec
31 * @ingroup PJMEDIA_CODEC_CODECS
32 * @brief Implementation of G.722 Codec
33 * @{
34 *
35 * This section describes functions to initialize and register G.722 codec
36 * factory to the codec manager. After the codec factory has been registered,
37 * application can use @ref PJMEDIA_CODEC API to manipulate the codec.
38 *
39 * The G.722 implementation uses 16-bit PCM with sampling rate 16000Hz and
40 * 20ms frame length resulting in 64kbps bitrate.
41 *
42 * The G.722 codec implementation is provided as part of pjmedia-codec
43 * library, and does not depend on external G.722 codec implementation.
44 *
45 * \section codec_g722_setting Codec Settings
46 *
47 * \subsection g722_general_setting General Settings
48 *
49 * General codec settings for this codec such as VAD and PLC can be
50 * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
51 * Please see the documentation of #pjmedia_codec_param for more info.
52 *
53 * \subsection g722_specific_setting Codec Specific Settings
54 *
55 * Currently none.
56 */
57
58 PJ_BEGIN_DECL
59
60
61 /**
62 * Initialize and register G.722 codec factory to pjmedia endpoint.
63 *
64 * @param endpt The pjmedia endpoint.
65 *
66 * @return PJ_SUCCESS on success.
67 */
68 PJ_DECL(pj_status_t) pjmedia_codec_g722_init(pjmedia_endpt *endpt);
69
70
71 /**
72 * Unregister G.722 codec factory from pjmedia endpoint and cleanup
73 * resources allocated by the factory.
74 *
75 * @return PJ_SUCCESS on success.
76 */
77 PJ_DECL(pj_status_t) pjmedia_codec_g722_deinit(void);
78
79
80 /**
81 * Set the G.722 codec encoder and decoder level adjustment.
82 * If the value is non-zero, then PCM input samples to the encoder will
83 * be shifted right by this value, and similarly PCM output samples from
84 * the decoder will be shifted left by this value.
85 *
86 * Default value is PJMEDIA_G722_DEFAULT_PCM_SHIFT.
87 *
88 * @param val The value
89 *
90 * @return PJ_SUCCESS on success.
91 */
92 PJ_DECL(pj_status_t) pjmedia_codec_g722_set_pcm_shift(unsigned val);
93
94
95 PJ_END_DECL
96
97
98 /**
99 * @}
100 */
101
102 #endif /* __PJMEDIA_CODEC_G722_H__ */
103