aboutsummaryrefslogtreecommitdiffstats
path: root/codecs
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-08 22:48:47 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-08 22:48:47 +0000
commitd0b2229ebdf2a6569b092d4adf4ad7a984b2ef15 (patch)
tree9486a727b8e1260f7df7e56c9f2dbfa10936f2a4 /codecs
parent908810e23f7815eccab97be7023a1aed15f89464 (diff)
merge up to branch 1.2 and re-enable automerge
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@53671 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'codecs')
-rw-r--r--codecs/Makefile24
-rw-r--r--codecs/codec_zap.c21
2 files changed, 25 insertions, 20 deletions
diff --git a/codecs/Makefile b/codecs/Makefile
index 915a048e9..8fa454109 100644
--- a/codecs/Makefile
+++ b/codecs/Makefile
@@ -28,18 +28,18 @@ ifneq ($(wildcard g723.1b/coder2.c),)
LIBG723B=g723.1b/libg723b.a
endif
-# XXX Uncomment this when transcoder support is merged into zaptel 1.2 !
-#ifndef WITHOUT_ZAPTEL
-#ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),)
-# ifeq (${OSARCH},NetBSD)
-# SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/pkg/lib
-# endif
-# ifeq (${OSARCH},FreeBSD)
-# SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
-# endif
-# CODECS+=codec_zap.so
-#endif
-#endif # WITHOUT_ZAPTEL
+ifndef WITHOUT_ZAPTEL
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/linux/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/local/include/zaptel.h)$(wildcard $(CROSS_COMPILE_TARGET)/usr/pkg/include/zaptel.h),)
+ ifeq (${OSARCH},NetBSD)
+ SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/pkg/lib
+ endif
+ ifeq (${OSARCH},FreeBSD)
+ SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
+ endif
+ CODECS+=codec_zap.so
+endif
+endif # WITHOUT_ZAPTEL
+
UI_SPEEX=$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/speex.h)
UIS_SPEEX=$(wildcard $(CROSS_COMPILE_TARGET)/usr/include/speex/speex.h)
diff --git a/codecs/codec_zap.c b/codecs/codec_zap.c
index 40c7d4cb2..a4d9de6d8 100644
--- a/codecs/codec_zap.c
+++ b/codecs/codec_zap.c
@@ -241,7 +241,7 @@ static struct ast_translator_pvt *zap_new_alawtog723(void)
{
/* Request translation through zap if possible */
int fd;
- unsigned int x = ZT_TCOP_RESET;
+ unsigned int x = ZT_TCOP_ALLOCATE;
struct ast_translator_pvt *ztp;
struct zt_transcode_header *hdr;
int flags;
@@ -298,7 +298,7 @@ static struct ast_translator_pvt *zap_new_ulawtog723(void)
{
/* Request translation through zap if possible */
int fd;
- unsigned int x = ZT_TCOP_RESET;
+ unsigned int x = ZT_TCOP_ALLOCATE;
struct ast_translator_pvt *ztp;
struct zt_transcode_header *hdr;
int flags;
@@ -355,7 +355,7 @@ static struct ast_translator_pvt *zap_new_g723toalaw(void)
{
/* Request translation through zap if possible */
int fd;
- unsigned int x = ZT_TCOP_RESET;
+ unsigned int x = ZT_TCOP_ALLOCATE;
struct ast_translator_pvt *ztp;
struct zt_transcode_header *hdr;
int flags;
@@ -412,7 +412,7 @@ static struct ast_translator_pvt *zap_new_g723toulaw(void)
{
/* Request translation through zap if possible */
int fd;
- unsigned int x = ZT_TCOP_RESET;
+ unsigned int x = ZT_TCOP_ALLOCATE;
struct ast_translator_pvt *ztp;
struct zt_transcode_header *hdr;
int flags;
@@ -469,7 +469,7 @@ static struct ast_translator_pvt *zap_new_alawtog729(void)
{
/* Request translation through zap if possible */
int fd;
- unsigned int x = ZT_TCOP_RESET;
+ unsigned int x = ZT_TCOP_ALLOCATE;
struct ast_translator_pvt *ztp;
struct zt_transcode_header *hdr;
int flags;
@@ -526,7 +526,7 @@ static struct ast_translator_pvt *zap_new_ulawtog729(void)
{
/* Request translation through zap if possible */
int fd;
- unsigned int x = ZT_TCOP_RESET;
+ unsigned int x = ZT_TCOP_ALLOCATE;
struct ast_translator_pvt *ztp;
struct zt_transcode_header *hdr;
int flags;
@@ -583,7 +583,7 @@ static struct ast_translator_pvt *zap_new_g729toalaw(void)
{
/* Request translation through zap if possible */
int fd;
- unsigned int x = ZT_TCOP_RESET;
+ unsigned int x = ZT_TCOP_ALLOCATE;
struct ast_translator_pvt *ztp;
struct zt_transcode_header *hdr;
int flags;
@@ -640,7 +640,7 @@ static struct ast_translator_pvt *zap_new_g729toulaw(void)
{
/* Request translation through zap if possible */
int fd;
- unsigned int x = ZT_TCOP_RESET;
+ unsigned int x = ZT_TCOP_ALLOCATE;
struct ast_translator_pvt *ztp;
struct zt_transcode_header *hdr;
int flags;
@@ -856,6 +856,11 @@ static int find_transcoders(void)
ast_log(LOG_NOTICE, "No Zaptel transcoder support!\n");
return 0;
}
+
+ ast_mutex_lock(&channelcount);
+ totalchannels = 0;
+ ast_mutex_unlock(&channelcount);
+
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);