#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 |
Defines | |
#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 | |
static struct ast_frame * | lintospeex_frameout (struct ast_trans_pvt *pvt) |
convert work buffer and produce output frame | |
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 | |
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 = "8586c2a7d357cb591cc3a6607a8f62d1" , .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 |
Definition in file codec_speex.c.
#define BUFFER_SAMPLES 8000 |
Definition at line 80 of file codec_speex.c.
#define SPEEX_SAMPLES 160 |
#define TYPE_HIGH 0x0 |
#define TYPE_LOW 0x1 |
#define TYPE_MASK 0x3 |
#define TYPE_SILENCE 0x2 |
static void __reg_module | ( | void | ) | [static] |
Definition at line 520 of file codec_speex.c.
static void __unreg_module | ( | void | ) | [static] |
Definition at line 520 of file codec_speex.c.
static int lin16tospeexwb_new | ( | struct ast_trans_pvt * | pvt | ) | [static] |
Definition at line 146 of file codec_speex.c.
References speex_encoder_construct().
00147 { 00148 return speex_encoder_construct(pvt, &speex_wb_mode, 16000); 00149 }
static void lintospeex_destroy | ( | struct ast_trans_pvt * | arg | ) | [static] |
Definition at line 320 of file codec_speex.c.
References speex_coder_pvt::bits, preproc, ast_trans_pvt::pvt, and speex_coder_pvt::speex.
00321 { 00322 struct speex_coder_pvt *pvt = arg->pvt; 00323 #ifdef _SPEEX_TYPES_H 00324 if (preproc) 00325 speex_preprocess_state_destroy(pvt->pp); 00326 #endif 00327 speex_encoder_destroy(pvt->speex); 00328 speex_bits_destroy(&pvt->bits); 00329 }
static int lintospeex_framein | ( | struct ast_trans_pvt * | pvt, | |
struct ast_frame * | f | |||
) | [static] |
store input frame in work buffer
Definition at line 234 of file codec_speex.c.
References speex_coder_pvt::buf, f, ast_trans_pvt::pvt, and ast_trans_pvt::samples.
00235 { 00236 struct speex_coder_pvt *tmp = pvt->pvt; 00237 00238 /* XXX We should look at how old the rest of our stream is, and if it 00239 is too old, then we should overwrite it entirely, otherwise we can 00240 get artifacts of earlier talk that do not belong */ 00241 memcpy(tmp->buf + pvt->samples, f->data.ptr, f->datalen); 00242 pvt->samples += f->samples; 00243 return 0; 00244 }
static struct ast_frame* lintospeex_frameout | ( | struct ast_trans_pvt * | pvt | ) | [static] |
convert work buffer and produce output frame
Definition at line 247 of file codec_speex.c.
References AST_FRAME_CNG, speex_coder_pvt::bits, speex_coder_pvt::buf, dtx, ast_trans_pvt::f, speex_coder_pvt::framesize, ast_frame::frametype, preproc, ast_trans_pvt::pvt, ast_frame::samples, ast_trans_pvt::samples, speex_coder_pvt::silent_state, and speex_coder_pvt::speex.
00248 { 00249 struct speex_coder_pvt *tmp = pvt->pvt; 00250 int is_speech=1; 00251 int datalen = 0; /* output bytes */ 00252 int samples = 0; /* output samples */ 00253 00254 /* We can't work on anything less than a frame in size */ 00255 if (pvt->samples < tmp->framesize) 00256 return NULL; 00257 speex_bits_reset(&tmp->bits); 00258 while (pvt->samples >= tmp->framesize) { 00259 #ifdef _SPEEX_TYPES_H 00260 /* Preprocess audio */ 00261 if (preproc) 00262 is_speech = speex_preprocess(tmp->pp, tmp->buf + samples, NULL); 00263 /* Encode a frame of data */ 00264 if (is_speech) { 00265 /* If DTX enabled speex_encode returns 0 during silence */ 00266 is_speech = speex_encode_int(tmp->speex, tmp->buf + samples, &tmp->bits) || !dtx; 00267 } else { 00268 /* 5 zeros interpreted by Speex as silence (submode 0) */ 00269 speex_bits_pack(&tmp->bits, 0, 5); 00270 } 00271 #else 00272 { 00273 float fbuf[1024]; 00274 int x; 00275 /* Convert to floating point */ 00276 for (x = 0; x < tmp->framesize; x++) 00277 fbuf[x] = tmp->buf[samples + x]; 00278 /* Encode a frame of data */ 00279 is_speech = speex_encode(tmp->speex, fbuf, &tmp->bits) || !dtx; 00280 } 00281 #endif 00282 samples += tmp->framesize; 00283 pvt->samples -= tmp->framesize; 00284 } 00285 00286 /* Move the data at the end of the buffer to the front */ 00287 if (pvt->samples) 00288 memmove(tmp->buf, tmp->buf + samples, pvt->samples * 2); 00289 00290 /* Use AST_FRAME_CNG to signify the start of any silence period */ 00291 if (is_speech) { 00292 tmp->silent_state = 0; 00293 } else { 00294 if (tmp->silent_state) { 00295 return NULL; 00296 } else { 00297 tmp->silent_state = 1; 00298 speex_bits_reset(&tmp->bits); 00299 memset(&pvt->f, 0, sizeof(pvt->f)); 00300 pvt->f.frametype = AST_FRAME_CNG; 00301 pvt->f.samples = samples; 00302 /* XXX what now ? format etc... */ 00303 } 00304 } 00305 00306 /* Terminate bit stream */ 00307 speex_bits_pack(&tmp->bits, 15, 5); 00308 datalen = speex_bits_write(&tmp->bits, pvt->outbuf.c, pvt->t->buf_size); 00309 return ast_trans_frameout(pvt, datalen, samples); 00310 }
static int lintospeex_new | ( | struct ast_trans_pvt * | pvt | ) | [static] |
Definition at line 141 of file codec_speex.c.
References speex_encoder_construct().
00142 { 00143 return speex_encoder_construct(pvt, &speex_nb_mode, 8000); 00144 }
static int load_module | ( | void | ) | [static] |
Definition at line 501 of file codec_speex.c.
References AST_MODULE_LOAD_DECLINE, ast_register_translator, lin16tospeexwb, lintospeex, parse_config(), speextolin, and speexwbtolin16.
00502 { 00503 int res = 0; 00504 00505 if (parse_config(0)) 00506 return AST_MODULE_LOAD_DECLINE; 00507 00508 res |= ast_register_translator(&speextolin); 00509 res |= ast_register_translator(&lintospeex); 00510 res |= ast_register_translator(&speexwbtolin16); 00511 res |= ast_register_translator(&lin16tospeexwb); 00512 00513 return res; 00514 }
static int parse_config | ( | int | reload | ) | [static] |
Definition at line 387 of file codec_speex.c.
References abr, ast_config_load, ast_log(), ast_true(), ast_variable_browse(), ast_verb, complexity, CONFIG_FLAG_FILEUNCHANGED, config_flags, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEMISSING, CONFIG_STATUS_FILEUNCHANGED, dtx, enhancement, LOG_ERROR, pp_agc, pp_agc_level, pp_denoise, pp_dereverb, pp_dereverb_decay, pp_dereverb_level, pp_vad, preproc, quality, vad, var, vbr, and vbr_quality.
Referenced by load_module(), and reload().
00388 { 00389 struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 }; 00390 struct ast_config *cfg = ast_config_load("codecs.conf", config_flags); 00391 struct ast_variable *var; 00392 int res; 00393 float res_f; 00394 00395 if (cfg == CONFIG_STATUS_FILEMISSING || cfg == CONFIG_STATUS_FILEUNCHANGED || cfg == CONFIG_STATUS_FILEINVALID) 00396 return 0; 00397 00398 for (var = ast_variable_browse(cfg, "speex"); var; var = var->next) { 00399 if (!strcasecmp(var->name, "quality")) { 00400 res = abs(atoi(var->value)); 00401 if (res > -1 && res < 11) { 00402 ast_verb(3, "CODEC SPEEX: Setting Quality to %d\n",res); 00403 quality = res; 00404 } else 00405 ast_log(LOG_ERROR,"Error Quality must be 0-10\n"); 00406 } else if (!strcasecmp(var->name, "complexity")) { 00407 res = abs(atoi(var->value)); 00408 if (res > -1 && res < 11) { 00409 ast_verb(3, "CODEC SPEEX: Setting Complexity to %d\n",res); 00410 complexity = res; 00411 } else 00412 ast_log(LOG_ERROR,"Error! Complexity must be 0-10\n"); 00413 } else if (!strcasecmp(var->name, "vbr_quality")) { 00414 if (sscanf(var->value, "%30f", &res_f) == 1 && res_f >= 0 && res_f <= 10) { 00415 ast_verb(3, "CODEC SPEEX: Setting VBR Quality to %f\n",res_f); 00416 vbr_quality = res_f; 00417 } else 00418 ast_log(LOG_ERROR,"Error! VBR Quality must be 0-10\n"); 00419 } else if (!strcasecmp(var->name, "abr_quality")) { 00420 ast_log(LOG_ERROR,"Error! ABR Quality setting obsolete, set ABR to desired bitrate\n"); 00421 } else if (!strcasecmp(var->name, "enhancement")) { 00422 enhancement = ast_true(var->value) ? 1 : 0; 00423 ast_verb(3, "CODEC SPEEX: Perceptual Enhancement Mode. [%s]\n",enhancement ? "on" : "off"); 00424 } else if (!strcasecmp(var->name, "vbr")) { 00425 vbr = ast_true(var->value) ? 1 : 0; 00426 ast_verb(3, "CODEC SPEEX: VBR Mode. [%s]\n",vbr ? "on" : "off"); 00427 } else if (!strcasecmp(var->name, "abr")) { 00428 res = abs(atoi(var->value)); 00429 if (res >= 0) { 00430 if (res > 0) 00431 ast_verb(3, "CODEC SPEEX: Setting ABR target bitrate to %d\n",res); 00432 else 00433 ast_verb(3, "CODEC SPEEX: Disabling ABR\n"); 00434 abr = res; 00435 } else 00436 ast_log(LOG_ERROR,"Error! ABR target bitrate must be >= 0\n"); 00437 } else if (!strcasecmp(var->name, "vad")) { 00438 vad = ast_true(var->value) ? 1 : 0; 00439 ast_verb(3, "CODEC SPEEX: VAD Mode. [%s]\n",vad ? "on" : "off"); 00440 } else if (!strcasecmp(var->name, "dtx")) { 00441 dtx = ast_true(var->value) ? 1 : 0; 00442 ast_verb(3, "CODEC SPEEX: DTX Mode. [%s]\n",dtx ? "on" : "off"); 00443 } else if (!strcasecmp(var->name, "preprocess")) { 00444 preproc = ast_true(var->value) ? 1 : 0; 00445 ast_verb(3, "CODEC SPEEX: Preprocessing. [%s]\n",preproc ? "on" : "off"); 00446 } else if (!strcasecmp(var->name, "pp_vad")) { 00447 pp_vad = ast_true(var->value) ? 1 : 0; 00448 ast_verb(3, "CODEC SPEEX: Preprocessor VAD. [%s]\n",pp_vad ? "on" : "off"); 00449 } else if (!strcasecmp(var->name, "pp_agc")) { 00450 pp_agc = ast_true(var->value) ? 1 : 0; 00451 ast_verb(3, "CODEC SPEEX: Preprocessor AGC. [%s]\n",pp_agc ? "on" : "off"); 00452 } else if (!strcasecmp(var->name, "pp_agc_level")) { 00453 if (sscanf(var->value, "%30f", &res_f) == 1 && res_f >= 0) { 00454 ast_verb(3, "CODEC SPEEX: Setting preprocessor AGC Level to %f\n",res_f); 00455 pp_agc_level = res_f; 00456 } else 00457 ast_log(LOG_ERROR,"Error! Preprocessor AGC Level must be >= 0\n"); 00458 } else if (!strcasecmp(var->name, "pp_denoise")) { 00459 pp_denoise = ast_true(var->value) ? 1 : 0; 00460 ast_verb(3, "CODEC SPEEX: Preprocessor Denoise. [%s]\n",pp_denoise ? "on" : "off"); 00461 } else if (!strcasecmp(var->name, "pp_dereverb")) { 00462 pp_dereverb = ast_true(var->value) ? 1 : 0; 00463 ast_verb(3, "CODEC SPEEX: Preprocessor Dereverb. [%s]\n",pp_dereverb ? "on" : "off"); 00464 } else if (!strcasecmp(var->name, "pp_dereverb_decay")) { 00465 if (sscanf(var->value, "%30f", &res_f) == 1 && res_f >= 0) { 00466 ast_verb(3, "CODEC SPEEX: Setting preprocessor Dereverb Decay to %f\n",res_f); 00467 pp_dereverb_decay = res_f; 00468 } else 00469 ast_log(LOG_ERROR,"Error! Preprocessor Dereverb Decay must be >= 0\n"); 00470 } else if (!strcasecmp(var->name, "pp_dereverb_level")) { 00471 if (sscanf(var->value, "%30f", &res_f) == 1 && res_f >= 0) { 00472 ast_verb(3, "CODEC SPEEX: Setting preprocessor Dereverb Level to %f\n",res_f); 00473 pp_dereverb_level = res_f; 00474 } else 00475 ast_log(LOG_ERROR,"Error! Preprocessor Dereverb Level must be >= 0\n"); 00476 } 00477 } 00478 ast_config_destroy(cfg); 00479 return 0; 00480 }
static int reload | ( | void | ) | [static] |
Definition at line 482 of file codec_speex.c.
References AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, and parse_config().
00483 { 00484 if (parse_config(1)) 00485 return AST_MODULE_LOAD_DECLINE; 00486 return AST_MODULE_LOAD_SUCCESS; 00487 }
static int speex_decoder_construct | ( | struct ast_trans_pvt * | pvt, | |
const SpeexMode * | profile | |||
) | [static] |
Definition at line 151 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().
00152 { 00153 struct speex_coder_pvt *tmp = pvt->pvt; 00154 00155 if (!(tmp->speex = speex_decoder_init(profile))) 00156 return -1; 00157 00158 speex_bits_init(&tmp->bits); 00159 speex_decoder_ctl(tmp->speex, SPEEX_GET_FRAME_SIZE, &tmp->framesize); 00160 if (enhancement) 00161 speex_decoder_ctl(tmp->speex, SPEEX_SET_ENH, &enhancement); 00162 00163 return 0; 00164 }
static int speex_encoder_construct | ( | struct ast_trans_pvt * | pvt, | |
const SpeexMode * | profile, | |||
int | sampling_rate | |||
) | [static] |
Definition at line 100 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().
00101 { 00102 struct speex_coder_pvt *tmp = pvt->pvt; 00103 00104 if (!(tmp->speex = speex_encoder_init(profile))) 00105 return -1; 00106 00107 speex_bits_init(&tmp->bits); 00108 speex_bits_reset(&tmp->bits); 00109 speex_encoder_ctl(tmp->speex, SPEEX_GET_FRAME_SIZE, &tmp->framesize); 00110 speex_encoder_ctl(tmp->speex, SPEEX_SET_COMPLEXITY, &complexity); 00111 #ifdef _SPEEX_TYPES_H 00112 if (preproc) { 00113 tmp->pp = speex_preprocess_state_init(tmp->framesize, sampling_rate); 00114 speex_preprocess_ctl(tmp->pp, SPEEX_PREPROCESS_SET_VAD, &pp_vad); 00115 speex_preprocess_ctl(tmp->pp, SPEEX_PREPROCESS_SET_AGC, &pp_agc); 00116 speex_preprocess_ctl(tmp->pp, SPEEX_PREPROCESS_SET_AGC_LEVEL, &pp_agc_level); 00117 speex_preprocess_ctl(tmp->pp, SPEEX_PREPROCESS_SET_DENOISE, &pp_denoise); 00118 speex_preprocess_ctl(tmp->pp, SPEEX_PREPROCESS_SET_DEREVERB, &pp_dereverb); 00119 speex_preprocess_ctl(tmp->pp, SPEEX_PREPROCESS_SET_DEREVERB_DECAY, &pp_dereverb_decay); 00120 speex_preprocess_ctl(tmp->pp, SPEEX_PREPROCESS_SET_DEREVERB_LEVEL, &pp_dereverb_level); 00121 } 00122 #endif 00123 if (!abr && !vbr) { 00124 speex_encoder_ctl(tmp->speex, SPEEX_SET_QUALITY, &quality); 00125 if (vad) 00126 speex_encoder_ctl(tmp->speex, SPEEX_SET_VAD, &vad); 00127 } 00128 if (vbr) { 00129 speex_encoder_ctl(tmp->speex, SPEEX_SET_VBR, &vbr); 00130 speex_encoder_ctl(tmp->speex, SPEEX_SET_VBR_QUALITY, &vbr_quality); 00131 } 00132 if (abr) 00133 speex_encoder_ctl(tmp->speex, SPEEX_SET_ABR, &abr); 00134 if (dtx) 00135 speex_encoder_ctl(tmp->speex, SPEEX_SET_DTX, &dtx); 00136 tmp->silent_state = 0; 00137 00138 return 0; 00139 }
static void speextolin_destroy | ( | struct ast_trans_pvt * | arg | ) | [static] |
Definition at line 312 of file codec_speex.c.
References speex_coder_pvt::bits, ast_trans_pvt::pvt, and speex_coder_pvt::speex.
00313 { 00314 struct speex_coder_pvt *pvt = arg->pvt; 00315 00316 speex_decoder_destroy(pvt->speex); 00317 speex_bits_destroy(&pvt->bits); 00318 }
static int speextolin_framein | ( | struct ast_trans_pvt * | pvt, | |
struct ast_frame * | f | |||
) | [static] |
convert and store into outbuf
Definition at line 177 of file codec_speex.c.
References ast_log(), speex_coder_pvt::bits, BUFFER_SAMPLES, ast_trans_pvt::datalen, f, speex_coder_pvt::framesize, ast_trans_pvt::i16, LOG_WARNING, ast_trans_pvt::outbuf, ast_trans_pvt::pvt, ast_trans_pvt::samples, and speex_coder_pvt::speex.
00178 { 00179 struct speex_coder_pvt *tmp = pvt->pvt; 00180 00181 /* Assuming there's space left, decode into the current buffer at 00182 the tail location. Read in as many frames as there are */ 00183 int x; 00184 int res; 00185 int16_t *dst = pvt->outbuf.i16; 00186 /* XXX fout is a temporary buffer, may have different types */ 00187 #ifdef _SPEEX_TYPES_H 00188 spx_int16_t fout[1024]; 00189 #else 00190 float fout[1024]; 00191 #endif 00192 00193 if (f->datalen == 0) { /* Native PLC interpolation */ 00194 if (pvt->samples + tmp->framesize > BUFFER_SAMPLES) { 00195 ast_log(LOG_WARNING, "Out of buffer space\n"); 00196 return -1; 00197 } 00198 #ifdef _SPEEX_TYPES_H 00199 speex_decode_int(tmp->speex, NULL, dst + pvt->samples); 00200 #else 00201 speex_decode(tmp->speex, NULL, fout); 00202 for (x=0;x<tmp->framesize;x++) { 00203 dst[pvt->samples + x] = (int16_t)fout[x]; 00204 } 00205 #endif 00206 pvt->samples += tmp->framesize; 00207 pvt->datalen += 2 * tmp->framesize; /* 2 bytes/sample */ 00208 return 0; 00209 } 00210 00211 /* Read in bits */ 00212 speex_bits_read_from(&tmp->bits, f->data.ptr, f->datalen); 00213 for (;;) { 00214 #ifdef _SPEEX_TYPES_H 00215 res = speex_decode_int(tmp->speex, &tmp->bits, fout); 00216 #else 00217 res = speex_decode(tmp->speex, &tmp->bits, fout); 00218 #endif 00219 if (res < 0) 00220 break; 00221 if (pvt->samples + tmp->framesize > BUFFER_SAMPLES) { 00222 ast_log(LOG_WARNING, "Out of buffer space\n"); 00223 return -1; 00224 } 00225 for (x = 0 ; x < tmp->framesize; x++) 00226 dst[pvt->samples + x] = (int16_t)fout[x]; 00227 pvt->samples += tmp->framesize; 00228 pvt->datalen += 2 * tmp->framesize; /* 2 bytes/sample */ 00229 } 00230 return 0; 00231 }
static int speextolin_new | ( | struct ast_trans_pvt * | pvt | ) | [static] |
Definition at line 166 of file codec_speex.c.
References speex_decoder_construct().
00167 { 00168 return speex_decoder_construct(pvt, &speex_nb_mode); 00169 }
static int speexwbtolin16_new | ( | struct ast_trans_pvt * | pvt | ) | [static] |
Definition at line 171 of file codec_speex.c.
References speex_decoder_construct().
00172 { 00173 return speex_decoder_construct(pvt, &speex_wb_mode); 00174 }
static int unload_module | ( | void | ) | [static] |
Definition at line 489 of file codec_speex.c.
References ast_unregister_translator(), lin16tospeexwb, lintospeex, speextolin, and speexwbtolin16.
00490 { 00491 int res = 0; 00492 00493 res |= ast_unregister_translator(&speextolin); 00494 res |= ast_unregister_translator(&lintospeex); 00495 res |= ast_unregister_translator(&speexwbtolin16); 00496 res |= ast_unregister_translator(&lin16tospeexwb); 00497 00498 return res; 00499 }
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 = "8586c2a7d357cb591cc3a6607a8f62d1" , .load = load_module, .unload = unload_module, .reload = reload, } [static] |
Definition at line 520 of file codec_speex.c.
int abr = 0 [static] |
struct ast_module_info* ast_module_info = &__mod_info [static] |
Definition at line 520 of file codec_speex.c.
int complexity = 2 [static] |
int dtx = 0 [static] |
Definition at line 64 of file codec_speex.c.
Referenced by lintospeex_frameout(), and parse_config().
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] |
Definition at line 66 of file codec_speex.c.
Referenced by lintospeex_destroy(), lintospeex_frameout(), and parse_config().
int quality = 3 [static] |
Definition at line 57 of file codec_speex.c.
Referenced by ast_rtp_instance_set_stats_vars(), handle_request_bye(), parse_config(), and sip_hangup().
struct ast_translator speextolin [static] |
struct ast_translator speexwbtolin16 [static] |
int vad = 0 [static] |
int vbr = 0 [static] |
float vbr_quality = 4 [static] |