aboutsummaryrefslogtreecommitdiffstats
path: root/codecs/codec_dahdi.c
diff options
context:
space:
mode:
Diffstat (limited to 'codecs/codec_dahdi.c')
-rw-r--r--codecs/codec_dahdi.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/codecs/codec_dahdi.c b/codecs/codec_dahdi.c
index 506c038e4..794f0f58c 100644
--- a/codecs/codec_dahdi.c
+++ b/codecs/codec_dahdi.c
@@ -56,8 +56,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#define G723_SAMPLES 240
#define G729_SAMPLES 160
-static unsigned int global_useplc = 0;
-
static struct channel_usage {
int total;
int encoders;
@@ -489,29 +487,14 @@ static int register_translator(int dst, int src)
if (is_encoder(zt)) {
zt->t.framein = dahdi_encoder_framein;
zt->t.frameout = dahdi_encoder_frameout;
-#if 0
- zt->t.buffer_samples = 0;
-#endif
} else {
zt->t.framein = dahdi_decoder_framein;
zt->t.frameout = dahdi_decoder_frameout;
-#if 0
- if (AST_FORMAT_G723_1 == zt->t.srcfmt) {
- zt->t.plc_samples = G723_SAMPLES;
- } else {
- zt->t.plc_samples = G729_SAMPLES;
- }
- zt->t.buffer_samples = zt->t.plc_samples * 8;
-#endif
}
zt->t.destroy = dahdi_destroy;
zt->t.buffer_samples = 0;
zt->t.newpvt = dahdi_new;
zt->t.sample = fakesrc_sample;
-#if 0
- zt->t.useplc = global_useplc;
-#endif
- zt->t.useplc = 0;
zt->t.native_plc = 0;
zt->t.desc_size = sizeof(struct codec_dahdi_pvt);
@@ -563,27 +546,6 @@ static void unregister_translators(void)
AST_LIST_UNLOCK(&translators);
}
-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")) {
- global_useplc = ast_true(var->value);
- ast_verb(3, "codec_dahdi: %susing generic PLC\n",
- global_useplc ? "" : "not ");
- }
- }
-
- ast_config_destroy(cfg);
- return 0;
-}
-
static void build_translators(struct format_map *map, unsigned int dstfmts, unsigned int srcfmts)
{
unsigned int src, dst;
@@ -660,14 +622,6 @@ static int reload(void)
{
struct translator *cur;
- if (parse_config(1))
- return AST_MODULE_LOAD_DECLINE;
-
- AST_LIST_LOCK(&translators);
- AST_LIST_TRAVERSE(&translators, cur, entry)
- cur->t.useplc = global_useplc;
- AST_LIST_UNLOCK(&translators);
-
return AST_MODULE_LOAD_SUCCESS;
}
@@ -682,8 +636,6 @@ static int unload_module(void)
static int load_module(void)
{
ast_ulaw_init();
- if (parse_config(0))
- return AST_MODULE_LOAD_DECLINE;
find_transcoders();
ast_cli_register_multiple(cli, ARRAY_LEN(cli));
return AST_MODULE_LOAD_SUCCESS;