Asterisk - The Open Source Telephony Project GIT-master-27fb039
Loading...
Searching...
No Matches
Functions | Variables
res_format_attr_g729.c File Reference
#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/format.h"
Include dependency graph for res_format_attr_g729.c:

Go to the source code of this file.

Functions

static void __reg_module (void)
 
static void __unreg_module (void)
 
struct ast_moduleAST_MODULE_SELF_SYM (void)
 
static int g729_clone (const struct ast_format *src, struct ast_format *dst)
 
static void g729_destroy (struct ast_format *format)
 
static void g729_generate_sdp_fmtp (const struct ast_format *format, unsigned int payload, struct ast_str **str)
 
static int load_module (void)
 
static int unload_module (void)
 

Variables

static struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "G.729 Format Attribute Module" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_CHANNEL_DEPEND, }
 
static const struct ast_module_infoast_module_info = &__mod_info
 
static struct ast_format_interface g729_interface
 

Function Documentation

◆ __reg_module()

static void __reg_module ( void  )
static

Definition at line 74 of file res_format_attr_g729.c.

◆ __unreg_module()

static void __unreg_module ( void  )
static

Definition at line 74 of file res_format_attr_g729.c.

◆ AST_MODULE_SELF_SYM()

struct ast_module * AST_MODULE_SELF_SYM ( void  )

Definition at line 74 of file res_format_attr_g729.c.

◆ g729_clone()

static int g729_clone ( const struct ast_format src,
struct ast_format dst 
)
static

Definition at line 34 of file res_format_attr_g729.c.

35{
36 return 0;
37}

◆ g729_destroy()

static void g729_destroy ( struct ast_format format)
static

Definition at line 29 of file res_format_attr_g729.c.

30{
31}

◆ g729_generate_sdp_fmtp()

static void g729_generate_sdp_fmtp ( const struct ast_format format,
unsigned int  payload,
struct ast_str **  str 
)
static

Definition at line 39 of file res_format_attr_g729.c.

40{
41 /*
42 * According to the rfc the joint annexb format parameter should be set to 'yes'
43 * or 'no' based on the answerer (rfc7261 - 3.3). However, Asterisk being a B2BUA
44 * makes things tricky. So for now Asterisk will set annexb=no.
45 */
46 ast_str_append(str, 0, "a=fmtp:%u annexb=no\r\n", payload);
47}
const char * str
Definition app_jack.c:150
int ast_str_append(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Append to a thread local dynamic string.
Definition strings.h:1139

References ast_str_append(), and str.

◆ load_module()

static int load_module ( void  )
static

Definition at line 55 of file res_format_attr_g729.c.

56{
59 }
60
62}
#define ast_format_interface_register(codec, interface)
Register a format interface for use with the provided codec.
Definition format.h:273
@ AST_MODULE_LOAD_SUCCESS
Definition module.h:70
@ AST_MODULE_LOAD_DECLINE
Module has failed to load, may be in an inconsistent state.
Definition module.h:78
static struct ast_format_interface g729_interface

References ast_format_interface_register, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, and g729_interface.

◆ unload_module()

static int unload_module ( void  )
static

Definition at line 64 of file res_format_attr_g729.c.

65{
66 return 0;
67}

Variable Documentation

◆ __mod_info

struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "G.729 Format Attribute Module" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_CHANNEL_DEPEND, }
static

Definition at line 74 of file res_format_attr_g729.c.

◆ ast_module_info

const struct ast_module_info* ast_module_info = &__mod_info
static

Definition at line 74 of file res_format_attr_g729.c.

◆ g729_interface

struct ast_format_interface g729_interface
static
Initial value:
= {
.format_destroy = g729_destroy,
.format_clone = g729_clone,
.format_generate_sdp_fmtp = g729_generate_sdp_fmtp,
}
static int g729_clone(const struct ast_format *src, struct ast_format *dst)
static void g729_destroy(struct ast_format *format)
static void g729_generate_sdp_fmtp(const struct ast_format *format, unsigned int payload, struct ast_str **str)

Definition at line 49 of file res_format_attr_g729.c.

49 {
50 .format_destroy = g729_destroy,
51 .format_clone = g729_clone,
52 .format_generate_sdp_fmtp = g729_generate_sdp_fmtp,
53};

Referenced by load_module().