removed libbnec dependencies.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39864 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
29b4ce09b7
commit
e8972b947d
|
@ -47,11 +47,6 @@ ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/mISDNuser/mISDNlib.h),)
|
|||
C_MODS:=$(filter-out chan_misdn,$(C_MODS))
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libbnec.so),)
|
||||
EC_CFLAGS=-DWITH_BEROEC
|
||||
EC_LIBS=-lbnec
|
||||
endif
|
||||
|
||||
ifndef OPENH323DIR
|
||||
OPENH323DIR=$(HOME)/openh323
|
||||
endif
|
||||
|
@ -99,9 +94,9 @@ endif
|
|||
misdn/chan_misdn_lib.a:
|
||||
make -C misdn
|
||||
|
||||
chan_misdn.o: CFLAGS+=-Imisdn -DCHAN_MISDN_VERSION=\"0.3.0\" $(EC_CFLAGS)
|
||||
chan_misdn.o: CFLAGS+=-Imisdn -DCHAN_MISDN_VERSION=\"0.3.0\"
|
||||
|
||||
misdn_config.o: CFLAGS+=-Imisdn -DCHAN_MISDN_VERSION=\"0.3.0\" $(EC_CFLAGS)
|
||||
misdn_config.o: CFLAGS+=-Imisdn -DCHAN_MISDN_VERSION=\"0.3.0\"
|
||||
|
||||
chan_misdn.so: chan_misdn.o misdn_config.o misdn/chan_misdn_lib.a
|
||||
chan_misdn.so: LIBS+=-lisdnnet -lmISDN -lsuppserv $(EC_LIBS)
|
||||
chan_misdn.so: LIBS+=-lisdnnet -lmISDN -lsuppserv
|
||||
|
|
|
@ -957,13 +957,6 @@ static void print_bc_info (int fd, struct chan_list* help, struct misdn_bchannel
|
|||
" --> state: %s\n"
|
||||
" --> capability: %s\n"
|
||||
" --> echo_cancel: %d\n"
|
||||
#ifdef WITH_BEROEC
|
||||
" --> bnec_tail: %d\n"
|
||||
" --> bnec_nlp: %d\n"
|
||||
" --> bnec_ah: %d\n"
|
||||
" --> bnec_td: %d\n"
|
||||
" --> bnec_zerocoeff: %d\n"
|
||||
#endif
|
||||
" --> notone : rx %d tx:%d\n"
|
||||
" --> bc_hold: %d holded_bc :%d\n",
|
||||
help->ast->name,
|
||||
|
@ -978,13 +971,6 @@ static void print_bc_info (int fd, struct chan_list* help, struct misdn_bchannel
|
|||
bearer2str(bc->capability),
|
||||
bc->ec_enable,
|
||||
|
||||
#ifdef WITH_BEROEC
|
||||
bc->bnec_tail,
|
||||
bc->bnec_nlp,
|
||||
bc->bnec_ah,
|
||||
bc->bnec_td,
|
||||
bc->bnec_zero,
|
||||
#endif
|
||||
help->norxtone,help->notxtone,
|
||||
bc->holded, help->holded_bc?1:0
|
||||
);
|
||||
|
@ -1663,19 +1649,6 @@ static int update_ec_config(struct misdn_bchannel *bc)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_BEROEC
|
||||
misdn_cfg_get(port, MISDN_CFG_BNECHOCANCEL,&bc->bnec_tail, sizeof(int));
|
||||
misdn_cfg_get(port, MISDN_CFG_BNEC_ANTIHOWL, &bc->bnec_ah, sizeof(int));
|
||||
misdn_cfg_get(port, MISDN_CFG_BNEC_NLP, &bc->bnec_nlp, sizeof(int));
|
||||
misdn_cfg_get(port, MISDN_CFG_BNEC_TD, &bc->bnec_td, sizeof(int));
|
||||
misdn_cfg_get(port, MISDN_CFG_BNEC_ADAPT, &bc->bnec_adapt, sizeof(int));
|
||||
misdn_cfg_get(port, MISDN_CFG_BNEC_ZEROCOEFF, &bc->bnec_zero, sizeof(int));
|
||||
|
||||
if (bc->bnec_tail && bc->ec_enable) {
|
||||
ast_log(LOG_WARNING,"Are you sure you wan't to mix BNEC with Zapec ? This might cause bad audio quality!\n");
|
||||
bc->ec_enable=0;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -4914,10 +4887,6 @@ static int misdn_set_opt_exec(struct ast_channel *chan, void *data)
|
|||
if (neglect) {
|
||||
chan_misdn_log(1, ch->bc->port, " --> disabled\n");
|
||||
ch->bc->ec_enable=0;
|
||||
|
||||
#ifdef WITH_BEROEC
|
||||
ch->bc->bnec_tail=0;
|
||||
#endif
|
||||
} else {
|
||||
ch->bc->ec_enable=1;
|
||||
ch->bc->orig=ch->orginator;
|
||||
|
|
|
@ -13,11 +13,6 @@ SOURCES = isdn_lib.c isdn_msg_parser.c
|
|||
OBJDIR = .
|
||||
OBJS = isdn_lib.o isdn_msg_parser.o
|
||||
|
||||
ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libbnec.so),)
|
||||
CFLAGS+=-DBEROEC_VERSION=1
|
||||
CFLAGS+=-DWITH_BEROEC
|
||||
endif
|
||||
|
||||
all: chan_misdn_lib.a
|
||||
|
||||
%.o: %.c
|
||||
|
|
|
@ -25,10 +25,6 @@ int misdn_lib_get_l2_up(struct misdn_stack *stack);
|
|||
|
||||
struct misdn_stack* get_misdn_stack( void );
|
||||
|
||||
#ifdef WITH_BEROEC
|
||||
static int bec_initialized=0;
|
||||
#endif
|
||||
|
||||
int misdn_lib_port_is_pri(int port)
|
||||
{
|
||||
struct misdn_stack *stack=get_misdn_stack();
|
||||
|
@ -2196,14 +2192,6 @@ void misdn_tx_jitter(struct misdn_bchannel *bc, int len)
|
|||
|
||||
if (jlen < len) {
|
||||
cb_log(7,bc->port,"Jitterbuffer Underrun.\n");
|
||||
} else {
|
||||
#ifdef WITH_BEROEC
|
||||
if (bc->ec) {
|
||||
flip_buf_bits(data,len);
|
||||
beroec_cancel_alaw_chunk(bc->ec, data, bc->bframe, len);
|
||||
flip_buf_bits(data,len);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
txfrm->prim = DL_DATA|REQUEST;
|
||||
|
@ -3037,10 +3025,6 @@ void prepare_bc(struct misdn_bchannel*bc, int channel)
|
|||
if (++mypid>5000) mypid=1;
|
||||
bc->pid=mypid;
|
||||
|
||||
#ifdef WITH_BEROEC
|
||||
bc->ec=NULL;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
bc->addr=0;
|
||||
bc->b_stid=0;
|
||||
|
@ -3750,17 +3734,6 @@ int misdn_lib_init(char *portlist, struct misdn_lib_iface *iface, void *user_dat
|
|||
midev=te_lib_init();
|
||||
mgr->midev=midev;
|
||||
|
||||
#ifdef WITH_BEROEC
|
||||
int bec_ver=beroec_version();
|
||||
if (bec_ver>=BEROEC_VERSION) {
|
||||
beroec_init();
|
||||
bec_initialized=1;
|
||||
} else {
|
||||
cb_log(0,0,"!! Please update the BEROEC binary\n");
|
||||
bec_initialized=0;
|
||||
}
|
||||
#endif
|
||||
|
||||
port_count=mISDN_get_stack_count(midev);
|
||||
|
||||
msg_queue_init(&mgr->activatequeue);
|
||||
|
@ -4195,22 +4168,6 @@ void manager_ec_enable(struct misdn_bchannel *bc)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef WITH_BEROEC
|
||||
if (bc->ec) {
|
||||
cb_log(1, stack?stack->port:0, " --> EC already loaded\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!bec_initialized) bc->bnec_tail=0;
|
||||
|
||||
if (bc->bnec_tail) {
|
||||
bc->ec=beroec_new(bc->bnec_tail, BEROEC_SUBBAND,
|
||||
bc->bnec_ah,
|
||||
bc->bnec_td, bc->bnec_zero, bc->bnec_adapt, bc->bnec_nlp);
|
||||
}
|
||||
return ;
|
||||
#endif
|
||||
|
||||
if (bc->ec_enable) {
|
||||
cb_log(1, stack?stack->port:0,"Sending Control ECHOCAN_ON taps:%d training:%d\n",bc->ec_deftaps, bc->ec_training);
|
||||
|
||||
|
@ -4255,13 +4212,6 @@ void manager_ec_disable(struct misdn_bchannel *bc)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef WITH_BEROEC
|
||||
if (bc->ec)
|
||||
beroec_destroy(bc->ec);
|
||||
bc->ec=NULL;
|
||||
return;
|
||||
#endif
|
||||
|
||||
if ( bc->ec_enable) {
|
||||
cb_log(1, stack?stack->port:0, "Sending Control ECHOCAN_OFF\n");
|
||||
manager_ph_control(bc, ECHOCAN_OFF, 0);
|
||||
|
|
Reference in New Issue