44#elif defined(HAVE_GSM_GSM_HEADER)
48#include "../formats/msgsm.h"
50#define BUFFER_SAMPLES 8000
51#define GSM_SAMPLES 160
52#define GSM_FRAME_LEN 33
53#define MSGSM_FRAME_LEN 65
68 return (
tmp->gsm = gsm_create()) ? 0 : -1;
81 for (x=0; x < f->
datalen; x += flen) {
102 if (gsm_decode(
tmp->gsm, src, dst + pvt->
samples)) {
176 gsm_destroy(
tmp->gsm);
struct sla_ringing_trunk * last
Asterisk main include file. File version handling, generic pbx functions.
static int gsm_new(struct ast_trans_pvt *pvt)
static struct ast_translator lintogsm
static int lintogsm_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
store samples into working buffer for later decode
static struct ast_translator gsmtolin
static int gsmtolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
decode and store in outbuf.
static int load_module(void)
static int unload_module(void)
static void gsm_destroy_stuff(struct ast_trans_pvt *pvt)
static struct ast_frame * lintogsm_frameout(struct ast_trans_pvt *pvt)
encode and produce a frame
static struct ast_frame * gsm_sample(void)
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
Configuration File Parser.
A set of macros to manage forward-linked lists.
#define AST_LIST_NEXT(elm, field)
Returns the next entry in the list after the given entry.
Asterisk module definitions.
#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)
@ AST_MODULE_SUPPORT_CORE
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_SUCCESS
@ AST_MODULE_LOAD_DECLINE
Module has failed to load, may be in an inconsistent state.
static void conv65(wav_byte *c, gsm_byte *d)
static struct ast_frame * slin8_sample(void)
Data structure associated with a single frame of data.
union ast_frame::@226 data
Default structure for translators, with the basic fields and buffers, all allocated as part of the sa...
int datalen
actual space used in outbuf
union ast_trans_pvt::@287 outbuf
Descriptor of a translator.
int16_t buf[BUFFER_SAMPLES]
Support for translation of data formats. translate.c.
#define ast_register_translator(t)
See __ast_register_translator()
int ast_unregister_translator(struct ast_translator *t)
Unregister a translator Unregisters the given translator.
struct ast_frame * ast_trans_frameout(struct ast_trans_pvt *pvt, int datalen, int samples)
generic frameout function