36 #include "asterisk/translate.h"
40 #include "ilbc/iLBC_encode.h"
41 #include "ilbc/iLBC_decode.h"
43 #define USE_ILBC_ENHANCER 0
47 #define ILBC_FRAME_LEN 50
48 #define ILBC_SAMPLES 240
49 #define BUFFER_SAMPLES 8000
93 ast_log(
LOG_DEBUG,
"issue 16070, ILIB ERROR. data = NULL datalen = %d src = %s\n", datalen, f->
src ? f->
src :
"no src set");
106 ast_log(
LOG_WARNING,
"Huh? An ilbc frame that isn't a multiple of 50 bytes long from %s (%d)?\n", f->
src, datalen);
115 iLBC_decode(tmpf, plc_mode ? f->
data.
ptr + x : NULL, &tmp->
dec, plc_mode);
117 dst[pvt->
samples + i] = tmpf[i];
119 pvt->
datalen += 2*ILBC_SAMPLES;
154 tmpf[i] = tmp->
buf[samples + i];
155 iLBC_encode( pvt->
outbuf.
uc + datalen, tmpf, &tmp->
enc);
struct ast_frame * ast_trans_frameout(struct ast_trans_pvt *pvt, int datalen, int samples)
generic frameout function
int datalen
actual space used in outbuf
#define AST_MODULE_INFO_STANDARD(keystr, desc)
static int ilbctolin_new(struct ast_trans_pvt *pvt)
Asterisk main include file. File version handling, generic pbx functions.
union ast_trans_pvt::@213 outbuf
Descriptor of a translator.
static struct ast_translator ilbctolin
static struct ast_translator lintoilbc
static struct ast_frame * slin8_sample(void)
static int load_module(void)
static struct ast_frame * ilbc_sample(void)
#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 int ilbctolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
decode a frame and store in outbuf
int16_t buf[BUFFER_SAMPLES]
Default structure for translators, with the basic fields and buffers, all allocated as part of the sa...
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
static int unload_module(void)
#define AST_FORMAT_SLINEAR
static struct ast_frame * lintoilbc_frameout(struct ast_trans_pvt *pvt)
encode the temporary buffer and generate a frame
#define USE_ILBC_ENHANCER
Data structure associated with a single frame of data.
static int lintoilbc_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
store a frame into a temporary buffer, for later decoding
static int lintoilbc_new(struct ast_trans_pvt *pvt)
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
union ast_frame::@172 data
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.