Asterisk - The Open Source Telephony Project
18.5.0
|
Translate between signed linear and Global System for Mobile Communications (GSM) More...
#include "asterisk.h"
#include "asterisk/translate.h"
#include "asterisk/config.h"
#include "asterisk/module.h"
#include "asterisk/utils.h"
#include "asterisk/linkedlists.h"
#include "gsm.h"
#include "../formats/msgsm.h"
#include "asterisk/slin.h"
#include "ex_gsm.h"
Go to the source code of this file.
Data Structures | |
struct | gsm_translator_pvt |
Macros | |
#define | BUFFER_SAMPLES 8000 |
#define | GSM_FRAME_LEN 33 |
#define | GSM_SAMPLES 160 |
#define | MSGSM_FRAME_LEN 65 |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static void | gsm_destroy_stuff (struct ast_trans_pvt *pvt) |
static int | gsm_new (struct ast_trans_pvt *pvt) |
static int | gsmtolin_framein (struct ast_trans_pvt *pvt, struct ast_frame *f) |
decode and store in outbuf. More... | |
static int | lintogsm_framein (struct ast_trans_pvt *pvt, struct ast_frame *f) |
store samples into working buffer for later decode More... | |
static struct ast_frame * | lintogsm_frameout (struct ast_trans_pvt *pvt) |
encode and produce a frame More... | |
static int | load_module (void) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "GSM Coder/Decoder" , .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" , .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_translator | gsmtolin |
static struct ast_translator | lintogsm |
Translate between signed linear and Global System for Mobile Communications (GSM)
Definition in file codec_gsm.c.
#define BUFFER_SAMPLES 8000 |
Definition at line 50 of file codec_gsm.c.
Referenced by gsmtolin_framein(), and lintogsm_framein().
#define GSM_FRAME_LEN 33 |
Definition at line 52 of file codec_gsm.c.
Referenced by gsmtolin_framein(), and lintogsm_frameout().
#define GSM_SAMPLES 160 |
Definition at line 51 of file codec_gsm.c.
Referenced by gsm_sample(), gsmtolin_framein(), and lintogsm_frameout().
#define MSGSM_FRAME_LEN 65 |
Definition at line 53 of file codec_gsm.c.
Referenced by gsmtolin_framein().
|
static |
Definition at line 252 of file codec_gsm.c.
|
static |
Definition at line 252 of file codec_gsm.c.
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 252 of file codec_gsm.c.
|
static |
Definition at line 172 of file codec_gsm.c.
References gsm_translator_pvt::gsm, ast_trans_pvt::pvt, and tmp().
|
static |
Definition at line 64 of file codec_gsm.c.
References gsm_translator_pvt::gsm, ast_trans_pvt::pvt, and tmp().
|
static |
decode and store in outbuf.
Definition at line 72 of file codec_gsm.c.
References ast_log, BUFFER_SAMPLES, conv65(), ast_frame::data, ast_frame::datalen, ast_trans_pvt::datalen, gsm_translator_pvt::gsm, GSM_FRAME_LEN, GSM_SAMPLES, ast_trans_pvt::i16, len(), LOG_WARNING, MSGSM_FRAME_LEN, ast_trans_pvt::outbuf, ast_frame::ptr, ast_trans_pvt::pvt, ast_trans_pvt::samples, and tmp().
|
static |
store samples into working buffer for later decode
Definition at line 121 of file codec_gsm.c.
References ast_log, gsm_translator_pvt::buf, BUFFER_SAMPLES, ast_frame::data, ast_frame::datalen, LOG_WARNING, ast_frame::ptr, ast_trans_pvt::pvt, ast_frame::samples, ast_trans_pvt::samples, and tmp().
|
static |
encode and produce a frame
Definition at line 138 of file codec_gsm.c.
References AST_LIST_NEXT, ast_trans_frameout(), gsm_translator_pvt::buf, ast_trans_pvt::c, gsm_translator_pvt::gsm, GSM_FRAME_LEN, GSM_SAMPLES, last, NULL, ast_trans_pvt::outbuf, ast_trans_pvt::pvt, result, ast_frame::samples, ast_trans_pvt::samples, and tmp().
|
static |
Definition at line 233 of file codec_gsm.c.
References AST_MODFLAG_DEFAULT, AST_MODULE_INFO(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, AST_MODULE_SUPPORT_CORE, ast_register_translator, ASTERISK_GPL_KEY, and unload_module().
|
static |
Definition at line 223 of file codec_gsm.c.
References ast_unregister_translator().
Referenced by load_module().
|
static |
Definition at line 252 of file codec_gsm.c.
|
static |
Definition at line 252 of file codec_gsm.c.
|
static |
Definition at line 179 of file codec_gsm.c.
|
static |
Definition at line 201 of file codec_gsm.c.