Freeswitch-svn
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
February 2009
- 20 participants
- 764 discussions
[commit] r12186 - in freeswitch/trunk/libs/spandsp: . src src/msvc src/spandsp tests
by FreeSWITCH SVN 20 Feb '09
by FreeSWITCH SVN 20 Feb '09
20 Feb '09
Author: mikej
Date: Fri Feb 20 12:22:32 2009
New Revision: 12186
Log:
update to snapshot spandsp-20090211
Added:
freeswitch/trunk/libs/spandsp/src/msvc/getopt.c
freeswitch/trunk/libs/spandsp/src/msvc/make_at_dictionary.vcproj
freeswitch/trunk/libs/spandsp/src/msvc/make_headers.bat
freeswitch/trunk/libs/spandsp/src/msvc/make_modem_filter.vcproj
Modified:
freeswitch/trunk/libs/spandsp/configure.ac
freeswitch/trunk/libs/spandsp/src/Makefile.am
freeswitch/trunk/libs/spandsp/src/adsi.c
freeswitch/trunk/libs/spandsp/src/async.c
freeswitch/trunk/libs/spandsp/src/at_interpreter.c
freeswitch/trunk/libs/spandsp/src/awgn.c
freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c
freeswitch/trunk/libs/spandsp/src/bert.c
freeswitch/trunk/libs/spandsp/src/bitstream.c
freeswitch/trunk/libs/spandsp/src/dtmf.c
freeswitch/trunk/libs/spandsp/src/echo.c
freeswitch/trunk/libs/spandsp/src/fax.c
freeswitch/trunk/libs/spandsp/src/filter_tools.c
freeswitch/trunk/libs/spandsp/src/fsk.c
freeswitch/trunk/libs/spandsp/src/g711.c
freeswitch/trunk/libs/spandsp/src/g722.c
freeswitch/trunk/libs/spandsp/src/g726.c
freeswitch/trunk/libs/spandsp/src/gsm0610_encode.c
freeswitch/trunk/libs/spandsp/src/gsm0610_lpc.c
freeswitch/trunk/libs/spandsp/src/hdlc.c
freeswitch/trunk/libs/spandsp/src/ima_adpcm.c
freeswitch/trunk/libs/spandsp/src/libspandsp.sln
freeswitch/trunk/libs/spandsp/src/logging.c
freeswitch/trunk/libs/spandsp/src/lpc10_decode.c
freeswitch/trunk/libs/spandsp/src/lpc10_encode.c
freeswitch/trunk/libs/spandsp/src/make_at_dictionary.c
freeswitch/trunk/libs/spandsp/src/make_modem_filter.c
freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c
freeswitch/trunk/libs/spandsp/src/msvc/config.h
freeswitch/trunk/libs/spandsp/src/msvc/unistd.h
freeswitch/trunk/libs/spandsp/src/noise.c
freeswitch/trunk/libs/spandsp/src/oki_adpcm.c
freeswitch/trunk/libs/spandsp/src/playout.c
freeswitch/trunk/libs/spandsp/src/plc.c
freeswitch/trunk/libs/spandsp/src/power_meter.c
freeswitch/trunk/libs/spandsp/src/queue.c
freeswitch/trunk/libs/spandsp/src/schedule.c
freeswitch/trunk/libs/spandsp/src/sig_tone.c
freeswitch/trunk/libs/spandsp/src/silence_gen.c
freeswitch/trunk/libs/spandsp/src/spandsp/adsi.h
freeswitch/trunk/libs/spandsp/src/spandsp/async.h
freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h
freeswitch/trunk/libs/spandsp/src/spandsp/awgn.h
freeswitch/trunk/libs/spandsp/src/spandsp/bell_r2_mf.h
freeswitch/trunk/libs/spandsp/src/spandsp/bert.h
freeswitch/trunk/libs/spandsp/src/spandsp/bitstream.h
freeswitch/trunk/libs/spandsp/src/spandsp/complex.h
freeswitch/trunk/libs/spandsp/src/spandsp/dtmf.h
freeswitch/trunk/libs/spandsp/src/spandsp/echo.h
freeswitch/trunk/libs/spandsp/src/spandsp/fast_convert.h
freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h
freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h
freeswitch/trunk/libs/spandsp/src/spandsp/g711.h
freeswitch/trunk/libs/spandsp/src/spandsp/g722.h
freeswitch/trunk/libs/spandsp/src/spandsp/g726.h
freeswitch/trunk/libs/spandsp/src/spandsp/gsm0610.h
freeswitch/trunk/libs/spandsp/src/spandsp/hdlc.h
freeswitch/trunk/libs/spandsp/src/spandsp/ima_adpcm.h
freeswitch/trunk/libs/spandsp/src/spandsp/logging.h
freeswitch/trunk/libs/spandsp/src/spandsp/lpc10.h
freeswitch/trunk/libs/spandsp/src/spandsp/modem_connect_tones.h
freeswitch/trunk/libs/spandsp/src/spandsp/noise.h
freeswitch/trunk/libs/spandsp/src/spandsp/oki_adpcm.h
freeswitch/trunk/libs/spandsp/src/spandsp/playout.h
freeswitch/trunk/libs/spandsp/src/spandsp/plc.h
freeswitch/trunk/libs/spandsp/src/spandsp/power_meter.h
freeswitch/trunk/libs/spandsp/src/spandsp/queue.h
freeswitch/trunk/libs/spandsp/src/spandsp/schedule.h
freeswitch/trunk/libs/spandsp/src/spandsp/sig_tone.h
freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h
freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_tx.h
freeswitch/trunk/libs/spandsp/src/spandsp/t31.h
freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h
freeswitch/trunk/libs/spandsp/src/spandsp/t38_gateway.h
freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h
freeswitch/trunk/libs/spandsp/src/spandsp/t4.h
freeswitch/trunk/libs/spandsp/src/spandsp/time_scale.h
freeswitch/trunk/libs/spandsp/src/spandsp/tone_detect.h
freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h
freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h
freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_tx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v29tx.h
freeswitch/trunk/libs/spandsp/src/spandsp/v42.h
freeswitch/trunk/libs/spandsp/src/spandsp/v42bis.h
freeswitch/trunk/libs/spandsp/src/spandsp/version.h
freeswitch/trunk/libs/spandsp/src/super_tone_rx.c
freeswitch/trunk/libs/spandsp/src/super_tone_tx.c
freeswitch/trunk/libs/spandsp/src/t30.c
freeswitch/trunk/libs/spandsp/src/t31.c
freeswitch/trunk/libs/spandsp/src/t38_core.c
freeswitch/trunk/libs/spandsp/src/t38_gateway.c
freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c
freeswitch/trunk/libs/spandsp/src/t38_terminal.c
freeswitch/trunk/libs/spandsp/src/t4.c
freeswitch/trunk/libs/spandsp/src/time_scale.c
freeswitch/trunk/libs/spandsp/src/tone_detect.c
freeswitch/trunk/libs/spandsp/src/tone_generate.c
freeswitch/trunk/libs/spandsp/src/v17rx.c
freeswitch/trunk/libs/spandsp/src/v17tx.c
freeswitch/trunk/libs/spandsp/src/v22bis_tx.c
freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
freeswitch/trunk/libs/spandsp/src/v27ter_tx.c
freeswitch/trunk/libs/spandsp/src/v29rx.c
freeswitch/trunk/libs/spandsp/src/v29tx.c
freeswitch/trunk/libs/spandsp/src/v42.c
freeswitch/trunk/libs/spandsp/src/v42bis.c
freeswitch/trunk/libs/spandsp/src/vector_float.c
freeswitch/trunk/libs/spandsp/tests/echo_tests.c
freeswitch/trunk/libs/spandsp/tests/fax_decode.c
freeswitch/trunk/libs/spandsp/tests/playout_tests.c
freeswitch/trunk/libs/spandsp/tests/t4_tests.c
freeswitch/trunk/libs/spandsp/tests/tsb85_tests.c
Modified: freeswitch/trunk/libs/spandsp/configure.ac
==============================================================================
--- freeswitch/trunk/libs/spandsp/configure.ac (original)
+++ freeswitch/trunk/libs/spandsp/configure.ac Fri Feb 20 12:22:32 2009
@@ -16,7 +16,7 @@
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
-# $Id: configure.ac,v 1.65 2009/01/31 08:48:10 steveu Exp $
+# $Id: configure.ac,v 1.66 2009/02/10 17:20:31 steveu Exp $
# @start 1
@@ -33,7 +33,7 @@
SPANDSP_MINOR_VERSION=0
SPANDSP_MICRO_VERSION=6
-SPANDSP_LT_CURRENT=1
+SPANDSP_LT_CURRENT=2
SPANDSP_LT_REVISION=0
SPANDSP_LT_AGE=0
Modified: freeswitch/trunk/libs/spandsp/src/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/Makefile.am (original)
+++ freeswitch/trunk/libs/spandsp/src/Makefile.am Fri Feb 20 12:22:32 2009
@@ -16,7 +16,7 @@
## License along with this program; if not, write to the Free Software
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
-## $Id: Makefile.am,v 1.122 2009/02/03 16:33:13 steveu Exp $
+## $Id: Makefile.am,v 1.123 2009/02/10 17:16:57 steveu Exp $
AM_CFLAGS = $(COMP_VENDOR_CFLAGS)
AM_LDFLAGS = $(COMP_VENDOR_LDFLAGS)
@@ -29,18 +29,21 @@
libspandsp.sln \
libspandsp.vcproj \
msvc/config.h \
+ msvc/getopt.c \
msvc/gettimeofday.c \
msvc/inttypes.h \
msvc/tgmath.h \
msvc/unistd.h \
msvc/spandsp.h \
msvc/sys/time.h \
+ msvc/make_at_dictionary.vcproj \
+ msvc/make_headers.bat \
+ msvc/make_modem_filter.vcproj \
msvc/msvcproj.head \
msvc/msvcproj.foot \
msvc/vc8proj.head \
msvc/vc8proj.foot \
spandsp/private/README
-
INCLUDES = -I$(top_builddir)
lib_LTLIBRARIES = libspandsp.la
Modified: freeswitch/trunk/libs/spandsp/src/adsi.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/adsi.c (original)
+++ freeswitch/trunk/libs/spandsp/src/adsi.c Fri Feb 20 12:22:32 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: adsi.c,v 1.69 2009/02/03 16:28:39 steveu Exp $
+ * $Id: adsi.c,v 1.70 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -449,6 +449,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) adsi_rx_release(adsi_rx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) adsi_rx_free(adsi_rx_state_t *s)
{
free(s);
@@ -658,6 +664,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) adsi_tx_release(adsi_tx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) adsi_tx_free(adsi_tx_state_t *s)
{
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/async.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/async.c (original)
+++ freeswitch/trunk/libs/spandsp/src/async.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: async.c,v 1.17 2009/02/04 13:18:53 steveu Exp $
+ * $Id: async.c,v 1.18 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -103,6 +103,19 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) async_rx_release(async_rx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) async_rx_free(async_rx_state_t *s)
+{
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE_NONSTD(void) async_rx_put_bit(void *user_data, int bit)
{
async_rx_state_t *s;
@@ -216,6 +229,19 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) async_tx_release(async_tx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) async_tx_free(async_tx_state_t *s)
+{
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE_NONSTD(int) async_tx_get_bit(void *user_data)
{
async_tx_state_t *s;
Modified: freeswitch/trunk/libs/spandsp/src/at_interpreter.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/at_interpreter.c (original)
+++ freeswitch/trunk/libs/spandsp/src/at_interpreter.c Fri Feb 20 12:22:32 2009
@@ -25,7 +25,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: at_interpreter.c,v 1.35 2009/02/03 16:28:39 steveu Exp $
+ * $Id: at_interpreter.c,v 1.36 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -5318,13 +5318,22 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(int) at_free(at_state_t *s)
+SPAN_DECLARE(int) at_release(at_state_t *s)
{
at_reset_call_info(s);
if (s->local_id)
free(s->local_id);
- free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) at_free(at_state_t *s)
+{
+ int ret;
+
+ ret = at_release(s);
+ free(s);
+ return ret;
+}
+/*- End of function --------------------------------------------------------*/
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/awgn.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/awgn.c (original)
+++ freeswitch/trunk/libs/spandsp/src/awgn.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: awgn.c,v 1.21 2009/02/03 16:28:39 steveu Exp $
+ * $Id: awgn.c,v 1.22 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -96,12 +96,6 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(awgn_state_t *) awgn_init_dbm0(awgn_state_t *s, int idum, float level)
-{
- return awgn_init_dbov(s, idum, level - DBM0_MAX_POWER);
-}
-/*- End of function --------------------------------------------------------*/
-
SPAN_DECLARE(awgn_state_t *) awgn_init_dbov(awgn_state_t *s, int idum, float level)
{
int j;
@@ -134,6 +128,25 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(awgn_state_t *) awgn_init_dbm0(awgn_state_t *s, int idum, float level)
+{
+ return awgn_init_dbov(s, idum, level - DBM0_MAX_POWER);
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) awgn_release(awgn_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) awgn_free(awgn_state_t *s)
+{
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int16_t) awgn(awgn_state_t *s)
{
double fac;
Modified: freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c (original)
+++ freeswitch/trunk/libs/spandsp/src/bell_r2_mf.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: bell_r2_mf.c,v 1.37 2009/02/03 16:28:39 steveu Exp $
+ * $Id: bell_r2_mf.c,v 1.38 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -340,6 +340,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) bell_mf_tx_release(bell_mf_tx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) bell_mf_tx_free(bell_mf_tx_state_t *s)
{
free(s);
@@ -437,6 +443,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) r2_mf_tx_release(r2_mf_tx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) r2_mf_tx_free(r2_mf_tx_state_t *s)
{
free(s);
@@ -651,6 +663,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) bell_mf_rx_release(bell_mf_rx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) bell_mf_rx_free(bell_mf_rx_state_t *s)
{
free(s);
@@ -829,6 +847,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) r2_mf_rx_release(r2_mf_rx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) r2_mf_rx_free(r2_mf_rx_state_t *s)
{
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/bert.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/bert.c (original)
+++ freeswitch/trunk/libs/spandsp/src/bert.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: bert.c,v 1.31 2009/02/03 16:28:39 steveu Exp $
+ * $Id: bert.c,v 1.32 2009/02/10 13:06:46 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -351,7 +351,7 @@
if (s == NULL)
{
if ((s = (bert_state_t *) malloc(sizeof(*s))) == NULL)
- return NULL;
+ return NULL;
}
memset(s, 0, sizeof(*s));
@@ -493,4 +493,17 @@
return s;
}
/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) bert_release(bert_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) bert_free(bert_state_t *s)
+{
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/bitstream.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/bitstream.c (original)
+++ freeswitch/trunk/libs/spandsp/src/bitstream.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: bitstream.c,v 1.17 2009/02/03 16:28:39 steveu Exp $
+ * $Id: bitstream.c,v 1.18 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -128,10 +128,27 @@
SPAN_DECLARE(bitstream_state_t *) bitstream_init(bitstream_state_t *s)
{
if (s == NULL)
- return NULL;
+ {
+ if ((s = (bitstream_state_t *) malloc(sizeof(*s))) == NULL)
+ return NULL;
+ }
s->bitstream = 0;
s->residue = 0;
return s;
}
/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) bitstream_release(bitstream_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) bitstream_free(bitstream_state_t *s)
+{
+ if (s)
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/dtmf.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/dtmf.c (original)
+++ freeswitch/trunk/libs/spandsp/src/dtmf.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: dtmf.c,v 1.50 2009/02/03 16:28:39 steveu Exp $
+ * $Id: dtmf.c,v 1.51 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file dtmf.h */
@@ -410,6 +410,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) dtmf_rx_release(dtmf_rx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) dtmf_rx_free(dtmf_rx_state_t *s)
{
free(s);
@@ -526,6 +532,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) dtmf_tx_release(dtmf_tx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) dtmf_tx_free(dtmf_tx_state_t *s)
{
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/echo.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/echo.c (original)
+++ freeswitch/trunk/libs/spandsp/src/echo.c Fri Feb 20 12:22:32 2009
@@ -27,7 +27,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: echo.c,v 1.31 2009/02/03 16:28:39 steveu Exp $
+ * $Id: echo.c,v 1.32 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -238,7 +238,7 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(echo_can_state_t *) echo_can_create(int len, int adaption_mode)
+SPAN_DECLARE(echo_can_state_t *) echo_can_init(int len, int adaption_mode)
{
echo_can_state_t *ec;
int i;
@@ -279,11 +279,17 @@
ec->tap_rotate_counter = 1600;
ec->cng_level = 1000;
echo_can_adaption_mode(ec, adaption_mode);
- return ec;
+ return ec;
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(void) echo_can_free(echo_can_state_t *ec)
+SPAN_DECLARE(int) echo_can_release(echo_can_state_t *ec)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) echo_can_free(echo_can_state_t *ec)
{
int i;
@@ -292,6 +298,7 @@
for (i = 0; i < 4; i++)
free(ec->fir_taps16[i]);
free(ec);
+ return 0;
}
/*- End of function --------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/fax.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/fax.c (original)
+++ freeswitch/trunk/libs/spandsp/src/fax.c Fri Feb 20 12:22:32 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fax.c,v 1.85 2009/02/03 16:28:39 steveu Exp $
+ * $Id: fax.c,v 1.86 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -545,7 +545,6 @@
if ((s = (fax_state_t *) malloc(sizeof(*s))) == NULL)
return NULL;
}
-
memset(s, 0, sizeof(*s));
span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
span_log_set_protocol(&s->logging, "FAX");
Modified: freeswitch/trunk/libs/spandsp/src/filter_tools.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/filter_tools.c (original)
+++ freeswitch/trunk/libs/spandsp/src/filter_tools.c Fri Feb 20 12:22:32 2009
@@ -25,7 +25,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: filter_tools.c,v 1.9 2009/01/28 03:41:26 steveu Exp $
+ * $Id: filter_tools.c,v 1.10 2009/02/10 17:16:57 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -51,8 +51,12 @@
#include "spandsp/complex.h"
#include "filter_tools.h"
+#if !defined(FALSE)
#define FALSE 0
+#endif
+#if !defined(TRUE)
#define TRUE (!FALSE)
+#endif
#define MAXPZ 8192
#define SEQ_LEN 8192
@@ -149,7 +153,7 @@
if (f <= f1)
vec[i] = complex_set(1.0, 0.0);
else if (f <= f2)
- vec[i] = complex_set(0.5*(1.0 + cos((3.1415926535*tau/beta) * (f - f1))), 0.0);
+ vec[i] = complex_set(0.5*(1.0 + cos((3.1415926535*tau/beta)*(f - f1))), 0.0);
else
vec[i] = complex_set(0.0, 0.0);
}
Modified: freeswitch/trunk/libs/spandsp/src/fsk.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/fsk.c (original)
+++ freeswitch/trunk/libs/spandsp/src/fsk.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fsk.c,v 1.51 2009/02/03 16:28:39 steveu Exp $
+ * $Id: fsk.c,v 1.52 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -149,6 +149,19 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) fsk_tx_release(fsk_tx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) fsk_tx_free(fsk_tx_state_t *s)
+{
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) fsk_tx(fsk_tx_state_t *s, int16_t amp[], int len)
{
int sample;
@@ -289,6 +302,19 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) fsk_rx_release(fsk_rx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) fsk_rx_free(fsk_rx_state_t *s)
+{
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
static void report_status_change(fsk_rx_state_t *s, int status)
{
if (s->status_handler)
Modified: freeswitch/trunk/libs/spandsp/src/g711.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/g711.c (original)
+++ freeswitch/trunk/libs/spandsp/src/g711.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: g711.c,v 1.15 2009/02/03 16:28:39 steveu Exp $
+ * $Id: g711.c,v 1.16 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -183,6 +183,12 @@
SPAN_DECLARE(int) g711_release(g711_state_t *s)
{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) g711_free(g711_state_t *s)
+{
free(s);
return 0;
}
Modified: freeswitch/trunk/libs/spandsp/src/g722.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/g722.c (original)
+++ freeswitch/trunk/libs/spandsp/src/g722.c Fri Feb 20 12:22:32 2009
@@ -28,7 +28,7 @@
* Computer Science, Speech Group
* Chengxiang Lu and Alex Hauptmann
*
- * $Id: g722.c,v 1.7 2009/02/03 16:28:39 steveu Exp $
+ * $Id: g722.c,v 1.8 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -283,6 +283,12 @@
SPAN_DECLARE(int) g722_decode_release(g722_decode_state_t *s)
{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) g722_decode_free(g722_decode_state_t *s)
+{
free(s);
return 0;
}
@@ -455,6 +461,12 @@
SPAN_DECLARE(int) g722_encode_release(g722_encode_state_t *s)
{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) g722_encode_free(g722_encode_state_t *s)
+{
free(s);
return 0;
}
Modified: freeswitch/trunk/libs/spandsp/src/g726.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/g726.c (original)
+++ freeswitch/trunk/libs/spandsp/src/g726.c Fri Feb 20 12:22:32 2009
@@ -48,7 +48,7 @@
* 2550 Garcia Avenue
* Mountain View, California 94043
*
- * $Id: g726.c,v 1.27 2009/02/03 16:28:39 steveu Exp $
+ * $Id: g726.c,v 1.28 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -1059,6 +1059,12 @@
SPAN_DECLARE(int) g726_release(g726_state_t *s)
{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) g726_free(g726_state_t *s)
+{
free(s);
return 0;
}
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_encode.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_encode.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_encode.c Fri Feb 20 12:22:32 2009
@@ -25,7 +25,7 @@
* This code is based on the widely used GSM 06.10 code available from
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
*
- * $Id: gsm0610_encode.c,v 1.29 2009/02/03 16:28:39 steveu Exp $
+ * $Id: gsm0610_encode.c,v 1.30 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -106,6 +106,13 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) gsm0610_set_packing(gsm0610_state_t *s, int packing)
+{
+ s->packing = packing;
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(gsm0610_state_t *) gsm0610_init(gsm0610_state_t *s, int packing)
{
if (s == NULL)
@@ -122,14 +129,13 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(int) gsm0610_set_packing(gsm0610_state_t *s, int packing)
+SPAN_DECLARE(int) gsm0610_release(gsm0610_state_t *s)
{
- s->packing = packing;
- return 0;
+ return 0;
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(int) gsm0610_release(gsm0610_state_t *s)
+SPAN_DECLARE(int) gsm0610_free(gsm0610_state_t *s)
{
if (s)
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_lpc.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_lpc.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_lpc.c Fri Feb 20 12:22:32 2009
@@ -25,7 +25,7 @@
* This code is based on the widely used GSM 06.10 code available from
* http://kbs.cs.tu-berlin.de/~jutta/toast.html
*
- * $Id: gsm0610_lpc.c,v 1.28 2009/02/03 16:28:39 steveu Exp $
+ * $Id: gsm0610_lpc.c,v 1.29 2009/02/05 15:57:27 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/hdlc.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/hdlc.c (original)
+++ freeswitch/trunk/libs/spandsp/src/hdlc.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: hdlc.c,v 1.69 2009/02/03 16:28:39 steveu Exp $
+ * $Id: hdlc.c,v 1.70 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -318,6 +318,19 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) hdlc_rx_release(hdlc_rx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) hdlc_rx_free(hdlc_rx_state_t *s)
+{
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) hdlc_rx_get_stats(hdlc_rx_state_t *s,
hdlc_rx_stats_t *t)
{
@@ -578,4 +591,17 @@
return s;
}
/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) hdlc_tx_release(hdlc_tx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) hdlc_tx_free(hdlc_tx_state_t *s)
+{
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/ima_adpcm.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/ima_adpcm.c (original)
+++ freeswitch/trunk/libs/spandsp/src/ima_adpcm.c Fri Feb 20 12:22:32 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: ima_adpcm.c,v 1.34 2009/02/03 16:28:39 steveu Exp $
+ * $Id: ima_adpcm.c,v 1.35 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -294,6 +294,12 @@
SPAN_DECLARE(int) ima_adpcm_release(ima_adpcm_state_t *s)
{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) ima_adpcm_free(ima_adpcm_state_t *s)
+{
free(s);
return 0;
}
Modified: freeswitch/trunk/libs/spandsp/src/libspandsp.sln
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/libspandsp.sln (original)
+++ freeswitch/trunk/libs/spandsp/src/libspandsp.sln Fri Feb 20 12:22:32 2009
@@ -1,6 +1,10 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_at_dictionary", "msvc\make_at_dictionary.vcproj", "{DEE932AB-5911-4700-9EEB-8C7090A0A330}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_modem_filter", "msvc\make_modem_filter.vcproj", "{329A6FA0-0FCC-4435-A950-E670AEFA9838}"
+EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspandsp", "libspandsp.vcproj", "{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}"
ProjectSection(ProjectDependencies) = postProject
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014} = {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}
Modified: freeswitch/trunk/libs/spandsp/src/logging.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/logging.c (original)
+++ freeswitch/trunk/libs/spandsp/src/logging.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: logging.c,v 1.30 2009/02/03 16:28:39 steveu Exp $
+ * $Id: logging.c,v 1.31 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -177,20 +177,6 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(int) span_log_init(logging_state_t *s, int level, const char *tag)
-{
- s->span_error = __span_error;
- s->span_message = __span_message;
- s->level = level;
- s->tag = tag;
- s->protocol = NULL;
- s->samples_per_second = SAMPLE_RATE;
- s->elapsed_samples = 0;
-
- return 0;
-}
-/*- End of function --------------------------------------------------------*/
-
SPAN_DECLARE(int) span_log_set_level(logging_state_t *s, int level)
{
s->level = level;
@@ -254,4 +240,37 @@
__span_error = func;
}
/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) span_log_init(logging_state_t *s, int level, const char *tag)
+{
+ if (s == NULL)
+ {
+ if ((s = (logging_state_t *) malloc(sizeof(*s))) == NULL)
+ return NULL;
+ }
+ s->span_error = __span_error;
+ s->span_message = __span_message;
+ s->level = level;
+ s->tag = tag;
+ s->protocol = NULL;
+ s->samples_per_second = SAMPLE_RATE;
+ s->elapsed_samples = 0;
+
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) span_log_release(logging_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) span_log_free(logging_state_t *s)
+{
+ if (s)
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/lpc10_decode.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/lpc10_decode.c (original)
+++ freeswitch/trunk/libs/spandsp/src/lpc10_decode.c Fri Feb 20 12:22:32 2009
@@ -26,7 +26,7 @@
* implementation of the LPC-10 2400 bps Voice Coder. They do not
* exert copyright claims on their code, and it may be freely used.
*
- * $Id: lpc10_decode.c,v 1.26 2009/02/03 16:28:39 steveu Exp $
+ * $Id: lpc10_decode.c,v 1.27 2009/02/10 13:06:46 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -1077,6 +1077,12 @@
SPAN_DECLARE(int) lpc10_decode_release(lpc10_decode_state_t *s)
{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) lpc10_decode_free(lpc10_decode_state_t *s)
+{
free(s);
return 0;
}
Modified: freeswitch/trunk/libs/spandsp/src/lpc10_encode.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/lpc10_encode.c (original)
+++ freeswitch/trunk/libs/spandsp/src/lpc10_encode.c Fri Feb 20 12:22:32 2009
@@ -26,7 +26,7 @@
* implementation of the LPC-10 2400 bps Voice Coder. They do not
* exert copyright claims on their code, and it may be freely used.
*
- * $Id: lpc10_encode.c,v 1.27 2009/02/03 16:28:39 steveu Exp $
+ * $Id: lpc10_encode.c,v 1.28 2009/02/10 13:06:46 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -365,6 +365,12 @@
SPAN_DECLARE(int) lpc10_encode_release(lpc10_encode_state_t *s)
{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) lpc10_encode_free(lpc10_encode_state_t *s)
+{
free(s);
return 0;
}
Modified: freeswitch/trunk/libs/spandsp/src/make_at_dictionary.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/make_at_dictionary.c (original)
+++ freeswitch/trunk/libs/spandsp/src/make_at_dictionary.c Fri Feb 20 12:22:32 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: make_at_dictionary.c,v 1.1 2008/07/01 03:27:51 steveu Exp $
+ * $Id: make_at_dictionary.c,v 1.2 2009/02/10 17:16:57 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -541,7 +541,7 @@
static void trie_add(trie_t *s, const char *u, size_t len)
{
- int i;
+ size_t i;
int index;
trie_node_t *t;
Modified: freeswitch/trunk/libs/spandsp/src/make_modem_filter.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/make_modem_filter.c (original)
+++ freeswitch/trunk/libs/spandsp/src/make_modem_filter.c Fri Feb 20 12:22:32 2009
@@ -23,7 +23,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: make_modem_filter.c,v 1.13 2009/01/28 03:41:27 steveu Exp $
+ * $Id: make_modem_filter.c,v 1.14 2009/02/10 17:16:57 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -49,8 +49,12 @@
#include "spandsp/complex.h"
#include "filter_tools.h"
+#if !defined(FALSE)
#define FALSE 0
+#endif
+#if !defined(TRUE)
#define TRUE (!FALSE)
+#endif
//#define SAMPLE_RATE 8000.0
#define MAX_COEFFS_PER_FILTER 128
Modified: freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c (original)
+++ freeswitch/trunk/libs/spandsp/src/modem_connect_tones.c Fri Feb 20 12:22:32 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: modem_connect_tones.c,v 1.33 2009/02/03 16:28:39 steveu Exp $
+ * $Id: modem_connect_tones.c,v 1.34 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -253,6 +253,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) modem_connect_tones_tx_release(modem_connect_tones_tx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) modem_connect_tones_tx_free(modem_connect_tones_tx_state_t *s)
{
free(s);
@@ -544,6 +550,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) modem_connect_tones_rx_release(modem_connect_tones_rx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) modem_connect_tones_rx_free(modem_connect_tones_rx_state_t *s)
{
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/msvc/config.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/config.h (original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/config.h Fri Feb 20 12:22:32 2009
@@ -10,7 +10,7 @@
*
* This file is released in the public domain.
*
- * $Id: config.h,v 1.2 2009/02/03 16:39:41 steveu Exp $
+ * $Id: config.h,v 1.3 2009/02/10 13:06:47 steveu Exp $
*/
#if !defined(_MSVC_CONFIG_H_)
@@ -33,6 +33,7 @@
#define HAVE_TGMATH_H
#define HAVE_LONG_DOUBLE
+#define HAVE_LIBTIFF
#define SPANDSP_USE_EXPORT_CAPABILITY 1
Added: freeswitch/trunk/libs/spandsp/src/msvc/getopt.c
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/src/msvc/getopt.c Fri Feb 20 12:22:32 2009
@@ -0,0 +1,177 @@
+/*****************************************************************************
+ *
+ * MODULE NAME : GETOPT.C
+ *
+ * COPYRIGHTS:
+ * This module contains code made available by IBM
+ * Corporation on an AS IS basis. Any one receiving the
+ * module is considered to be licensed under IBM copyrights
+ * to use the IBM-provided source code in any way he or she
+ * deems fit, including copying it, compiling it, modifying
+ * it, and redistributing it, with or without
+ * modifications. No license under any IBM patents or
+ * patent applications is to be implied from this copyright
+ * license.
+ *
+ * A user of the module should understand that IBM cannot
+ * provide technical support for the module and will not be
+ * responsible for any consequences of use of the program.
+ *
+ * Any notices, including this one, are not to be removed
+ * from the module without the prior written consent of
+ * IBM.
+ *
+ * AUTHOR: Original author:
+ * G. R. Blair (BOBBLAIR at AUSVM1)
+ * Internet: bobblair(a)bobblair.austin.ibm.com
+ *
+ * Extensively revised by:
+ * John Q. Walker II, Ph.D. (JOHHQ at RALVM6)
+ * Internet: johnq(a)ralvm6.vnet.ibm.com
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ * getopt()
+ *
+ * The getopt() function is a command line parser. It returns the next
+ * option character in argv that matches an option character in opstring.
+ *
+ * The argv argument points to an array of argc+1 elements containing argc
+ * pointers to character strings followed by a null pointer.
+ *
+ * The opstring argument points to a string of option characters; if an
+ * option character is followed by a colon, the option is expected to have
+ * an argument that may or may not be separated from it by white space.
+ * The external variable optarg is set to point to the start of the option
+ * argument on return from getopt().
+ *
+ * The getopt() function places in optind the argv index of the next argument
+ * to be processed. The system initializes the external variable optind to
+ * 1 before the first call to getopt().
+ *
+ * When all options have been processed (that is, up to the first nonoption
+ * argument), getopt() returns EOF. The special option "--" may be used to
+ * delimit the end of the options; EOF will be returned, and "--" will be
+ * skipped.
+ *
+ * The getopt() function returns a question mark (?) when it encounters an
+ * option character not included in opstring. This error message can be
+ * disabled by setting opterr to zero. Otherwise, it returns the option
+ * character that was detected.
+ *
+ * If the special option "--" is detected, or all options have been
+ * processed, EOF is returned.
+ *
+ * Options are marked by either a minus sign (-) or a slash (/).
+ *
+ * No errors are defined.
+ *****************************************************************************/
+
+#include <stdio.h> /* for EOF */
+#include <string.h> /* for strchr() */
+
+
+/* static (global) variables that are specified as exported by getopt() */
+char *optarg = NULL; /* pointer to the start of the option argument */
+int optind = 1; /* number of the next argv[] to be evaluated */
+int opterr = 1; /* non-zero if a question mark should be returned
+ when a non-valid option character is detected */
+
+/* handle possible future character set concerns by putting this in a macro */
+#define _next_char(string) (char)(*(string+1))
+
+int getopt(int argc, char *argv[], char *opstring)
+{
+ static char *pIndexPosition = NULL; /* place inside current argv string */
+ char *pArgString = NULL; /* where to start from next */
+ char *pOptString; /* the string in our program */
+
+
+ if (pIndexPosition != NULL) {
+ /* we last left off inside an argv string */
+ if (*(++pIndexPosition)) {
+ /* there is more to come in the most recent argv */
+ pArgString = pIndexPosition;
+ }
+ }
+
+ if (pArgString == NULL) {
+ /* we didn't leave off in the middle of an argv string */
+ if (optind >= argc) {
+ /* more command-line arguments than the argument count */
+ pIndexPosition = NULL; /* not in the middle of anything */
+ return EOF; /* used up all command-line arguments */
+ }
+
+ /*---------------------------------------------------------------------
+ * If the next argv[] is not an option, there can be no more options.
+ *-------------------------------------------------------------------*/
+ pArgString = argv[optind++]; /* set this to the next argument ptr */
+
+ if (('/' != *pArgString) && /* doesn't start with a slash or a dash? */
+ ('-' != *pArgString)) {
+ --optind; /* point to current arg once we're done */
+ optarg = NULL; /* no argument follows the option */
+ pIndexPosition = NULL; /* not in the middle of anything */
+ return EOF; /* used up all the command-line flags */
+ }
+
+ /* check for special end-of-flags markers */
+ if ((strcmp(pArgString, "-") == 0) ||
+ (strcmp(pArgString, "--") == 0)) {
+ optarg = NULL; /* no argument follows the option */
+ pIndexPosition = NULL; /* not in the middle of anything */
+ return EOF; /* encountered the special flag */
+ }
+
+ pArgString++; /* look past the / or - */
+ }
+
+ if (':' == *pArgString) { /* is it a colon? */
+ /*---------------------------------------------------------------------
+ * Rare case: if opterr is non-zero, return a question mark;
+ * otherwise, just return the colon we're on.
+ *-------------------------------------------------------------------*/
+ return (opterr ? (int)'?' : (int)':');
+ }
+ else if ((pOptString = strchr(opstring, *pArgString)) == 0) {
+ /*---------------------------------------------------------------------
+ * The letter on the command-line wasn't any good.
+ *-------------------------------------------------------------------*/
+ optarg = NULL; /* no argument follows the option */
+ pIndexPosition = NULL; /* not in the middle of anything */
+ return (opterr ? (int)'?' : (int)*pArgString);
+ }
+ else {
+ /*---------------------------------------------------------------------
+ * The letter on the command-line matches one we expect to see
+ *-------------------------------------------------------------------*/
+ if (':' == _next_char(pOptString)) { /* is the next letter a colon? */
+ /* It is a colon. Look for an argument string. */
+ if ('\0' != _next_char(pArgString)) { /* argument in this argv? */
+ optarg = &pArgString[1]; /* Yes, it is */
+ }
+ else {
+ /*-------------------------------------------------------------
+ * The argument string must be in the next argv.
+ * But, what if there is none (bad input from the user)?
+ * In that case, return the letter, and optarg as NULL.
+ *-----------------------------------------------------------*/
+ if (optind < argc)
+ optarg = argv[optind++];
+ else {
+ optarg = NULL;
+ return (opterr ? (int)'?' : (int)*pArgString);
+ }
+ }
+ pIndexPosition = NULL; /* not in the middle of anything */
+ }
+ else {
+ /* it's not a colon, so just return the letter */
+ optarg = NULL; /* no argument follows the option */
+ pIndexPosition = pArgString; /* point to the letter we're on */
+ }
+ return (int)*pArgString; /* return the letter that matched */
+ }
+}
Added: freeswitch/trunk/libs/spandsp/src/msvc/make_at_dictionary.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/src/msvc/make_at_dictionary.vcproj Fri Feb 20 12:22:32 2009
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="make_at_dictionary"
+ ProjectGUID="{DEE932AB-5911-4700-9EEB-8C7090A0A330}"
+ RootNamespace="make_at_dictionary"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;.\spandsp;.\msvc;..\..\tiff-3.8.2\libtiff;.\generated"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\make_at_dictionary.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/spandsp/src/msvc/make_headers.bat
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/src/msvc/make_headers.bat Fri Feb 20 12:22:32 2009
@@ -0,0 +1,27 @@
+..\Debug\make_at_dictionary >..\at_interpreter_dictionary.h
+
+..\Debug\make_modem_filter -m V.17 -i -r >..\v17rx_fixed_rrc.h
+..\Debug\make_modem_filter -m V.17 -r >..\v17rx_floating_rrc.h
+
+..\Debug\make_modem_filter -m V.17 -i -t >..\v17tx_fixed_rrc.h
+..\Debug\make_modem_filter -m V.17 -t >..\v17tx_floating_rrc.h
+
+..\Debug\make_modem_filter -m V.22bis1200 -i -r >..\v22bis_rx_1200_fixed_rrc.h
+..\Debug\make_modem_filter -m V.22bis2400 -i -r >..\v22bis_rx_2400_fixed_rrc.h
+..\Debug\make_modem_filter -m V.22bis1200 -r >..\v22bis_rx_1200_floating_rrc.h
+..\Debug\make_modem_filter -m V.22bis2400 -r >..\v22bis_rx_2400_floating_rrc.h
+
+..\Debug\make_modem_filter -m V.27ter2400 -i -r >..\v27ter_rx_2400_fixed_rrc.h
+..\Debug\make_modem_filter -m V.27ter4800 -i -r >..\v27ter_rx_4800_fixed_rrc.h
+..\Debug\make_modem_filter -m V.27ter2400 -r >..\v27ter_rx_2400_floating_rrc.h
+..\Debug\make_modem_filter -m V.27ter4800 -r >..\v27ter_rx_4800_floating_rrc.h
+..\Debug\make_modem_filter -m V.27ter2400 -i -t >..\v27ter_tx_2400_fixed_rrc.h
+..\Debug\make_modem_filter -m V.27ter4800 -i -t >..\v27ter_tx_4800_fixed_rrc.h
+..\Debug\make_modem_filter -m V.27ter2400 -t >..\v27ter_tx_2400_floating_rrc.h
+..\Debug\make_modem_filter -m V.27ter4800 -t >..\v27ter_tx_4800_floating_rrc.h
+
+..\Debug\make_modem_filter -m V.29 -i -r >..\v29rx_fixed_rrc.h
+..\Debug\make_modem_filter -m V.29 -r >..\v29rx_floating_rrc.h
+..\Debug\make_modem_filter -m V.29 -i -t >..\v29tx_fixed_rrc.h
+..\Debug\make_modem_filter -m V.29 -t >..\v29tx_floating_rrc.h
+
Added: freeswitch/trunk/libs/spandsp/src/msvc/make_modem_filter.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/spandsp/src/msvc/make_modem_filter.vcproj Fri Feb 20 12:22:32 2009
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="make_modem_filter"
+ ProjectGUID="{329A6FA0-0FCC-4435-A950-E670AEFA9838}"
+ RootNamespace="make_modem_filter"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".;.\spandsp;.\msvc;..\..\tiff-3.8.2\libtiff;.\generated"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="getopt.c"
+ >
+ </File>
+ <File
+ RelativePath="..\make_modem_filter.c"
+ >
+ </File>
+ <File
+ RelativePath="..\filter_tools.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\filter_tools.h"
+ >
+ </File>
+ <File
+ RelativePath=".\stdafx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\targetver.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: freeswitch/trunk/libs/spandsp/src/msvc/unistd.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/unistd.h (original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/unistd.h Fri Feb 20 12:22:32 2009
@@ -12,8 +12,8 @@
*
*/
-#if !defined(_INTTYPES_H_)
-#define _INTTYPES_H_
+#if !defined(_UNISTD_H_)
+#define _UNISTD_H_
#ifdef __cplusplus
extern "C" {
@@ -22,7 +22,9 @@
#define open _open
#define write _write
-extern int gethostname (char *name, size_t len);
+extern int getopt(int argc, char *argv[], char *opstring);
+
+extern char *optarg;
#ifdef __cplusplus
}
Modified: freeswitch/trunk/libs/spandsp/src/noise.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/noise.c (original)
+++ freeswitch/trunk/libs/spandsp/src/noise.c Fri Feb 20 12:22:32 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: noise.c,v 1.30 2009/02/03 16:28:39 steveu Exp $
+ * $Id: noise.c,v 1.31 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -80,12 +80,6 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(noise_state_t *) noise_init_dbm0(noise_state_t *s, int seed, float level, int class_of_noise, int quality)
-{
- return noise_init_dbov(s, seed, (level - DBM0_MAX_POWER), class_of_noise, quality);
-}
-/*- End of function --------------------------------------------------------*/
-
SPAN_DECLARE(noise_state_t *) noise_init_dbov(noise_state_t *s, int seed, float level, int class_of_noise, int quality)
{
float rms;
@@ -115,6 +109,18 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(noise_state_t *) noise_init_dbm0(noise_state_t *s, int seed, float level, int class_of_noise, int quality)
+{
+ return noise_init_dbov(s, seed, (level - DBM0_MAX_POWER), class_of_noise, quality);
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) noise_release(noise_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) noise_free(noise_state_t *s)
{
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/oki_adpcm.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/oki_adpcm.c (original)
+++ freeswitch/trunk/libs/spandsp/src/oki_adpcm.c Fri Feb 20 12:22:32 2009
@@ -27,7 +27,7 @@
* The actual OKI ADPCM encode and decode method is derived from freely
* available code, whose exact origins seem uncertain.
*
- * $Id: oki_adpcm.c,v 1.31 2009/02/03 16:28:39 steveu Exp $
+ * $Id: oki_adpcm.c,v 1.32 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -260,6 +260,12 @@
SPAN_DECLARE(int) oki_adpcm_release(oki_adpcm_state_t *s)
{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) oki_adpcm_free(oki_adpcm_state_t *s)
+{
free(s);
return 0;
}
Modified: freeswitch/trunk/libs/spandsp/src/playout.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/playout.c (original)
+++ freeswitch/trunk/libs/spandsp/src/playout.c Fri Feb 20 12:22:32 2009
@@ -29,7 +29,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: playout.c,v 1.16 2009/02/03 16:28:39 steveu Exp $
+ * $Id: playout.c,v 1.17 2009/02/10 13:06:46 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -330,7 +330,7 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(playout_state_t *) playout_new(int min_length, int max_length)
+SPAN_DECLARE(playout_state_t *) playout_init(int min_length, int max_length)
{
playout_state_t *s;
@@ -342,7 +342,7 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(void) playout_free(playout_state_t *s)
+SPAN_DECLARE(int) playout_release(playout_state_t *s)
{
playout_frame_t *frame;
playout_frame_t *next;
@@ -360,8 +360,19 @@
next = frame->later;
free(frame);
}
- /* Finally, free ourselves! */
- free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) playout_free(playout_state_t *s)
+{
+ if (s)
+ {
+ playout_release(s);
+ /* Finally, free ourselves! */
+ free(s);
+ }
+ return 0;
}
/*- End of function --------------------------------------------------------*/
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/plc.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/plc.c (original)
+++ freeswitch/trunk/libs/spandsp/src/plc.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: plc.c,v 1.26 2009/02/03 16:28:39 steveu Exp $
+ * $Id: plc.c,v 1.27 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -248,6 +248,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) plc_release(plc_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) plc_free(plc_state_t *s)
{
if (s)
Modified: freeswitch/trunk/libs/spandsp/src/power_meter.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/power_meter.c (original)
+++ freeswitch/trunk/libs/spandsp/src/power_meter.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: power_meter.c,v 1.27 2009/02/03 16:28:39 steveu Exp $
+ * $Id: power_meter.c,v 1.28 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -62,6 +62,20 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) power_meter_release(power_meter_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) power_meter_free(power_meter_t *s)
+{
+ if (s)
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(power_meter_t *) power_meter_damping(power_meter_t *s, int shift)
{
s->shift = shift;
Modified: freeswitch/trunk/libs/spandsp/src/queue.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/queue.c (original)
+++ freeswitch/trunk/libs/spandsp/src/queue.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: queue.c,v 1.28 2009/02/03 16:28:40 steveu Exp $
+ * $Id: queue.c,v 1.29 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -410,6 +410,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) queue_release(queue_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) queue_free(queue_state_t *s)
{
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/schedule.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/schedule.c (original)
+++ freeswitch/trunk/libs/spandsp/src/schedule.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: schedule.c,v 1.21 2009/02/03 16:28:40 steveu Exp $
+ * $Id: schedule.c,v 1.22 2009/02/10 13:06:46 steveu Exp $
*/
#if defined(HAVE_CONFIG_H)
@@ -149,4 +149,13 @@
return 0;
}
/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) span_schedule_free(span_sched_state_t *s)
+{
+ span_schedule_release(s);
+ if (s)
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/sig_tone.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/sig_tone.c (original)
+++ freeswitch/trunk/libs/spandsp/src/sig_tone.c Fri Feb 20 12:22:32 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: sig_tone.c,v 1.30 2009/02/03 16:28:40 steveu Exp $
+ * $Id: sig_tone.c,v 1.31 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -390,6 +390,19 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) sig_tone_tx_release(sig_tone_tx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) sig_tone_tx_free(sig_tone_tx_state_t *s)
+{
+ if (s)
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
SPAN_DECLARE(int) sig_tone_rx(sig_tone_rx_state_t *s, int16_t amp[], int len)
{
#if defined(SPANDSP_USE_FIXED_POINT)
@@ -674,4 +687,18 @@
return s;
}
/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) sig_tone_rx_release(sig_tone_rx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) sig_tone_rx_free(sig_tone_rx_state_t *s)
+{
+ if (s)
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/silence_gen.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/silence_gen.c (original)
+++ freeswitch/trunk/libs/spandsp/src/silence_gen.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: silence_gen.c,v 1.19 2009/02/04 13:18:53 steveu Exp $
+ * $Id: silence_gen.c,v 1.20 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -128,6 +128,20 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) silence_gen_release(silence_gen_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) silence_gen_free(silence_gen_state_t *s)
+{
+ if (s)
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
/* The following dummy routines, to absorb data, don't really have a proper home,
so they have been put here. */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/adsi.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/adsi.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/adsi.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: adsi.h,v 1.35 2009/02/03 16:28:40 steveu Exp $
+ * $Id: adsi.h,v 1.36 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -394,6 +394,8 @@
*/
SPAN_DECLARE(adsi_rx_state_t *) adsi_rx_init(adsi_rx_state_t *s, int standard, put_msg_func_t put_msg, void *user_data);
+SPAN_DECLARE(int) adsi_rx_release(adsi_rx_state_t *s);
+
SPAN_DECLARE(int) adsi_rx_free(adsi_rx_state_t *s);
/*! \brief Receive a chunk of ADSI audio.
@@ -411,6 +413,8 @@
*/
SPAN_DECLARE(adsi_tx_state_t *) adsi_tx_init(adsi_tx_state_t *s, int standard);
+SPAN_DECLARE(int) adsi_tx_release(adsi_tx_state_t *s);
+
SPAN_DECLARE(int) adsi_tx_free(adsi_tx_state_t *s);
/*! \brief Adjust the preamble associated with an ADSI transmit context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/async.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/async.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/async.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: async.h,v 1.22 2009/02/04 13:18:53 steveu Exp $
+ * $Id: async.h,v 1.23 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -158,6 +158,10 @@
get_byte_func_t get_byte,
void *user_data);
+SPAN_DECLARE(int) async_tx_release(async_tx_state_t *s);
+
+SPAN_DECLARE(int) async_tx_free(async_tx_state_t *s);
+
/*! Get the next bit of a transmitted serial bit stream.
\brief Get the next bit of a transmitted serial bit stream.
\param user_data An opaque point which must point to a transmitter context.
@@ -182,6 +186,10 @@
put_byte_func_t put_byte,
void *user_data);
+SPAN_DECLARE(int) async_rx_release(async_rx_state_t *s);
+
+SPAN_DECLARE(int) async_rx_free(async_rx_state_t *s);
+
/*! Accept a bit from a received serial bit stream
\brief Accept a bit from a received serial bit stream
\param user_data An opaque point which must point to a receiver context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/at_interpreter.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: at_interpreter.h,v 1.22 2009/02/03 16:28:40 steveu Exp $
+ * $Id: at_interpreter.h,v 1.23 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -179,6 +179,12 @@
at_modem_control_handler_t *modem_control_handler,
void *modem_control_user_data);
+/*! Release an AT interpreter context.
+ \brief Release an AT interpreter context.
+ \param s The AT context.
+ \return 0 for OK */
+SPAN_DECLARE(int) at_release(at_state_t *s);
+
/*! Free an AT interpreter context.
\brief Free an AT interpreter context.
\param s The AT context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/awgn.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/awgn.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/awgn.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: awgn.h,v 1.17 2009/02/03 16:28:40 steveu Exp $
+ * $Id: awgn.h,v 1.18 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -82,6 +82,10 @@
SPAN_DECLARE(awgn_state_t *) awgn_init_dbov(awgn_state_t *s, int idum, float level);
+SPAN_DECLARE(int) awgn_release(awgn_state_t *s);
+
+SPAN_DECLARE(int) awgn_free(awgn_state_t *s);
+
SPAN_DECLARE(int16_t) awgn(awgn_state_t *s);
#if defined(__cplusplus)
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/bell_r2_mf.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/bell_r2_mf.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/bell_r2_mf.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: bell_r2_mf.h,v 1.23 2009/02/03 16:28:41 steveu Exp $
+ * $Id: bell_r2_mf.h,v 1.24 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -152,6 +152,11 @@
\return A pointer to the Bell MF generator context.*/
SPAN_DECLARE(bell_mf_tx_state_t *) bell_mf_tx_init(bell_mf_tx_state_t *s);
+/*! \brief Release a Bell MF generator context.
+ \param s The Bell MF generator context.
+ \return 0 for OK, else -1. */
+SPAN_DECLARE(int) bell_mf_tx_release(bell_mf_tx_state_t *s);
+
/*! \brief Free a Bell MF generator context.
\param s The Bell MF generator context.
\return 0 for OK, else -1. */
@@ -177,6 +182,11 @@
\return A pointer to the MFC/R2 generator context.*/
SPAN_DECLARE(r2_mf_tx_state_t *) r2_mf_tx_init(r2_mf_tx_state_t *s, int fwd);
+/*! \brief Release an R2 MF tone generator context.
+ \param s The R2 MF tone generator context.
+ \return 0 for OK, else -1. */
+SPAN_DECLARE(int) r2_mf_tx_release(r2_mf_tx_state_t *s);
+
/*! \brief Free an R2 MF tone generator context.
\param s The R2 MF tone generator context.
\return 0 for OK, else -1. */
@@ -209,6 +219,11 @@
digits_rx_callback_t callback,
void *user_data);
+/*! \brief Release a Bell MF receiver context.
+ \param s The Bell MF receiver context.
+ \return 0 for OK, else -1. */
+SPAN_DECLARE(int) bell_mf_rx_release(bell_mf_rx_state_t *s);
+
/*! \brief Free a Bell MF receiver context.
\param s The Bell MF receiver context.
\return 0 for OK, else -1. */
@@ -242,6 +257,11 @@
tone_report_func_t callback,
void *user_data);
+/*! \brief Release an R2 MF receiver context.
+ \param s The R2 MF receiver context.
+ \return 0 for OK, else -1. */
+SPAN_DECLARE(int) r2_mf_rx_release(r2_mf_rx_state_t *s);
+
/*! \brief Free an R2 MF receiver context.
\param s The R2 MF receiver context.
\return 0 for OK, else -1. */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/bert.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/bert.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/bert.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: bert.h,v 1.22 2009/02/03 16:28:41 steveu Exp $
+ * $Id: bert.h,v 1.23 2009/02/10 13:06:47 steveu Exp $
*/
#if !defined(_SPANDSP_BERT_H_)
@@ -127,6 +127,10 @@
\return The BERT context. */
SPAN_DECLARE(bert_state_t *) bert_init(bert_state_t *s, int limit, int pattern, int resync_len, int resync_percent);
+SPAN_DECLARE(int) bert_release(bert_state_t *s);
+
+SPAN_DECLARE(int) bert_free(bert_state_t *s);
+
/*! Get the next bit of the BERT sequence from the generator.
\param s The BERT context.
\return The bit. */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/bitstream.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/bitstream.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/bitstream.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: bitstream.h,v 1.13 2009/02/03 16:28:41 steveu Exp $
+ * $Id: bitstream.h,v 1.14 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -75,6 +75,10 @@
\return A pointer to the bitstream context. */
SPAN_DECLARE(bitstream_state_t *) bitstream_init(bitstream_state_t *s);
+SPAN_DECLARE(int) bitstream_release(bitstream_state_t *s);
+
+SPAN_DECLARE(int) bitstream_free(bitstream_state_t *s);
+
#if defined(__cplusplus)
}
#endif
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/complex.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/complex.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/complex.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: complex.h,v 1.18 2008/09/03 13:41:42 steveu Exp $
+ * $Id: complex.h,v 1.19 2009/02/10 17:16:57 steveu Exp $
*/
/*! \file */
@@ -121,7 +121,7 @@
}
/*- End of function --------------------------------------------------------*/
-static __inline__ complex_t complex_set(float re, float im)
+static __inline__ complex_t complex_set(double re, double im)
{
complex_t z;
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/dtmf.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/dtmf.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/dtmf.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: dtmf.h,v 1.31 2009/02/03 16:28:41 steveu Exp $
+ * $Id: dtmf.h,v 1.32 2009/02/10 13:06:47 steveu Exp $
*/
#if !defined(_SPANDSP_DTMF_H_)
@@ -127,6 +127,11 @@
\return A pointer to the DTMF generator context. */
SPAN_DECLARE(dtmf_tx_state_t *) dtmf_tx_init(dtmf_tx_state_t *s);
+/*! \brief Release a DTMF tone generator context.
+ \param s The DTMF tone generator context.
+ \return 0 for OK, else -1. */
+SPAN_DECLARE(int) dtmf_tx_release(dtmf_tx_state_t *s);
+
/*! \brief Free a DTMF tone generator context.
\param s The DTMF tone generator context.
\return 0 for OK, else -1. */
@@ -195,6 +200,11 @@
digits_rx_callback_t callback,
void *user_data);
+/*! \brief Release a DTMF receiver context.
+ \param s The DTMF receiver context.
+ \return 0 for OK, else -1. */
+SPAN_DECLARE(int) dtmf_rx_release(dtmf_rx_state_t *s);
+
/*! \brief Free a DTMF receiver context.
\param s The DTMF receiver context.
\return 0 for OK, else -1. */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/echo.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/echo.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/echo.h Fri Feb 20 12:22:32 2009
@@ -24,7 +24,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: echo.h,v 1.18 2009/02/03 16:28:41 steveu Exp $
+ * $Id: echo.h,v 1.19 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -196,12 +196,19 @@
\param len The length of the canceller, in samples.
\return The new canceller context, or NULL if the canceller could not be created.
*/
-SPAN_DECLARE(echo_can_state_t *) echo_can_create(int len, int adaption_mode);
+SPAN_DECLARE(echo_can_state_t *) echo_can_init(int len, int adaption_mode);
+
+/*! Release a voice echo canceller context.
+ \param ec The echo canceller context.
+ \return 0 for OK, else -1.
+*/
+SPAN_DECLARE(int) echo_can_release(echo_can_state_t *ec);
/*! Free a voice echo canceller context.
\param ec The echo canceller context.
+ \return 0 for OK, else -1.
*/
-SPAN_DECLARE(void) echo_can_free(echo_can_state_t *ec);
+SPAN_DECLARE(int) echo_can_free(echo_can_state_t *ec);
/*! Flush (reinitialise) a voice echo canceller context.
\param ec The echo canceller context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/fast_convert.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/fast_convert.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/fast_convert.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fast_convert.h,v 1.2 2009/02/05 12:21:36 steveu Exp $
+ * $Id: fast_convert.h,v 1.3 2009/02/10 13:06:47 steveu Exp $
*/
#if !defined(_SPANDSP_FAST_CONVERT_H_)
@@ -82,6 +82,7 @@
*/
#if defined(__CYGWIN__)
+#if !defined(__cplusplus)
/*
* CYGWIN has lrint and lrintf functions, but they are slow and buggy:
* http://sourceware.org/ml/cygwin/2005-06/msg00153.html
@@ -118,6 +119,7 @@
);
return retval;
}
+#endif
/* The fastest way to convert is the equivalent of lrint() */
static __inline__ long int lfastrint(double x)
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/fax_modems.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fax_modems.h,v 1.8 2009/02/03 16:28:41 steveu Exp $
+ * $Id: fax_modems.h,v 1.9 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -44,8 +44,13 @@
SPAN_DECLARE(int) fax_modems_v17_v21_rx(void *user_data, const int16_t amp[], int len);
SPAN_DECLARE(int) fax_modems_v27ter_v21_rx(void *user_data, const int16_t amp[], int len);
SPAN_DECLARE(int) fax_modems_v29_v21_rx(void *user_data, const int16_t amp[], int len);
+
SPAN_DECLARE(fax_modems_state_t *) fax_modems_init(fax_modems_state_t *s, void *user_data);
+SPAN_DECLARE(int) fax_modems_release(fax_modems_state_t *s);
+
+SPAN_DECLARE(int) fax_modems_free(fax_modems_state_t *s);
+
#if defined(__cplusplus)
}
#endif
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/fsk.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fsk.h,v 1.35 2009/02/03 16:28:41 steveu Exp $
+ * $Id: fsk.h,v 1.36 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -148,6 +148,10 @@
get_bit_func_t get_bit,
void *user_data);
+SPAN_DECLARE(int) fsk_tx_release(fsk_tx_state_t *s);
+
+SPAN_DECLARE(int) fsk_tx_free(fsk_tx_state_t *s);
+
/*! Adjust an FSK modem transmit context's power output.
\brief Adjust an FSK modem transmit context's power output.
\param s The modem context.
@@ -197,6 +201,10 @@
put_bit_func_t put_bit,
void *user_data);
+SPAN_DECLARE(int) fsk_rx_release(fsk_rx_state_t *s);
+
+SPAN_DECLARE(int) fsk_rx_free(fsk_rx_state_t *s);
+
/*! Process a block of received FSK modem audio samples.
\brief Process a block of received FSK modem audio samples.
\param s The modem context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/g711.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/g711.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/g711.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: g711.h,v 1.17 2009/02/03 16:28:41 steveu Exp $
+ * $Id: g711.h,v 1.18 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -280,11 +280,16 @@
\return A pointer to the G.711 context, or NULL for error. */
SPAN_DECLARE(g711_state_t *) g711_init(g711_state_t *s, int mode);
-/*! Free a G.711 encode or decode context.
+/*! Release a G.711 encode or decode context.
\param s The G.711 context.
\return 0 for OK. */
SPAN_DECLARE(int) g711_release(g711_state_t *s);
+/*! Free a G.711 encode or decode context.
+ \param s The G.711 context.
+ \return 0 for OK. */
+SPAN_DECLARE(int) g711_free(g711_state_t *s);
+
#if defined(__cplusplus)
}
#endif
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/g722.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/g722.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/g722.h Fri Feb 20 12:22:32 2009
@@ -28,7 +28,7 @@
* Computer Science, Speech Group
* Chengxiang Lu and Alex Hauptmann
*
- * $Id: g722.h,v 1.24 2009/02/03 16:28:41 steveu Exp $
+ * $Id: g722.h,v 1.25 2009/02/10 13:06:47 steveu Exp $
*/
@@ -75,6 +75,8 @@
SPAN_DECLARE(int) g722_encode_release(g722_encode_state_t *s);
+SPAN_DECLARE(int) g722_encode_free(g722_encode_state_t *s);
+
/*! Encode a buffer of linear PCM data to G.722
\param s The G.722 context.
\param g722_data The G.722 data produced.
@@ -93,6 +95,8 @@
SPAN_DECLARE(int) g722_decode_release(g722_decode_state_t *s);
+SPAN_DECLARE(int) g722_decode_free(g722_decode_state_t *s);
+
/*! Decode a buffer of G.722 data to linear PCM.
\param s The G.722 context.
\param amp The audio sample buffer.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/g726.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/g726.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/g726.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: g726.h,v 1.24 2009/02/03 16:28:41 steveu Exp $
+ * $Id: g726.h,v 1.25 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -79,11 +79,16 @@
\return A pointer to the G.726 context, or NULL for error. */
SPAN_DECLARE(g726_state_t *) g726_init(g726_state_t *s, int bit_rate, int ext_coding, int packing);
-/*! Free a G.726 encode or decode context.
+/*! Release a G.726 encode or decode context.
\param s The G.726 context.
\return 0 for OK. */
SPAN_DECLARE(int) g726_release(g726_state_t *s);
+/*! Free a G.726 encode or decode context.
+ \param s The G.726 context.
+ \return 0 for OK. */
+SPAN_DECLARE(int) g726_free(g726_state_t *s);
+
/*! Decode a buffer of G.726 ADPCM data to linear PCM, a-law or u-law.
\param s The G.726 context.
\param amp The audio sample buffer.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/gsm0610.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/gsm0610.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/gsm0610.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: gsm0610.h,v 1.20 2009/02/03 16:28:41 steveu Exp $
+ * $Id: gsm0610.h,v 1.21 2009/02/10 13:06:47 steveu Exp $
*/
#if !defined(_SPANDSP_GSM0610_H_)
@@ -90,6 +90,11 @@
\return 0 for success, else -1. */
SPAN_DECLARE(int) gsm0610_release(gsm0610_state_t *s);
+/*! Free a GSM 06.10 encode or decode context.
+ \param s The GSM 06.10 context
+ \return 0 for success, else -1. */
+SPAN_DECLARE(int) gsm0610_free(gsm0610_state_t *s);
+
/*! Set the packing format for a GSM 06.10 encode or decode context.
\param s The GSM 06.10 context
\param packing One of the GSM0610_PACKING_xxx options.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/hdlc.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/hdlc.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/hdlc.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: hdlc.h,v 1.42 2009/02/03 16:28:41 steveu Exp $
+ * $Id: hdlc.h,v 1.43 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -101,6 +101,10 @@
hdlc_frame_handler_t handler,
void *user_data);
+SPAN_DECLARE(int) hdlc_rx_release(hdlc_rx_state_t *s);
+
+SPAN_DECLARE(int) hdlc_rx_free(hdlc_rx_state_t *s);
+
/*! \brief Set the maximum frame length for an HDLC receiver context.
\param s A pointer to an HDLC receiver context.
\param max_len The maximum permitted length of a frame.
@@ -157,6 +161,10 @@
hdlc_underflow_handler_t handler,
void *user_data);
+SPAN_DECLARE(int) hdlc_tx_release(hdlc_tx_state_t *s);
+
+SPAN_DECLARE(int) hdlc_tx_free(hdlc_tx_state_t *s);
+
/*! \brief Set the maximum frame length for an HDLC transmitter context.
\param s A pointer to an HDLC transmitter context.
\param max_len The maximum length.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/ima_adpcm.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/ima_adpcm.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/ima_adpcm.h Fri Feb 20 12:22:32 2009
@@ -26,7 +26,7 @@
* Based on a bit from here, a bit from there, eye of toad,
* ear of bat, etc - plus, of course, my own 2 cents.
*
- * $Id: ima_adpcm.h,v 1.23 2009/02/03 16:28:41 steveu Exp $
+ * $Id: ima_adpcm.h,v 1.24 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -77,11 +77,16 @@
int variant,
int chunk_size);
-/*! Free an IMA ADPCM encode or decode context.
+/*! Release an IMA ADPCM encode or decode context.
\param s The IMA ADPCM context.
\return 0 for OK. */
SPAN_DECLARE(int) ima_adpcm_release(ima_adpcm_state_t *s);
+/*! Free an IMA ADPCM encode or decode context.
+ \param s The IMA ADPCM context.
+ \return 0 for OK. */
+SPAN_DECLARE(int) ima_adpcm_free(ima_adpcm_state_t *s);
+
/*! Encode a buffer of linear PCM data to IMA ADPCM.
\param s The IMA ADPCM context.
\param ima_data The IMA ADPCM data produced.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/logging.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/logging.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/logging.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: logging.h,v 1.18 2009/01/31 08:48:11 steveu Exp $
+ * $Id: logging.h,v 1.19 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -109,8 +109,6 @@
*/
SPAN_DECLARE(int) span_log_buf(logging_state_t *s, int level, const char *tag, const uint8_t *buf, int len);
-SPAN_DECLARE(int) span_log_init(logging_state_t *s, int level, const char *tag);
-
SPAN_DECLARE(int) span_log_set_level(logging_state_t *s, int level);
SPAN_DECLARE(int) span_log_set_tag(logging_state_t *s, const char *tag);
@@ -129,6 +127,12 @@
SPAN_DECLARE(void) span_set_error_handler(error_handler_func_t func);
+SPAN_DECLARE(int) span_log_init(logging_state_t *s, int level, const char *tag);
+
+SPAN_DECLARE(int) span_log_release(logging_state_t *s);
+
+SPAN_DECLARE(int) span_log_free(logging_state_t *s);
+
#if defined(__cplusplus)
}
#endif
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/lpc10.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/lpc10.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/lpc10.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: lpc10.h,v 1.20 2009/02/03 16:28:41 steveu Exp $
+ * $Id: lpc10.h,v 1.21 2009/02/10 13:06:47 steveu Exp $
*/
#if !defined(_SPANDSP_LPC10_H_)
@@ -78,6 +78,8 @@
SPAN_DECLARE(int) lpc10_encode_release(lpc10_encode_state_t *s);
+SPAN_DECLARE(int) lpc10_encode_free(lpc10_encode_state_t *s);
+
/*! Encode a buffer of linear PCM data to LPC10e.
\param s The LPC10e context.
\param ima_data The LPC10e data produced.
@@ -95,6 +97,8 @@
SPAN_DECLARE(int) lpc10_decode_release(lpc10_decode_state_t *s);
+SPAN_DECLARE(int) lpc10_decode_free(lpc10_decode_state_t *s);
+
/*! Decode a buffer of LPC10e data to linear PCM.
\param s The LPC10e context.
\param amp The audio sample buffer.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/modem_connect_tones.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/modem_connect_tones.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/modem_connect_tones.h Fri Feb 20 12:22:32 2009
@@ -24,7 +24,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: modem_connect_tones.h,v 1.21 2009/02/03 16:28:41 steveu Exp $
+ * $Id: modem_connect_tones.h,v 1.22 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -107,6 +107,12 @@
SPAN_DECLARE(modem_connect_tones_tx_state_t *) modem_connect_tones_tx_init(modem_connect_tones_tx_state_t *s,
int tone_type);
+/*! \brief Release an instance of the modem connect tones generator.
+ \param s The context.
+ \return 0 for OK, else -1.
+*/
+SPAN_DECLARE(int) modem_connect_tones_tx_release(modem_connect_tones_tx_state_t *s);
+
/*! \brief Free an instance of the modem connect tones generator.
\param s The context.
\return 0 for OK, else -1.
@@ -152,6 +158,11 @@
tone_report_func_t tone_callback,
void *user_data);
+/*! \brief Release an instance of the modem connect tones detector.
+ \param s The context.
+ \return 0 for OK, else -1. */
+SPAN_DECLARE(int) modem_connect_tones_rx_release(modem_connect_tones_rx_state_t *s);
+
/*! \brief Free an instance of the modem connect tones detector.
\param s The context.
\return 0 for OK, else -1. */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/noise.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/noise.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/noise.h Fri Feb 20 12:22:32 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: noise.h,v 1.16 2009/02/03 16:28:41 steveu Exp $
+ * $Id: noise.h,v 1.17 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -112,6 +112,8 @@
SPAN_DECLARE(noise_state_t *) noise_init_dbov(noise_state_t *s, int seed, float level, int class_of_noise, int quality);
+SPAN_DECLARE(int) noise_release(noise_state_t *s);
+
SPAN_DECLARE(int) noise_free(noise_state_t *s);
/*! Generate a sample of audio noise.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/oki_adpcm.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/oki_adpcm.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/oki_adpcm.h Fri Feb 20 12:22:32 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: oki_adpcm.h,v 1.23 2009/02/03 16:28:41 steveu Exp $
+ * $Id: oki_adpcm.h,v 1.24 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -64,11 +64,16 @@
SPAN_DECLARE(oki_adpcm_state_t *) oki_adpcm_init(oki_adpcm_state_t *s,
int bit_rate);
-/*! Free an Oki ADPCM encode or decode context.
+/*! Release an Oki ADPCM encode or decode context.
\param s The Oki ADPCM context.
\return 0 for OK. */
SPAN_DECLARE(int) oki_adpcm_release(oki_adpcm_state_t *s);
+/*! Free an Oki ADPCM encode or decode context.
+ \param s The Oki ADPCM context.
+ \return 0 for OK. */
+SPAN_DECLARE(int) oki_adpcm_free(oki_adpcm_state_t *s);
+
/*! Decode a buffer of Oki ADPCM data to linear PCM.
\param s The Oki ADPCM context.
\param amp The audio sample buffer.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/playout.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/playout.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/playout.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: playout.h,v 1.13 2009/02/03 16:28:41 steveu Exp $
+ * $Id: playout.h,v 1.14 2009/02/10 13:06:47 steveu Exp $
*/
#if !defined(_SPANDSP_PLAYOUT_H_)
@@ -182,17 +182,6 @@
\return The next timestamp. */
SPAN_DECLARE(timestamp_t) playout_next_due(playout_state_t *s);
-/*! Create a new instance of play-out buffering.
- \param min_length Minimum length of the buffer, in samples.
- \param max_length Maximum length of the buffer, in samples. If this equals min_length, static
- length buffering is used.
- \return The new context */
-SPAN_DECLARE(playout_state_t *) playout_new(int min_length, int max_length);
-
-/*! Destroy an instance of play-out buffering.
- \param s The play-out context to be destroyed */
-SPAN_DECLARE(void) playout_free(playout_state_t *s);
-
/*! Reset an instance of play-out buffering.
NOTE: The buffer should be empty before you call this function, otherwise
you will leak queued frames, and some internal structures
@@ -202,6 +191,23 @@
length buffering is used. */
SPAN_DECLARE(void) playout_restart(playout_state_t *s, int min_length, int max_length);
+/*! Create a new instance of play-out buffering.
+ \param min_length Minimum length of the buffer, in samples.
+ \param max_length Maximum length of the buffer, in samples. If this equals min_length, static
+ length buffering is used.
+ \return The new context */
+SPAN_DECLARE(playout_state_t *) playout_init(int min_length, int max_length);
+
+/*! Release an instance of play-out buffering.
+ \param s The play-out context to be releaased
+ \return 0 if OK, else -1 */
+SPAN_DECLARE(int) playout_release(playout_state_t *s);
+
+/*! Free an instance of play-out buffering.
+ \param s The play-out context to be destroyed
+ \return 0 if OK, else -1 */
+SPAN_DECLARE(int) playout_free(playout_state_t *s);
+
#if defined(__cplusplus)
}
#endif
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/plc.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/plc.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/plc.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: plc.h,v 1.20 2009/02/03 16:28:41 steveu Exp $
+ * $Id: plc.h,v 1.21 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -155,6 +155,11 @@
\return A pointer to the the packet loss concealer context. */
SPAN_DECLARE(plc_state_t *) plc_init(plc_state_t *s);
+/*! Release a packet loss concealer context.
+ \param s The packet loss concealer context.
+ \return 0 for OK. */
+SPAN_DECLARE(int) plc_release(plc_state_t *s);
+
/*! Free a packet loss concealer context.
\param s The packet loss concealer context.
\return 0 for OK. */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/power_meter.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/power_meter.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/power_meter.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: power_meter.h,v 1.17 2009/02/03 16:28:41 steveu Exp $
+ * $Id: power_meter.h,v 1.18 2009/02/10 13:06:47 steveu Exp $
*/
#if !defined(_POWER_METER_H_)
@@ -68,6 +68,10 @@
\return The power meter context. */
SPAN_DECLARE(power_meter_t *) power_meter_init(power_meter_t *s, int shift);
+SPAN_DECLARE(int) power_meter_release(power_meter_t *s);
+
+SPAN_DECLARE(int) power_meter_free(power_meter_t *s);
+
/*! Change the damping factor of a power meter context.
\brief Change the damping factor of a power meter context.
\param s The power meter context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/queue.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/queue.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/queue.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: queue.h,v 1.20 2009/02/03 16:28:41 steveu Exp $
+ * $Id: queue.h,v 1.21 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -160,10 +160,16 @@
\return A pointer to the context if OK, else NULL. */
SPAN_DECLARE(queue_state_t *) queue_init(queue_state_t *s, int len, int flags);
-/*! Delete a queue.
+/*! Release a queue.
+ \brief Release a queue.
+ \param s The queue context.
+ \return 0 if OK, else -1. */
+SPAN_DECLARE(int) queue_release(queue_state_t *s);
+
+/*! Free a queue.
\brief Delete a queue.
\param s The queue context.
- \return 0 if deleted OK, else -1. */
+ \return 0 if OK, else -1. */
SPAN_DECLARE(int) queue_free(queue_state_t *s);
#if defined(__cplusplus)
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/schedule.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/schedule.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/schedule.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: schedule.h,v 1.19 2009/02/03 16:28:41 steveu Exp $
+ * $Id: schedule.h,v 1.20 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -60,6 +60,7 @@
SPAN_DECLARE(span_sched_state_t *) span_schedule_init(span_sched_state_t *s);
SPAN_DECLARE(int) span_schedule_release(span_sched_state_t *s);
+SPAN_DECLARE(int) span_schedule_free(span_sched_state_t *s);
#if defined(__cplusplus)
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/sig_tone.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/sig_tone.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/sig_tone.h Fri Feb 20 12:22:32 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: sig_tone.h,v 1.17 2009/02/03 16:28:41 steveu Exp $
+ * $Id: sig_tone.h,v 1.18 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -115,6 +115,10 @@
\return A pointer to the signalling tone context, or NULL if there was a problem. */
SPAN_DECLARE(sig_tone_rx_state_t *) sig_tone_rx_init(sig_tone_rx_state_t *s, int tone_type, sig_tone_func_t sig_update, void *user_data);
+SPAN_DECLARE(int) sig_tone_rx_release(sig_tone_rx_state_t *s);
+
+SPAN_DECLARE(int) sig_tone_rx_free(sig_tone_rx_state_t *s);
+
/*! Generate a block of signaling tone audio samples.
\brief Generate a block of signaling tone audio samples.
\param s The signaling tone context.
@@ -138,6 +142,10 @@
\return A pointer to the signalling tone context, or NULL if there was a problem. */
SPAN_DECLARE(sig_tone_tx_state_t *) sig_tone_tx_init(sig_tone_tx_state_t *s, int tone_type, sig_tone_func_t sig_update, void *user_data);
+SPAN_DECLARE(int) sig_tone_tx_release(sig_tone_tx_state_t *s);
+
+SPAN_DECLARE(int) sig_tone_tx_free(sig_tone_tx_state_t *s);
+
#if defined(__cplusplus)
}
#endif
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: silence_gen.h,v 1.15 2009/02/04 13:18:53 steveu Exp $
+ * $Id: silence_gen.h,v 1.16 2009/02/10 13:06:47 steveu Exp $
*/
#if !defined(_SPANDSP_SILENCE_GEN_H_)
@@ -105,6 +105,10 @@
*/
SPAN_DECLARE(silence_gen_state_t *) silence_gen_init(silence_gen_state_t *s, int silent_samples);
+SPAN_DECLARE(int) silence_gen_release(silence_gen_state_t *s);
+
+SPAN_DECLARE(int) silence_gen_free(silence_gen_state_t *s);
+
/* The following dummy routines, to absorb data, don't really have a proper home,
so they have been put here. */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_rx.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: super_tone_rx.h,v 1.20 2009/02/03 16:28:41 steveu Exp $
+ * $Id: super_tone_rx.h,v 1.21 2009/02/10 13:06:47 steveu Exp $
*/
#if !defined(_SPANDSP_SUPER_TONE_RX_H_)
@@ -119,6 +119,12 @@
\param s The supervisory tone context.
\return 0 for OK, -1 for fail.
*/
+SPAN_DECLARE(int) super_tone_rx_release(super_tone_rx_state_t *s);
+
+/*! Free a supervisory tone detector.
+ \param s The supervisory tone context.
+ \return 0 for OK, -1 for fail.
+*/
SPAN_DECLARE(int) super_tone_rx_free(super_tone_rx_state_t *s);
/*! Define a callback routine to be called each time a tone pattern element is complete. This is
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_tx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_tx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/super_tone_tx.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: super_tone_tx.h,v 1.16 2009/02/03 16:28:41 steveu Exp $
+ * $Id: super_tone_tx.h,v 1.17 2009/02/10 13:06:47 steveu Exp $
*/
#if !defined(_SPANDSP_SUPER_TONE_TX_H_)
@@ -58,7 +58,7 @@
int length,
int cycles);
-SPAN_DECLARE(void) super_tone_tx_free(super_tone_tx_step_t *s);
+SPAN_DECLARE(int) super_tone_tx_free_tone(super_tone_tx_step_t *s);
/*! Initialise a supervisory tone generator.
\brief Initialise a supervisory tone generator.
@@ -67,6 +67,10 @@
\return The supervisory tone generator context. */
SPAN_DECLARE(super_tone_tx_state_t *) super_tone_tx_init(super_tone_tx_state_t *s, super_tone_tx_step_t *tree);
+SPAN_DECLARE(int) super_tone_tx_release(super_tone_tx_state_t *s);
+
+SPAN_DECLARE(int) super_tone_tx_free(super_tone_tx_state_t *s);
+
/*! Generate a block of audio samples for a supervisory tone pattern.
\brief Generate a block of audio samples for a supervisory tone pattern.
\param s The supervisory tone context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t31.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t31.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t31.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t31.h,v 1.57 2009/02/03 16:28:41 steveu Exp $
+ * $Id: t31.h,v 1.58 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -140,6 +140,12 @@
\return 0 for OK */
SPAN_DECLARE(int) t31_release(t31_state_t *s);
+/*! Free a T.31 context.
+ \brief Release a T.31 context.
+ \param s The T.31 context.
+ \return 0 for OK */
+SPAN_DECLARE(int) t31_free(t31_state_t *s);
+
#if defined(__cplusplus)
}
#endif
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t38_core.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_core.h,v 1.36 2009/02/03 16:28:41 steveu Exp $
+ * $Id: t38_core.h,v 1.37 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -336,6 +336,10 @@
t38_tx_packet_handler_t *tx_packet_handler,
void *tx_packet_user_data);
+SPAN_DECLARE(int) t38_core_release(t38_core_state_t *s);
+
+SPAN_DECLARE(int) t38_core_free(t38_core_state_t *s);
+
#if defined(__cplusplus)
}
#endif
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t38_gateway.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t38_gateway.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t38_gateway.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_gateway.h,v 1.61 2009/02/03 16:28:41 steveu Exp $
+ * $Id: t38_gateway.h,v 1.62 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -86,6 +86,12 @@
t38_tx_packet_handler_t *tx_packet_handler,
void *tx_packet_user_data);
+/*! Release a gateway mode T.38 context.
+ \brief Release a T.38 context.
+ \param s The T.38 context.
+ \return 0 for OK, else -1. */
+SPAN_DECLARE(int) t38_gateway_release(t38_gateway_state_t *s);
+
/*! Free a gateway mode T.38 context.
\brief Free a T.38 context.
\param s The T.38 context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h Fri Feb 20 12:22:32 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_non_ecm_buffer.h,v 1.6 2009/02/04 13:18:53 steveu Exp $
+ * $Id: t38_non_ecm_buffer.h,v 1.7 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -61,6 +61,10 @@
\return A pointer to the buffer context, or NULL if there was a problem. */
SPAN_DECLARE(t38_non_ecm_buffer_state_t *) t38_non_ecm_buffer_init(t38_non_ecm_buffer_state_t *s, int mode, int min_row_bits);
+SPAN_DECLARE(int) t38_non_ecm_buffer_release(t38_non_ecm_buffer_state_t *s);
+
+SPAN_DECLARE(int) t38_non_ecm_buffer_free(t38_non_ecm_buffer_state_t *s);
+
/*! \brief Set the mode of a T.38 rate adapting non-ECM buffer context.
\param s The buffer context.
\param mode TRUE for image data mode, or FALSE for TCF mode.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t4.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t4.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t4.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t4.h,v 1.56 2009/02/05 12:21:36 steveu Exp $
+ * $Id: t4.h,v 1.57 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -244,6 +244,13 @@
\return 0 for success, otherwise -1. */
SPAN_DECLARE(int) t4_rx_end_page(t4_state_t *s);
+/*! \brief End reception of a document. Tidy up and close the file.
+ This should be used to end T.4 reception started with
+ t4_rx_init.
+ \param s The T.4 receive context.
+ \return 0 for success, otherwise -1. */
+SPAN_DECLARE(int) t4_rx_release(t4_state_t *s);
+
/*! \brief End reception of a document. Tidy up, close the file and
free the context. This should be used to end T.4 reception
started with t4_rx_init.
@@ -251,13 +258,6 @@
\return 0 for success, otherwise -1. */
SPAN_DECLARE(int) t4_rx_free(t4_state_t *s);
-/*! \brief End reception of a document. Tidy up and close the file.
- This should be used to end T.4 reception started with
- t4_rx_init.
- \param s The T.4 context.
- \return 0 for success, otherwise -1. */
-SPAN_DECLARE(int) t4_rx_end(t4_state_t *s);
-
SPAN_DECLARE(int) t4_rx_set_row_write_handler(t4_state_t *s, t4_row_write_handler_t handler, void *user_data);
/*! \brief Set the encoding for the received data.
@@ -374,6 +374,12 @@
set (i.e. the returned value is 2 or 3). */
SPAN_DECLARE(int) t4_tx_check_bit(t4_state_t *s);
+/*! \brief End the transmission of a document. Tidy up and close the file.
+ This should be used to end T.4 transmission started with t4_tx_init.
+ \param s The T.4 context.
+ \return 0 for success, otherwise -1. */
+SPAN_DECLARE(int) t4_tx_release(t4_state_t *s);
+
/*! \brief End the transmission of a document. Tidy up, close the file and
free the context. This should be used to end T.4 transmission
started with t4_tx_init.
@@ -381,12 +387,6 @@
\return 0 for success, otherwise -1. */
SPAN_DECLARE(int) t4_tx_free(t4_state_t *s);
-/*! \brief End the transmission of a document. Tidy up and close the file.
- This should be used to end T.4 transmission started with t4_tx_init.
- \param s The T.4 context.
- \return 0 for success, otherwise -1. */
-SPAN_DECLARE(int) t4_tx_end(t4_state_t *s);
-
/*! \brief Set the encoding for the encoded data.
\param s The T.4 context.
\param encoding The encoding. */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/time_scale.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/time_scale.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/time_scale.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: time_scale.h,v 1.19 2009/02/03 16:28:41 steveu Exp $
+ * $Id: time_scale.h,v 1.20 2009/02/10 13:06:47 steveu Exp $
*/
#if !defined(_SPANDSP_TIME_SCALE_H_)
@@ -73,6 +73,11 @@
\return A pointer to the context, or NULL if there was a problem. */
SPAN_DECLARE(time_scale_state_t *) time_scale_init(time_scale_state_t *s, int sample_rate, float playout_rate);
+/*! \brief Release a time scale context.
+ \param s The time scale context.
+ \return 0 for OK, else -1. */
+SPAN_DECLARE(int) time_scale_release(time_scale_state_t *s);
+
/*! \brief Free a time scale context.
\param s The time scale context.
\return 0 for OK, else -1. */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/tone_detect.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/tone_detect.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/tone_detect.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: tone_detect.h,v 1.44 2009/02/03 16:28:41 steveu Exp $
+ * $Id: tone_detect.h,v 1.45 2009/02/10 13:06:47 steveu Exp $
*/
#if !defined(_SPANDSP_TONE_DETECT_H_)
@@ -86,6 +86,10 @@
SPAN_DECLARE(goertzel_state_t *) goertzel_init(goertzel_state_t *s,
goertzel_descriptor_t *t);
+SPAN_DECLARE(int) goertzel_release(goertzel_state_t *s);
+
+SPAN_DECLARE(int) goertzel_free(goertzel_state_t *s);
+
/*! \brief Reset the state of a Goertzel transform.
\param s The Goertzel context. */
SPAN_DECLARE(void) goertzel_reset(goertzel_state_t *s);
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/tone_generate.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: tone_generate.h,v 1.37 2009/02/03 16:28:41 steveu Exp $
+ * $Id: tone_generate.h,v 1.38 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -88,9 +88,13 @@
int d4,
int repeat);
+SPAN_DECLARE(int) tone_gen(tone_gen_state_t *s, int16_t amp[], int max_samples);
+
SPAN_DECLARE(tone_gen_state_t *) tone_gen_init(tone_gen_state_t *s, tone_gen_descriptor_t *t);
-SPAN_DECLARE(int) tone_gen(tone_gen_state_t *s, int16_t amp[], int max_samples);
+SPAN_DECLARE(int) tone_gen_release(tone_gen_state_t *s);
+
+SPAN_DECLARE(int) tone_gen_free(tone_gen_state_t *s);
#if defined(__cplusplus)
}
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v17rx.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v17rx.h,v 1.60 2009/02/03 16:28:41 steveu Exp $
+ * $Id: v17rx.h,v 1.61 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -253,6 +253,12 @@
\return 0 for OK, -1 for bad parameter */
SPAN_DECLARE(int) v17_rx_restart(v17_rx_state_t *s, int bit_rate, int short_train);
+/*! Release a V.17 modem receive context.
+ \brief Release a V.17 modem receive context.
+ \param s The modem context.
+ \return 0 for OK */
+SPAN_DECLARE(int) v17_rx_release(v17_rx_state_t *s);
+
/*! Free a V.17 modem receive context.
\brief Free a V.17 modem receive context.
\param s The modem context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v17tx.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v17tx.h,v 1.39 2009/02/03 16:28:41 steveu Exp $
+ * $Id: v17tx.h,v 1.40 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -120,6 +120,12 @@
\return 0 for OK, -1 for parameter error. */
SPAN_DECLARE(int) v17_tx_restart(v17_tx_state_t *s, int bit_rate, int tep, int short_train);
+/*! Release a V.17 modem transmit context.
+ \brief Release a V.17 modem transmit context.
+ \param s The modem context.
+ \return 0 for OK */
+SPAN_DECLARE(int) v17_tx_release(v17_tx_state_t *s);
+
/*! Free a V.17 modem transmit context.
\brief Free a V.17 modem transmit context.
\param s The modem context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v22bis.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v22bis.h,v 1.34 2009/02/03 16:28:41 steveu Exp $
+ * $Id: v22bis.h,v 1.35 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -152,6 +152,12 @@
put_bit_func_t put_bit,
void *user_data);
+/*! Release a V.22bis modem receive context.
+ \brief Release a V.22bis modem receive context.
+ \param s The modem context.
+ \return 0 for OK */
+SPAN_DECLARE(int) v22bis_release(v22bis_state_t *s);
+
/*! Free a V.22bis modem receive context.
\brief Free a V.22bis modem receive context.
\param s The modem context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_rx.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_rx.h,v 1.56 2009/02/03 16:28:41 steveu Exp $
+ * $Id: v27ter_rx.h,v 1.57 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -88,6 +88,12 @@
\return 0 for OK, -1 for bad parameter */
SPAN_DECLARE(int) v27ter_rx_restart(v27ter_rx_state_t *s, int bit_rate, int old_train);
+/*! Release a V.27ter modem receive context.
+ \brief Release a V.27ter modem receive context.
+ \param s The modem context.
+ \return 0 for OK */
+SPAN_DECLARE(int) v27ter_rx_release(v27ter_rx_state_t *s);
+
/*! Free a V.27ter modem receive context.
\brief Free a V.27ter modem receive context.
\param s The modem context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_tx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_tx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v27ter_tx.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_tx.h,v 1.39 2009/02/03 16:28:41 steveu Exp $
+ * $Id: v27ter_tx.h,v 1.40 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -101,6 +101,12 @@
\return 0 for OK, -1 for bad parameter */
SPAN_DECLARE(int) v27ter_tx_restart(v27ter_tx_state_t *s, int bit_rate, int tep);
+/*! Release a V.27ter modem transmit context.
+ \brief Release a V.27ter modem transmit context.
+ \param s The modem context.
+ \return 0 for OK */
+SPAN_DECLARE(int) v27ter_tx_release(v27ter_tx_state_t *s);
+
/*! Free a V.27ter modem transmit context.
\brief Free a V.27ter modem transmit context.
\param s The modem context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v29rx.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29rx.h,v 1.67 2009/02/03 16:28:41 steveu Exp $
+ * $Id: v29rx.h,v 1.68 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -157,6 +157,12 @@
\return 0 for OK, -1 for bad parameter */
SPAN_DECLARE(int) v29_rx_restart(v29_rx_state_t *s, int bit_rate, int old_train);
+/*! Release a V.29 modem receive context.
+ \brief Release a V.29 modem receive context.
+ \param s The modem context.
+ \return 0 for OK */
+SPAN_DECLARE(int) v29_rx_release(v29_rx_state_t *s);
+
/*! Free a V.29 modem receive context.
\brief Free a V.29 modem receive context.
\param s The modem context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v29tx.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v29tx.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v29tx.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29tx.h,v 1.37 2009/02/03 16:28:41 steveu Exp $
+ * $Id: v29tx.h,v 1.38 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -132,6 +132,12 @@
\return 0 for OK, -1 for bad parameter */
SPAN_DECLARE(int) v29_tx_restart(v29_tx_state_t *s, int bit_rate, int tep);
+/*! Release a V.29 modem transmit context.
+ \brief Release a V.29 modem transmit context.
+ \param s The modem context.
+ \return 0 for OK */
+SPAN_DECLARE(int) v29_tx_release(v29_tx_state_t *s);
+
/*! Free a V.29 modem transmit context.
\brief Free a V.29 modem transmit context.
\param s The modem context.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v42.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v42.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v42.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v42.h,v 1.29 2009/02/04 13:18:53 steveu Exp $
+ * $Id: v42.h,v 1.30 2009/02/10 13:06:47 steveu Exp $
*/
/*! \page v42_page V.42 modem error correction
@@ -147,6 +147,11 @@
\return 0 if OK */
SPAN_DECLARE(int) v42_release(v42_state_t *s);
+/*! Free a V.42 context.
+ \param s The V.42 context.
+ \return 0 if OK */
+SPAN_DECLARE(int) v42_free(v42_state_t *s);
+
#if defined(__cplusplus)
}
#endif
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v42bis.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v42bis.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v42bis.h Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v42bis.h,v 1.25 2009/02/03 16:28:41 steveu Exp $
+ * $Id: v42bis.h,v 1.26 2009/02/10 13:06:47 steveu Exp $
*/
/*! \page v42bis_page V.42bis modem data compression
@@ -94,6 +94,14 @@
\return 0 */
SPAN_DECLARE(int) v42bis_decompress_flush(v42bis_state_t *s);
+/*! Set the compression mode.
+ \param s The V.42bis context.
+ \param mode One of the V.42bis compression modes -
+ V42BIS_COMPRESSION_MODE_DYNAMIC,
+ V42BIS_COMPRESSION_MODE_ALWAYS,
+ V42BIS_COMPRESSION_MODE_NEVER */
+SPAN_DECLARE(void) v42bis_compression_control(v42bis_state_t *s, int mode);
+
/*! Initialise a V.42bis context.
\param s The V.42bis context.
\param negotiated_p0 The negotiated P0 parameter, from the V.42bis spec.
@@ -117,19 +125,16 @@
void *data_user_data,
int max_data_len);
-/*! Set the compression mode.
- \param s The V.42bis context.
- \param mode One of the V.42bis compression modes -
- V42BIS_COMPRESSION_MODE_DYNAMIC,
- V42BIS_COMPRESSION_MODE_ALWAYS,
- V42BIS_COMPRESSION_MODE_NEVER */
-SPAN_DECLARE(void) v42bis_compression_control(v42bis_state_t *s, int mode);
-
/*! Release a V.42bis context.
\param s The V.42bis context.
\return 0 if OK */
SPAN_DECLARE(int) v42bis_release(v42bis_state_t *s);
+/*! Free a V.42bis context.
+ \param s The V.42bis context.
+ \return 0 if OK */
+SPAN_DECLARE(int) v42bis_free(v42bis_state_t *s);
+
#if defined(__cplusplus)
}
#endif
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/version.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/version.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/version.h Fri Feb 20 12:22:32 2009
@@ -30,8 +30,8 @@
/* The date and time of the version are in UTC form. */
-#define SPANDSP_RELEASE_DATE 20090205
-#define SPANDSP_RELEASE_TIME 122416
+#define SPANDSP_RELEASE_DATE 20090210
+#define SPANDSP_RELEASE_TIME 172413
#endif
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/super_tone_rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/super_tone_rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/super_tone_rx.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: super_tone_rx.c,v 1.32 2009/02/03 16:28:40 steveu Exp $
+ * $Id: super_tone_rx.c,v 1.33 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -267,6 +267,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) super_tone_rx_release(super_tone_rx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) super_tone_rx_free(super_tone_rx_state_t *s)
{
if (s)
Modified: freeswitch/trunk/libs/spandsp/src/super_tone_tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/super_tone_tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/super_tone_tx.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: super_tone_tx.c,v 1.28 2009/02/03 16:28:40 steveu Exp $
+ * $Id: super_tone_tx.c,v 1.29 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -112,7 +112,7 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(void) super_tone_tx_free(super_tone_tx_step_t *s)
+SPAN_DECLARE(int) super_tone_tx_free_tone(super_tone_tx_step_t *s)
{
super_tone_tx_step_t *t;
@@ -125,6 +125,7 @@
s = s->next;
free(t);
}
+ return 0;
}
/*- End of function --------------------------------------------------------*/
@@ -147,6 +148,20 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) super_tone_tx_release(super_tone_tx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) super_tone_tx_free(super_tone_tx_state_t *s)
+{
+ if (s)
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) super_tone_tx(super_tone_tx_state_t *s, int16_t amp[], int max_samples)
{
int samples;
Modified: freeswitch/trunk/libs/spandsp/src/t30.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t30.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t30.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t30.c,v 1.284 2009/02/04 13:18:53 steveu Exp $
+ * $Id: t30.c,v 1.285 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -367,12 +367,29 @@
#define set_ctrl_bits(s,val,bit) (s)[3 + ((bit - 1)/8)] |= ((val) << ((bit - 1)%8))
#define clr_ctrl_bit(s,bit) (s)[3 + ((bit - 1)/8)] &= ~(1 << ((bit - 1)%8))
+static int terminate_operation_in_progress(t30_state_t *s)
+{
+ /* Make sure any FAX in progress is tidied up. If the tidying up has
+ already happened, repeating it here is harmless. */
+ switch (s->operation_in_progress)
+ {
+ case OPERATION_IN_PROGRESS_T4_TX:
+ t4_tx_release(&(s->t4));
+ break;
+ case OPERATION_IN_PROGRESS_T4_RX:
+ t4_rx_release(&(s->t4));
+ break;
+ }
+ s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
static int tx_start_page(t30_state_t *s)
{
if (t4_tx_start_page(&(s->t4)))
{
- t4_tx_end(&(s->t4));
- s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
+ terminate_operation_in_progress(s);
return -1;
}
s->ecm_block = 0;
@@ -1750,10 +1767,10 @@
switch (s->operation_in_progress)
{
case OPERATION_IN_PROGRESS_T4_TX:
- t4_tx_end(&(s->t4));
+ t4_tx_release(&(s->t4));
break;
case OPERATION_IN_PROGRESS_T4_RX:
- t4_rx_end(&(s->t4));
+ t4_rx_release(&(s->t4));
break;
}
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
@@ -1848,7 +1865,7 @@
must be evaluated before the minimum scan row bits can be evaluated. */
if ((min_row_bits = set_min_scan_time_code(s)) < 0)
{
- t4_tx_end(&(s->t4));
+ t4_tx_release(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
return -1;
}
@@ -2953,14 +2970,14 @@
case T30_COPY_QUALITY_PERFECT:
case T30_COPY_QUALITY_GOOD:
rx_end_page(s);
- t4_rx_end(&(s->t4));
+ t4_rx_release(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
s->in_message = FALSE;
set_state(s, T30_STATE_III_Q_MCF);
break;
case T30_COPY_QUALITY_POOR:
rx_end_page(s);
- t4_rx_end(&(s->t4));
+ t4_rx_release(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
s->in_message = FALSE;
set_state(s, T30_STATE_III_Q_RTP);
@@ -3011,14 +3028,14 @@
case T30_COPY_QUALITY_PERFECT:
case T30_COPY_QUALITY_GOOD:
rx_end_page(s);
- t4_rx_end(&(s->t4));
+ t4_rx_release(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
s->in_message = FALSE;
set_state(s, T30_STATE_III_Q_MCF);
break;
case T30_COPY_QUALITY_POOR:
rx_end_page(s);
- t4_rx_end(&(s->t4));
+ t4_rx_release(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
s->in_message = FALSE;
set_state(s, T30_STATE_III_Q_RTP);
@@ -3038,7 +3055,7 @@
case T30_COPY_QUALITY_PERFECT:
case T30_COPY_QUALITY_GOOD:
rx_end_page(s);
- t4_rx_end(&(s->t4));
+ t4_rx_release(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
s->in_message = FALSE;
set_state(s, T30_STATE_III_Q_MCF);
@@ -3046,7 +3063,7 @@
break;
case T30_COPY_QUALITY_POOR:
rx_end_page(s);
- t4_rx_end(&(s->t4));
+ t4_rx_release(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
s->in_message = FALSE;
set_state(s, T30_STATE_III_Q_RTP);
@@ -3070,14 +3087,14 @@
case T30_COPY_QUALITY_PERFECT:
case T30_COPY_QUALITY_GOOD:
rx_end_page(s);
- t4_rx_end(&(s->t4));
+ t4_rx_release(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
s->in_message = FALSE;
set_state(s, T30_STATE_III_Q_MCF);
break;
case T30_COPY_QUALITY_POOR:
rx_end_page(s);
- t4_rx_end(&(s->t4));
+ t4_rx_release(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
s->in_message = FALSE;
set_state(s, T30_STATE_III_Q_RTP);
@@ -3380,7 +3397,7 @@
tx_end_page(s);
if (s->phase_d_handler)
s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
- t4_tx_end(&(s->t4));
+ t4_tx_release(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
if (span_log_test(&s->logging, SPAN_LOG_FLOW))
{
@@ -3394,7 +3411,7 @@
tx_end_page(s);
if (s->phase_d_handler)
s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
- t4_tx_end(&(s->t4));
+ t4_tx_release(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
send_dcn(s);
if (span_log_test(&s->logging, SPAN_LOG_FLOW))
@@ -3436,7 +3453,7 @@
tx_end_page(s);
if (s->phase_d_handler)
s->phase_d_handler(s, s->phase_d_user_data, T30_RTP);
- t4_tx_end(&(s->t4));
+ t4_tx_release(&(s->t4));
/* TODO: should go back to T, and resend */
return_to_phase_b(s, TRUE);
break;
@@ -3445,7 +3462,7 @@
tx_end_page(s);
if (s->phase_d_handler)
s->phase_d_handler(s, s->phase_d_user_data, T30_RTP);
- t4_tx_end(&(s->t4));
+ t4_tx_release(&(s->t4));
s->current_status = T30_ERR_TX_INVALRSP;
send_dcn(s);
break;
@@ -3702,7 +3719,7 @@
tx_end_page(s);
if (s->phase_d_handler)
s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
- t4_tx_end(&(s->t4));
+ t4_tx_release(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
if (span_log_test(&s->logging, SPAN_LOG_FLOW))
{
@@ -3716,7 +3733,7 @@
tx_end_page(s);
if (s->phase_d_handler)
s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
- t4_tx_end(&(s->t4));
+ t4_tx_release(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
send_dcn(s);
if (span_log_test(&s->logging, SPAN_LOG_FLOW))
@@ -3804,7 +3821,7 @@
tx_end_page(s);
if (s->phase_d_handler)
s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
- t4_tx_end(&(s->t4));
+ t4_tx_release(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
if (span_log_test(&s->logging, SPAN_LOG_FLOW))
{
@@ -3818,7 +3835,7 @@
tx_end_page(s);
if (s->phase_d_handler)
s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
- t4_tx_end(&(s->t4));
+ t4_tx_release(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
send_dcn(s);
if (span_log_test(&s->logging, SPAN_LOG_FLOW))
@@ -3922,7 +3939,7 @@
tx_end_page(s);
if (s->phase_d_handler)
s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
- t4_tx_end(&(s->t4));
+ t4_tx_release(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
if (span_log_test(&s->logging, SPAN_LOG_FLOW))
{
@@ -3936,7 +3953,7 @@
tx_end_page(s);
if (s->phase_d_handler)
s->phase_d_handler(s, s->phase_d_user_data, T30_MCF);
- t4_tx_end(&(s->t4));
+ t4_tx_release(&(s->t4));
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
send_dcn(s);
if (span_log_test(&s->logging, SPAN_LOG_FLOW))
@@ -5870,10 +5887,10 @@
switch (s->operation_in_progress)
{
case OPERATION_IN_PROGRESS_T4_TX:
- t4_tx_end(&(s->t4));
+ t4_tx_release(&(s->t4));
break;
case OPERATION_IN_PROGRESS_T4_RX:
- t4_rx_end(&(s->t4));
+ t4_rx_release(&(s->t4));
break;
}
s->operation_in_progress = OPERATION_IN_PROGRESS_NONE;
Modified: freeswitch/trunk/libs/spandsp/src/t31.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t31.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t31.c Fri Feb 20 12:22:32 2009
@@ -25,7 +25,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t31.c,v 1.139 2009/02/03 16:28:40 steveu Exp $
+ * $Id: t31.c,v 1.140 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -2528,6 +2528,13 @@
SPAN_DECLARE(int) t31_release(t31_state_t *s)
{
at_reset_call_info(&s->at_state);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) t31_free(t31_state_t *s)
+{
+ t31_release(s);
free(s);
return 0;
}
Modified: freeswitch/trunk/libs/spandsp/src/t38_core.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t38_core.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t38_core.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_core.c,v 1.51 2009/02/03 16:28:40 steveu Exp $
+ * $Id: t38_core.c,v 1.52 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -976,4 +976,18 @@
return s;
}
/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) t38_core_release(t38_core_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) t38_core_free(t38_core_state_t *s)
+{
+ if (s)
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/t38_gateway.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t38_gateway.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t38_gateway.c Fri Feb 20 12:22:32 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_gateway.c,v 1.153 2009/02/03 16:28:40 steveu Exp $
+ * $Id: t38_gateway.c,v 1.154 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -2273,6 +2273,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) t38_gateway_release(t38_gateway_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) t38_gateway_free(t38_gateway_state_t *s)
{
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c Fri Feb 20 12:22:32 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_non_ecm_buffer.c,v 1.7 2009/02/04 13:18:53 steveu Exp $
+ * $Id: t38_non_ecm_buffer.c,v 1.8 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -261,6 +261,11 @@
SPAN_DECLARE(t38_non_ecm_buffer_state_t *) t38_non_ecm_buffer_init(t38_non_ecm_buffer_state_t *s, int mode, int min_row_bits)
{
+ if (s == NULL)
+ {
+ if ((s = (t38_non_ecm_buffer_state_t *) malloc(sizeof(*s))) == NULL)
+ return NULL;
+ }
memset(s, 0, sizeof(*s));
s->octet = 0xFF;
s->flow_control_fill_octet = 0xFF;
@@ -271,4 +276,18 @@
return s;
}
/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) t38_non_ecm_buffer_release(t38_non_ecm_buffer_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) t38_non_ecm_buffer_free(t38_non_ecm_buffer_state_t *s)
+{
+ if (s)
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/t38_terminal.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t38_terminal.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t38_terminal.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_terminal.c,v 1.122 2009/02/03 16:28:40 steveu Exp $
+ * $Id: t38_terminal.c,v 1.123 2009/02/10 13:06:46 steveu Exp $
*/
/*! \file */
@@ -1160,7 +1160,7 @@
SPAN_DECLARE(int) t38_terminal_free(t38_terminal_state_t *s)
{
- t30_release(&s->t30);
+ t38_terminal_release(s);
free(s);
return 0;
}
Modified: freeswitch/trunk/libs/spandsp/src/t4.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t4.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t4.c Fri Feb 20 12:22:32 2009
@@ -24,7 +24,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t4.c,v 1.123 2009/02/05 12:21:36 steveu Exp $
+ * $Id: t4.c,v 1.124 2009/02/10 13:06:46 steveu Exp $
*/
/*
@@ -150,6 +150,7 @@
#include "t4_states.h"
+#if defined(HAVE_LIBTIFF)
static int set_tiff_directory_info(t4_state_t *s)
{
time_t now;
@@ -354,6 +355,23 @@
}
/*- End of function --------------------------------------------------------*/
+static int get_tiff_total_pages(t4_state_t *s)
+{
+ int max;
+
+ /* Each page *should* contain the total number of pages, but can this be
+ trusted? Some files say 0. Actually searching for the last page is
+ more reliable. */
+ max = 0;
+ while (TIFFSetDirectory(s->tiff.tiff_file, (tdir_t) max))
+ max++;
+ /* Back to the previous page */
+ if (!TIFFSetDirectory(s->tiff.tiff_file, (tdir_t) s->pages_transferred))
+ return -1;
+ return max;
+}
+/*- End of function --------------------------------------------------------*/
+
static int open_tiff_input_file(t4_state_t *s, const char *file)
{
if ((s->tiff.tiff_file = TIFFOpen(file, "r")) == NULL)
@@ -449,6 +467,57 @@
}
/*- End of function --------------------------------------------------------*/
+#else
+
+static int set_tiff_directory_info(t4_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int get_tiff_directory_info(t4_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int open_tiff_input_file(t4_state_t *s, const char *file)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int read_tiff_image(t4_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int close_tiff_input_file(t4_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int open_tiff_output_file(t4_state_t *s, const char *file)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void write_tiff_image(t4_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+static int close_tiff_output_file(t4_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+#endif
+
static void update_row_bit_info(t4_state_t *s)
{
if (s->row_bits > s->max_row_bits)
@@ -1327,7 +1396,7 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(int) t4_rx_end(t4_state_t *s)
+SPAN_DECLARE(int) t4_rx_release(t4_state_t *s)
{
if (!s->rx)
return -1;
@@ -1340,10 +1409,11 @@
SPAN_DECLARE(int) t4_rx_free(t4_state_t *s)
{
- if (t4_rx_end(s))
- return -1;
+ int ret;
+
+ ret = t4_rx_release(s);
free(s);
- return 0;
+ return ret;
}
/*- End of function --------------------------------------------------------*/
@@ -1874,9 +1944,11 @@
this_image_width = 0;
if (s->row_read_handler == NULL)
{
+#if defined(HAVE_LIBTIFF)
if (!TIFFSetDirectory(s->tiff.tiff_file, (tdir_t) s->pages_transferred))
return -1;
TIFFGetField(s->tiff.tiff_file, TIFFTAG_IMAGEWIDTH, &this_image_width);
+#endif
}
s->image_size = 0;
s->tx_bitstream = 0;
@@ -2019,8 +2091,10 @@
{
if (s->row_read_handler == NULL)
{
+#if defined(HAVE_LIBTIFF)
if (!TIFFSetDirectory(s->tiff.tiff_file, (tdir_t) s->pages_transferred + 1))
return -1;
+#endif
}
}
return 0;
@@ -2089,7 +2163,7 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(int) t4_tx_end(t4_state_t *s)
+SPAN_DECLARE(int) t4_tx_release(t4_state_t *s)
{
if (s->rx)
return -1;
@@ -2102,10 +2176,11 @@
SPAN_DECLARE(int) t4_tx_free(t4_state_t *s)
{
- if (t4_tx_end(s))
- return -1;
+ int ret;
+
+ ret = t4_tx_release(s);
free(s);
- return 0;
+ return ret;
}
/*- End of function --------------------------------------------------------*/
@@ -2157,19 +2232,11 @@
{
int max;
- /* Each page *should* contain the total number of pages, but can this be
- trusted? Some files say 0. Actually searching for the last page is
- more reliable. */
max = 0;
if (s->row_write_handler == NULL)
- {
- while (TIFFSetDirectory(s->tiff.tiff_file, (tdir_t) max))
- max++;
- /* Back to the previous page */
- if (!TIFFSetDirectory(s->tiff.tiff_file, (tdir_t) s->pages_transferred))
- return -1;
- }
- s->pages_in_file = max;
+ max = get_tiff_total_pages(s);
+ if (max >= 0)
+ s->pages_in_file = max;
return max;
}
/*- End of function --------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/time_scale.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/time_scale.c (original)
+++ freeswitch/trunk/libs/spandsp/src/time_scale.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: time_scale.c,v 1.29 2009/02/03 16:28:40 steveu Exp $
+ * $Id: time_scale.c,v 1.30 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -158,6 +158,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) time_scale_release(time_scale_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) time_scale_free(time_scale_state_t *s)
{
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/tone_detect.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/tone_detect.c (original)
+++ freeswitch/trunk/libs/spandsp/src/tone_detect.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: tone_detect.c,v 1.50 2009/02/03 16:28:40 steveu Exp $
+ * $Id: tone_detect.c,v 1.51 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file tone_detect.h */
@@ -91,6 +91,20 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) goertzel_release(goertzel_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) goertzel_free(goertzel_state_t *s)
+{
+ if (s)
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(void) goertzel_reset(goertzel_state_t *s)
{
#if defined(SPANDSP_USE_FIXED_POINT)
Modified: freeswitch/trunk/libs/spandsp/src/tone_generate.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/tone_generate.c (original)
+++ freeswitch/trunk/libs/spandsp/src/tone_generate.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: tone_generate.c,v 1.49 2009/02/03 16:28:40 steveu Exp $
+ * $Id: tone_generate.c,v 1.50 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -129,6 +129,20 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) tone_gen_release(tone_gen_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) tone_gen_free(tone_gen_state_t *s)
+{
+ if (s)
+ free(s);
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) tone_gen(tone_gen_state_t *s, int16_t amp[], int max_samples)
{
int samples;
Modified: freeswitch/trunk/libs/spandsp/src/v17rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v17rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v17rx.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v17rx.c,v 1.132 2009/02/03 16:28:40 steveu Exp $
+ * $Id: v17rx.c,v 1.133 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -1263,6 +1263,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) v17_rx_release(v17_rx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) v17_rx_free(v17_rx_state_t *s)
{
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/v17tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v17tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v17tx.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v17tx.c,v 1.70 2009/02/03 16:28:40 steveu Exp $
+ * $Id: v17tx.c,v 1.71 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -407,6 +407,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) v17_tx_release(v17_tx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) v17_tx_free(v17_tx_state_t *s)
{
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/v22bis_tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v22bis_tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v22bis_tx.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v22bis_tx.c,v 1.50 2009/02/03 16:28:40 steveu Exp $
+ * $Id: v22bis_tx.c,v 1.51 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -673,6 +673,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) v22bis_release(v22bis_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) v22bis_free(v22bis_state_t *s)
{
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/v27ter_rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v27ter_rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v27ter_rx.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_rx.c,v 1.116 2009/02/03 16:28:40 steveu Exp $
+ * $Id: v27ter_rx.c,v 1.117 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -1115,6 +1115,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) v27ter_rx_release(v27ter_rx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) v27ter_rx_free(v27ter_rx_state_t *s)
{
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/v27ter_tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v27ter_tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v27ter_tx.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v27ter_tx.c,v 1.72 2009/02/03 16:28:40 steveu Exp $
+ * $Id: v27ter_tx.c,v 1.73 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -421,6 +421,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) v27ter_tx_release(v27ter_tx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) v27ter_tx_free(v27ter_tx_state_t *s)
{
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/v29rx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v29rx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v29rx.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29rx.c,v 1.153 2009/02/03 16:28:40 steveu Exp $
+ * $Id: v29rx.c,v 1.154 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -1141,6 +1141,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) v29_rx_release(v29_rx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) v29_rx_free(v29_rx_state_t *s)
{
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/v29tx.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v29tx.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v29tx.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v29tx.c,v 1.85 2009/02/03 16:28:40 steveu Exp $
+ * $Id: v29tx.c,v 1.86 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -377,6 +377,12 @@
}
/*- End of function --------------------------------------------------------*/
+SPAN_DECLARE(int) v29_tx_release(v29_tx_state_t *s)
+{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
SPAN_DECLARE(int) v29_tx_free(v29_tx_state_t *s)
{
free(s);
Modified: freeswitch/trunk/libs/spandsp/src/v42.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v42.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v42.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v42.c,v 1.49 2009/02/04 13:18:53 steveu Exp $
+ * $Id: v42.c,v 1.50 2009/02/10 13:06:47 steveu Exp $
*/
/* THIS IS A WORK IN PROGRESS. IT IS NOT FINISHED. */
@@ -1419,6 +1419,12 @@
SPAN_DECLARE(int) v42_release(v42_state_t *s)
{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) v42_free(v42_state_t *s)
+{
free(s);
return 0;
}
Modified: freeswitch/trunk/libs/spandsp/src/v42bis.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v42bis.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v42bis.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v42bis.c,v 1.36 2009/02/03 16:28:40 steveu Exp $
+ * $Id: v42bis.c,v 1.37 2009/02/10 13:06:47 steveu Exp $
*/
/* THIS IS A WORK IN PROGRESS. IT IS NOT FINISHED.
@@ -689,6 +689,12 @@
SPAN_DECLARE(int) v42bis_release(v42bis_state_t *s)
{
+ return 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+SPAN_DECLARE(int) v42bis_free(v42bis_state_t *s)
+{
free(s);
return 0;
}
Modified: freeswitch/trunk/libs/spandsp/src/vector_float.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/vector_float.c (original)
+++ freeswitch/trunk/libs/spandsp/src/vector_float.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: vector_float.c,v 1.20 2009/02/03 16:28:40 steveu Exp $
+ * $Id: vector_float.c,v 1.21 2009/02/05 15:57:27 steveu Exp $
*/
/*! \file */
@@ -132,8 +132,8 @@
SPAN_DECLARE(void) vec_negatef(float z[], const float x[], int n)
{
int i;
- static const uint32_t mask = 0x80000000;
- static const float *fmask = (float *)&mask;
+ static const uint32_t mask = 0x80000000;
+ static const float *fmask = (float *) &mask;
__m128 n1;
__m128 n2;
Modified: freeswitch/trunk/libs/spandsp/tests/echo_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/echo_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/echo_tests.c Fri Feb 20 12:22:32 2009
@@ -25,7 +25,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: echo_tests.c,v 1.37 2008/11/30 10:17:31 steveu Exp $
+ * $Id: echo_tests.c,v 1.38 2009/02/10 13:06:47 steveu Exp $
*/
/*! \page echo_can_tests_page Line echo cancellation for voice tests
@@ -654,7 +654,7 @@
//int coeff_index;
print_test_title("Performing basic sanity test\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
local_cur = 0;
far_cur = 0;
@@ -779,7 +779,7 @@
/* Test 2 - Convergence and steady state residual and returned echo level test */
/* Test 2A - Convergence and reconvergence test with NLP enabled */
print_test_title("Performing test 2A - Convergence and reconvergence test with NLP enabled\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
echo_can_flush(ctx);
echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION | ECHO_CAN_USE_NLP);
@@ -828,7 +828,7 @@
/* Test 2 - Convergence and steady state residual and returned echo level test */
/* Test 2B - Convergence and reconverge with NLP disabled */
print_test_title("Performing test 2B - Convergence and reconverge with NLP disabled\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
echo_can_flush(ctx);
echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
@@ -882,7 +882,7 @@
/* Test 2 - Convergence and steady state residual and returned echo level test */
/* Test 2C(a) - Convergence with background noise present */
print_test_title("Performing test 2C(a) - Convergence with background noise present\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
awgn_init_dbm0(&far_noise_source, 7162534, -50.0f);
echo_can_flush(ctx);
@@ -918,7 +918,7 @@
/* Test 3 - Performance under double talk conditions */
/* Test 3A - Double talk test with low cancelled-end levels */
print_test_title("Performing test 3A - Double talk test with low cancelled-end levels\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
echo_can_flush(ctx);
echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
@@ -956,7 +956,7 @@
/* Test 3 - Performance under double talk conditions */
/* Test 3B(a) - Double talk stability test with high cancelled-end levels */
print_test_title("Performing test 3B(b) - Double talk stability test with high cancelled-end levels\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
echo_can_flush(ctx);
echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
@@ -996,7 +996,7 @@
/* Test 3 - Performance under double talk conditions */
/* Test 3B(b) - Double talk stability test with low cancelled-end levels */
print_test_title("Performing test 3B(b) - Double talk stability test with low cancelled-end levels\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
echo_can_flush(ctx);
echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
@@ -1036,7 +1036,7 @@
/* Test 3 - Performance under double talk conditions */
/* Test 3C - Double talk test with simulated conversation */
print_test_title("Performing test 3C - Double talk test with simulated conversation\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
echo_can_flush(ctx);
echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
@@ -1074,7 +1074,7 @@
/* Test 4 - Leak rate test */
print_test_title("Performing test 4 - Leak rate test\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
echo_can_flush(ctx);
echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
@@ -1106,7 +1106,7 @@
/* Test 5 - Infinite return loss convergence test */
print_test_title("Performing test 5 - Infinite return loss convergence test\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
echo_can_flush(ctx);
echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
@@ -1141,7 +1141,7 @@
/* Test 6 - Non-divergence on narrow-band signals */
print_test_title("Performing test 6 - Non-divergence on narrow-band signals\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
echo_can_flush(ctx);
echo_can_adaption_mode(ctx, ECHO_CAN_USE_ADAPTION);
@@ -1210,7 +1210,7 @@
/* Test 7 - Stability */
print_test_title("Performing test 7 - Stability\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
/* Put tones through an unconverged canceller, and check nothing unpleasant
happens. */
@@ -1262,7 +1262,7 @@
/* Test 8 - Non-convergence on No 5, 6, and 7 in-band signalling */
print_test_title("Performing test 8 - Non-convergence on No 5, 6, and 7 in-band signalling\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
fprintf(stderr, "Test 8 not yet implemented\n");
@@ -1279,7 +1279,7 @@
/* Test 9 - Comfort noise test */
print_test_title("Performing test 9 - Comfort noise test\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
awgn_init_dbm0(&far_noise_source, 7162534, -50.0f);
echo_can_flush(ctx);
@@ -1317,7 +1317,7 @@
/* Test 10 - FAX test during call establishment phase */
/* Test 10A - Canceller operation on the calling station side */
print_test_title("Performing test 10A - Canceller operation on the calling station side\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
fprintf(stderr, "Test 10A not yet implemented\n");
@@ -1333,7 +1333,7 @@
/* Test 10 - FAX test during call establishment phase */
/* Test 10B - Canceller operation on the called station side */
print_test_title("Performing test 10B - Canceller operation on the called station side\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
fprintf(stderr, "Test 10B not yet implemented\n");
@@ -1351,7 +1351,7 @@
transmission and page breaks (for further study) */
print_test_title("Performing test 10C - Canceller operation on the calling station side during page\n"
"transmission and page breaks (for further study)\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
fprintf(stderr, "Test 10C not yet implemented\n");
@@ -1366,7 +1366,7 @@
/* Test 11 - Tandem echo canceller test (for further study) */
print_test_title("Performing test 11 - Tandem echo canceller test (for further study)\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
fprintf(stderr, "Test 11 not yet implemented\n");
@@ -1381,7 +1381,7 @@
/* Test 12 - Residual acoustic echo test (for further study) */
print_test_title("Performing test 12 - Residual acoustic echo test (for further study)\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
fprintf(stderr, "Test 12 not yet implemented\n");
@@ -1397,7 +1397,7 @@
/* Test 13 - Performance with ITU-T low-bit rate coders in echo path
(Optional, under study) */
print_test_title("Performing test 13 - Performance with ITU-T low-bit rate coders in echo path (Optional, under study)\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
fprintf(stderr, "Test 13 not yet implemented\n");
@@ -1412,7 +1412,7 @@
/* Test 14 - Performance with V-series low-speed data modems */
print_test_title("Performing test 14 - Performance with V-series low-speed data modems\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
fprintf(stderr, "Test 14 not yet implemented\n");
@@ -1427,7 +1427,7 @@
/* Test 15 - PCM offset test (Optional) */
print_test_title("Performing test 15 - PCM offset test (Optional)\n");
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
fprintf(stderr, "Test 15 not yet implemented\n");
@@ -1525,7 +1525,7 @@
ecfile = afOpenFile_telephony_write(argv[1], 1);
}
- ctx = echo_can_create(TEST_EC_TAPS, 0);
+ ctx = echo_can_init(TEST_EC_TAPS, 0);
echo_can_adaption_mode(ctx, mode);
samples = 0;
do
Modified: freeswitch/trunk/libs/spandsp/tests/fax_decode.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/fax_decode.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/fax_decode.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fax_decode.c,v 1.53 2009/01/27 05:13:12 steveu Exp $
+ * $Id: fax_decode.c,v 1.54 2009/02/10 13:06:47 steveu Exp $
*/
/*! \page fax_decode_page FAX decoder
@@ -525,7 +525,7 @@
v29_rx(v29, amp, len);
//v27ter_rx(v27ter, amp, len);
}
- t4_rx_end(&t4_state);
+ t4_rx_release(&t4_state);
if (afCloseFile(inhandle) != 0)
{
Modified: freeswitch/trunk/libs/spandsp/tests/playout_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/playout_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/playout_tests.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: playout_tests.c,v 1.27 2008/11/15 14:27:29 steveu Exp $
+ * $Id: playout_tests.c,v 1.28 2009/02/10 13:06:47 steveu Exp $
*/
/*! \page playout_tests_page Playout (jitter buffering) tests
@@ -106,7 +106,7 @@
for (i = 0; i < BLOCK_LEN; i++)
fill[i] = 32767;
- if ((s = playout_new(2*BLOCK_LEN, 15*BLOCK_LEN)) == NULL)
+ if ((s = playout_init(2*BLOCK_LEN, 15*BLOCK_LEN)) == NULL)
return;
plc_init(&plc);
time_scale_init(&ts, SAMPLE_RATE, 1.0);
@@ -270,7 +270,7 @@
type = PLAYOUT_TYPE_SPEECH;
len = BLOCK_LEN;
- if ((s = playout_new(2*BLOCK_LEN, 2*BLOCK_LEN)) == NULL)
+ if ((s = playout_init(2*BLOCK_LEN, 2*BLOCK_LEN)) == NULL)
return;
for (i = 0; i < 1000000; i++)
{
Modified: freeswitch/trunk/libs/spandsp/tests/t4_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/t4_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/t4_tests.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t4_tests.c,v 1.65 2009/01/05 13:48:32 steveu Exp $
+ * $Id: t4_tests.c,v 1.66 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -354,7 +354,7 @@
dump_image_as_xxx(&receive_state);
t4_rx_end_page(&receive_state);
display_page_stats(&receive_state);
- t4_rx_end(&receive_state);
+ t4_rx_release(&receive_state);
}
else
{
@@ -501,8 +501,8 @@
t4_rx_end_page(&receive_state);
sends++;
}
- t4_tx_end(&send_state);
- t4_rx_end(&receive_state);
+ t4_tx_release(&send_state);
+ t4_rx_release(&receive_state);
/* And we should now have a matching received TIFF file. Note this will only match
at the image level. TIFF files allow a lot of ways to express the same thing,
so bit matching of the files is not the normal case. */
@@ -588,8 +588,8 @@
t4_rx_end_page(&receive_state);
break;
}
- t4_tx_end(&send_state);
- t4_rx_end(&receive_state);
+ t4_tx_release(&send_state);
+ t4_rx_release(&receive_state);
#endif
printf("Tests passed\n");
Modified: freeswitch/trunk/libs/spandsp/tests/tsb85_tests.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/tests/tsb85_tests.c (original)
+++ freeswitch/trunk/libs/spandsp/tests/tsb85_tests.c Fri Feb 20 12:22:32 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: tsb85_tests.c,v 1.28 2009/01/28 03:41:27 steveu Exp $
+ * $Id: tsb85_tests.c,v 1.29 2009/02/10 13:06:47 steveu Exp $
*/
/*! \file */
@@ -1019,7 +1019,7 @@
span_log(&s->logging, SPAN_LOG_FLOW, "We need to corrupt the image\n");
corrupt_image(s, image, len, (const char *) bad_rows);
}
- t4_tx_end(&t4_state);
+ t4_tx_release(&t4_state);
span_log(&s->logging, SPAN_LOG_FLOW, "Non-ECM image is %d bytes\n", len);
faxtester_set_non_ecm_image_buffer(s, image, len);
}
@@ -1059,7 +1059,7 @@
corrupt_image(s, image, len, (const char *) bad_rows);
}
/*endif*/
- t4_tx_end(&t4_state);
+ t4_tx_release(&t4_state);
span_log(&s->logging, SPAN_LOG_FLOW, "ECM image is %d bytes\n", len);
faxtester_set_ecm_image_buffer(s, image, len, ecm_block, ecm_frame_size, i);
}
1
0
Author: mikej
Date: Fri Feb 20 12:08:55 2009
New Revision: 12185
Log:
revert 12212
Added:
freeswitch/trunk/libs/spandsp/src/libtiff.vcproj
- copied unchanged from r12121, /freeswitch/trunk/libs/spandsp/src/libtiff.vcproj
Removed:
freeswitch/trunk/libs/spandsp/src/libspandsp.2008.vcproj
freeswitch/trunk/libs/spandsp/src/libtiff.2008.vcproj
Modified:
freeswitch/trunk/Freeswitch.2008.express.sln
freeswitch/trunk/Freeswitch.2008.sln
freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj
Modified: freeswitch/trunk/Freeswitch.2008.express.sln
==============================================================================
--- freeswitch/trunk/Freeswitch.2008.express.sln (original)
+++ freeswitch/trunk/Freeswitch.2008.express.sln Fri Feb 20 12:08:55 2009
@@ -573,12 +573,12 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download TIFF", "libs\win32\Download TIFF.2008.vcproj", "{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspandsp", "libs\spandsp\src\libspandsp.2008.vcproj", "{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspandsp", "libs\spandsp\src\libspandsp.vcproj", "{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}"
ProjectSection(ProjectDependencies) = postProject
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014} = {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtiff", "libs\spandsp\src\libtiff.2008.vcproj", "{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtiff", "libs\spandsp\src\libtiff.vcproj", "{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}"
ProjectSection(ProjectDependencies) = postProject
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917} = {2B8A45C9-FEB4-4734-AB37-8DB9DB899917}
EndProjectSection
Modified: freeswitch/trunk/Freeswitch.2008.sln
==============================================================================
--- freeswitch/trunk/Freeswitch.2008.sln (original)
+++ freeswitch/trunk/Freeswitch.2008.sln Fri Feb 20 12:08:55 2009
@@ -951,12 +951,12 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download TIFF", "libs\win32\Download TIFF.2008.vcproj", "{2B8A45C9-FEB4-4734-AB37-8DB9DB899917}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtiff", "libs\spandsp\src\libtiff.2008.vcproj", "{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtiff", "libs\spandsp\src\libtiff.vcproj", "{401A40CD-5DB4-4E34-AC68-FA99E9FAC014}"
ProjectSection(ProjectDependencies) = postProject
{2B8A45C9-FEB4-4734-AB37-8DB9DB899917} = {2B8A45C9-FEB4-4734-AB37-8DB9DB899917}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspandsp", "libs\spandsp\src\libspandsp.2008.vcproj", "{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspandsp", "libs\spandsp\src\libspandsp.vcproj", "{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}"
ProjectSection(ProjectDependencies) = postProject
{401A40CD-5DB4-4E34-AC68-FA99E9FAC014} = {401A40CD-5DB4-4E34-AC68-FA99E9FAC014}
EndProjectSection
Modified: freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj (original)
+++ freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj Fri Feb 20 12:08:55 2009
@@ -1,864 +1,304 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="8.00"
+ Version="9.00"
Name="libspandsp"
- ProjectGUID="{CF70F278-3364-4395-A2E1-23501C9B8AD2}"
+ ProjectGUID="{1CBB0077-18C5-455F-801C-0A0CE7B0BBF5}"
RootNamespace="libspandsp"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
>
- <Platforms>
- <Platform
+ <Platforms>
+ <Platform
Name="Win32"
/>
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(SolutionDir)$(ConfigurationName)"
- ConfigurationType="4"
+ OutputDirectory="$(SolutionDir)Debug"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
>
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
+ <Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="src; src\spandsp; src\msvc;..\libtiff\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;HAVE_CONFIG_H"
+ AdditionalIncludeDirectories=".;.\spandsp;.\msvc;..\..\tiff-3.8.2\libtiff;.\generated"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H"
+ MinimalRebuild="true"
BasicRuntimeChecks="3"
- ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
WarningLevel="4"
DebugInformationFormat="4"
+ CompileAs="1"
+ DisableSpecificWarnings="4127"
/>
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="./Debug\spandsp.lib"
+ TargetMachine="1"
/>
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
+ </Configuration>
+ <Configuration
Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(SolutionDir)$(ConfigurationName)"
- ConfigurationType="4"
+ OutputDirectory="$(SolutionDir)Release"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
>
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
+ <Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="src; src\spandsp; src\msvc;..\libtiff\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;HAVE_CONFIG_H"
- ProgramDataBaseFileName="$(OutDir)\$(ProjectName).pdb"
+ AdditionalIncludeDirectories=".;.\spandsp;.\msvc;..\..\tiff-3.8.2\libtiff;.\generated"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
WarningLevel="4"
DebugInformationFormat="3"
+ DisableSpecificWarnings="4127"
/>
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="./Release\spandsp.lib"
+ TargetMachine="1"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
- <File
- RelativePath="adsi.c"
- >
- </File>
- <File
- RelativePath="async.c"
- >
- </File>
- <File
- RelativePath="at_interpreter.c"
- >
- </File>
- <File
- RelativePath="awgn.c"
- >
- </File>
- <File
- RelativePath="bell_r2_mf.c"
- >
- </File>
- <File
- RelativePath="bert.c"
- >
- </File>
- <File
- RelativePath="bit_operations.c"
- >
- </File>
- <File
- RelativePath="bitstream.c"
- >
- </File>
- <File
- RelativePath="complex_filters.c"
- >
- </File>
- <File
- RelativePath="complex_vector_float.c"
- >
- </File>
- <File
- RelativePath="complex_vector_int.c"
- >
- </File>
- <File
- RelativePath="crc.c"
- >
- </File>
- <File
- RelativePath="dds_float.c"
- >
- </File>
- <File
- RelativePath="dds_int.c"
- >
- </File>
- <File
- RelativePath="dtmf.c"
- >
- </File>
- <File
- RelativePath="echo.c"
- >
- </File>
- <File
- RelativePath="fax.c"
- >
- </File>
- <File
- RelativePath="fsk.c"
- >
- </File>
- <File
- RelativePath="g711.c"
- >
- </File>
- <File
- RelativePath="g722.c"
- >
- </File>
- <File
- RelativePath="g726.c"
- >
- </File>
- <File
- RelativePath="gsm0610_decode.c"
- >
- </File>
- <File
- RelativePath="gsm0610_encode.c"
- >
- </File>
- <File
- RelativePath="gsm0610_long_term.c"
- >
- </File>
- <File
- RelativePath="gsm0610_lpc.c"
- >
- </File>
- <File
- RelativePath="gsm0610_preprocess.c"
- >
- </File>
- <File
- RelativePath="gsm0610_rpe.c"
- >
- </File>
- <File
- RelativePath="gsm0610_short_term.c"
- >
- </File>
- <File
- RelativePath="hdlc.c"
- >
- </File>
- <File
- RelativePath="ima_adpcm.c"
- >
- </File>
- <File
- RelativePath="logging.c"
- >
- </File>
- <File
- RelativePath="lpc10_analyse.c"
- >
- </File>
- <File
- RelativePath="lpc10_decode.c"
- >
- </File>
- <File
- RelativePath="lpc10_encode.c"
- >
- </File>
- <File
- RelativePath="lpc10_placev.c"
- >
- </File>
- <File
- RelativePath="lpc10_voicing.c"
- >
- </File>
- <File
- RelativePath="modem_connect_tones.c"
- >
- </File>
- <File
- RelativePath="modem_echo.c"
- >
- </File>
- <File
- RelativePath="msvc/gettimeofday.c"
- >
- </File>
- <File
- RelativePath="noise.c"
- >
- </File>
- <File
- RelativePath="oki_adpcm.c"
- >
- </File>
- <File
- RelativePath="playout.c"
- >
- </File>
- <File
- RelativePath="plc.c"
- >
- </File>
- <File
- RelativePath="power_meter.c"
- >
- </File>
- <File
- RelativePath="queue.c"
- >
- </File>
- <File
- RelativePath="schedule.c"
- >
- </File>
- <File
- RelativePath="sig_tone.c"
- >
- </File>
- <File
- RelativePath="silence_gen.c"
- >
- </File>
- <File
- RelativePath="super_tone_rx.c"
- >
- </File>
- <File
- RelativePath="super_tone_tx.c"
- >
- </File>
- <File
- RelativePath="t30.c"
- >
- </File>
- <File
- RelativePath="t30_api.c"
- >
- </File>
- <File
- RelativePath="t30_logging.c"
- >
- </File>
- <File
- RelativePath="t31.c"
- >
- </File>
- <File
- RelativePath="t35.c"
- >
- </File>
- <File
- RelativePath="t38_core.c"
- >
- </File>
- <File
- RelativePath="t38_gateway.c"
- >
- </File>
- <File
- RelativePath="t38_non_ecm_buffer.c"
- >
- </File>
- <File
- RelativePath="t38_terminal.c"
- >
- </File>
- <File
- RelativePath="t4.c"
- >
- </File>
- <File
- RelativePath="testcpuid.c"
- >
- </File>
- <File
- RelativePath="time_scale.c"
- >
- </File>
- <File
- RelativePath="tone_detect.c"
- >
- </File>
- <File
- RelativePath="tone_generate.c"
- >
- </File>
- <File
- RelativePath="v17rx.c"
- >
- </File>
- <File
- RelativePath="v17tx.c"
- >
- </File>
- <File
- RelativePath="v22bis_rx.c"
- >
- </File>
- <File
- RelativePath="v22bis_tx.c"
- >
- </File>
- <File
- RelativePath="v27ter_rx.c"
- >
- </File>
- <File
- RelativePath="v27ter_tx.c"
- >
- </File>
- <File
- RelativePath="v29rx.c"
- >
- </File>
- <File
- RelativePath="v29tx.c"
- >
- </File>
- <File
- RelativePath="v42.c"
- >
- </File>
- <File
- RelativePath="v42bis.c"
- >
- </File>
- <File
- RelativePath="v8.c"
- >
- </File>
- <File
- RelativePath="vector_float.c"
- >
- </File>
- <File
- RelativePath="vector_int.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- >
- <File
- RelativePath="spandsp.h"
- >
- </File>
- <File
- RelativePath="spandsp/adsi.h"
- >
- </File>
- <File
- RelativePath="spandsp/arctan2.h"
- >
- </File>
- <File
- RelativePath="spandsp/async.h"
- >
- </File>
- <File
- RelativePath="spandsp/at_interpreter.h"
- >
- </File>
- <File
- RelativePath="spandsp/awgn.h"
- >
- </File>
- <File
- RelativePath="spandsp/bell_r2_mf.h"
- >
- </File>
- <File
- RelativePath="spandsp/bert.h"
- >
- </File>
- <File
- RelativePath="spandsp/biquad.h"
- >
- </File>
- <File
- RelativePath="spandsp/bit_operations.h"
- >
- </File>
- <File
- RelativePath="spandsp/bitstream.h"
- >
- </File>
- <File
- RelativePath="spandsp/complex.h"
- >
- </File>
- <File
- RelativePath="spandsp/complex_filters.h"
- >
- </File>
- <File
- RelativePath="spandsp/complex_vector_float.h"
- >
- </File>
- <File
- RelativePath="spandsp/complex_vector_int.h"
- >
- </File>
- <File
- RelativePath="spandsp/crc.h"
- >
- </File>
- <File
- RelativePath="spandsp/dc_restore.h"
- >
- </File>
- <File
- RelativePath="spandsp/dds.h"
- >
- </File>
- <File
- RelativePath="spandsp/dtmf.h"
- >
- </File>
- <File
- RelativePath="spandsp/echo.h"
- >
- </File>
- <File
- RelativePath="spandsp/expose.h"
- >
- </File>
- <File
- RelativePath="spandsp/fax.h"
- >
- </File>
- <File
- RelativePath="spandsp/fax_modems.h"
- >
- </File>
- <File
- RelativePath="spandsp/fir.h"
- >
- </File>
- <File
- RelativePath="spandsp/fsk.h"
- >
- </File>
- <File
- RelativePath="spandsp/g168models.h"
- >
- </File>
- <File
- RelativePath="spandsp/g711.h"
- >
- </File>
- <File
- RelativePath="spandsp/g722.h"
- >
- </File>
- <File
- RelativePath="spandsp/g726.h"
- >
- </File>
- <File
- RelativePath="spandsp/gsm0610.h"
- >
- </File>
- <File
- RelativePath="spandsp/hdlc.h"
- >
- </File>
- <File
- RelativePath="spandsp/ima_adpcm.h"
- >
- </File>
- <File
- RelativePath="spandsp/logging.h"
- >
- </File>
- <File
- RelativePath="spandsp/lpc10.h"
- >
- </File>
- <File
- RelativePath="spandsp/modem_connect_tones.h"
- >
- </File>
- <File
- RelativePath="spandsp/modem_echo.h"
- >
- </File>
- <File
- RelativePath="spandsp/noise.h"
- >
- </File>
- <File
- RelativePath="spandsp/oki_adpcm.h"
- >
- </File>
- <File
- RelativePath="spandsp/playout.h"
- >
- </File>
- <File
- RelativePath="spandsp/plc.h"
- >
- </File>
- <File
- RelativePath="spandsp/power_meter.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/adsi.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/bell_r2_mf.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/dtmf.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/fax.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/fax_modems.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/fsk.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/g722.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/g726.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/modem_connect_tones.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/t30.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/t31.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/t38_gateway.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/t38_non_ecm_buffer.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/t38_terminal.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/t4.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/v17rx.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/v17tx.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/v27ter_rx.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/v27ter_tx.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/v29rx.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/v29tx.h"
- >
- </File>
- <File
- RelativePath="spandsp/private/v8.h"
- >
- </File>
- <File
- RelativePath="spandsp/queue.h"
- >
- </File>
- <File
- RelativePath="spandsp/saturated.h"
- >
- </File>
- <File
- RelativePath="spandsp/schedule.h"
- >
- </File>
- <File
- RelativePath="spandsp/sig_tone.h"
- >
- </File>
- <File
- RelativePath="spandsp/silence_gen.h"
- >
- </File>
- <File
- RelativePath="spandsp/super_tone_rx.h"
- >
- </File>
- <File
- RelativePath="spandsp/super_tone_tx.h"
- >
- </File>
- <File
- RelativePath="spandsp/t30.h"
- >
- </File>
- <File
- RelativePath="spandsp/t30_api.h"
- >
- </File>
- <File
- RelativePath="spandsp/t30_fcf.h"
- >
- </File>
- <File
- RelativePath="spandsp/t30_logging.h"
- >
- </File>
- <File
- RelativePath="spandsp/t31.h"
- >
- </File>
- <File
- RelativePath="spandsp/t35.h"
- >
- </File>
- <File
- RelativePath="spandsp/t38_core.h"
- >
- </File>
- <File
- RelativePath="spandsp/t38_gateway.h"
- >
- </File>
- <File
- RelativePath="spandsp/t38_non_ecm_buffer.h"
- >
- </File>
- <File
- RelativePath="spandsp/t38_terminal.h"
- >
- </File>
- <File
- RelativePath="spandsp/t4.h"
- >
- </File>
- <File
- RelativePath="spandsp/telephony.h"
- >
- </File>
- <File
- RelativePath="spandsp/time_scale.h"
- >
- </File>
- <File
- RelativePath="spandsp/timing.h"
- >
- </File>
- <File
- RelativePath="spandsp/tone_detect.h"
- >
- </File>
- <File
- RelativePath="spandsp/tone_generate.h"
- >
- </File>
- <File
- RelativePath="spandsp/v17rx.h"
- >
- </File>
- <File
- RelativePath="spandsp/v17tx.h"
- >
- </File>
- <File
- RelativePath="spandsp/v22bis.h"
- >
- </File>
- <File
- RelativePath="spandsp/v27ter_rx.h"
- >
- </File>
- <File
- RelativePath="spandsp/v27ter_tx.h"
- >
- </File>
- <File
- RelativePath="spandsp/v29rx.h"
- >
- </File>
- <File
- RelativePath="spandsp/v29tx.h"
- >
- </File>
- <File
- RelativePath="spandsp/v42.h"
- >
- </File>
- <File
- RelativePath="spandsp/v42bis.h"
- >
- </File>
- <File
- RelativePath="spandsp/v8.h"
- >
- </File>
- <File
- RelativePath="spandsp/vector_float.h"
- >
- </File>
- <File
- RelativePath="spandsp/vector_int.h"
- >
- </File>
- <File
- RelativePath="spandsp/version.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- <File
- RelativePath=".\src\msvc\spandsp.def"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+<File RelativePath="adsi.c"></File>
+<File RelativePath="async.c"></File>
+<File RelativePath="at_interpreter.c"></File>
+<File RelativePath="awgn.c"></File>
+<File RelativePath="bell_r2_mf.c"></File>
+<File RelativePath="bert.c"></File>
+<File RelativePath="bit_operations.c"></File>
+<File RelativePath="bitstream.c"></File>
+<File RelativePath="complex_filters.c"></File>
+<File RelativePath="complex_vector_float.c"></File>
+<File RelativePath="complex_vector_int.c"></File>
+<File RelativePath="crc.c"></File>
+<File RelativePath="dds_float.c"></File>
+<File RelativePath="dds_int.c"></File>
+<File RelativePath="dtmf.c"></File>
+<File RelativePath="echo.c"></File>
+<File RelativePath="fax.c"></File>
+<File RelativePath="fsk.c"></File>
+<File RelativePath="g711.c"></File>
+<File RelativePath="g722.c"></File>
+<File RelativePath="g726.c"></File>
+<File RelativePath="gsm0610_decode.c"></File>
+<File RelativePath="gsm0610_encode.c"></File>
+<File RelativePath="gsm0610_long_term.c"></File>
+<File RelativePath="gsm0610_lpc.c"></File>
+<File RelativePath="gsm0610_preprocess.c"></File>
+<File RelativePath="gsm0610_rpe.c"></File>
+<File RelativePath="gsm0610_short_term.c"></File>
+<File RelativePath="hdlc.c"></File>
+<File RelativePath="ima_adpcm.c"></File>
+<File RelativePath="logging.c"></File>
+<File RelativePath="lpc10_analyse.c"></File>
+<File RelativePath="lpc10_decode.c"></File>
+<File RelativePath="lpc10_encode.c"></File>
+<File RelativePath="lpc10_placev.c"></File>
+<File RelativePath="lpc10_voicing.c"></File>
+<File RelativePath="modem_echo.c"></File>
+<File RelativePath="modem_connect_tones.c"></File>
+<File RelativePath="noise.c"></File>
+<File RelativePath="oki_adpcm.c"></File>
+<File RelativePath="playout.c"></File>
+<File RelativePath="plc.c"></File>
+<File RelativePath="power_meter.c"></File>
+<File RelativePath="queue.c"></File>
+<File RelativePath="schedule.c"></File>
+<File RelativePath="sig_tone.c"></File>
+<File RelativePath="silence_gen.c"></File>
+<File RelativePath="super_tone_rx.c"></File>
+<File RelativePath="super_tone_tx.c"></File>
+<File RelativePath="t4.c"></File>
+<File RelativePath="t30.c"></File>
+<File RelativePath="t30_api.c"></File>
+<File RelativePath="t30_logging.c"></File>
+<File RelativePath="t31.c"></File>
+<File RelativePath="t35.c"></File>
+<File RelativePath="t38_core.c"></File>
+<File RelativePath="t38_gateway.c"></File>
+<File RelativePath="t38_non_ecm_buffer.c"></File>
+<File RelativePath="t38_terminal.c"></File>
+<File RelativePath="testcpuid.c"></File>
+<File RelativePath="time_scale.c"></File>
+<File RelativePath="tone_detect.c"></File>
+<File RelativePath="tone_generate.c"></File>
+<File RelativePath="v17rx.c"></File>
+<File RelativePath="v17tx.c"></File>
+<File RelativePath="v22bis_rx.c"></File>
+<File RelativePath="v22bis_tx.c"></File>
+<File RelativePath="v27ter_rx.c"></File>
+<File RelativePath="v27ter_tx.c"></File>
+<File RelativePath="v29rx.c"></File>
+<File RelativePath="v29tx.c"></File>
+<File RelativePath="v42.c"></File>
+<File RelativePath="v42bis.c"></File>
+<File RelativePath="v8.c"></File>
+<File RelativePath="vector_float.c"></File>
+<File RelativePath="vector_int.c"></File>
+<File RelativePath=".\msvc\gettimeofday.c"></File>
+</Filter><Filter Name="Header Files">
+<File RelativePath="spandsp/adsi.h"></File>
+<File RelativePath="spandsp/async.h"></File>
+<File RelativePath="spandsp/arctan2.h"></File>
+<File RelativePath="spandsp/at_interpreter.h"></File>
+<File RelativePath="spandsp/awgn.h"></File>
+<File RelativePath="spandsp/bell_r2_mf.h"></File>
+<File RelativePath="spandsp/bert.h"></File>
+<File RelativePath="spandsp/biquad.h"></File>
+<File RelativePath="spandsp/bit_operations.h"></File>
+<File RelativePath="spandsp/bitstream.h"></File>
+<File RelativePath="spandsp/crc.h"></File>
+<File RelativePath="spandsp/complex.h"></File>
+<File RelativePath="spandsp/complex_filters.h"></File>
+<File RelativePath="spandsp/complex_vector_float.h"></File>
+<File RelativePath="spandsp/complex_vector_int.h"></File>
+<File RelativePath="spandsp/dc_restore.h"></File>
+<File RelativePath="spandsp/dds.h"></File>
+<File RelativePath="spandsp/dtmf.h"></File>
+<File RelativePath="spandsp/echo.h"></File>
+<File RelativePath="spandsp/fast_convert.h"></File>
+<File RelativePath="spandsp/fax.h"></File>
+<File RelativePath="spandsp/fax_modems.h"></File>
+<File RelativePath="spandsp/fir.h"></File>
+<File RelativePath="spandsp/fsk.h"></File>
+<File RelativePath="spandsp/g168models.h"></File>
+<File RelativePath="spandsp/g711.h"></File>
+<File RelativePath="spandsp/g722.h"></File>
+<File RelativePath="spandsp/g726.h"></File>
+<File RelativePath="spandsp/gsm0610.h"></File>
+<File RelativePath="spandsp/hdlc.h"></File>
+<File RelativePath="spandsp/ima_adpcm.h"></File>
+<File RelativePath="spandsp/logging.h"></File>
+<File RelativePath="spandsp/lpc10.h"></File>
+<File RelativePath="spandsp/modem_echo.h"></File>
+<File RelativePath="spandsp/modem_connect_tones.h"></File>
+<File RelativePath="spandsp/noise.h"></File>
+<File RelativePath="spandsp/oki_adpcm.h"></File>
+<File RelativePath="spandsp/playout.h"></File>
+<File RelativePath="spandsp/plc.h"></File>
+<File RelativePath="spandsp/power_meter.h"></File>
+<File RelativePath="spandsp/queue.h"></File>
+<File RelativePath="spandsp/saturated.h"></File>
+<File RelativePath="spandsp/schedule.h"></File>
+<File RelativePath="spandsp/sig_tone.h"></File>
+<File RelativePath="spandsp/silence_gen.h"></File>
+<File RelativePath="spandsp/super_tone_rx.h"></File>
+<File RelativePath="spandsp/super_tone_tx.h"></File>
+<File RelativePath="spandsp/t4.h"></File>
+<File RelativePath="spandsp/t30.h"></File>
+<File RelativePath="spandsp/t30_api.h"></File>
+<File RelativePath="spandsp/t30_fcf.h"></File>
+<File RelativePath="spandsp/t30_logging.h"></File>
+<File RelativePath="spandsp/t31.h"></File>
+<File RelativePath="spandsp/t35.h"></File>
+<File RelativePath="spandsp/t38_core.h"></File>
+<File RelativePath="spandsp/t38_gateway.h"></File>
+<File RelativePath="spandsp/t38_non_ecm_buffer.h"></File>
+<File RelativePath="spandsp/t38_terminal.h"></File>
+<File RelativePath="spandsp/telephony.h"></File>
+<File RelativePath="spandsp/time_scale.h"></File>
+<File RelativePath="spandsp/timing.h"></File>
+<File RelativePath="spandsp/tone_detect.h"></File>
+<File RelativePath="spandsp/tone_generate.h"></File>
+<File RelativePath="spandsp/v17rx.h"></File>
+<File RelativePath="spandsp/v17tx.h"></File>
+<File RelativePath="spandsp/v22bis.h"></File>
+<File RelativePath="spandsp/v27ter_rx.h"></File>
+<File RelativePath="spandsp/v27ter_tx.h"></File>
+<File RelativePath="spandsp/v29rx.h"></File>
+<File RelativePath="spandsp/v29tx.h"></File>
+<File RelativePath="spandsp/v42.h"></File>
+<File RelativePath="spandsp/v42bis.h"></File>
+<File RelativePath="spandsp/v8.h"></File>
+<File RelativePath="spandsp/vector_float.h"></File>
+<File RelativePath="spandsp/vector_int.h"></File>
+<File RelativePath="spandsp/version.h"></File>
+<File RelativePath="spandsp/private/adsi.h"></File>
+<File RelativePath="spandsp/private/async.h"></File>
+<File RelativePath="spandsp/private/at_interpreter.h"></File>
+<File RelativePath="spandsp/private/awgn.h"></File>
+<File RelativePath="spandsp/private/bell_r2_mf.h"></File>
+<File RelativePath="spandsp/private/bert.h"></File>
+<File RelativePath="spandsp/private/bitstream.h"></File>
+<File RelativePath="spandsp/private/dtmf.h"></File>
+<File RelativePath="spandsp/private/fax.h"></File>
+<File RelativePath="spandsp/private/fax_modems.h"></File>
+<File RelativePath="spandsp/private/fsk.h"></File>
+<File RelativePath="spandsp/private/g711.h"></File>
+<File RelativePath="spandsp/private/g722.h"></File>
+<File RelativePath="spandsp/private/g726.h"></File>
+<File RelativePath="spandsp/private/gsm0610.h"></File>
+<File RelativePath="spandsp/private/hdlc.h"></File>
+<File RelativePath="spandsp/private/ima_adpcm.h"></File>
+<File RelativePath="spandsp/private/logging.h"></File>
+<File RelativePath="spandsp/private/lpc10.h"></File>
+<File RelativePath="spandsp/private/modem_connect_tones.h"></File>
+<File RelativePath="spandsp/private/noise.h"></File>
+<File RelativePath="spandsp/private/oki_adpcm.h"></File>
+<File RelativePath="spandsp/private/queue.h"></File>
+<File RelativePath="spandsp/private/schedule.h"></File>
+<File RelativePath="spandsp/private/sig_tone.h"></File>
+<File RelativePath="spandsp/private/super_tone_rx.h"></File>
+<File RelativePath="spandsp/private/super_tone_tx.h"></File>
+<File RelativePath="spandsp/private/t30.h"></File>
+<File RelativePath="spandsp/private/t31.h"></File>
+<File RelativePath="spandsp/private/t38_core.h"></File>
+<File RelativePath="spandsp/private/t38_gateway.h"></File>
+<File RelativePath="spandsp/private/t38_non_ecm_buffer.h"></File>
+<File RelativePath="spandsp/private/t38_terminal.h"></File>
+<File RelativePath="spandsp/private/t4.h"></File>
+<File RelativePath="spandsp/private/time_scale.h"></File>
+<File RelativePath="spandsp/private/tone_detect.h"></File>
+<File RelativePath="spandsp/private/tone_generate.h"></File>
+<File RelativePath="spandsp/private/v17rx.h"></File>
+<File RelativePath="spandsp/private/v17tx.h"></File>
+<File RelativePath="spandsp/private/v22bis.h"></File>
+<File RelativePath="spandsp/private/v27ter_rx.h"></File>
+<File RelativePath="spandsp/private/v27ter_tx.h"></File>
+<File RelativePath="spandsp/private/v29rx.h"></File>
+<File RelativePath="spandsp/private/v29tx.h"></File>
+<File RelativePath="spandsp/private/v42.h"></File>
+<File RelativePath="spandsp/private/v42bis.h"></File>
+<File RelativePath="spandsp/private/v8.h"></File>
+<File RelativePath="spandsp/expose.h"></File>
+<File RelativePath="spandsp.h"></File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
1
0
Author: brian
Date: Fri Feb 20 12:07:35 2009
New Revision: 12184
Log:
fix python and commit an python example.
Added:
freeswitch/trunk/libs/esl/python/single_command.py
Modified:
freeswitch/trunk/libs/esl/python/Makefile
Modified: freeswitch/trunk/libs/esl/python/Makefile
==============================================================================
--- freeswitch/trunk/libs/esl/python/Makefile (original)
+++ freeswitch/trunk/libs/esl/python/Makefile Fri Feb 20 12:07:35 2009
@@ -1,7 +1,7 @@
LOCAL_CFLAGS=-I/usr/include/python2.4
LOCAL_LDFLAGS=-lpython2.4
-all: ESL.so
+all: _ESL.so
esl_wrap.cpp:
swig -module ESL -classic -python -c++ -DMULTIPLICITY -I../src/include -o esl_wrap.cpp ../ESL.i
@@ -9,8 +9,8 @@
esl_wrap.o: esl_wrap.cpp
$(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(LOCAL_CFLAGS) -c esl_wrap.cpp -o esl_wrap.o
-ESL.so: esl_wrap.o
- $(CXX) $(SOLINK) esl_wrap.o $(MYLIB) $(LOCAL_LDFLAGS) -o ESL.so -L. $(LIBS)
+_ESL.so: esl_wrap.o
+ $(CXX) $(SOLINK) esl_wrap.o $(MYLIB) $(LOCAL_LDFLAGS) -o _ESL.so -L. $(LIBS)
clean:
rm -f *.o *.so *~
Added: freeswitch/trunk/libs/esl/python/single_command.py
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/esl/python/single_command.py Fri Feb 20 12:07:35 2009
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+
+import string
+import sys
+from ESL import *
+
+con = ESLconnection("localhost","8021","ClueCon")
+#are we connected?
+
+if con.connected:
+
+ #get argument passed to script
+ command = string.join(sys.argv[1:])
+
+ #run command
+ e=con.sendRecv("api "+ command)
+ print e.getBody()
+
+else:
+
+ print "Not Connected"
+
1
0
Author: mikej
Date: Fri Feb 20 12:04:57 2009
New Revision: 12183
Log:
clean msvc build warning
Modified:
freeswitch/trunk/src/switch_log.c
Modified: freeswitch/trunk/src/switch_log.c
==============================================================================
--- freeswitch/trunk/src/switch_log.c (original)
+++ freeswitch/trunk/src/switch_log.c Fri Feb 20 12:04:57 2009
@@ -195,7 +195,7 @@
static switch_thread_t *thread;
-static void *SWITCH_THREAD_FUNC log_thread(switch_thread_t *thread, void *obj)
+static void *SWITCH_THREAD_FUNC log_thread(switch_thread_t *t, void *obj)
{
if (!obj) {
1
0
[commit] r12182 - in freeswitch/trunk/libs/esl: lua perl php python ruby src src/include
by FreeSWITCH SVN 20 Feb '09
by FreeSWITCH SVN 20 Feb '09
20 Feb '09
Author: anthm
Date: Fri Feb 20 11:16:36 2009
New Revision: 12182
Log:
allow null arg to api and bgapi method
Modified:
freeswitch/trunk/libs/esl/lua/esl_wrap.cpp
freeswitch/trunk/libs/esl/perl/esl_wrap.cpp
freeswitch/trunk/libs/esl/php/ESL.php
freeswitch/trunk/libs/esl/php/esl_wrap.cpp
freeswitch/trunk/libs/esl/python/esl_wrap.cpp
freeswitch/trunk/libs/esl/ruby/esl_wrap.cpp
freeswitch/trunk/libs/esl/src/esl_oop.cpp
freeswitch/trunk/libs/esl/src/include/esl_oop.h
Modified: freeswitch/trunk/libs/esl/lua/esl_wrap.cpp
==============================================================================
--- freeswitch/trunk/libs/esl/lua/esl_wrap.cpp (original)
+++ freeswitch/trunk/libs/esl/lua/esl_wrap.cpp Fri Feb 20 11:16:36 2009
@@ -2337,20 +2337,22 @@
int SWIG_arg = -1;
ESLconnection *arg1 = (ESLconnection *) 0 ;
char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
+ char *arg3 = (char *) NULL ;
ESLevent *result = 0 ;
- SWIG_check_num_args("api",3,3)
+ SWIG_check_num_args("api",2,3)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("api",1,"ESLconnection *");
if(!lua_isstring(L,2)) SWIG_fail_arg("api",2,"char const *");
- if(!lua_isstring(L,3)) SWIG_fail_arg("api",3,"char const *");
+ if(lua_gettop(L)>=3 && !lua_isstring(L,3)) SWIG_fail_arg("api",3,"char const *");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
SWIG_fail_ptr("ESLconnection_api",1,SWIGTYPE_p_ESLconnection);
}
arg2 = (char *)lua_tostring(L, 2);
- arg3 = (char *)lua_tostring(L, 3);
+ if(lua_gettop(L)>=3){
+ arg3 = (char *)lua_tostring(L, 3);
+ }
result = (ESLevent *)(arg1)->api((char const *)arg2,(char const *)arg3);
SWIG_arg=0;
SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,0); SWIG_arg++;
@@ -2368,20 +2370,22 @@
int SWIG_arg = -1;
ESLconnection *arg1 = (ESLconnection *) 0 ;
char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
+ char *arg3 = (char *) NULL ;
ESLevent *result = 0 ;
- SWIG_check_num_args("bgapi",3,3)
+ SWIG_check_num_args("bgapi",2,3)
if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("bgapi",1,"ESLconnection *");
if(!lua_isstring(L,2)) SWIG_fail_arg("bgapi",2,"char const *");
- if(!lua_isstring(L,3)) SWIG_fail_arg("bgapi",3,"char const *");
+ if(lua_gettop(L)>=3 && !lua_isstring(L,3)) SWIG_fail_arg("bgapi",3,"char const *");
if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
SWIG_fail_ptr("ESLconnection_bgapi",1,SWIGTYPE_p_ESLconnection);
}
arg2 = (char *)lua_tostring(L, 2);
- arg3 = (char *)lua_tostring(L, 3);
+ if(lua_gettop(L)>=3){
+ arg3 = (char *)lua_tostring(L, 3);
+ }
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3);
SWIG_arg=0;
SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,0); SWIG_arg++;
Modified: freeswitch/trunk/libs/esl/perl/esl_wrap.cpp
==============================================================================
--- freeswitch/trunk/libs/esl/perl/esl_wrap.cpp (original)
+++ freeswitch/trunk/libs/esl/perl/esl_wrap.cpp Fri Feb 20 11:16:36 2009
@@ -2828,7 +2828,7 @@
{
ESLconnection *arg1 = (ESLconnection *) 0 ;
char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
+ char *arg3 = (char *) NULL ;
ESLevent *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -2841,7 +2841,7 @@
int argvi = 0;
dXSARGS;
- if ((items < 3) || (items > 3)) {
+ if ((items < 2) || (items > 3)) {
SWIG_croak("Usage: ESLconnection_api(self,cmd,arg);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
@@ -2854,11 +2854,13 @@
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_api" "', argument " "2"" of type '" "char const *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
- res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
- if (!SWIG_IsOK(res3)) {
- SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_api" "', argument " "3"" of type '" "char const *""'");
+ if (items > 2) {
+ res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_api" "', argument " "3"" of type '" "char const *""'");
+ }
+ arg3 = reinterpret_cast< char * >(buf3);
}
- arg3 = reinterpret_cast< char * >(buf3);
result = (ESLevent *)(arg1)->api((char const *)arg2,(char const *)arg3);
ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, 0 | SWIG_SHADOW); argvi++ ;
@@ -2878,7 +2880,7 @@
{
ESLconnection *arg1 = (ESLconnection *) 0 ;
char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
+ char *arg3 = (char *) NULL ;
ESLevent *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -2891,7 +2893,7 @@
int argvi = 0;
dXSARGS;
- if ((items < 3) || (items > 3)) {
+ if ((items < 2) || (items > 3)) {
SWIG_croak("Usage: ESLconnection_bgapi(self,cmd,arg);");
}
res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
@@ -2904,11 +2906,13 @@
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_bgapi" "', argument " "2"" of type '" "char const *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
- res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
- if (!SWIG_IsOK(res3)) {
- SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_bgapi" "', argument " "3"" of type '" "char const *""'");
+ if (items > 2) {
+ res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_bgapi" "', argument " "3"" of type '" "char const *""'");
+ }
+ arg3 = reinterpret_cast< char * >(buf3);
}
- arg3 = reinterpret_cast< char * >(buf3);
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3);
ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, 0 | SWIG_SHADOW); argvi++ ;
Modified: freeswitch/trunk/libs/esl/php/ESL.php
==============================================================================
--- freeswitch/trunk/libs/esl/php/ESL.php (original)
+++ freeswitch/trunk/libs/esl/php/ESL.php Fri Feb 20 11:16:36 2009
@@ -131,13 +131,19 @@
return is_resource($r) ? new ESLevent($r) : $r;
}
- function api($cmd,$arg) {
- $r=ESLconnection_api($this->_cPtr,$cmd,$arg);
+ function api($cmd,$arg=null) {
+ switch (func_num_args()) {
+ case 1: $r=ESLconnection_api($this->_cPtr,$cmd); break;
+ default: $r=ESLconnection_api($this->_cPtr,$cmd,$arg);
+ }
return is_resource($r) ? new ESLevent($r) : $r;
}
- function bgapi($cmd,$arg) {
- $r=ESLconnection_bgapi($this->_cPtr,$cmd,$arg);
+ function bgapi($cmd,$arg=null) {
+ switch (func_num_args()) {
+ case 1: $r=ESLconnection_bgapi($this->_cPtr,$cmd); break;
+ default: $r=ESLconnection_bgapi($this->_cPtr,$cmd,$arg);
+ }
return is_resource($r) ? new ESLevent($r) : $r;
}
Modified: freeswitch/trunk/libs/esl/php/esl_wrap.cpp
==============================================================================
--- freeswitch/trunk/libs/esl/php/esl_wrap.cpp (original)
+++ freeswitch/trunk/libs/esl/php/esl_wrap.cpp Fri Feb 20 11:16:36 2009
@@ -1889,14 +1889,16 @@
ZEND_NAMED_FUNCTION(_wrap_ESLconnection_api) {
ESLconnection *arg1 = (ESLconnection *) 0 ;
char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
+ char *arg3 = (char *) NULL ;
ESLevent *result = 0 ;
zval **args[3];
+ int arg_count;
SWIG_ResetError();
- if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
- WRONG_PARAM_COUNT;
- }
+ arg_count = ZEND_NUM_ARGS();
+ if(arg_count<2 || arg_count>3 ||
+ zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
+ WRONG_PARAM_COUNT;
{
if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_ESLconnection, 0) < 0) {
@@ -1910,12 +1912,13 @@
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
-
- /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
- convert_to_string_ex(args[2]);
- arg3 = (char *) Z_STRVAL_PP(args[2]);
- /*@SWIG@*/;
-
+ if(arg_count > 2) {
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ convert_to_string_ex(args[2]);
+ arg3 = (char *) Z_STRVAL_PP(args[2]);
+ /*@SWIG@*/;
+
+ }
result = (ESLevent *)(arg1)->api((char const *)arg2,(char const *)arg3);
{
SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_ESLevent, 0);
@@ -1929,14 +1932,16 @@
ZEND_NAMED_FUNCTION(_wrap_ESLconnection_bgapi) {
ESLconnection *arg1 = (ESLconnection *) 0 ;
char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
+ char *arg3 = (char *) NULL ;
ESLevent *result = 0 ;
zval **args[3];
+ int arg_count;
SWIG_ResetError();
- if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
- WRONG_PARAM_COUNT;
- }
+ arg_count = ZEND_NUM_ARGS();
+ if(arg_count<2 || arg_count>3 ||
+ zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
+ WRONG_PARAM_COUNT;
{
if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_ESLconnection, 0) < 0) {
@@ -1950,12 +1955,13 @@
arg2 = (char *) Z_STRVAL_PP(args[1]);
/*@SWIG@*/;
-
- /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
- convert_to_string_ex(args[2]);
- arg3 = (char *) Z_STRVAL_PP(args[2]);
- /*@SWIG@*/;
-
+ if(arg_count > 2) {
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ convert_to_string_ex(args[2]);
+ arg3 = (char *) Z_STRVAL_PP(args[2]);
+ /*@SWIG@*/;
+
+ }
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3);
{
SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_ESLevent, 0);
Modified: freeswitch/trunk/libs/esl/python/esl_wrap.cpp
==============================================================================
--- freeswitch/trunk/libs/esl/python/esl_wrap.cpp (original)
+++ freeswitch/trunk/libs/esl/python/esl_wrap.cpp Fri Feb 20 11:16:36 2009
@@ -3732,7 +3732,7 @@
PyObject *resultobj = 0;
ESLconnection *arg1 = (ESLconnection *) 0 ;
char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
+ char *arg3 = (char *) NULL ;
ESLevent *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -3746,7 +3746,7 @@
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"OOO:ESLconnection_api",&obj0,&obj1,&obj2)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"OO|O:ESLconnection_api",&obj0,&obj1,&obj2)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_api" "', argument " "1"" of type '" "ESLconnection *""'");
@@ -3757,11 +3757,13 @@
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_api" "', argument " "2"" of type '" "char const *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
- res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
- if (!SWIG_IsOK(res3)) {
- SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_api" "', argument " "3"" of type '" "char const *""'");
+ if (obj2) {
+ res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_api" "', argument " "3"" of type '" "char const *""'");
+ }
+ arg3 = reinterpret_cast< char * >(buf3);
}
- arg3 = reinterpret_cast< char * >(buf3);
result = (ESLevent *)(arg1)->api((char const *)arg2,(char const *)arg3);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, 0 | 0 );
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
@@ -3778,7 +3780,7 @@
PyObject *resultobj = 0;
ESLconnection *arg1 = (ESLconnection *) 0 ;
char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
+ char *arg3 = (char *) NULL ;
ESLevent *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -3792,7 +3794,7 @@
PyObject * obj1 = 0 ;
PyObject * obj2 = 0 ;
- if (!PyArg_ParseTuple(args,(char *)"OOO:ESLconnection_bgapi",&obj0,&obj1,&obj2)) SWIG_fail;
+ if (!PyArg_ParseTuple(args,(char *)"OO|O:ESLconnection_bgapi",&obj0,&obj1,&obj2)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_bgapi" "', argument " "1"" of type '" "ESLconnection *""'");
@@ -3803,11 +3805,13 @@
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_bgapi" "', argument " "2"" of type '" "char const *""'");
}
arg2 = reinterpret_cast< char * >(buf2);
- res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
- if (!SWIG_IsOK(res3)) {
- SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_bgapi" "', argument " "3"" of type '" "char const *""'");
+ if (obj2) {
+ res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_bgapi" "', argument " "3"" of type '" "char const *""'");
+ }
+ arg3 = reinterpret_cast< char * >(buf3);
}
- arg3 = reinterpret_cast< char * >(buf3);
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, 0 | 0 );
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
Modified: freeswitch/trunk/libs/esl/ruby/esl_wrap.cpp
==============================================================================
--- freeswitch/trunk/libs/esl/ruby/esl_wrap.cpp (original)
+++ freeswitch/trunk/libs/esl/ruby/esl_wrap.cpp Fri Feb 20 11:16:36 2009
@@ -2855,7 +2855,7 @@
_wrap_ESLconnection_api(int argc, VALUE *argv, VALUE self) {
ESLconnection *arg1 = (ESLconnection *) 0 ;
char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
+ char *arg3 = (char *) NULL ;
ESLevent *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -2867,8 +2867,8 @@
int alloc3 = 0 ;
VALUE vresult = Qnil;
- if ((argc < 2) || (argc > 2)) {
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+ if ((argc < 1) || (argc > 2)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
if (!SWIG_IsOK(res1)) {
@@ -2880,11 +2880,13 @@
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","api", 2, argv[0] ));
}
arg2 = reinterpret_cast< char * >(buf2);
- res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
- if (!SWIG_IsOK(res3)) {
- SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","api", 3, argv[1] ));
+ if (argc > 1) {
+ res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","api", 3, argv[1] ));
+ }
+ arg3 = reinterpret_cast< char * >(buf3);
}
- arg3 = reinterpret_cast< char * >(buf3);
result = (ESLevent *)(arg1)->api((char const *)arg2,(char const *)arg3);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, 0 | 0 );
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
@@ -2901,7 +2903,7 @@
_wrap_ESLconnection_bgapi(int argc, VALUE *argv, VALUE self) {
ESLconnection *arg1 = (ESLconnection *) 0 ;
char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
+ char *arg3 = (char *) NULL ;
ESLevent *result = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
@@ -2913,8 +2915,8 @@
int alloc3 = 0 ;
VALUE vresult = Qnil;
- if ((argc < 2) || (argc > 2)) {
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+ if ((argc < 1) || (argc > 2)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
if (!SWIG_IsOK(res1)) {
@@ -2926,11 +2928,13 @@
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","bgapi", 2, argv[0] ));
}
arg2 = reinterpret_cast< char * >(buf2);
- res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
- if (!SWIG_IsOK(res3)) {
- SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","bgapi", 3, argv[1] ));
+ if (argc > 1) {
+ res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","bgapi", 3, argv[1] ));
+ }
+ arg3 = reinterpret_cast< char * >(buf3);
}
- arg3 = reinterpret_cast< char * >(buf3);
result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3);
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, 0 | 0 );
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
Modified: freeswitch/trunk/libs/esl/src/esl_oop.cpp
==============================================================================
--- freeswitch/trunk/libs/esl/src/esl_oop.cpp (original)
+++ freeswitch/trunk/libs/esl/src/esl_oop.cpp Fri Feb 20 11:16:36 2009
@@ -56,13 +56,19 @@
ESLevent *ESLconnection::api(const char *cmd, const char *arg)
{
- size_t len = strlen(cmd) + strlen(arg) + 5;
+ size_t len;
char *cmd_buf;
+ if (!cmd) {
+ return NULL;
+ }
+
+ len = strlen(cmd) + (arg ? strlen(arg) : 0) + 5;
+
cmd_buf = (char *) malloc(len);
assert(cmd_buf);
- snprintf(cmd_buf, len, "api %s %s", cmd, arg);
+ snprintf(cmd_buf, len, "api %s %s", cmd, arg ? arg : "");
*(cmd_buf + len) = '\0';
if (esl_send_recv(&handle, cmd_buf) == ESL_SUCCESS) {
@@ -78,13 +84,19 @@
ESLevent *ESLconnection::bgapi(const char *cmd, const char *arg)
{
- size_t len = strlen(cmd) + strlen(arg) + 5;
+ size_t len;
char *cmd_buf;
+ if (!cmd) {
+ return NULL;
+ }
+
+ len = strlen(cmd) + (arg ? strlen(arg) : 0) + 5;
+
cmd_buf = (char *) malloc(len);
assert(cmd_buf);
- snprintf(cmd_buf, len, "bgapi %s %s", cmd, arg);
+ snprintf(cmd_buf, len, "bgapi %s %s", cmd, arg ? arg : "");
*(cmd_buf + len) = '\0';
if (esl_send_recv(&handle, cmd_buf) == ESL_SUCCESS) {
Modified: freeswitch/trunk/libs/esl/src/include/esl_oop.h
==============================================================================
--- freeswitch/trunk/libs/esl/src/include/esl_oop.h (original)
+++ freeswitch/trunk/libs/esl/src/include/esl_oop.h Fri Feb 20 11:16:36 2009
@@ -77,8 +77,8 @@
ESLevent *getInfo();
esl_status_t send(const char *cmd);
ESLevent *sendRecv(const char *cmd);
- ESLevent *api(const char *cmd, const char *arg);
- ESLevent *bgapi(const char *cmd, const char *arg);
+ ESLevent *api(const char *cmd, const char *arg = NULL);
+ ESLevent *bgapi(const char *cmd, const char *arg = NULL);
esl_status_t sendEvent(ESLevent *send_me);
ESLevent *recvEvent();
ESLevent *recvEventTimed(int ms);
1
0
Author: anthm
Date: Fri Feb 20 10:54:08 2009
New Revision: 12181
Log:
change example
Modified:
freeswitch/trunk/libs/esl/perl/single_command.pl
Modified: freeswitch/trunk/libs/esl/perl/single_command.pl
==============================================================================
--- freeswitch/trunk/libs/esl/perl/single_command.pl (original)
+++ freeswitch/trunk/libs/esl/perl/single_command.pl Fri Feb 20 10:54:08 2009
@@ -1,6 +1,8 @@
require ESL;
-my $command = join(" ", @ARGV);
+my $command = shift;
+my $args = join(" ", @ARGV);
+
my $con = new ESL::ESLconnection("localhost", "8021", "ClueCon");
-my $e = $con->sendRecv("api $command");
+my $e = $con->api($command, $args);
print $e->getBody();
1
0
Author: brian
Date: Fri Feb 20 10:53:24 2009
New Revision: 12180
Log:
add ruby example
Added:
freeswitch/trunk/libs/esl/ruby/single_command.rb
Added: freeswitch/trunk/libs/esl/ruby/single_command.rb
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/esl/ruby/single_command.rb Fri Feb 20 10:53:24 2009
@@ -0,0 +1,8 @@
+#! /usr/bin/ruby
+
+require "ESL"
+
+command = ARGV.join(" ")
+con = ESL::ESLconnection.new("localhost", "8021", "ClueCon")
+e = con.sendRecv("api #{command}")
+puts e.getBody()
1
0
[commit] r12179 - in freeswitch/trunk/libs/esl: lua perl php python ruby src src/include
by FreeSWITCH SVN 20 Feb '09
by FreeSWITCH SVN 20 Feb '09
20 Feb '09
Author: anthm
Date: Fri Feb 20 10:52:11 2009
New Revision: 12179
Log:
add api and bgapi methods
Modified:
freeswitch/trunk/libs/esl/lua/esl_wrap.cpp
freeswitch/trunk/libs/esl/perl/ESL.pm
freeswitch/trunk/libs/esl/perl/esl_wrap.cpp
freeswitch/trunk/libs/esl/php/ESL.php
freeswitch/trunk/libs/esl/php/esl_wrap.cpp
freeswitch/trunk/libs/esl/php/php_ESL.h
freeswitch/trunk/libs/esl/python/esl_wrap.cpp
freeswitch/trunk/libs/esl/ruby/esl_wrap.cpp
freeswitch/trunk/libs/esl/src/esl_oop.cpp
freeswitch/trunk/libs/esl/src/include/esl_oop.h
Modified: freeswitch/trunk/libs/esl/lua/esl_wrap.cpp
==============================================================================
--- freeswitch/trunk/libs/esl/lua/esl_wrap.cpp (original)
+++ freeswitch/trunk/libs/esl/lua/esl_wrap.cpp Fri Feb 20 10:52:11 2009
@@ -2333,6 +2333,68 @@
}
+static int _wrap_ESLconnection_api(lua_State* L) {
+ int SWIG_arg = -1;
+ ESLconnection *arg1 = (ESLconnection *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ ESLevent *result = 0 ;
+
+ SWIG_check_num_args("api",3,3)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("api",1,"ESLconnection *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("api",2,"char const *");
+ if(!lua_isstring(L,3)) SWIG_fail_arg("api",3,"char const *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
+ SWIG_fail_ptr("ESLconnection_api",1,SWIGTYPE_p_ESLconnection);
+ }
+
+ arg2 = (char *)lua_tostring(L, 2);
+ arg3 = (char *)lua_tostring(L, 3);
+ result = (ESLevent *)(arg1)->api((char const *)arg2,(char const *)arg3);
+ SWIG_arg=0;
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,0); SWIG_arg++;
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
+static int _wrap_ESLconnection_bgapi(lua_State* L) {
+ int SWIG_arg = -1;
+ ESLconnection *arg1 = (ESLconnection *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ ESLevent *result = 0 ;
+
+ SWIG_check_num_args("bgapi",3,3)
+ if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("bgapi",1,"ESLconnection *");
+ if(!lua_isstring(L,2)) SWIG_fail_arg("bgapi",2,"char const *");
+ if(!lua_isstring(L,3)) SWIG_fail_arg("bgapi",3,"char const *");
+
+ if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
+ SWIG_fail_ptr("ESLconnection_bgapi",1,SWIGTYPE_p_ESLconnection);
+ }
+
+ arg2 = (char *)lua_tostring(L, 2);
+ arg3 = (char *)lua_tostring(L, 3);
+ result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3);
+ SWIG_arg=0;
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,0); SWIG_arg++;
+ return SWIG_arg;
+
+ if(0) SWIG_fail;
+
+fail:
+ lua_error(L);
+ return SWIG_arg;
+}
+
+
static int _wrap_ESLconnection_sendEvent(lua_State* L) {
int SWIG_arg = -1;
ESLconnection *arg1 = (ESLconnection *) 0 ;
@@ -2595,6 +2657,8 @@
{"getInfo", _wrap_ESLconnection_getInfo},
{"send", _wrap_ESLconnection_send},
{"sendRecv", _wrap_ESLconnection_sendRecv},
+ {"api", _wrap_ESLconnection_api},
+ {"bgapi", _wrap_ESLconnection_bgapi},
{"sendEvent", _wrap_ESLconnection_sendEvent},
{"recvEvent", _wrap_ESLconnection_recvEvent},
{"recvEventTimed", _wrap_ESLconnection_recvEventTimed},
Modified: freeswitch/trunk/libs/esl/perl/ESL.pm
==============================================================================
--- freeswitch/trunk/libs/esl/perl/ESL.pm (original)
+++ freeswitch/trunk/libs/esl/perl/ESL.pm Fri Feb 20 10:52:11 2009
@@ -130,6 +130,8 @@
*getInfo = *ESLc::ESLconnection_getInfo;
*send = *ESLc::ESLconnection_send;
*sendRecv = *ESLc::ESLconnection_sendRecv;
+*api = *ESLc::ESLconnection_api;
+*bgapi = *ESLc::ESLconnection_bgapi;
*sendEvent = *ESLc::ESLconnection_sendEvent;
*recvEvent = *ESLc::ESLconnection_recvEvent;
*recvEventTimed = *ESLc::ESLconnection_recvEventTimed;
Modified: freeswitch/trunk/libs/esl/perl/esl_wrap.cpp
==============================================================================
--- freeswitch/trunk/libs/esl/perl/esl_wrap.cpp (original)
+++ freeswitch/trunk/libs/esl/perl/esl_wrap.cpp Fri Feb 20 10:52:11 2009
@@ -2824,6 +2824,106 @@
}
+XS(_wrap_ESLconnection_api) {
+ {
+ ESLconnection *arg1 = (ESLconnection *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ ESLevent *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int res3 ;
+ char *buf3 = 0 ;
+ int alloc3 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 3) || (items > 3)) {
+ SWIG_croak("Usage: ESLconnection_api(self,cmd,arg);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_api" "', argument " "1"" of type '" "ESLconnection *""'");
+ }
+ arg1 = reinterpret_cast< ESLconnection * >(argp1);
+ res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_api" "', argument " "2"" of type '" "char const *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_api" "', argument " "3"" of type '" "char const *""'");
+ }
+ arg3 = reinterpret_cast< char * >(buf3);
+ result = (ESLevent *)(arg1)->api((char const *)arg2,(char const *)arg3);
+ ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, 0 | SWIG_SHADOW); argvi++ ;
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ XSRETURN(argvi);
+ fail:
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ SWIG_croak_null();
+ }
+}
+
+
+XS(_wrap_ESLconnection_bgapi) {
+ {
+ ESLconnection *arg1 = (ESLconnection *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ ESLevent *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int res3 ;
+ char *buf3 = 0 ;
+ int alloc3 = 0 ;
+ int argvi = 0;
+ dXSARGS;
+
+ if ((items < 3) || (items > 3)) {
+ SWIG_croak("Usage: ESLconnection_bgapi(self,cmd,arg);");
+ }
+ res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_bgapi" "', argument " "1"" of type '" "ESLconnection *""'");
+ }
+ arg1 = reinterpret_cast< ESLconnection * >(argp1);
+ res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_bgapi" "', argument " "2"" of type '" "char const *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_bgapi" "', argument " "3"" of type '" "char const *""'");
+ }
+ arg3 = reinterpret_cast< char * >(buf3);
+ result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3);
+ ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, 0 | SWIG_SHADOW); argvi++ ;
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ XSRETURN(argvi);
+ fail:
+
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ SWIG_croak_null();
+ }
+}
+
+
XS(_wrap_ESLconnection_sendEvent) {
{
ESLconnection *arg1 = (ESLconnection *) 0 ;
@@ -3268,6 +3368,8 @@
{"ESLc::ESLconnection_getInfo", _wrap_ESLconnection_getInfo},
{"ESLc::ESLconnection_send", _wrap_ESLconnection_send},
{"ESLc::ESLconnection_sendRecv", _wrap_ESLconnection_sendRecv},
+{"ESLc::ESLconnection_api", _wrap_ESLconnection_api},
+{"ESLc::ESLconnection_bgapi", _wrap_ESLconnection_bgapi},
{"ESLc::ESLconnection_sendEvent", _wrap_ESLconnection_sendEvent},
{"ESLc::ESLconnection_recvEvent", _wrap_ESLconnection_recvEvent},
{"ESLc::ESLconnection_recvEventTimed", _wrap_ESLconnection_recvEventTimed},
Modified: freeswitch/trunk/libs/esl/php/ESL.php
==============================================================================
--- freeswitch/trunk/libs/esl/php/ESL.php (original)
+++ freeswitch/trunk/libs/esl/php/ESL.php Fri Feb 20 10:52:11 2009
@@ -131,6 +131,16 @@
return is_resource($r) ? new ESLevent($r) : $r;
}
+ function api($cmd,$arg) {
+ $r=ESLconnection_api($this->_cPtr,$cmd,$arg);
+ return is_resource($r) ? new ESLevent($r) : $r;
+ }
+
+ function bgapi($cmd,$arg) {
+ $r=ESLconnection_bgapi($this->_cPtr,$cmd,$arg);
+ return is_resource($r) ? new ESLevent($r) : $r;
+ }
+
function sendEvent($send_me) {
return ESLconnection_sendEvent($this->_cPtr,$send_me);
}
Modified: freeswitch/trunk/libs/esl/php/esl_wrap.cpp
==============================================================================
--- freeswitch/trunk/libs/esl/php/esl_wrap.cpp (original)
+++ freeswitch/trunk/libs/esl/php/esl_wrap.cpp Fri Feb 20 10:52:11 2009
@@ -1886,6 +1886,86 @@
}
+ZEND_NAMED_FUNCTION(_wrap_ESLconnection_api) {
+ ESLconnection *arg1 = (ESLconnection *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ ESLevent *result = 0 ;
+ zval **args[3];
+
+ SWIG_ResetError();
+ if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
+ WRONG_PARAM_COUNT;
+ }
+
+ {
+ if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_ESLconnection, 0) < 0) {
+ SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESLconnection_api. Expected SWIGTYPE_p_ESLconnection");
+ }
+ }
+ if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
+
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ convert_to_string_ex(args[1]);
+ arg2 = (char *) Z_STRVAL_PP(args[1]);
+ /*@SWIG@*/;
+
+
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ convert_to_string_ex(args[2]);
+ arg3 = (char *) Z_STRVAL_PP(args[2]);
+ /*@SWIG@*/;
+
+ result = (ESLevent *)(arg1)->api((char const *)arg2,(char const *)arg3);
+ {
+ SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_ESLevent, 0);
+ }
+ return;
+fail:
+ zend_error(SWIG_ErrorCode(),SWIG_ErrorMsg());
+}
+
+
+ZEND_NAMED_FUNCTION(_wrap_ESLconnection_bgapi) {
+ ESLconnection *arg1 = (ESLconnection *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ ESLevent *result = 0 ;
+ zval **args[3];
+
+ SWIG_ResetError();
+ if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
+ WRONG_PARAM_COUNT;
+ }
+
+ {
+ if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_ESLconnection, 0) < 0) {
+ SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ESLconnection_bgapi. Expected SWIGTYPE_p_ESLconnection");
+ }
+ }
+ if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
+
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ convert_to_string_ex(args[1]);
+ arg2 = (char *) Z_STRVAL_PP(args[1]);
+ /*@SWIG@*/;
+
+
+ /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+ convert_to_string_ex(args[2]);
+ arg3 = (char *) Z_STRVAL_PP(args[2]);
+ /*@SWIG@*/;
+
+ result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3);
+ {
+ SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_ESLevent, 0);
+ }
+ return;
+fail:
+ zend_error(SWIG_ErrorCode(),SWIG_ErrorMsg());
+}
+
+
ZEND_NAMED_FUNCTION(_wrap_ESLconnection_sendEvent) {
ESLconnection *arg1 = (ESLconnection *) 0 ;
ESLevent *arg2 = (ESLevent *) 0 ;
@@ -2248,6 +2328,8 @@
SWIG_ZEND_NAMED_FE(eslconnection_getinfo,_wrap_ESLconnection_getInfo,NULL)
SWIG_ZEND_NAMED_FE(eslconnection_send,_wrap_ESLconnection_send,NULL)
SWIG_ZEND_NAMED_FE(eslconnection_sendrecv,_wrap_ESLconnection_sendRecv,NULL)
+ SWIG_ZEND_NAMED_FE(eslconnection_api,_wrap_ESLconnection_api,NULL)
+ SWIG_ZEND_NAMED_FE(eslconnection_bgapi,_wrap_ESLconnection_bgapi,NULL)
SWIG_ZEND_NAMED_FE(eslconnection_sendevent,_wrap_ESLconnection_sendEvent,NULL)
SWIG_ZEND_NAMED_FE(eslconnection_recvevent,_wrap_ESLconnection_recvEvent,NULL)
SWIG_ZEND_NAMED_FE(eslconnection_recveventtimed,_wrap_ESLconnection_recvEventTimed,NULL)
Modified: freeswitch/trunk/libs/esl/php/php_ESL.h
==============================================================================
--- freeswitch/trunk/libs/esl/php/php_ESL.h (original)
+++ freeswitch/trunk/libs/esl/php/php_ESL.h Fri Feb 20 10:52:11 2009
@@ -52,6 +52,8 @@
ZEND_NAMED_FUNCTION(_wrap_ESLconnection_getInfo);
ZEND_NAMED_FUNCTION(_wrap_ESLconnection_send);
ZEND_NAMED_FUNCTION(_wrap_ESLconnection_sendRecv);
+ZEND_NAMED_FUNCTION(_wrap_ESLconnection_api);
+ZEND_NAMED_FUNCTION(_wrap_ESLconnection_bgapi);
ZEND_NAMED_FUNCTION(_wrap_ESLconnection_sendEvent);
ZEND_NAMED_FUNCTION(_wrap_ESLconnection_recvEvent);
ZEND_NAMED_FUNCTION(_wrap_ESLconnection_recvEventTimed);
Modified: freeswitch/trunk/libs/esl/python/esl_wrap.cpp
==============================================================================
--- freeswitch/trunk/libs/esl/python/esl_wrap.cpp (original)
+++ freeswitch/trunk/libs/esl/python/esl_wrap.cpp Fri Feb 20 10:52:11 2009
@@ -3728,6 +3728,98 @@
}
+SWIGINTERN PyObject *_wrap_ESLconnection_api(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ ESLconnection *arg1 = (ESLconnection *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ ESLevent *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int res3 ;
+ char *buf3 = 0 ;
+ int alloc3 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOO:ESLconnection_api",&obj0,&obj1,&obj2)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_api" "', argument " "1"" of type '" "ESLconnection *""'");
+ }
+ arg1 = reinterpret_cast< ESLconnection * >(argp1);
+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_api" "', argument " "2"" of type '" "char const *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_api" "', argument " "3"" of type '" "char const *""'");
+ }
+ arg3 = reinterpret_cast< char * >(buf3);
+ result = (ESLevent *)(arg1)->api((char const *)arg2,(char const *)arg3);
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, 0 | 0 );
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ return resultobj;
+fail:
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_ESLconnection_bgapi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+ PyObject *resultobj = 0;
+ ESLconnection *arg1 = (ESLconnection *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ ESLevent *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int res3 ;
+ char *buf3 = 0 ;
+ int alloc3 = 0 ;
+ PyObject * obj0 = 0 ;
+ PyObject * obj1 = 0 ;
+ PyObject * obj2 = 0 ;
+
+ if (!PyArg_ParseTuple(args,(char *)"OOO:ESLconnection_bgapi",&obj0,&obj1,&obj2)) SWIG_fail;
+ res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_bgapi" "', argument " "1"" of type '" "ESLconnection *""'");
+ }
+ arg1 = reinterpret_cast< ESLconnection * >(argp1);
+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_bgapi" "', argument " "2"" of type '" "char const *""'");
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_bgapi" "', argument " "3"" of type '" "char const *""'");
+ }
+ arg3 = reinterpret_cast< char * >(buf3);
+ result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3);
+ resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, 0 | 0 );
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ return resultobj;
+fail:
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ return NULL;
+}
+
+
SWIGINTERN PyObject *_wrap_ESLconnection_sendEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
ESLconnection *arg1 = (ESLconnection *) 0 ;
@@ -4086,6 +4178,8 @@
{ (char *)"ESLconnection_getInfo", _wrap_ESLconnection_getInfo, METH_VARARGS, NULL},
{ (char *)"ESLconnection_send", _wrap_ESLconnection_send, METH_VARARGS, NULL},
{ (char *)"ESLconnection_sendRecv", _wrap_ESLconnection_sendRecv, METH_VARARGS, NULL},
+ { (char *)"ESLconnection_api", _wrap_ESLconnection_api, METH_VARARGS, NULL},
+ { (char *)"ESLconnection_bgapi", _wrap_ESLconnection_bgapi, METH_VARARGS, NULL},
{ (char *)"ESLconnection_sendEvent", _wrap_ESLconnection_sendEvent, METH_VARARGS, NULL},
{ (char *)"ESLconnection_recvEvent", _wrap_ESLconnection_recvEvent, METH_VARARGS, NULL},
{ (char *)"ESLconnection_recvEventTimed", _wrap_ESLconnection_recvEventTimed, METH_VARARGS, NULL},
Modified: freeswitch/trunk/libs/esl/ruby/esl_wrap.cpp
==============================================================================
--- freeswitch/trunk/libs/esl/ruby/esl_wrap.cpp (original)
+++ freeswitch/trunk/libs/esl/ruby/esl_wrap.cpp Fri Feb 20 10:52:11 2009
@@ -2852,6 +2852,98 @@
SWIGINTERN VALUE
+_wrap_ESLconnection_api(int argc, VALUE *argv, VALUE self) {
+ ESLconnection *arg1 = (ESLconnection *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ ESLevent *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int res3 ;
+ char *buf3 = 0 ;
+ int alloc3 = 0 ;
+ VALUE vresult = Qnil;
+
+ if ((argc < 2) || (argc > 2)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+ }
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ESLconnection *","api", 1, self ));
+ }
+ arg1 = reinterpret_cast< ESLconnection * >(argp1);
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","api", 2, argv[0] ));
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","api", 3, argv[1] ));
+ }
+ arg3 = reinterpret_cast< char * >(buf3);
+ result = (ESLevent *)(arg1)->api((char const *)arg2,(char const *)arg3);
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, 0 | 0 );
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ return vresult;
+fail:
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
+_wrap_ESLconnection_bgapi(int argc, VALUE *argv, VALUE self) {
+ ESLconnection *arg1 = (ESLconnection *) 0 ;
+ char *arg2 = (char *) 0 ;
+ char *arg3 = (char *) 0 ;
+ ESLevent *result = 0 ;
+ void *argp1 = 0 ;
+ int res1 = 0 ;
+ int res2 ;
+ char *buf2 = 0 ;
+ int alloc2 = 0 ;
+ int res3 ;
+ char *buf3 = 0 ;
+ int alloc3 = 0 ;
+ VALUE vresult = Qnil;
+
+ if ((argc < 2) || (argc > 2)) {
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
+ }
+ res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
+ if (!SWIG_IsOK(res1)) {
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "ESLconnection *","bgapi", 1, self ));
+ }
+ arg1 = reinterpret_cast< ESLconnection * >(argp1);
+ res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
+ if (!SWIG_IsOK(res2)) {
+ SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","bgapi", 2, argv[0] ));
+ }
+ arg2 = reinterpret_cast< char * >(buf2);
+ res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
+ if (!SWIG_IsOK(res3)) {
+ SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","bgapi", 3, argv[1] ));
+ }
+ arg3 = reinterpret_cast< char * >(buf3);
+ result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3);
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, 0 | 0 );
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ return vresult;
+fail:
+ if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
+ return Qnil;
+}
+
+
+SWIGINTERN VALUE
_wrap_ESLconnection_sendEvent(int argc, VALUE *argv, VALUE self) {
ESLconnection *arg1 = (ESLconnection *) 0 ;
ESLevent *arg2 = (ESLevent *) 0 ;
@@ -3507,6 +3599,8 @@
rb_define_method(cESLconnection.klass, "getInfo", VALUEFUNC(_wrap_ESLconnection_getInfo), -1);
rb_define_method(cESLconnection.klass, "send", VALUEFUNC(_wrap_ESLconnection_send), -1);
rb_define_method(cESLconnection.klass, "sendRecv", VALUEFUNC(_wrap_ESLconnection_sendRecv), -1);
+ rb_define_method(cESLconnection.klass, "api", VALUEFUNC(_wrap_ESLconnection_api), -1);
+ rb_define_method(cESLconnection.klass, "bgapi", VALUEFUNC(_wrap_ESLconnection_bgapi), -1);
rb_define_method(cESLconnection.klass, "sendEvent", VALUEFUNC(_wrap_ESLconnection_sendEvent), -1);
rb_define_method(cESLconnection.klass, "recvEvent", VALUEFUNC(_wrap_ESLconnection_recvEvent), -1);
rb_define_method(cESLconnection.klass, "recvEventTimed", VALUEFUNC(_wrap_ESLconnection_recvEventTimed), -1);
Modified: freeswitch/trunk/libs/esl/src/esl_oop.cpp
==============================================================================
--- freeswitch/trunk/libs/esl/src/esl_oop.cpp (original)
+++ freeswitch/trunk/libs/esl/src/esl_oop.cpp Fri Feb 20 10:52:11 2009
@@ -54,6 +54,50 @@
return NULL;
}
+ESLevent *ESLconnection::api(const char *cmd, const char *arg)
+{
+ size_t len = strlen(cmd) + strlen(arg) + 5;
+ char *cmd_buf;
+
+ cmd_buf = (char *) malloc(len);
+ assert(cmd_buf);
+
+ snprintf(cmd_buf, len, "api %s %s", cmd, arg);
+ *(cmd_buf + len) = '\0';
+
+ if (esl_send_recv(&handle, cmd_buf) == ESL_SUCCESS) {
+ esl_event_t *event;
+ esl_event_dup(&event, handle.last_sr_event);
+ return new ESLevent(event, 1);
+ }
+
+ free(cmd_buf);
+
+ return NULL;
+}
+
+ESLevent *ESLconnection::bgapi(const char *cmd, const char *arg)
+{
+ size_t len = strlen(cmd) + strlen(arg) + 5;
+ char *cmd_buf;
+
+ cmd_buf = (char *) malloc(len);
+ assert(cmd_buf);
+
+ snprintf(cmd_buf, len, "bgapi %s %s", cmd, arg);
+ *(cmd_buf + len) = '\0';
+
+ if (esl_send_recv(&handle, cmd_buf) == ESL_SUCCESS) {
+ esl_event_t *event;
+ esl_event_dup(&event, handle.last_sr_event);
+ return new ESLevent(event, 1);
+ }
+
+ free(cmd_buf);
+
+ return NULL;
+}
+
ESLevent *ESLconnection::getInfo()
{
if (handle.connected && handle.info_event) {
@@ -98,9 +142,10 @@
}
if (esl_recv_event(&handle, NULL) == ESL_SUCCESS) {
- if (handle.last_ievent) {
+ esl_event_t *e = handle.last_ievent ? handle.last_ievent : handle.last_event;
+ if (e) {
esl_event_t *event;
- esl_event_dup(&event, handle.last_ievent);
+ esl_event_dup(&event, e);
last_event_obj = new ESLevent(event, 1);
return last_event_obj;
}
@@ -117,9 +162,10 @@
}
if (esl_recv_event_timed(&handle, ms, NULL) == ESL_SUCCESS) {
- if (handle.last_ievent) {
+ esl_event_t *e = handle.last_ievent ? handle.last_ievent : handle.last_event;
+ if (e) {
esl_event_t *event;
- esl_event_dup(&event, handle.last_ievent);
+ esl_event_dup(&event, e);
last_event_obj = new ESLevent(event, 1);
return last_event_obj;
}
Modified: freeswitch/trunk/libs/esl/src/include/esl_oop.h
==============================================================================
--- freeswitch/trunk/libs/esl/src/include/esl_oop.h (original)
+++ freeswitch/trunk/libs/esl/src/include/esl_oop.h Fri Feb 20 10:52:11 2009
@@ -77,6 +77,8 @@
ESLevent *getInfo();
esl_status_t send(const char *cmd);
ESLevent *sendRecv(const char *cmd);
+ ESLevent *api(const char *cmd, const char *arg);
+ ESLevent *bgapi(const char *cmd, const char *arg);
esl_status_t sendEvent(ESLevent *send_me);
ESLevent *recvEvent();
ESLevent *recvEventTimed(int ms);
1
0
[commit] r12178 - freeswitch/trunk/src/mod/formats/mod_portaudio_stream
by FreeSWITCH SVN 20 Feb '09
by FreeSWITCH SVN 20 Feb '09
20 Feb '09
Author: brian
Date: Fri Feb 20 10:49:18 2009
New Revision: 12178
Log:
add MODFORM-25 to SVN, thanks Hanedi Salas
Added:
freeswitch/trunk/src/mod/formats/mod_portaudio_stream/
freeswitch/trunk/src/mod/formats/mod_portaudio_stream/Makefile
freeswitch/trunk/src/mod/formats/mod_portaudio_stream/mod_portaudio_stream.c
Added: freeswitch/trunk/src/mod/formats/mod_portaudio_stream/Makefile
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/formats/mod_portaudio_stream/Makefile Fri Feb 20 10:49:18 2009
@@ -0,0 +1,23 @@
+BASE=../../../..
+BASE=../../../..
+
+PA_DIR=$(BASE)/libs/portaudio
+MODPA_DIR=$(BASE)/src/mod/endpoints/mod_portaudio
+
+
+PALA=$(PA_DIR)/lib/libportaudio.la
+LOCAL_CFLAGS=-I. -I$(PA_DIR)/include -I$(MODPA_DIR) -D__EXTENSION__=1
+
+LOCAL_INSERT_LDFLAGS=if test $$osarch = "Darwin" ; then echo "-framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon" ; fi ;
+
+LOCAL_LIBADD=$(PALA)
+LOCAL_OBJS=$(MODPA_DIR)/pablio.o $(MODPA_DIR)/pa_ringbuffer.o
+LOCAL_SOURCES=$(MODPA_DIR)/pablio.c $(MODPA_DIR)/pa_ringbuffer.c
+
+include $(BASE)/build/modmake.rules
+
+$(PALA): $(PA_DIR) $(PA_DIR)/.update
+ cd $(PA_DIR) && $(MAKE)
+ $(TOUCH_TARGET)
+
+$(LOCAL_OBJS): $(LOCAL_SOURCES)
\ No newline at end of file
Added: freeswitch/trunk/src/mod/formats/mod_portaudio_stream/mod_portaudio_stream.c
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/formats/mod_portaudio_stream/mod_portaudio_stream.c Fri Feb 20 10:49:18 2009
@@ -0,0 +1,639 @@
+/*
+ * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ * Copyright (C) 2005-2009, Anthony Minessale II <anthm(a)freeswitch.org>
+ *
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ *
+ * The Initial Developer of the Original Code is
+ * Anthony Minessale II <anthm(a)freeswitch.org>
+ * Portions created by the Initial Developer are Copyright (C)
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * mod_portaudio_stream.c -- Portaudio Streaming interface Audio
+ *
+ */
+#include "switch.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include "pablio.h"
+#include <string.h>
+
+#define DEFAULT_PREBUFFER_SIZE 1024 * 64
+#define SAMPLE_TYPE paInt16
+#define PREFERRED_RATE 8000
+
+SWITCH_MODULE_LOAD_FUNCTION(mod_portaudio_stream_load);
+SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_portaudio_stream_shutdown);
+SWITCH_MODULE_DEFINITION(mod_portaudio_stream, mod_portaudio_stream_load, mod_portaudio_stream_shutdown, NULL);
+static switch_memory_pool_t *module_pool = NULL;
+
+struct portaudio_stream_source;
+
+static struct {
+ int running;
+ int threads;
+ switch_mutex_t *mutex;
+ switch_hash_t *source_hash;
+
+} globals;
+
+
+struct portaudio_stream_context {
+ struct portaudio_stream_source *source;
+ switch_mutex_t *audio_mutex;
+ switch_buffer_t *audio_buffer;
+ int err;
+ const char *func;
+ const char *file;
+ int line;
+ switch_file_handle_t *handle;
+ struct portaudio_stream_context *next;
+};
+
+typedef struct portaudio_stream_context portaudio_stream_context_t;
+
+struct portaudio_stream_source {
+ char *sourcename;
+ int sourcedev;
+ int rate;
+ int interval;
+ char *timer_name;
+ int total;
+ int ready;
+ int stopped;
+ uint8_t channels;
+ switch_size_t samples;
+ uint32_t prebuf;
+ portaudio_stream_context_t *context_list;
+ switch_mutex_t *mutex;
+ switch_memory_pool_t *pool;
+ switch_thread_rwlock_t *rwlock;
+ PABLIO_Stream *audio_stream;
+ switch_frame_t read_frame;
+ switch_timer_t timer;
+ switch_codec_t read_codec;
+ switch_codec_t write_codec;
+ switch_mutex_t *device_lock;
+ unsigned char databuf[SWITCH_RECOMMENDED_BUFFER_SIZE];
+};
+
+typedef struct portaudio_stream_source portaudio_stream_source_t;
+
+
+
+static int get_dev_by_number(char *numstr, int in)
+{
+ int numDevices = Pa_GetDeviceCount();
+ const PaDeviceInfo *pdi;
+ char *end_ptr;
+ int number;
+
+ number = (int) strtol(numstr, &end_ptr, 10);
+
+ if (end_ptr == numstr || number < 0) {
+ return -1;
+ }
+
+ if (number > -1 && number < numDevices && (pdi = Pa_GetDeviceInfo(number))) {
+ if (in && pdi->maxInputChannels) {
+ return number;
+ } else if (!in && pdi->maxOutputChannels) {
+ return number;
+ }
+ }
+
+ return -1;
+}
+
+static int get_dev_by_name(char *name, int in)
+{
+ int i;
+ int numDevices;
+ const PaDeviceInfo *pdi;
+ numDevices = Pa_GetDeviceCount();
+
+ if (numDevices < 0) {
+ switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "ERROR: Pa_CountDevices returned 0x%x\n", numDevices);
+ return -2;
+ }
+
+ for (i = 0; i < numDevices; i++) {
+ int match = 0;
+ pdi = Pa_GetDeviceInfo(i);
+
+ if (switch_strlen_zero(name)) {
+ match = 1;
+ } else if (pdi && pdi->name && strstr(pdi->name, name)) {
+ match = 1;
+ }
+
+ if (match) {
+ if (in && pdi->maxInputChannels) {
+ return i;
+ } else if (!in && pdi->maxOutputChannels) {
+ return i;
+ }
+ }
+ }
+
+ return -1;
+}
+
+static switch_status_t engage_device(portaudio_stream_source_t *source,int restart)
+{
+ PaStreamParameters inputParameters,outputParameters;
+ PaError err;
+ int sample_rate = source->rate;
+ int codec_ms = source->interval;
+
+ switch_mutex_init(&source->device_lock, SWITCH_MUTEX_NESTED, module_pool);
+
+ if (source->timer.timer_interface) {
+ switch_core_timer_sync(&source->timer);
+ }
+
+ if (source->audio_stream) {
+ return SWITCH_STATUS_SUCCESS;
+ }
+
+ if (!source->read_codec.implementation) {
+ if (switch_core_codec_init(&source->read_codec,
+ "L16",
+ NULL, sample_rate, codec_ms, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL,
+ NULL) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
+ return SWITCH_STATUS_FALSE;
+ }
+ }
+
+ switch_assert(source->read_codec.implementation);
+
+ if (!source->write_codec.implementation) {
+ if (switch_core_codec_init(&source->write_codec,
+ "L16",
+ NULL,
+ sample_rate, codec_ms, 1, SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL,
+ NULL) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec?\n");
+ switch_core_codec_destroy(&source->read_codec);
+ return SWITCH_STATUS_FALSE;
+ }
+ }
+
+
+ if (!source->timer.timer_interface) {
+ if (switch_core_timer_init(&source->timer,
+ source->timer_name, codec_ms, source->read_codec.implementation->samples_per_packet,
+ module_pool) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "setup timer failed!\n");
+ switch_core_codec_destroy(&source->read_codec);
+ switch_core_codec_destroy(&source->write_codec);
+ return SWITCH_STATUS_FALSE;
+ }
+ }
+
+ source->read_frame.rate = sample_rate;
+ source->read_frame.codec = &source->read_codec;
+
+ switch_mutex_lock(source->device_lock);
+ /* LOCKED ************************************************************************************************** */
+ inputParameters.device = source->sourcedev;
+ inputParameters.channelCount = 1;
+ inputParameters.sampleFormat = SAMPLE_TYPE;
+ inputParameters.suggestedLatency = Pa_GetDeviceInfo(inputParameters.device)->defaultLowInputLatency;
+ inputParameters.hostApiSpecificStreamInfo = NULL;
+ outputParameters.device = source->sourcedev;
+ outputParameters.channelCount = 1;
+ outputParameters.sampleFormat = SAMPLE_TYPE;
+ outputParameters.suggestedLatency = Pa_GetDeviceInfo(outputParameters.device)->defaultLowOutputLatency;
+ outputParameters.hostApiSpecificStreamInfo = NULL;
+
+
+ err = OpenAudioStream(&source->audio_stream, &inputParameters, NULL, sample_rate, paClipOff,
+ source->read_codec.implementation->samples_per_packet, 0);
+ /* UNLOCKED ************************************************************************************************* */
+ if (err != paNoError) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error opening audio device retrying\n");
+ switch_yield(1000000);
+ err = OpenAudioStream(&source->audio_stream, &inputParameters, &outputParameters, sample_rate, paClipOff,
+ source->read_codec.implementation->samples_per_packet, 0);
+ }
+
+ switch_mutex_unlock(source->device_lock);
+ if (err != paNoError) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open audio device\n");
+ switch_core_codec_destroy(&source->read_codec);
+ switch_core_timer_destroy(&source->timer);
+ return SWITCH_STATUS_FALSE;
+ }
+
+
+ return SWITCH_STATUS_SUCCESS;
+}
+
+static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void *obj)
+{
+ portaudio_stream_source_t *source = obj;
+ portaudio_stream_context_t *cp;
+ int samples = 0;
+ int bused, bytesToWrite;
+
+
+ switch_mutex_lock(globals.mutex);
+ globals.threads++;
+ switch_mutex_unlock(globals.mutex);
+
+ if (!source->prebuf) {
+ source->prebuf = DEFAULT_PREBUFFER_SIZE;
+ }
+
+
+
+ switch_mutex_lock(globals.mutex);
+ switch_core_hash_insert(globals.source_hash, source->sourcename, source);
+ switch_mutex_unlock(globals.mutex);
+
+
+ switch_thread_rwlock_create(&source->rwlock, source->pool);
+
+ if (engage_device(source,0)!=SWITCH_STATUS_SUCCESS){
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, " Dev %d cant be engaged !\n",(int) source->sourcedev);
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, " Dev %d engaged at %d rate!\n",(int) source->sourcedev, (int) source->rate);
+ if (globals.running && !source->stopped) {
+ source->ready = 1;
+
+ if (!source->audio_stream){
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No Audio Stream wops!\n");
+ source->stopped = 0;
+ source->ready = 0;
+ } else {
+ while (globals.running && !source->stopped) {
+ samples = 0;
+ switch_mutex_lock(source->device_lock);
+ samples = ReadAudioStream(source->audio_stream, source->databuf,
+ source->read_codec.implementation->samples_per_packet , &source->timer);
+ switch_mutex_unlock(source->device_lock);
+
+
+ if (samples) {
+ bytesToWrite = source->samples;
+ if (samples < bytesToWrite) {
+ bytesToWrite = samples;
+ }
+ bytesToWrite *= source->audio_stream->bytesPerFrame;
+
+ if (source->total) {
+
+ switch_mutex_lock(source->mutex);
+ for (cp = source->context_list; cp; cp = cp->next) {
+
+ switch_mutex_lock(cp->audio_mutex);
+
+ bused = switch_buffer_inuse(cp->audio_buffer);
+ if (bused > source->samples * 768 ) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Leaking stream handle! [%s() %s:%d] %d used %d max\n", cp->func, cp->file,
+ cp->line,(int) bused, (int) ( source->samples * 768));
+ switch_buffer_zero(cp->audio_buffer);
+ } else {
+ switch_buffer_write(cp->audio_buffer, source->databuf, bytesToWrite);
+ }
+
+ switch_mutex_unlock(cp->audio_mutex);
+ }
+ switch_mutex_unlock(source->mutex);
+ }
+
+ }
+
+ }
+ }
+
+ }
+ }
+
+
+ source->ready = 0;
+
+ switch_mutex_lock(globals.mutex);
+ switch_core_hash_delete(globals.source_hash, source->sourcename);
+ switch_mutex_unlock(globals.mutex);
+
+ switch_thread_rwlock_wrlock(source->rwlock);
+ switch_thread_rwlock_unlock(source->rwlock);
+
+
+ switch_mutex_lock(source->device_lock);
+ CloseAudioStream(source->audio_stream);
+ if (source->read_codec.implementation) {
+ switch_core_codec_destroy(&source->read_codec);
+ switch_core_codec_destroy(&source->write_codec);
+ }
+ if (source->write_codec.implementation) {
+ switch_core_codec_destroy(&source->write_codec);
+ }
+ switch_mutex_unlock(source->device_lock);
+
+
+ switch_core_destroy_memory_pool(&source->pool);
+
+ switch_mutex_lock(globals.mutex);
+ globals.threads--;
+ switch_mutex_unlock(globals.mutex);
+
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, " thread ending succesfully !\n");
+ switch_thread_exit(thread,SWITCH_STATUS_SUCCESS);
+
+ return NULL;
+}
+
+
+static switch_status_t portaudio_stream_file_open(switch_file_handle_t *handle, const char *path)
+{
+ portaudio_stream_context_t *context ;
+ portaudio_stream_source_t *source;
+ switch_memory_pool_t *pool;
+ switch_status_t status = SWITCH_STATUS_FALSE;
+ switch_thread_t *thread;
+ switch_threadattr_t *thd_attr = NULL;
+ uint32_t rate = PREFERRED_RATE;
+ char *npath ;
+ int devNumber;
+
+
+
+
+
+ handle->pre_buffer_datalen = 0;
+
+ if (switch_test_flag(handle, SWITCH_FILE_FLAG_WRITE)) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "This format does not support writing! (yet)\n");
+ return status;
+ }
+
+ npath = switch_core_strdup(module_pool, path);
+
+ int tmp = handle->samplerate;
+ if (tmp == 8000 || tmp == 16000 || tmp == 32000 || tmp == 48000) {
+ rate = tmp;
+ }
+
+ if (*path == '#') {
+ devNumber = get_dev_by_number(npath + 1, 1);
+ } else {
+ devNumber = get_dev_by_name(npath , 1);
+ }
+ npath = switch_mprintf("device-%d at %d",devNumber,rate);
+
+
+
+ switch_mutex_lock(globals.mutex);
+ source = switch_core_hash_find(globals.source_hash, npath);
+
+ /* dev isnt there, try to start thread */
+ if (!source) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, " source isnt Created, create and start thread!\n");
+
+ if (switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, " :S no pool\n");
+ } else {
+ source = switch_core_alloc(pool, sizeof(*source));
+ if (source!=NULL){
+ source->pool = pool;
+ source->sourcedev = devNumber;
+ source->sourcename = switch_core_strdup(source->pool, npath);
+ source->rate = rate;
+ source->interval = 20;
+ source->channels = 1;
+ source->timer_name = "soft";
+ source->prebuf = DEFAULT_PREBUFFER_SIZE;
+ source->stopped = 0;
+ source->ready = 0;
+ source->samples = switch_samples_per_packet(source->rate, source->interval);
+
+
+
+ switch_mutex_init(&source->mutex, SWITCH_MUTEX_NESTED, source->pool);
+
+
+
+ switch_threadattr_create(&thd_attr, source->pool);
+ switch_threadattr_detach_set(thd_attr, 1);
+
+ switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
+ switch_thread_create(&thread, thd_attr, read_stream_thread, source, source->pool);
+
+ }
+
+ }
+
+ }
+ switch_mutex_unlock(globals.mutex);
+ switch_yield(1000000);
+ /* dev already engaged */
+ if (source) {
+
+ /*wait for source to be ready*/
+
+ while(source->ready==0){switch_yield(100000);}
+
+
+ if (switch_thread_rwlock_tryrdlock(source->rwlock) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, " error rwlock !\n");
+ source = NULL;
+ }
+
+ }
+
+
+
+ if (source) {
+ status = SWITCH_STATUS_SUCCESS;
+
+ if ((context = switch_core_alloc(handle->memory_pool, sizeof(*context))) == 0) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, " error allocating context!\n");
+ status = SWITCH_STATUS_MEMERR;
+ } else {
+ /* everything goes fine at this point */
+ handle->samples = 0;
+ handle->samplerate = source->rate;
+ handle->channels = 1;
+ handle->format = 0;
+ handle->sections = 0;
+ handle->seekable = 0;
+ handle->speed = 0;
+ handle->private_info = context;
+ handle->interval = source->interval;
+
+
+ switch_mutex_init(&context->audio_mutex, SWITCH_MUTEX_NESTED, handle->memory_pool);
+ if (switch_buffer_create_dynamic(&context->audio_buffer, 512, 1024, 0) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Memory Error!\n");
+ status = SWITCH_STATUS_MEMERR;
+ } else {
+ /* context created... then continue */
+ context->source = source;
+ context->file = handle->file;
+ context->func = handle->func;
+ context->line = handle->line;
+ context->handle = handle;
+ switch_mutex_lock(source->mutex);
+ context->next = source->context_list;
+ source->context_list = context;
+ source->total++;
+ switch_mutex_unlock(source->mutex);
+
+ }
+ }
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unknown source %s\n", path);
+ status = SWITCH_STATUS_FALSE;
+ }
+
+
+
+ return status;
+}
+
+
+static switch_status_t portaudio_stream_file_close(switch_file_handle_t *handle)
+{
+ portaudio_stream_context_t *cp, *last = NULL, *context = handle->private_info;
+
+
+ switch_mutex_lock(context->source->mutex);
+ for (cp = context->source->context_list; cp; cp = cp->next) {
+ if (cp == context) {
+ if (last) {
+ last->next = cp->next;
+ } else {
+ context->source->context_list = cp->next;
+ }
+ break;
+ }
+ last = cp;
+ }
+ context->source->total--;
+ switch_mutex_unlock(context->source->mutex);
+ switch_buffer_destroy(&context->audio_buffer);
+ switch_thread_rwlock_unlock(context->source->rwlock);
+
+ return SWITCH_STATUS_SUCCESS;
+}
+
+
+static switch_status_t portaudio_stream_file_read(switch_file_handle_t *handle, void *data, size_t *len)
+{
+ portaudio_stream_context_t *context = handle->private_info;
+ switch_size_t bytes = 0;
+ int bytesPerSample = context->source->audio_stream->bytesPerFrame;
+ size_t need = *len * bytesPerSample;
+
+
+
+ if (!context->source->ready) {
+ *len = 0;
+ return SWITCH_STATUS_FALSE;
+ }
+
+ switch_mutex_lock(context->audio_mutex);
+ if ((bytes = switch_buffer_read(context->audio_buffer, data, need))) {
+ *len = bytes / bytesPerSample;
+ } else {
+ if (need > 2560) {
+ need = 2560;
+ }
+ memset(data, 255, need);
+ *len = need / bytesPerSample;
+ }
+ switch_mutex_unlock(context->audio_mutex);
+
+
+
+ handle->sample_count += *len;
+ return SWITCH_STATUS_SUCCESS;
+
+
+}
+
+/* Registration */
+
+static char *supported_formats[SWITCH_MAX_CODECS] = { 0 };
+
+static void shutdown_event_handler(switch_event_t *event)
+{
+ globals.running = 0;
+}
+
+SWITCH_MODULE_LOAD_FUNCTION(mod_portaudio_stream_load)
+{
+ switch_file_interface_t *file_interface;
+ supported_formats[0] = "portaudio_stream";
+
+ module_pool = pool;
+
+ Pa_Initialize();
+
+ *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+ file_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_FILE_INTERFACE);
+ file_interface->interface_name = modname;
+ file_interface->extens = supported_formats;
+ file_interface->file_open = portaudio_stream_file_open;
+ file_interface->file_close = portaudio_stream_file_close;
+ file_interface->file_read = portaudio_stream_file_read;
+
+ if (switch_event_bind(modname, SWITCH_EVENT_SHUTDOWN, SWITCH_EVENT_SUBCLASS_ANY, shutdown_event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind shutdown event handler!\n");
+ }
+
+ memset(&globals, 0, sizeof(globals));
+ globals.running = 1;
+ globals.threads = 0;
+ switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, module_pool);
+ switch_core_hash_init(&globals.source_hash, module_pool);
+
+
+ /* indicate that the module should continue to be loaded */
+ return SWITCH_STATUS_SUCCESS;
+}
+
+SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_portaudio_stream_shutdown)
+{
+ globals.running = 0;
+ switch_event_unbind_callback(shutdown_event_handler);
+
+ while(globals.threads > 0) {
+ switch_yield(100000);
+ }
+
+ Pa_Terminate();
+
+ switch_core_hash_destroy(&globals.source_hash);
+ return SWITCH_STATUS_SUCCESS;
+}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:t
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4:
+ */
1
0
Author: anthm
Date: Fri Feb 20 09:30:01 2009
New Revision: 12177
Log:
don't execute apps on channels that are hungup
Modified:
freeswitch/trunk/src/switch_core_session.c
Modified: freeswitch/trunk/src/switch_core_session.c
==============================================================================
--- freeswitch/trunk/src/switch_core_session.c (original)
+++ freeswitch/trunk/src/switch_core_session.c Fri Feb 20 09:30:01 2009
@@ -1238,6 +1238,11 @@
{
switch_application_interface_t *application_interface;
+ if (switch_channel_get_state(session->channel) >= CS_HANGUP) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Channel is hungup, aborting execution of application: %s\n", app);
+ return SWITCH_STATUS_FALSE;
+ }
+
if ((application_interface = switch_loadable_module_get_application_interface(app)) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Application %s\n", app);
switch_channel_hangup(session->channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
1
0