44 #include "asterisk/linkedlists.h"
50 #define BUFFER_SAMPLES 8096
53 #include "g722/g722.h"
72 g722_encode_init(&tmp->
g722, 64000, G722_SAMPLE_RATE_8000);
81 g722_encode_init(&tmp->
g722, 64000, 0);
91 g722_decode_init(&tmp->
g722, 64000, G722_SAMPLE_RATE_8000);
100 g722_decode_init(&tmp->
g722, 64000, 0);
115 (uint8_t *) f->
data.
ptr, in_samples);
119 pvt->
datalen += (out_samples *
sizeof(int16_t));
164 .
name =
"g722tolin16",
176 .
name =
"lin16tog722",
static int unload_module(void)
int datalen
actual space used in outbuf
Asterisk main include file. File version handling, generic pbx functions.
union ast_trans_pvt::@213 outbuf
Descriptor of a translator.
Support for translation of data formats. translate.c.
static int load_module(void)
Configuration File Parser.
#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)
static struct ast_frame * slin8_sample(void)
static int g722tolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
static struct ast_translator lintog722
static struct ast_frame * slin16_sample(void)
static struct ast_translator g722tolin
static int lintog722_new(struct ast_trans_pvt *pvt)
init a new instance of g722_encoder_pvt.
#define ast_register_translator(t)
See __ast_register_translator()
int ast_unregister_translator(struct ast_translator *t)
Unregister a translator Unregisters the given tranlator.
static struct ast_frame * g722_sample(void)
#define AST_FORMAT_SLINEAR16
Default structure for translators, with the basic fields and buffers, all allocated as part of the sa...
static struct ast_translator g722tolin16
static int lintog722_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
#define AST_FORMAT_SLINEAR
Data structure associated with a single frame of data.
static int lin16tog722_new(struct ast_trans_pvt *pvt)
static int g722tolin_new(struct ast_trans_pvt *pvt)
init a new instance of g722_encoder_pvt.
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
union ast_frame::@172 data
static int g722tolin16_new(struct ast_trans_pvt *pvt)
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.
static struct ast_translator lin16tog722