SILK format attribute interface.
More...
Go to the source code of this file.
|
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "SILK Format Attribute Module" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "30ef0c93b36035ec78c9cfd712d36d9b" , .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_CHANNEL_DEPEND, } |
|
static const struct ast_module_info * | ast_module_info = &__mod_info |
|
static struct ast_format_interface | silk_interface |
|
SILK format attribute interface.
- Author
- David Vossel dvoss.nosp@m.el@d.nosp@m.igium.nosp@m..com
Definition in file res_format_attr_silk.c.
◆ __reg_module()
static void __reg_module |
( |
void |
| ) |
|
|
static |
◆ __unreg_module()
static void __unreg_module |
( |
void |
| ) |
|
|
static |
◆ AST_MODULE_SELF_SYM()
◆ attr_init()
static void attr_init |
( |
struct silk_attr * |
attr | ) |
|
|
static |
◆ load_module()
static int load_module |
( |
void |
| ) |
|
|
static |
◆ silk_clone()
◆ silk_cmp()
◆ silk_destroy()
static void silk_destroy |
( |
struct ast_format * |
format | ) |
|
|
static |
◆ silk_generate_sdp_fmtp()
static void silk_generate_sdp_fmtp |
( |
const struct ast_format * |
format, |
|
|
unsigned int |
payload, |
|
|
struct ast_str ** |
str |
|
) |
| |
|
static |
◆ silk_get()
static const void* silk_get |
( |
const struct ast_format * |
format, |
|
|
const char * |
name |
|
) |
| |
|
static |
Definition at line 216 of file res_format_attr_silk.c.
References ast_format_get_attribute_data(), ast_log, silk_attr::dtx, silk_attr::fec, LOG_WARNING, silk_attr::maxbitrate, NULL, and silk_attr::packetloss_percentage.
221 if (!strcasecmp(
name,
"max_bitrate")) {
223 }
else if (!strcasecmp(
name,
"dtx")) {
225 }
else if (!strcasecmp(
name,
"fec")) {
227 }
else if (!strcasecmp(
name,
"packetloss_percentage")) {
SILK attribute structure.
unsigned int packetloss_percentage
◆ silk_getjoint()
Definition at line 144 of file res_format_attr_silk.c.
References ast_format_clone(), ast_format_get_attribute_data(), ast_format_get_sample_rate(), attr_init(), silk_attr::dtx, silk_attr::fec, MAX, silk_attr::maxbitrate, MIN, NULL, and silk_attr::packetloss_percentage.
161 if (!attr1 || !attr2) {
169 attr_res->
dtx = attr1->
dtx && attr2->
dtx ? 1 : 0;
173 attr_res->
fec = attr1->
fec && attr2->
fec ? 1 : 0;
SILK attribute structure.
unsigned int packetloss_percentage
◆ silk_parse_sdp_fmtp()
static struct ast_format* silk_parse_sdp_fmtp |
( |
const struct ast_format * |
format, |
|
|
const char * |
attributes |
|
) |
| |
|
static |
Definition at line 84 of file res_format_attr_silk.c.
References ast_format_clone(), ast_format_get_attribute_data(), ast_strdupa, silk_attr::dtx, silk_attr::fec, silk_attr::maxbitrate, and NULL.
98 for (attrib = attribs; *attrib; ++attrib) {
99 *attrib = tolower(*attrib);
102 if (sscanf(attribs,
"maxaveragebitrate=%30u", &val) == 1) {
105 if (sscanf(attribs,
"usedtx=%30u", &val) == 1) {
108 if (sscanf(attribs,
"useinbandfec=%30u", &val) == 1) {
SILK attribute structure.
#define ast_strdupa(s)
duplicate a string in memory from the stack
◆ silk_set()
static struct ast_format* silk_set |
( |
const struct ast_format * |
format, |
|
|
const char * |
name, |
|
|
const char * |
value |
|
) |
| |
|
static |
Definition at line 183 of file res_format_attr_silk.c.
References ast_format_clone(), ast_format_get_attribute_data(), ast_log, silk_attr::dtx, silk_attr::fec, LOG_WARNING, silk_attr::maxbitrate, NULL, and silk_attr::packetloss_percentage.
189 if (sscanf(
value,
"%30u", &val) != 1) {
201 if (!strcasecmp(
name,
"max_bitrate")) {
203 }
else if (!strcasecmp(
name,
"dtx")) {
205 }
else if (!strcasecmp(
name,
"fec")) {
207 }
else if (!strcasecmp(
name,
"packetloss_percentage")) {
SILK attribute structure.
unsigned int packetloss_percentage
◆ unload_module()
static int unload_module |
( |
void |
| ) |
|
|
static |
◆ __mod_info
struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "SILK Format Attribute Module" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "30ef0c93b36035ec78c9cfd712d36d9b" , .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_CHANNEL_DEPEND, } |
|
static |
◆ ast_module_info
◆ silk_interface