mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 03:48:02 +00:00
merge new_loader_completion branch, including (at least):
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
# the GNU General Public License
|
||||
#
|
||||
|
||||
ifneq ($(wildcard ../menuselect.makeopts),)
|
||||
ifneq ($(wildcard $(ASTTOPDIR)/menuselect.makeopts),)
|
||||
include ../menuselect.makeopts
|
||||
include ../menuselect.makedeps
|
||||
endif
|
||||
@@ -19,22 +19,25 @@ endif
|
||||
C_MODS:=$(filter-out $(MENUSELECT_CODECS),$(patsubst %.c,%,$(wildcard codec_*.c)))
|
||||
CC_MODS:=$(filter-out $(MENUSELECT_CODECS),$(patsubst %.cc,%,$(wildcard codec_*.cc)))
|
||||
|
||||
SELECTED_MODS:=$(C_MODS) $(CC_MODS)
|
||||
LOADABLE_MODS:=$(C_MODS) $(CC_MODS)
|
||||
|
||||
ifneq ($(findstring codecs,$(MENUSELECT_EMBED)),)
|
||||
EMBEDDED_MODS:=$(LOADABLE_MODS)
|
||||
LOADABLE_MODS:=
|
||||
endif
|
||||
|
||||
LIBILBC:=ilbc/libilbc.a
|
||||
LIBLPC10:=lpc10/liblpc10.a
|
||||
|
||||
all: _all
|
||||
|
||||
ifeq ($(GSM_LIB),internal)
|
||||
GSM_INCLUDE:=-Igsm/inc
|
||||
GSM_LIB:=
|
||||
|
||||
codec_gsm.so: gsm/lib/libgsm.a
|
||||
endif
|
||||
|
||||
include $(ASTTOPDIR)/Makefile.moddir_rules
|
||||
|
||||
ifneq ($(GSM_INTERNAL),)
|
||||
GSM_INCLUDE:=-Igsm/inc
|
||||
$(codec_gsm): gsm/lib/libgsm.a
|
||||
endif
|
||||
|
||||
clean::
|
||||
$(MAKE) -C gsm clean
|
||||
$(MAKE) -C lpc10 clean
|
||||
@@ -42,14 +45,14 @@ clean::
|
||||
|
||||
gsm/lib/libgsm.a:
|
||||
@mkdir -p gsm/lib
|
||||
@CFLAGS="$(CFLAGS) -I." $(MAKE) -C gsm lib/libgsm.a
|
||||
@CFLAGS="$(OTHER_SUBDIR_CFLAGS) -I." $(MAKE) -C gsm lib/libgsm.a
|
||||
|
||||
$(LIBLPC10):
|
||||
@$(MAKE) -C lpc10 all
|
||||
@CFLAGS="$(OTHER_SUBDIR_CFLAGS)" $(MAKE) -C lpc10 all
|
||||
|
||||
codec_lpc10.so: $(LIBLPC10)
|
||||
$(codec_lpc10): $(LIBLPC10)
|
||||
|
||||
$(LIBILBC):
|
||||
@$(MAKE) -C ilbc all
|
||||
@CFLAGS="$(OTHER_SUBDIR_CFLAGS)" $(MAKE) -C ilbc all
|
||||
|
||||
codec_ilbc.so: $(LIBILBC)
|
||||
$(codec_ilbc): $(LIBILBC)
|
||||
|
||||
@@ -137,38 +137,32 @@ static struct ast_translator ulawtoalaw = {
|
||||
|
||||
/*! \brief standard module glue */
|
||||
|
||||
static int unload_module(void *mod)
|
||||
static int unload_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = ast_unregister_translator(&ulawtoalaw);
|
||||
res |= ast_unregister_translator(&alawtoulaw);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int load_module(void *mod)
|
||||
static int load_module(void)
|
||||
{
|
||||
int res;
|
||||
int x;
|
||||
|
||||
for (x=0;x<256;x++) {
|
||||
mu2a[x] = AST_LIN2A(AST_MULAW(x));
|
||||
a2mu[x] = AST_LIN2MU(AST_ALAW(x));
|
||||
}
|
||||
res = ast_register_translator(&alawtoulaw, mod);
|
||||
res = ast_register_translator(&alawtoulaw);
|
||||
if (!res)
|
||||
res = ast_register_translator(&ulawtoalaw, mod);
|
||||
res = ast_register_translator(&ulawtoalaw);
|
||||
else
|
||||
ast_unregister_translator(&alawtoulaw);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static const char *description(void)
|
||||
{
|
||||
return "A-law and Mulaw direct Coder/Decoder";
|
||||
}
|
||||
|
||||
static const char *key(void)
|
||||
{
|
||||
return ASTERISK_GPL_KEY;
|
||||
}
|
||||
|
||||
STD_MOD(MOD_1, NULL, NULL, NULL);
|
||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "A-law and Mulaw direct Coder/Decoder");
|
||||
|
||||
@@ -367,40 +367,38 @@ static void parse_config(void)
|
||||
}
|
||||
|
||||
/*! \brief standard module glue */
|
||||
static int reload(void *mod)
|
||||
static int reload(void)
|
||||
{
|
||||
parse_config();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int unload_module(void *mod)
|
||||
static int unload_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = ast_unregister_translator(&lintoadpcm);
|
||||
res |= ast_unregister_translator(&adpcmtolin);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int load_module(void *mod)
|
||||
static int load_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
parse_config();
|
||||
res = ast_register_translator(&adpcmtolin, mod);
|
||||
res = ast_register_translator(&adpcmtolin);
|
||||
if (!res)
|
||||
res = ast_register_translator(&lintoadpcm, mod);
|
||||
res = ast_register_translator(&lintoadpcm);
|
||||
else
|
||||
ast_unregister_translator(&adpcmtolin);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static const char *description(void)
|
||||
{
|
||||
return "Adaptive Differential PCM Coder/Decoder";
|
||||
}
|
||||
|
||||
static const char *key(void)
|
||||
{
|
||||
return ASTERISK_GPL_KEY;
|
||||
}
|
||||
|
||||
STD_MOD(MOD_1, reload, NULL, NULL);
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Adaptive Differential PCM Coder/Decoder",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.reload = reload,
|
||||
);
|
||||
|
||||
@@ -152,40 +152,38 @@ static void parse_config(void)
|
||||
|
||||
/*! \brief standard module stuff */
|
||||
|
||||
static int reload(void *mod)
|
||||
static int reload(void)
|
||||
{
|
||||
parse_config();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int unload_module(void *mod)
|
||||
static int unload_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = ast_unregister_translator(&lintoalaw);
|
||||
res |= ast_unregister_translator(&alawtolin);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int load_module(void *mod)
|
||||
static int load_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
parse_config();
|
||||
res = ast_register_translator(&alawtolin, mod);
|
||||
res = ast_register_translator(&alawtolin);
|
||||
if (!res)
|
||||
res = ast_register_translator(&lintoalaw, mod);
|
||||
res = ast_register_translator(&lintoalaw);
|
||||
else
|
||||
ast_unregister_translator(&alawtolin);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static const char *description(void)
|
||||
{
|
||||
return "A-law Coder/Decoder";
|
||||
}
|
||||
|
||||
static const char *key(void)
|
||||
{
|
||||
return ASTERISK_GPL_KEY;
|
||||
}
|
||||
|
||||
STD_MOD(MOD_1, reload, NULL, NULL);
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "A-law Coder/Decoder",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.reload = reload,
|
||||
);
|
||||
|
||||
@@ -912,14 +912,14 @@ static void parse_config(void)
|
||||
ast_config_destroy(cfg);
|
||||
}
|
||||
|
||||
static int reload(void *mod)
|
||||
static int reload(void)
|
||||
{
|
||||
parse_config();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int unload_module (void *mod)
|
||||
static int unload_module(void)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
@@ -935,35 +935,30 @@ static int unload_module (void *mod)
|
||||
return res;
|
||||
}
|
||||
|
||||
static int load_module (void *mod)
|
||||
static int load_module(void)
|
||||
{
|
||||
int res = 0;
|
||||
|
||||
|
||||
parse_config();
|
||||
|
||||
res |= ast_register_translator(&g726tolin, mod);
|
||||
res |= ast_register_translator(&lintog726, mod);
|
||||
res |= ast_register_translator(&g726tolin);
|
||||
res |= ast_register_translator(&lintog726);
|
||||
|
||||
res |= ast_register_translator(&g726aal2tolin, mod);
|
||||
res |= ast_register_translator(&lintog726aal2, mod);
|
||||
res |= ast_register_translator(&g726aal2tolin);
|
||||
res |= ast_register_translator(&lintog726aal2);
|
||||
|
||||
res |= ast_register_translator(&g726aal2tog726, mod);
|
||||
res |= ast_register_translator(&g726tog726aal2, mod);
|
||||
res |= ast_register_translator(&g726aal2tog726);
|
||||
res |= ast_register_translator(&g726tog726aal2);
|
||||
|
||||
if (res)
|
||||
unload_module(mod);
|
||||
unload_module();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static const char *description(void)
|
||||
{
|
||||
return "ITU G.726-32kbps G726 Transcoder";
|
||||
}
|
||||
|
||||
static const char *key(void)
|
||||
{
|
||||
return ASTERISK_GPL_KEY;
|
||||
}
|
||||
|
||||
STD_MOD(MOD_1, reload, NULL, NULL);
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "ITU G.726-32kbps G726 Transcoder",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.reload = reload,
|
||||
);
|
||||
|
||||
@@ -246,41 +246,39 @@ static void parse_config(void)
|
||||
}
|
||||
|
||||
/*! \brief standard module glue */
|
||||
static int reload(void *mod)
|
||||
static int reload(void)
|
||||
{
|
||||
parse_config();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int unload_module(void *mod)
|
||||
static int unload_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = ast_unregister_translator(&lintogsm);
|
||||
if (!res)
|
||||
res = ast_unregister_translator(&gsmtolin);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int load_module(void *mod)
|
||||
static int load_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
parse_config();
|
||||
res = ast_register_translator(&gsmtolin, mod);
|
||||
res = ast_register_translator(&gsmtolin);
|
||||
if (!res)
|
||||
res=ast_register_translator(&lintogsm, mod);
|
||||
res=ast_register_translator(&lintogsm);
|
||||
else
|
||||
ast_unregister_translator(&gsmtolin);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static const char *description(void)
|
||||
{
|
||||
return "GSM/PCM16 (signed linear) Codec Translator";
|
||||
}
|
||||
|
||||
static const char *key(void)
|
||||
{
|
||||
return ASTERISK_GPL_KEY;
|
||||
}
|
||||
|
||||
STD_MOD(MOD_1, reload, NULL, NULL);
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "GSM Coder/Decoder",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.reload = reload,
|
||||
);
|
||||
|
||||
@@ -58,8 +58,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#define ILBC_SAMPLES 240 /* 30ms at 8000 hz */
|
||||
#define BUFFER_SAMPLES 8000
|
||||
|
||||
static char *tdesc = "iLBC/PCM16 (signed linear) Codec Translator";
|
||||
|
||||
struct ilbc_coder_pvt {
|
||||
iLBC_Enc_Inst_t enc;
|
||||
iLBC_Dec_Inst_t dec;
|
||||
@@ -215,33 +213,27 @@ static struct ast_translator lintoilbc = {
|
||||
.buf_size = (BUFFER_SAMPLES * ILBC_FRAME_LEN + ILBC_SAMPLES - 1) / ILBC_SAMPLES,
|
||||
};
|
||||
|
||||
static int unload_module(void *mod)
|
||||
static int unload_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = ast_unregister_translator(&lintoilbc);
|
||||
res |= ast_unregister_translator(&ilbctolin);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int load_module(void *mod)
|
||||
static int load_module(void)
|
||||
{
|
||||
int res;
|
||||
res = ast_register_translator(&ilbctolin, mod);
|
||||
|
||||
res = ast_register_translator(&ilbctolin);
|
||||
if (!res)
|
||||
res=ast_register_translator(&lintoilbc, mod);
|
||||
res=ast_register_translator(&lintoilbc);
|
||||
else
|
||||
ast_unregister_translator(&ilbctolin);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static const char *description(void)
|
||||
{
|
||||
return tdesc;
|
||||
}
|
||||
|
||||
static const char *key(void)
|
||||
{
|
||||
return ASTERISK_GPL_KEY;
|
||||
}
|
||||
|
||||
STD_MOD(MOD_1, NULL, NULL, NULL);
|
||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "iLBC Coder/Decoder");
|
||||
|
||||
@@ -281,41 +281,40 @@ static void parse_config(void)
|
||||
ast_config_destroy(cfg);
|
||||
}
|
||||
|
||||
static int reload(void *mod)
|
||||
static int reload(void)
|
||||
{
|
||||
parse_config();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int unload_module(void *mod)
|
||||
static int unload_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = ast_unregister_translator(&lintolpc10);
|
||||
res |= ast_unregister_translator(&lpc10tolin);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int load_module(void *mod)
|
||||
static int load_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
parse_config();
|
||||
res=ast_register_translator(&lpc10tolin, mod);
|
||||
res=ast_register_translator(&lpc10tolin);
|
||||
if (!res)
|
||||
res=ast_register_translator(&lintolpc10, mod);
|
||||
res=ast_register_translator(&lintolpc10);
|
||||
else
|
||||
ast_unregister_translator(&lpc10tolin);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static const char *description(void)
|
||||
{
|
||||
return "LPC10 2.4kbps (signed linear) Voice Coder";
|
||||
}
|
||||
|
||||
static const char *key(void)
|
||||
{
|
||||
return ASTERISK_GPL_KEY;
|
||||
}
|
||||
|
||||
STD_MOD(MOD_1, reload, NULL, NULL);
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "LPC10 2.4kbps Coder/Decoder",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.reload = reload,
|
||||
);
|
||||
|
||||
@@ -479,49 +479,39 @@ static void parse_config(void)
|
||||
ast_config_destroy(cfg);
|
||||
}
|
||||
|
||||
static int reload(void *mod)
|
||||
static int reload(void)
|
||||
{
|
||||
/*
|
||||
* XXX reloading while there are active sessions is
|
||||
* somewhat silly because the old state presumably
|
||||
* wouldn't work anymore...
|
||||
* maybe we shuld do a standard hangup localusers ?
|
||||
*/
|
||||
ast_mutex_lock(&__mod_desc->lock);
|
||||
parse_config();
|
||||
ast_mutex_lock(&__mod_desc->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int unload_module(void *mod)
|
||||
static int unload_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = ast_unregister_translator(&lintospeex);
|
||||
res |= ast_unregister_translator(&speextolin);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int load_module(void *mod)
|
||||
static int load_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
parse_config();
|
||||
res=ast_register_translator(&speextolin, mod);
|
||||
res=ast_register_translator(&speextolin);
|
||||
if (!res)
|
||||
res=ast_register_translator(&lintospeex, mod);
|
||||
res=ast_register_translator(&lintospeex);
|
||||
else
|
||||
ast_unregister_translator(&speextolin);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static const char *description(void)
|
||||
{
|
||||
return "Speex/PCM16 (signed linear) Codec Translator";
|
||||
}
|
||||
|
||||
static const char *key(void)
|
||||
{
|
||||
return ASTERISK_GPL_KEY;
|
||||
}
|
||||
|
||||
STD_MOD(MOD_1, reload, NULL, NULL);
|
||||
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Speex Coder/Decoder",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.reload = reload,
|
||||
);
|
||||
|
||||
@@ -163,44 +163,39 @@ static void parse_config(void)
|
||||
ast_config_destroy(cfg);
|
||||
}
|
||||
|
||||
static int reload(void *mod)
|
||||
static int reload(void)
|
||||
{
|
||||
parse_config();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int unload_module(void *mod)
|
||||
static int unload_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
res = ast_unregister_translator(&lintoulaw);
|
||||
res |= ast_unregister_translator(&ulawtolin);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int load_module(void *mod)
|
||||
static int load_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
parse_config();
|
||||
res = ast_register_translator(&ulawtolin, mod);
|
||||
res = ast_register_translator(&ulawtolin);
|
||||
if (!res)
|
||||
res = ast_register_translator(&lintoulaw, mod);
|
||||
res = ast_register_translator(&lintoulaw);
|
||||
else
|
||||
ast_unregister_translator(&ulawtolin);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return a description of this module.
|
||||
*/
|
||||
|
||||
static const char *description(void)
|
||||
{
|
||||
return "Mu-law Coder/Decoder";
|
||||
}
|
||||
|
||||
static const char *key(void)
|
||||
{
|
||||
return ASTERISK_GPL_KEY;
|
||||
}
|
||||
|
||||
STD_MOD(MOD_1, reload, NULL, NULL);
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "mu-Law Coder/Decoder",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.reload = reload,
|
||||
);
|
||||
|
||||
@@ -222,7 +222,7 @@ static struct ast_frame *fakesrc_sample(void)
|
||||
return &f;
|
||||
}
|
||||
|
||||
static int register_translator(int dst, int src, void *mod)
|
||||
static int register_translator(int dst, int src)
|
||||
{
|
||||
struct translator *zt;
|
||||
int res;
|
||||
@@ -242,7 +242,7 @@ static int register_translator(int dst, int src, void *mod)
|
||||
zt->t.useplc = global_useplc;
|
||||
zt->t.buf_size = BUFFER_SAMPLES * 2;
|
||||
zt->t.desc_size = sizeof(struct pvt);
|
||||
if ((res = ast_register_translator(&zt->t, mod))) {
|
||||
if ((res = ast_register_translator(&zt->t))) {
|
||||
free(zt);
|
||||
return -1;
|
||||
}
|
||||
@@ -310,7 +310,7 @@ static void parse_config(void)
|
||||
ast_config_destroy(cfg);
|
||||
}
|
||||
|
||||
static void build_translators(void *mod, struct format_map *map, unsigned int dstfmts, unsigned int srcfmts)
|
||||
static void build_translators(struct format_map *map, unsigned int dstfmts, unsigned int srcfmts)
|
||||
{
|
||||
unsigned int src, dst;
|
||||
|
||||
@@ -325,13 +325,13 @@ static void build_translators(void *mod, struct format_map *map, unsigned int ds
|
||||
if (global_format_map.map[dst][src])
|
||||
continue;
|
||||
|
||||
if (!register_translator(dst, src, mod))
|
||||
if (!register_translator(dst, src))
|
||||
map->map[dst][src] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int find_transcoders(void *mod)
|
||||
static int find_transcoders(void)
|
||||
{
|
||||
struct zt_transcode_info info = { 0, };
|
||||
struct format_map map = { { { 0 } } };
|
||||
@@ -346,7 +346,7 @@ static int find_transcoders(void *mod)
|
||||
for (info.tcnum = 0; !(res = ioctl(fd, ZT_TRANSCODE_OP, &info)); info.tcnum++) {
|
||||
if (option_verbose > 1)
|
||||
ast_verbose(VERBOSE_PREFIX_2 "Found transcoder '%s'.\n", info.name);
|
||||
build_translators(mod, &map, info.dstfmts, info.srcfmts);
|
||||
build_translators(&map, info.dstfmts, info.srcfmts);
|
||||
}
|
||||
close(fd);
|
||||
|
||||
@@ -363,12 +363,12 @@ static int find_transcoders(void *mod)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int reload(void *mod)
|
||||
static int reload(void)
|
||||
{
|
||||
struct translator *cur;
|
||||
|
||||
parse_config();
|
||||
find_transcoders(mod);
|
||||
find_transcoders();
|
||||
|
||||
AST_LIST_LOCK(&translators);
|
||||
AST_LIST_TRAVERSE(&translators, cur, entry)
|
||||
@@ -378,29 +378,23 @@ static int reload(void *mod)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int unload_module(void *mod)
|
||||
static int unload_module(void)
|
||||
{
|
||||
unregister_translators();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int load_module(void *mod)
|
||||
static int load_module(void)
|
||||
{
|
||||
parse_config();
|
||||
find_transcoders(mod);
|
||||
find_transcoders();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const char *description(void)
|
||||
{
|
||||
return "Generic Zaptel Transcoder Codec Translator";
|
||||
}
|
||||
|
||||
static const char *key(void)
|
||||
{
|
||||
return ASTERISK_GPL_KEY;
|
||||
}
|
||||
|
||||
STD_MOD(MOD_1, reload, NULL, NULL);
|
||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Generic Zaptel Transcoder Codec Translator",
|
||||
.load = load_module,
|
||||
.unload = unload_module,
|
||||
.reload = reload,
|
||||
);
|
||||
|
||||
@@ -38,7 +38,7 @@ WAV49 = -DWAV49
|
||||
######### probably require gcc.
|
||||
|
||||
ifeq (, $(findstring $(OSARCH) , Darwin SunOS ))
|
||||
ifeq (, $(findstring $(PROC) , x86_64 amd64 ultrasparc sparc64 arm ppc ppc64 ia64 s390))
|
||||
ifeq (, $(findstring $(PROC) , x86_64 amd64 ultrasparc sparc64 arm ppc ppc64 ia64 s390 bfin ))
|
||||
ifeq (, $(findstring $(shell uname -m) , ppc ppc64 alpha armv4l s390 ))
|
||||
OPTIMIZE+=-march=$(PROC)
|
||||
endif
|
||||
@@ -210,7 +210,7 @@ GSM_SOURCES = $(SRC)/add.c \
|
||||
# XXX should merge with GSM_OBJECTS
|
||||
ifeq (${OSARCH},Linux)
|
||||
ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc s390 ))
|
||||
ifeq (,$(findstring ${PROC} , arm ia64 s390 ))
|
||||
ifeq (,$(findstring ${PROC} , arm ia64 s390 bfin ))
|
||||
GSM_SOURCES+= $(SRC)/k6opt.s
|
||||
endif
|
||||
endif
|
||||
@@ -262,7 +262,7 @@ GSM_OBJECTS = $(SRC)/add.o \
|
||||
|
||||
ifeq (${OSARCH},Linux)
|
||||
ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc ))
|
||||
ifeq (,$(findstring ${PROC} , arm ia64 ))
|
||||
ifeq (,$(findstring ${PROC} , arm ia64 bfin ))
|
||||
GSM_OBJECTS+= $(SRC)/k6opt.o
|
||||
endif
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user