[asterisk-commits] kpfleming: branch 1.4 r137677 - in /branches/1.4: ./ build_tools/ channels/ c...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Aug 13 21:02:16 CDT 2008
Author: kpfleming
Date: Wed Aug 13 21:02:15 2008
New Revision: 137677
URL: http://svn.digium.com/view/asterisk?view=rev&rev=137677
Log:
add support for Zaptel versions that contain the new transcoder interface
Modified:
branches/1.4/build_tools/menuselect-deps.in
branches/1.4/channels/chan_dahdi.c
branches/1.4/codecs/codec_dahdi.c
branches/1.4/configure
branches/1.4/configure.ac
branches/1.4/include/asterisk/dahdi_compat.h
Modified: branches/1.4/build_tools/menuselect-deps.in
URL: http://svn.digium.com/view/asterisk/branches/1.4/build_tools/menuselect-deps.in?view=diff&rev=137677&r1=137676&r2=137677
==============================================================================
--- branches/1.4/build_tools/menuselect-deps.in (original)
+++ branches/1.4/build_tools/menuselect-deps.in Wed Aug 13 21:02:15 2008
@@ -1,6 +1,7 @@
ASOUND=@PBX_ALSA@
CURL=@PBX_CURL@
DAHDI=@PBX_DAHDI@
+DAHDI_TRANSCODE=@PBX_DAHDI_TRANSCODE@
FREETDS=@PBX_FREETDS@
GSM=@PBX_GSM@
GTK=@PBX_GTK@
@@ -33,7 +34,6 @@
VORBIS=@PBX_VORBIS@
VPBAPI=@PBX_VPB@
ZAPTEL=@PBX_ZAPTEL@
-DAHDI_TRANSCODE=@PBX_DAHDI_TRANSCODE@
ZLIB=@PBX_ZLIB@
ISDNNET=@PBX_ISDNNET@
MISDN=@PBX_MISDN@
Modified: branches/1.4/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_dahdi.c?view=diff&rev=137677&r1=137676&r2=137677
==============================================================================
--- branches/1.4/channels/chan_dahdi.c (original)
+++ branches/1.4/channels/chan_dahdi.c Wed Aug 13 21:02:15 2008
@@ -39,7 +39,7 @@
/*** MODULEINFO
<depend>res_smdi</depend>
- <depend>DAHDI</depend>
+ <depend>dahdi</depend>
<depend>tonezone</depend>
<depend>res_features</depend>
<use>pri</use>
Modified: branches/1.4/codecs/codec_dahdi.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/codecs/codec_dahdi.c?view=diff&rev=137677&r1=137676&r2=137677
==============================================================================
--- branches/1.4/codecs/codec_dahdi.c (original)
+++ branches/1.4/codecs/codec_dahdi.c Wed Aug 13 21:02:15 2008
@@ -44,7 +44,6 @@
#include <sys/ioctl.h>
#include <errno.h>
#include <sys/mman.h>
-#include <dahdi/user.h>
#include "asterisk/lock.h"
#include "asterisk/translate.h"
@@ -56,6 +55,7 @@
#include "asterisk/channel.h"
#include "asterisk/utils.h"
#include "asterisk/linkedlists.h"
+#include "asterisk/dahdi_compat.h"
#define BUFFER_SAMPLES 8000
Modified: branches/1.4/configure.ac
URL: http://svn.digium.com/view/asterisk/branches/1.4/configure.ac?view=diff&rev=137677&r1=137676&r2=137677
==============================================================================
--- branches/1.4/configure.ac (original)
+++ branches/1.4/configure.ac Wed Aug 13 21:02:15 2008
@@ -438,7 +438,6 @@
AST_EXT_LIB_CHECK([CAP], [cap], [cap_from_text], [sys/capability.h])
fi
-PBX_DAHDI_TRANSCODE=0
if test "${USE_DAHDI}" != "no" ; then
AST_C_DEFINE_CHECK([DAHDI], [DAHDI_CODE], [dahdi/user.h])
if test "x${PBX_DAHDI}" = "x1" ; then
@@ -1492,6 +1491,28 @@
if test "${ac_cv_zaptel_vldtmf}" = "yes"; then
PBX_ZAPTEL_VLDTMF=1
fi
+ AC_MSG_CHECKING(for zt_transcoder_info in zaptel/zaptel.h)
+ saved_cppflags="${CPPFLAGS}"
+ if test "x${ZAPTEL_DIR}" != "x"; then
+ CPPFLAGS="${CPPFLAGS} -I${ZAPTEL_DIR}/include"
+ fi
+ AC_COMPILE_IFELSE(
+ [
+ AC_LANG_PROGRAM(
+ [#include <zaptel/zaptel.h>],
+ [int foo = sizeof(struct zt_transcoder_info);])
+ ],
+ [ AC_MSG_RESULT(yes)
+ ac_cv_zaptel_transcode="yes"
+ ],
+ [ AC_MSG_RESULT(no)
+ ac_cv_zaptel_transcode="no"
+ ]
+ )
+ CPPFLAGS="${saved_cppflags}"
+ if test "${ac_cv_zaptel_transcode}" = "yes"; then
+ PBX_DAHDI_TRANSCODE=1
+ fi
fi
AC_SUBST(PBX_ZAPTEL_VLDTMF)
AC_SUBST(PBX_DAHDI_TRANSCODE)
Modified: branches/1.4/include/asterisk/dahdi_compat.h
URL: http://svn.digium.com/view/asterisk/branches/1.4/include/asterisk/dahdi_compat.h?view=diff&rev=137677&r1=137676&r2=137677
==============================================================================
--- branches/1.4/include/asterisk/dahdi_compat.h (original)
+++ branches/1.4/include/asterisk/dahdi_compat.h Wed Aug 13 21:02:15 2008
@@ -150,10 +150,8 @@
#define DAHDI_SPANSTAT ZT_SPANSTAT
#define DAHDI_SPECIFY ZT_SPECIFY
#define DAHDI_START ZT_START
-#define DAHDI_TCOP_ALLOCATE ZT_TCOP_ALLOCATE
-#define DAHDI_TCOP_GETINFO ZT_TCOP_GETINFO
-#define DAHDI_TCOP_RELEASE ZT_TCOP_RELEASE
-#define DAHDI_TCOP_TRANSCODE ZT_TCOP_TRANSCODE
+#define DAHDI_TC_ALLOCATE ZT_TC_ALLOCATE
+#define DAHDI_TC_GETINFO ZT_TC_GETINFO
#define DAHDI_TIMERACK ZT_TIMERACK
#define DAHDI_TIMERCONFIG ZT_TIMERCONFIG
#define DAHDI_TIMERPING ZT_TIMERPING
@@ -172,10 +170,8 @@
#define DAHDI_TONE_INFO ZT_TONE_INFO
#define DAHDI_TONE_RINGTONE ZT_TONE_RINGTONE
#define DAHDI_TONE_STUTTER ZT_TONE_STUTTER
-#define dahdi_transcode_header zt_transcode_header
-#define dahdi_transcode_info zt_transcode_info
-#define DAHDI_TRANSCODE_MAGIC ZT_TRANSCODE_MAGIC
-#define DAHDI_TRANSCODE_OP ZT_TRANSCODE_OP
+#define dahdi_transcoder_formats zt_transcoder_formats
+#define dahdi_transcoder_info zt_transcoder_info
#define DAHDI_vldtmf ZT_vldtmf
#define DAHDI_WINK ZT_WINK
#define HAVE_DAHDI HAVE_ZAPTEL
More information about the asterisk-commits
mailing list