diff options
author | Mark Michelson <mmichelson@digium.com> | 2010-06-03 17:09:11 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2010-06-03 17:09:11 +0000 |
commit | a68f5b96bcb1a975bec2014191faf67de7a73441 (patch) | |
tree | 1f2066e925b5c8961f31cf4d7310f0e628845827 /codecs/codec_lpc10.c | |
parent | d1aacea4e3bec1e3eaa2ebd5938e7908724df763 (diff) |
Remove unnecessary code relating to PLC.
The logic for handling generic PLC is now handled in ast_write in
channel.c instead of in translation code.
Review: https://reviewboard.asterisk.org/r/683/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@267492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'codecs/codec_lpc10.c')
-rw-r--r-- | codecs/codec_lpc10.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/codecs/codec_lpc10.c b/codecs/codec_lpc10.c index 33ccbb241..d61729c95 100644 --- a/codecs/codec_lpc10.c +++ b/codecs/codec_lpc10.c @@ -201,7 +201,6 @@ static struct ast_translator lpc10tolin = { .sample = lpc10_sample, .desc_size = sizeof(struct lpc10_coder_pvt), .buffer_samples = BUFFER_SAMPLES, - .plc_samples = LPC10_SAMPLES_PER_FRAME, .buf_size = BUFFER_SAMPLES * 2, }; @@ -219,28 +218,8 @@ static struct ast_translator lintolpc10 = { .buf_size = LPC10_BYTES_IN_COMPRESSED_FRAME * (1 + BUFFER_SAMPLES / LPC10_SAMPLES_PER_FRAME), }; -static int parse_config(int reload) -{ - struct ast_variable *var; - struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 }; - struct ast_config *cfg = ast_config_load("codecs.conf", config_flags); - if (cfg == CONFIG_STATUS_FILEMISSING || cfg == CONFIG_STATUS_FILEUNCHANGED || cfg == CONFIG_STATUS_FILEINVALID) - return 0; - for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) { - if (!strcasecmp(var->name, "genericplc")) { - lpc10tolin.useplc = ast_true(var->value) ? 1 : 0; - ast_verb(3, "codec_lpc10: %susing generic PLC\n", - lpc10tolin.useplc ? "" : "not "); - } - } - ast_config_destroy(cfg); - return 0; -} - static int reload(void) { - if (parse_config(1)) - return AST_MODULE_LOAD_DECLINE; return AST_MODULE_LOAD_SUCCESS; } @@ -259,8 +238,6 @@ static int load_module(void) { int res; - if (parse_config(0)) - return AST_MODULE_LOAD_DECLINE; res = ast_register_translator(&lpc10tolin); if (!res) res = ast_register_translator(&lintolpc10); |