Translate between signed linear and Speex (Open Codec) More...
#include "asterisk.h"
#include <speex/speex.h>
#include "asterisk/translate.h"
#include "asterisk/module.h"
#include "asterisk/config.h"
#include "asterisk/utils.h"
#include "asterisk/slin.h"
#include "ex_speex.h"
Go to the source code of this file.
Data Structures | |
struct | speex_coder_pvt |
Macros | |
#define | BUFFER_SAMPLES 8000 |
#define | SPEEX_SAMPLES 160 |
#define | TYPE_HIGH 0x0 |
#define | TYPE_LOW 0x1 |
#define | TYPE_MASK 0x3 |
#define | TYPE_SILENCE 0x2 |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | lin16tospeexwb_new (struct ast_trans_pvt *pvt) |
static void | lintospeex_destroy (struct ast_trans_pvt *arg) |
static int | lintospeex_framein (struct ast_trans_pvt *pvt, struct ast_frame *f) |
store input frame in work buffer More... | |
static struct ast_frame * | lintospeex_frameout (struct ast_trans_pvt *pvt) |
convert work buffer and produce output frame More... | |
static int | lintospeex_new (struct ast_trans_pvt *pvt) |
static int | load_module (void) |
static int | parse_config (int reload) |
static int | reload (void) |
static int | speex_decoder_construct (struct ast_trans_pvt *pvt, const SpeexMode *profile) |
static int | speex_encoder_construct (struct ast_trans_pvt *pvt, const SpeexMode *profile, int sampling_rate) |
static void | speextolin_destroy (struct ast_trans_pvt *arg) |
static int | speextolin_framein (struct ast_trans_pvt *pvt, struct ast_frame *f) |
convert and store into outbuf More... | |
static int | speextolin_new (struct ast_trans_pvt *pvt) |
static int | speexwbtolin16_new (struct ast_trans_pvt *pvt) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "Speex 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, .reload = reload, } |
static int | abr = 0 |
static struct ast_module_info * | ast_module_info = &__mod_info |
static int | complexity = 2 |
static int | dtx = 0 |
static int | enhancement = 0 |
static struct ast_translator | lin16tospeexwb |
static struct ast_translator | lintospeex |
static int | pp_agc = 0 |
static float | pp_agc_level = 8000 |
static int | pp_denoise = 0 |
static int | pp_dereverb = 0 |
static float | pp_dereverb_decay = 0.4 |
static float | pp_dereverb_level = 0.3 |
static int | pp_vad = 0 |
static int | preproc = 0 |
static int | quality = 3 |
static struct ast_translator | speextolin |
static struct ast_translator | speexwbtolin16 |
static int | vad = 0 |
static int | vbr = 0 |
static float | vbr_quality = 4 |
Translate between signed linear and Speex (Open Codec)
Definition in file codec_speex.c.
#define BUFFER_SAMPLES 8000 |
Definition at line 81 of file codec_speex.c.
Referenced by speextolin_framein().
#define SPEEX_SAMPLES 160 |
Definition at line 82 of file codec_speex.c.
Referenced by speex16_sample(), and speex_sample().
#define TYPE_HIGH 0x0 |
Definition at line 77 of file codec_speex.c.
#define TYPE_LOW 0x1 |
Definition at line 78 of file codec_speex.c.
#define TYPE_MASK 0x3 |
Definition at line 79 of file codec_speex.c.
#define TYPE_SILENCE 0x2 |
Definition at line 76 of file codec_speex.c.
|
static |
Definition at line 521 of file codec_speex.c.
|
static |
Definition at line 521 of file codec_speex.c.
|
static |
Definition at line 147 of file codec_speex.c.
References speex_encoder_construct().
|
static |
Definition at line 321 of file codec_speex.c.
References speex_coder_pvt::bits, ast_trans_pvt::pvt, and speex_coder_pvt::speex.
|
static |
store input frame in work buffer
Definition at line 235 of file codec_speex.c.
References speex_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 |
convert work buffer and produce output frame
Definition at line 248 of file codec_speex.c.
References AST_FRAME_CNG, ast_trans_frameout(), speex_coder_pvt::bits, speex_coder_pvt::buf, ast_translator::buf_size, ast_trans_pvt::c, dtx, ast_trans_pvt::f, speex_coder_pvt::framesize, ast_frame::frametype, ast_trans_pvt::outbuf, ast_trans_pvt::pvt, ast_trans_pvt::samples, ast_frame::samples, speex_coder_pvt::silent_state, speex_coder_pvt::speex, and ast_trans_pvt::t.
|
static |
Definition at line 142 of file codec_speex.c.
References speex_encoder_construct().
|
static |
Definition at line 502 of file codec_speex.c.
References AST_MODULE_LOAD_DECLINE, ast_register_translator, and parse_config().
|
static |
Definition at line 388 of file codec_speex.c.
References ast_config_destroy(), ast_config_load, ast_log(), ast_true(), ast_variable_browse(), ast_verb, CONFIG_FLAG_FILEUNCHANGED, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEMISSING, CONFIG_STATUS_FILEUNCHANGED, LOG_ERROR, ast_variable::name, ast_variable::next, ast_variable::value, and var.
Referenced by load_module(), and reload().
|
static |
Definition at line 483 of file codec_speex.c.
References AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, and parse_config().
|
static |
Definition at line 152 of file codec_speex.c.
References speex_coder_pvt::bits, speex_coder_pvt::framesize, ast_trans_pvt::pvt, and speex_coder_pvt::speex.
Referenced by speextolin_new(), and speexwbtolin16_new().
|
static |
Definition at line 101 of file codec_speex.c.
References speex_coder_pvt::bits, speex_coder_pvt::framesize, ast_trans_pvt::pvt, speex_coder_pvt::silent_state, and speex_coder_pvt::speex.
Referenced by lin16tospeexwb_new(), and lintospeex_new().
|
static |
Definition at line 313 of file codec_speex.c.
References speex_coder_pvt::bits, ast_trans_pvt::pvt, and speex_coder_pvt::speex.
|
static |
convert and store into outbuf
Definition at line 178 of file codec_speex.c.
References ast_log(), speex_coder_pvt::bits, BUFFER_SAMPLES, ast_frame::data, ast_trans_pvt::datalen, ast_frame::datalen, speex_coder_pvt::framesize, ast_trans_pvt::i16, LOG_WARNING, ast_trans_pvt::outbuf, ast_frame::ptr, ast_trans_pvt::pvt, ast_trans_pvt::samples, and speex_coder_pvt::speex.
|
static |
Definition at line 167 of file codec_speex.c.
References speex_decoder_construct().
|
static |
Definition at line 172 of file codec_speex.c.
References speex_decoder_construct().
|
static |
Definition at line 490 of file codec_speex.c.
References ast_unregister_translator().
|
static |
Definition at line 521 of file codec_speex.c.
|
static |
Definition at line 64 of file codec_speex.c.
|
static |
Definition at line 521 of file codec_speex.c.
|
static |
Definition at line 59 of file codec_speex.c.
|
static |
Definition at line 65 of file codec_speex.c.
Referenced by lintospeex_frameout().
|
static |
Definition at line 60 of file codec_speex.c.
|
static |
Definition at line 374 of file codec_speex.c.
|
static |
Definition at line 346 of file codec_speex.c.
|
static |
Definition at line 69 of file codec_speex.c.
|
static |
Definition at line 70 of file codec_speex.c.
|
static |
Definition at line 71 of file codec_speex.c.
|
static |
Definition at line 72 of file codec_speex.c.
|
static |
Definition at line 73 of file codec_speex.c.
|
static |
Definition at line 74 of file codec_speex.c.
|
static |
Definition at line 68 of file codec_speex.c.
|
static |
Definition at line 67 of file codec_speex.c.
|
static |
Definition at line 58 of file codec_speex.c.
Referenced by ast_rtp_instance_set_stats_vars(), handle_request_bye(), and sip_hangup().
|
static |
Definition at line 332 of file codec_speex.c.
|
static |
Definition at line 360 of file codec_speex.c.
|
static |
Definition at line 61 of file codec_speex.c.
|
static |
Definition at line 62 of file codec_speex.c.
|
static |
Definition at line 63 of file codec_speex.c.