Translate between signed linear and Internet Low Bitrate Codec. More...
#include "asterisk.h"
#include "asterisk/translate.h"
#include "asterisk/module.h"
#include "asterisk/utils.h"
#include "ilbc/iLBC_encode.h"
#include "ilbc/iLBC_decode.h"
#include "asterisk/slin.h"
#include "ex_ilbc.h"
Go to the source code of this file.
Data Structures | |
struct | ilbc_coder_pvt |
Macros | |
#define | BUFFER_SAMPLES 8000 |
#define | ILBC_FRAME_LEN 50 /* apparently... */ |
#define | ILBC_MS 30 |
#define | ILBC_SAMPLES 240 /* 30ms at 8000 hz */ |
#define | USE_ILBC_ENHANCER 0 |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | ilbctolin_framein (struct ast_trans_pvt *pvt, struct ast_frame *f) |
decode a frame and store in outbuf More... | |
static int | ilbctolin_new (struct ast_trans_pvt *pvt) |
static int | lintoilbc_framein (struct ast_trans_pvt *pvt, struct ast_frame *f) |
store a frame into a temporary buffer, for later decoding More... | |
static struct ast_frame * | lintoilbc_frameout (struct ast_trans_pvt *pvt) |
encode the temporary buffer and generate a frame More... | |
static int | lintoilbc_new (struct ast_trans_pvt *pvt) |
static int | load_module (void) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "iLBC 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 = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, } |
static struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_translator | ilbctolin |
static struct ast_translator | lintoilbc |
Translate between signed linear and Internet Low Bitrate Codec.
Definition in file codec_ilbc.c.
#define BUFFER_SAMPLES 8000 |
Definition at line 49 of file codec_ilbc.c.
Referenced by ilbctolin_framein().
#define ILBC_FRAME_LEN 50 /* apparently... */ |
Definition at line 47 of file codec_ilbc.c.
Referenced by ilbctolin_framein(), and lintoilbc_frameout().
#define ILBC_MS 30 |
Definition at line 44 of file codec_ilbc.c.
Referenced by ilbctolin_new(), and lintoilbc_new().
#define ILBC_SAMPLES 240 /* 30ms at 8000 hz */ |
Definition at line 48 of file codec_ilbc.c.
Referenced by ilbc_sample(), ilbctolin_framein(), and lintoilbc_frameout().
#define USE_ILBC_ENHANCER 0 |
Definition at line 43 of file codec_ilbc.c.
Referenced by ilbctolin_new().
|
static |
Definition at line 217 of file codec_ilbc.c.
|
static |
Definition at line 217 of file codec_ilbc.c.
|
static |
decode a frame and store in outbuf
Definition at line 81 of file codec_ilbc.c.
References ast_log(), BUFFER_SAMPLES, ast_frame::data, ast_trans_pvt::datalen, ast_frame::datalen, ilbc_coder_pvt::dec, ast_trans_pvt::i16, ILBC_FRAME_LEN, ILBC_SAMPLES, LOG_DEBUG, LOG_WARNING, ast_trans_pvt::outbuf, ast_frame::ptr, ast_trans_pvt::pvt, ast_trans_pvt::samples, ast_frame::samples, and ast_frame::src.
|
static |
Definition at line 71 of file codec_ilbc.c.
References ilbc_coder_pvt::dec, ILBC_MS, ast_trans_pvt::pvt, and USE_ILBC_ENHANCER.
|
static |
store a frame into a temporary buffer, for later decoding
Definition at line 125 of file codec_ilbc.c.
References ilbc_coder_pvt::buf, ast_frame::data, ast_frame::datalen, ast_frame::ptr, ast_trans_pvt::pvt, ast_trans_pvt::samples, and ast_frame::samples.
|
static |
encode the temporary buffer and generate a frame
Definition at line 139 of file codec_ilbc.c.
References ast_trans_frameout(), ilbc_coder_pvt::buf, ilbc_coder_pvt::enc, ILBC_FRAME_LEN, ILBC_SAMPLES, ast_trans_pvt::outbuf, ast_trans_pvt::pvt, ast_trans_pvt::samples, and ast_trans_pvt::uc.
|
static |
Definition at line 62 of file codec_ilbc.c.
References ilbc_coder_pvt::enc, ILBC_MS, and ast_trans_pvt::pvt.
|
static |
Definition at line 203 of file codec_ilbc.c.
References AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_SUCCESS, ast_register_translator, and ast_unregister_translator().
|
static |
Definition at line 193 of file codec_ilbc.c.
References ast_unregister_translator().
|
static |
Definition at line 217 of file codec_ilbc.c.
|
static |
Definition at line 217 of file codec_ilbc.c.
|
static |
Definition at line 169 of file codec_ilbc.c.
|
static |
Definition at line 181 of file codec_ilbc.c.