Digital Milliwatt Test.
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 = "Digital Milliwatt (mu-law) Test Application" , .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" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
|
static const char | app [] = "Milliwatt" |
|
static const struct ast_module_info * | ast_module_info = &__mod_info |
|
static const char | digital_milliwatt [] = {0x1e,0x0b,0x0b,0x1e,0x9e,0x8b,0x8b,0x9e} |
|
static struct ast_generator | milliwattgen |
|
◆ __reg_module()
static void __reg_module |
( |
void |
| ) |
|
|
static |
◆ __unreg_module()
static void __unreg_module |
( |
void |
| ) |
|
|
static |
◆ AST_MODULE_SELF_SYM()
◆ load_module()
static int load_module |
( |
void |
| ) |
|
|
static |
◆ milliwatt_alloc()
static void* milliwatt_alloc |
( |
struct ast_channel * |
chan, |
|
|
void * |
params |
|
) |
| |
|
static |
◆ milliwatt_exec()
static int milliwatt_exec |
( |
struct ast_channel * |
chan, |
|
|
const char * |
data |
|
) |
| |
|
static |
◆ milliwatt_generate()
static int milliwatt_generate |
( |
struct ast_channel * |
chan, |
|
|
void * |
data, |
|
|
int |
len, |
|
|
int |
samples |
|
) |
| |
|
static |
Definition at line 77 of file app_milliwatt.c.
References ARRAY_LEN, ast_channel_name(), ast_format_ulaw, AST_FRAME_VOICE, ast_frfree, AST_FRIENDLY_OFFSET, ast_log, ast_write(), buf, ast_frame::data, ast_frame::datalen, digital_milliwatt, errno, ast_frame_subclass::format, ast_frame::frametype, len(), LOG_WARNING, ast_frame::ptr, ast_frame::samples, and ast_frame::subclass.
81 int i, *indexp = (
int *)
data, res;
106 for (i = 0; i <
len; i++) {
struct ast_frame_subclass subclass
#define AST_FRIENDLY_OFFSET
Offset into a frame's data buffer.
static const char digital_milliwatt[]
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
int ast_write(struct ast_channel *chan, struct ast_frame *frame)
Write a frame to a channel This function writes the given frame to the indicated channel.
const char * ast_channel_name(const struct ast_channel *chan)
Data structure associated with a single frame of data.
union ast_frame::@263 data
enum ast_frame_type frametype
struct ast_format * format
◆ milliwatt_release()
static void milliwatt_release |
( |
struct ast_channel * |
chan, |
|
|
void * |
data |
|
) |
| |
|
static |
◆ old_milliwatt_exec()
static int old_milliwatt_exec |
( |
struct ast_channel * |
chan | ) |
|
|
static |
Definition at line 128 of file app_milliwatt.c.
References ast_activate_generator(), ast_answer(), ast_channel_name(), ast_deactivate_generator(), ast_format_ulaw, ast_log, ast_safe_sleep(), ast_set_read_format(), ast_set_write_format(), AST_STATE_UP, and LOG_WARNING.
Referenced by milliwatt_exec().
int ast_safe_sleep(struct ast_channel *chan, int ms)
Wait for a specified amount of time, looking for hangups.
int ast_activate_generator(struct ast_channel *chan, struct ast_generator *gen, void *params)
ast_channel_state
ast_channel states
int ast_set_read_format(struct ast_channel *chan, struct ast_format *format)
Sets read format on channel chan.
int ast_set_write_format(struct ast_channel *chan, struct ast_format *format)
Sets write format on channel chan.
static struct ast_generator milliwattgen
void ast_deactivate_generator(struct ast_channel *chan)
const char * ast_channel_name(const struct ast_channel *chan)
int ast_answer(struct ast_channel *chan)
Answer a channel.
◆ 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 = "Digital Milliwatt (mu-law) Test Application" , .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" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
|
static |
◆ app
const char app[] = "Milliwatt" |
|
static |
◆ ast_module_info
◆ digital_milliwatt
const char digital_milliwatt[] = {0x1e,0x0b,0x0b,0x1e,0x9e,0x8b,0x8b,0x9e} |
|
static |
◆ milliwattgen
Initial value:= {
}
static int milliwatt_generate(struct ast_channel *chan, void *data, int len, int samples)
static void * milliwatt_alloc(struct ast_channel *chan, void *params)
static void milliwatt_release(struct ast_channel *chan, void *data)
Definition at line 122 of file app_milliwatt.c.