Asterisk - The Open Source Telephony Project GIT-master-f36a736
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 = "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 = 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:147
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 = "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 = 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.

Referenced by load_module().