SILK format attribute interface.  
More...
Go to the source code of this file.
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.
  217{
  220 
  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")) {
 
  229    } else {
  232    }
  233 
  235}
unsigned int packetloss_percentage
References ast_format_get_attribute_data(), ast_log, silk_attr::dtx, silk_attr::fec, LOG_WARNING, silk_attr::maxbitrate, name, NULL, and silk_attr::packetloss_percentage.
 
 
◆ silk_getjoint()
Definition at line 144 of file res_format_attr_silk.c.
  145{
  150 
  153    }
  154 
  156    if (!jointformat) {
  158    }
  160 
  161    if (!attr1 || !attr2) {
  163    } else {
  164        
  166 
  167        
  168
  169        attr_res->
dtx = attr1->
dtx && attr2->
dtx ? 1 : 0;
 
  170 
  171        
  172
  173        attr_res->
fec = attr1->
fec && attr2->
fec ? 1 : 0;
 
  174 
  175        
  176
  178    }
  179 
  180    return jointformat;
  181}
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.
 
 
◆ 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.
   85{
   90 
   92    if (!cloned) {
   94    }
   96 
   97    
   98    for (attrib = attribs; *attrib; ++attrib) {
   99        *attrib = tolower(*attrib);
  100    } 
  101 
  102    if (sscanf(attribs, 
"maxaveragebitrate=%30u", &
val) == 1) {
 
  104    }
  105    if (sscanf(attribs, 
"usedtx=%30u", &
val) == 1) {
 
  107    }
  108    if (sscanf(attribs, 
"useinbandfec=%30u", &
val) == 1) {
 
  110    }
  111 
  112    return cloned;
  113}
#define ast_strdupa(s)
duplicate a string in memory from the stack
References ast_format_clone(), ast_format_get_attribute_data(), ast_strdupa, silk_attr::dtx, silk_attr::fec, silk_attr::maxbitrate, and NULL.
 
 
◆ 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.
  184{
  188 
  189    if (sscanf(
value, 
"%30u", &
val) != 1) {
 
  193    }
  194 
  196    if (!cloned) {
  198    }
  200 
  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")) {
 
  209    } else {
  211    }
  212 
  213    return cloned;
  214}
References ast_format_clone(), ast_format_get_attribute_data(), ast_log, silk_attr::dtx, silk_attr::fec, LOG_WARNING, silk_attr::maxbitrate, name, NULL, silk_attr::packetloss_percentage, and value.
 
 
◆ unload_module()
  
  | 
        
          | static int unload_module | ( | void |  | ) |  |  | static | 
 
 
◆ __mod_info
◆ ast_module_info
◆ silk_interface