Debian Codegraph @

Xpjproject/pjmedia/include/pjmedia-codec/ilbc.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_ILBC_H__
20 #define __PJMEDIA_CODEC_ILBC_H__
21
22 /**
23 * @file pjmedia-codec/ilbc.h
24 * @brief iLBC codec.
25 */
26
27 #include <pjmedia-codec/types.h>
28
29 /**
30 * @defgroup PJMED_ILBC iLBC Codec
31 * @ingroup PJMEDIA_CODEC_CODECS
32 * @brief Implementation of iLBC Codec
33 * @{
34 *
35 * This section describes functions to initialize and register iLBC 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 iLBC codec is developed by Global IP Solutions (GIPS), formerly
40 * Global IP Sound. The iLBC offers low bitrate and graceful audio quality
41 * degradation on frame losses.
42 *
43 * The iLBC codec supports 16-bit PCM audio signal with sampling rate of
44 * 8000Hz operating at two modes: 20ms and 30ms frame length modes, resulting
45 * in bitrates of 15.2kbps for 20ms mode and 13.33kbps for 30ms mode.
46 *
47 *
48 * \section ilbc_codec_setting Codec Settings
49 *
50 * \subsection ilbc_general_setting General Settings
51 *
52 * General codec settings for this codec such as VAD and PLC can be
53 * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param.
54 * Please see the documentation of #pjmedia_codec_param for more info.
55 *
56 * \subsection ilbc_specific_setting Codec Specific Settings
57 *
58 * The following settings are applicable for this codec.
59 *
60 * \subsubsection ilbc_mode Mode
61 *
62 * The default mode should be set upon initialization, see
63 * #pjmedia_codec_ilbc_init(). After the codec is initialized, the default
64 * mode can be modified using #pjmedia_codec_mgr_set_default_param().
65 *
66 * In #pjmedia_codec_param, iLBC mode can be set by specifying SDP
67 * format parameter "mode" in the SDP "a=fmtp" attribute for decoding
68 * direction. Valid values are "20" and "30" (for 20ms and 30ms mode
69 * respectively).
70 *
71 * Here is an example to set up #pjmedia_codec_param to use mode 20ms:
72 * \code
73 pjmedia_codec_param param;
74 ...
75 // setting iLBC mode in SDP
76 param.setting.dec_fmtp.cnt = 1;
77 param.setting.dec_fmtp.param[0].name = pj_str("mode");
78 param.setting.dec_fmtp.param[0].val = pj_str("20");
79 ...
80 \endcode
81 */
82
83 PJ_BEGIN_DECL
84
85
86 /**
87 * Initialize and register iLBC codec factory to pjmedia endpoint.
88 *
89 * @param endpt The pjmedia endpoint.
90 * @param mode Default decoder mode to be used. Valid values are
91 * 20 and 30 ms. Note that encoder mode follows the
92 * setting advertised in the remote's SDP.
93 *
94 * @return PJ_SUCCESS on success.
95 */
96 PJ_DECL(pj_status_t) pjmedia_codec_ilbc_init( pjmedia_endpt *endpt,
97 int mode );
98
99
100
101 /**
102 * Unregister iLBC codec factory from pjmedia endpoint and deinitialize
103 * the iLBC codec library.
104 *
105 * @return PJ_SUCCESS on success.
106 */
107 PJ_DECL(pj_status_t) pjmedia_codec_ilbc_deinit(void);
108
109
110 PJ_END_DECL
111
112
113 /**
114 * @}
115 */
116
117 #endif /* __PJMEDIA_CODEC_ILBC_H__ */
118