opalvoip-svn Mailing List for OpalVOIP (Page 645)
Brought to you by:
csoutheren,
rjongbloed
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(71) |
Nov
(241) |
Dec
(143) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(210) |
Feb
(263) |
Mar
(214) |
Apr
(290) |
May
(203) |
Jun
(160) |
Jul
(128) |
Aug
(158) |
Sep
(376) |
Oct
(234) |
Nov
(227) |
Dec
(216) |
2009 |
Jan
(99) |
Feb
(151) |
Mar
(234) |
Apr
(143) |
May
(271) |
Jun
(244) |
Jul
(173) |
Aug
(124) |
Sep
(246) |
Oct
(178) |
Nov
(85) |
Dec
(77) |
2010 |
Jan
(101) |
Feb
(79) |
Mar
(92) |
Apr
(134) |
May
(125) |
Jun
(121) |
Jul
(61) |
Aug
(70) |
Sep
(86) |
Oct
(81) |
Nov
(65) |
Dec
(75) |
2011 |
Jan
(110) |
Feb
(119) |
Mar
(267) |
Apr
(154) |
May
(296) |
Jun
(177) |
Jul
(149) |
Aug
(124) |
Sep
(120) |
Oct
(116) |
Nov
(99) |
Dec
(121) |
2012 |
Jan
(78) |
Feb
(161) |
Mar
(323) |
Apr
(154) |
May
(190) |
Jun
(207) |
Jul
(176) |
Aug
(165) |
Sep
(137) |
Oct
(85) |
Nov
(112) |
Dec
(100) |
2013 |
Jan
(341) |
Feb
(102) |
Mar
(240) |
Apr
(216) |
May
(233) |
Jun
(226) |
Jul
(139) |
Aug
(192) |
Sep
(183) |
Oct
(211) |
Nov
(220) |
Dec
(110) |
2014 |
Jan
(203) |
Feb
(205) |
Mar
(100) |
Apr
(178) |
May
(194) |
Jun
(249) |
Jul
(136) |
Aug
(241) |
Sep
(226) |
Oct
(200) |
Nov
(94) |
Dec
(46) |
2015 |
Jan
(94) |
Feb
(74) |
Mar
(89) |
Apr
(78) |
May
(65) |
Jun
(70) |
Jul
(113) |
Aug
(176) |
Sep
(140) |
Oct
(154) |
Nov
(99) |
Dec
(115) |
2016 |
Jan
(102) |
Feb
(69) |
Mar
(97) |
Apr
(53) |
May
(42) |
Jun
(13) |
Jul
(42) |
Aug
(30) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <rjo...@us...> - 2007-11-05 01:27:56
|
Revision: 18796 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18796&view=rev Author: rjongbloed Date: 2007-11-04 17:27:39 -0800 (Sun, 04 Nov 2007) Log Message: ----------- Fixed incorrect test for old PWLIBDIR variable, thanks Peter Nixon! Modified Paths: -------------- opal/trunk/configure opal/trunk/configure.ac Modified: opal/trunk/configure =================================================================== --- opal/trunk/configure 2007-11-05 01:22:45 UTC (rev 18795) +++ opal/trunk/configure 2007-11-05 01:27:39 UTC (rev 18796) @@ -3079,7 +3079,7 @@ -if test test "${PTLIBDIR:-unset}" = "unset" -a "${PWLIBDIR:-unset}" != "unset" ; then +if test "${PTLIBDIR:-unset}" = "unset" -a "${PWLIBDIR:-unset}" != "unset" ; then PTLIBDIR=$PWLIBDIR fi if test "${PTLIBDIR:-unset}" != "unset" ; then Modified: opal/trunk/configure.ac =================================================================== --- opal/trunk/configure.ac 2007-11-05 01:22:45 UTC (rev 18795) +++ opal/trunk/configure.ac 2007-11-05 01:27:39 UTC (rev 18796) @@ -72,7 +72,7 @@ dnl look for ptlib, use a preference order of explicit PTLIBDIR, directory dnl at same level, home directory, /usr/local or /usr. -if test test "${PTLIBDIR:-unset}" = "unset" -a "${PWLIBDIR:-unset}" != "unset" ; then +if test "${PTLIBDIR:-unset}" = "unset" -a "${PWLIBDIR:-unset}" != "unset" ; then PTLIBDIR=$PWLIBDIR fi if test "${PTLIBDIR:-unset}" != "unset" ; then This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rjo...@us...> - 2007-11-05 01:22:48
|
Revision: 18795 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18795&view=rev Author: rjongbloed Date: 2007-11-04 17:22:45 -0800 (Sun, 04 Nov 2007) Log Message: ----------- Fixed "make update" to use svn Modified Paths: -------------- opal/trunk/Makefile.in Modified: opal/trunk/Makefile.in =================================================================== --- opal/trunk/Makefile.in 2007-11-05 01:19:29 UTC (rev 18794) +++ opal/trunk/Makefile.in 2007-11-05 01:22:45 UTC (rev 18795) @@ -324,7 +324,7 @@ all :: bothdepend both update: - cvs -q update + svn update $(MAKE) all This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rjo...@us...> - 2007-11-05 01:19:25
|
Revision: 18794 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18794&view=rev Author: rjongbloed Date: 2007-11-04 17:19:29 -0800 (Sun, 04 Nov 2007) Log Message: ----------- Fixed "make update" so uses svn Modified Paths: -------------- ptlib/trunk/Makefile.in Modified: ptlib/trunk/Makefile.in =================================================================== --- ptlib/trunk/Makefile.in 2007-11-04 20:31:31 UTC (rev 18793) +++ ptlib/trunk/Makefile.in 2007-11-05 01:19:29 UTC (rev 18794) @@ -239,7 +239,7 @@ set -e; $(foreach dir,$(SUBDIRS),if test -e $(dir) ; then $(MAKE) -C $(dir) $@; fi; ) update: - cvs update + svn update $(MAKE) bothdepend both ptlib: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dsa...@us...> - 2007-11-04 20:31:28
|
Revision: 18793 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18793&view=rev Author: dsandras Date: 2007-11-04 12:31:31 -0800 (Sun, 04 Nov 2007) Log Message: ----------- Fixed Mingw compilation thanks to Matthias Schneider <ma30002000 yahoo de>. Many thanks! Modified Paths: -------------- ptlib/trunk/include/ptclib/pdns.h ptlib/trunk/include/ptlib/msos/ptlib/vidinput_directx.h ptlib/trunk/src/ptlib/msos/vidinput_directx.cxx Modified: ptlib/trunk/include/ptclib/pdns.h =================================================================== --- ptlib/trunk/include/ptclib/pdns.h 2007-11-04 12:01:51 UTC (rev 18792) +++ ptlib/trunk/include/ptclib/pdns.h 2007-11-04 20:31:31 UTC (rev 18793) @@ -89,9 +89,11 @@ # pragma comment(lib, P_DNS_LIBRARY) // Accommodate spelling error in windns.h +#ifndef __MINGW32__ enum { DnsSectionAdditional = DnsSectionAddtional }; +#endif -#else +#else /* WIN32 */ # define P_HAS_RESOLVER 1 // set if using Unix-style DNS routines # include <arpa/nameser.h> Modified: ptlib/trunk/include/ptlib/msos/ptlib/vidinput_directx.h =================================================================== --- ptlib/trunk/include/ptlib/msos/ptlib/vidinput_directx.h 2007-11-04 12:01:51 UTC (rev 18792) +++ ptlib/trunk/include/ptlib/msos/ptlib/vidinput_directx.h 2007-11-04 20:31:31 UTC (rev 18793) @@ -118,7 +118,7 @@ */ static BOOL GetDeviceCapabilities( const PString & deviceName, ///< Name of device - InputDeviceCapabilities & caps ///< List of supported capabilities + InputDeviceCapabilities * caps ///< List of supported capabilities ); Modified: ptlib/trunk/src/ptlib/msos/vidinput_directx.cxx =================================================================== --- ptlib/trunk/src/ptlib/msos/vidinput_directx.cxx 2007-11-04 12:01:51 UTC (rev 18792) +++ ptlib/trunk/src/ptlib/msos/vidinput_directx.cxx 2007-11-04 20:31:31 UTC (rev 18793) @@ -1038,7 +1038,7 @@ } -BOOL PVideoInputDevice_DirectShow::GetDeviceCapabilities(const PString & /*deviceName*/,InputDeviceCapabilities & /*caps*/) +BOOL PVideoInputDevice_DirectShow::GetDeviceCapabilities(const PString & /*deviceName*/,InputDeviceCapabilities * /*caps*/) { // To do! return FALSE; @@ -1338,7 +1338,7 @@ } -struct { +const static struct { char *pwlib_format; GUID media_format; } formats[] = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-11-04 12:01:47
|
Revision: 18792 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18792&view=rev Author: csoutheren Date: 2007-11-04 04:01:51 -0800 (Sun, 04 Nov 2007) Log Message: ----------- Allow SNMP and HTTPSVC to be disabled on Windows builds Modified Paths: -------------- ptlib/trunk/configure.ac ptlib/trunk/include/ptclib/http.h ptlib/trunk/include/ptclib/httpform.h ptlib/trunk/src/ptclib/httpsrvr.cxx ptlib/trunk/src/ptclib/httpsvc.cxx ptlib/trunk/src/ptclib/psnmp.cxx ptlib/trunk/src/ptclib/shttpsvc.cxx ptlib/trunk/src/ptclib/snmpclnt.cxx Modified: ptlib/trunk/configure.ac =================================================================== --- ptlib/trunk/configure.ac 2007-11-04 11:39:45 UTC (rev 18791) +++ ptlib/trunk/configure.ac 2007-11-04 12:01:51 UTC (rev 18792) @@ -2064,6 +2064,7 @@ dnl MSWIN_DISPLAY httpsvc,HTTP service Support dnl MSWIN_DEFINE httpsvc,P_HTTPSVC +dnl MSWIN_IF_FEATURE httpsvc,!http AC_ARG_ENABLE(httpsvc, [ --disable-httpsvc disable HTTP service support]) Modified: ptlib/trunk/include/ptclib/http.h =================================================================== --- ptlib/trunk/include/ptclib/http.h 2007-11-04 11:39:45 UTC (rev 18791) +++ ptlib/trunk/include/ptclib/http.h 2007-11-04 12:01:51 UTC (rev 18792) @@ -246,8 +246,6 @@ #include <ptlib/ipsock.h> -#ifdef P_HTTPSVC - #include <ptclib/html.h> ////////////////////////////////////////////////////////////////////////////// @@ -355,8 +353,6 @@ BOOL SetSize(PINDEX) { return FALSE; } }; -#endif // P_HTTPSVC - #ifdef _WIN32_WCE #undef TRACE #endif @@ -634,8 +630,6 @@ PString userAgentName; }; -#ifdef P_HTTPSVC - ////////////////////////////////////////////////////////////////////////////// // PMultipartFormInfo @@ -1904,9 +1898,7 @@ PFilePath realPath; }; -#endif // P_HTTPSVC +#endif // _PHTTP -#endif - // End Of File /////////////////////////////////////////////////////////////// Modified: ptlib/trunk/include/ptclib/httpform.h =================================================================== --- ptlib/trunk/include/ptclib/httpform.h 2007-11-04 11:39:45 UTC (rev 18791) +++ ptlib/trunk/include/ptclib/httpform.h 2007-11-04 12:01:51 UTC (rev 18792) @@ -90,6 +90,7 @@ #endif #include <ptclib/http.h> +#include <ptclib/html.h> /////////////////////////////////////////////////////////////////////////////// Modified: ptlib/trunk/src/ptclib/httpsrvr.cxx =================================================================== --- ptlib/trunk/src/ptclib/httpsrvr.cxx 2007-11-04 11:39:45 UTC (rev 18791) +++ ptlib/trunk/src/ptclib/httpsrvr.cxx 2007-11-04 12:01:51 UTC (rev 18792) @@ -186,6 +186,7 @@ */ #include <ptlib.h> +#include <ptbuildopts.h> #ifdef P_HTTP Modified: ptlib/trunk/src/ptclib/httpsvc.cxx =================================================================== --- ptlib/trunk/src/ptclib/httpsvc.cxx 2007-11-04 11:39:45 UTC (rev 18791) +++ ptlib/trunk/src/ptclib/httpsvc.cxx 2007-11-04 12:01:51 UTC (rev 18792) @@ -345,6 +345,10 @@ #endif #include <ptlib.h> +#include <ptbuildopts.h> + +#ifdef P_HTTPSVC + #include <ptclib/httpsvc.h> #include <ptlib/sockets.h> @@ -2055,5 +2059,6 @@ return TRUE; } +#endif // P_HTTPSVC /////////////////////////////////////////////////////////////////// Modified: ptlib/trunk/src/ptclib/psnmp.cxx =================================================================== --- ptlib/trunk/src/ptclib/psnmp.cxx 2007-11-04 11:39:45 UTC (rev 18791) +++ ptlib/trunk/src/ptclib/psnmp.cxx 2007-11-04 12:01:51 UTC (rev 18792) @@ -83,6 +83,9 @@ #endif #include <ptlib.h> +#include <ptbuildopts.h> + +#ifdef P_SNMP #include <ptclib/psnmp.h> #define new PNEW @@ -192,5 +195,6 @@ return SnmpErrorCodeTable[err]; } +#endif // P_SNMP // End Of File /////////////////////////////////////////////////////////////// Modified: ptlib/trunk/src/ptclib/shttpsvc.cxx =================================================================== --- ptlib/trunk/src/ptclib/shttpsvc.cxx 2007-11-04 11:39:45 UTC (rev 18791) +++ ptlib/trunk/src/ptclib/shttpsvc.cxx 2007-11-04 12:01:51 UTC (rev 18792) @@ -65,15 +65,17 @@ * */ -#include <ptlib.h> - #ifdef __GNUC__ #pragma implementation "shttpsvc.h" #endif +#include <ptlib.h> +#include <ptbuildopts.h> + +#ifdef P_HTTPSVC + #include <ptclib/shttpsvc.h> - #ifdef P_SSL class HTTP_PSSLChannel : public PSSLChannel @@ -270,4 +272,6 @@ #endif //P_SSL +#endif // P_HTTPSVC + // End Of File /////////////////////////////////////////////////////////////// Modified: ptlib/trunk/src/ptclib/snmpclnt.cxx =================================================================== --- ptlib/trunk/src/ptclib/snmpclnt.cxx 2007-11-04 11:39:45 UTC (rev 18791) +++ ptlib/trunk/src/ptclib/snmpclnt.cxx 2007-11-04 12:01:51 UTC (rev 18792) @@ -57,6 +57,10 @@ */ #include <ptlib.h> +#include <ptbuildopts.h> + +#ifdef P_SNMP + #include <ptclib/psnmp.h> #define new PNEW @@ -496,5 +500,6 @@ channel.Write(sendBuffer, sendBuffer.GetSize()); } +#endif // P_SNMP // End Of File /////////////////////////////////////////////////////////////// This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-11-04 11:39:41
|
Revision: 18791 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18791&view=rev Author: csoutheren Date: 2007-11-04 03:39:45 -0800 (Sun, 04 Nov 2007) Log Message: ----------- Fix more problems with recent inet_ntop change. How many bugs can you fit into a few lines of code? Modified Paths: -------------- ptlib/trunk/src/ptlib/common/sockets.cxx Modified: ptlib/trunk/src/ptlib/common/sockets.cxx =================================================================== --- ptlib/trunk/src/ptlib/common/sockets.cxx 2007-11-04 11:33:00 UTC (rev 18790) +++ ptlib/trunk/src/ptlib/common/sockets.cxx 2007-11-04 11:39:45 UTC (rev 18791) @@ -2509,7 +2509,12 @@ PString PIPSocket::Address::AsString() const { -#if P_HAS_IPV6 +#if defined(P_VXWORKS) + char ipStorage[INET_ADDR_LEN]; + inet_ntoa_b(v.four, ipStorage); + return ipStorage; +#else +# if defined(P_HAS_IPV6) if (version == 6) { PString str; Psockaddr sa(*this, 0); @@ -2520,26 +2525,18 @@ str.MakeMinimumSize(); return str; } - -#else -# if defined(P_VXWORKS) - char ipStorage[INET_ADDR_LEN]; - inet_ntoa_b(v.four, ipStorage); - return ipStorage; - -# elif defined(P_HAS_INET_NTOP) - static PCriticalSection m; - return inet_ntoa(v.four); - -# endif -#endif +#endif // P_HAS_IPV6 +# if defined(P_HAS_INET_NTOP) PString str; if (inet_ntop(AF_INET, v.four, str.GetPointer(INET_ADDRSTRLEN), INET_ADDRSTRLEN) == NULL) return PString::Empty() str.MakeMinimumSize(); return str; - -#endif +# else + static PCriticalSection m; + return inet_ntoa(v.four); +#endif // P_HAS_INET_NTOP +#endif // P_VXWORKS } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-11-04 11:32:57
|
Revision: 18790 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18790&view=rev Author: csoutheren Date: 2007-11-04 03:33:00 -0800 (Sun, 04 Nov 2007) Log Message: ----------- Fix problem with recent inet_ntop change Modified Paths: -------------- ptlib/trunk/src/ptlib/common/sockets.cxx Modified: ptlib/trunk/src/ptlib/common/sockets.cxx =================================================================== --- ptlib/trunk/src/ptlib/common/sockets.cxx 2007-11-04 11:05:34 UTC (rev 18789) +++ ptlib/trunk/src/ptlib/common/sockets.cxx 2007-11-04 11:33:00 UTC (rev 18790) @@ -2521,20 +2521,22 @@ return str; } -#elif defined(P_VXWORKS) +#else +# if defined(P_VXWORKS) char ipStorage[INET_ADDR_LEN]; inet_ntoa_b(v.four, ipStorage); return ipStorage; -#elif defined(P_HAS_INET_NTOP) +# elif defined(P_HAS_INET_NTOP) static PCriticalSection m; return inet_ntoa(v.four); -#else - +# endif +#endif PString str; - if (inet_ntop(AF_INET, sa, str.GetPointer(INET_ADDRSTRLEN), INET_ADDRSTRLEN) == NULL) + if (inet_ntop(AF_INET, v.four, str.GetPointer(INET_ADDRSTRLEN), INET_ADDRSTRLEN) == NULL) return PString::Empty() + str.MakeMinimumSize(); return str; #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-11-04 11:05:33
|
Revision: 18789 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18789&view=rev Author: csoutheren Date: 2007-11-04 03:05:34 -0800 (Sun, 04 Nov 2007) Log Message: ----------- Use inet_ntop when available Use PCriticalSection on inet_ntoa Modified Paths: -------------- ptlib/trunk/configure ptlib/trunk/configure.ac ptlib/trunk/include/ptbuildopts.h.in ptlib/trunk/src/ptlib/common/sockets.cxx Modified: ptlib/trunk/configure =================================================================== --- ptlib/trunk/configure 2007-11-04 10:10:22 UTC (rev 18788) +++ ptlib/trunk/configure 2007-11-04 11:05:34 UTC (rev 18789) @@ -7874,11 +7874,72 @@ fi HAS_IPV6= +HAS_INET_NTOP= if test "$enable_ipv6" = "no" ; then { echo "$as_me:$LINENO: IPV6 disabled" >&5 echo "$as_me: IPV6 disabled" >&6;} + echo "$as_me:$LINENO: checking for inet_ntop" >&5 +echo $ECHO_N "checking for inet_ntop... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/types.h> + #include <netinet/in.h> + #include <arpa/inet.h> +int +main () +{ +int af; void * src; char * dst; socklen_t len; inet_ntop(af, src, dst, len); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + HAS_INET_NTOP=yes else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +HAS_INET_NTOP=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + if test $HAS_INET_NTOP = no ; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + else + cat >>confdefs.h <<\_ACEOF +#define P_HAS_INET_NTOP 1 +_ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + fi +else echo "$as_me:$LINENO: checking for IPv6 support" >&5 echo $ECHO_N "checking for IPv6 support... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF Modified: ptlib/trunk/configure.ac =================================================================== --- ptlib/trunk/configure.ac 2007-11-04 10:10:22 UTC (rev 18788) +++ ptlib/trunk/configure.ac 2007-11-04 11:05:34 UTC (rev 18789) @@ -1582,9 +1582,21 @@ fi HAS_IPV6= +HAS_INET_NTOP= if test "$enable_ipv6" = "no" ; then AC_MSG_NOTICE(IPV6 disabled) + AC_MSG_CHECKING(for inet_ntop) + AC_TRY_COMPILE([#include <sys/types.h> + #include <netinet/in.h> + #include <arpa/inet.h>], + [int af; void * src; char * dst; socklen_t len; inet_ntop(af, src, dst, len);], HAS_INET_NTOP=yes, HAS_INET_NTOP=no) + if test $HAS_INET_NTOP = no ; then + AC_MSG_RESULT(no) + else + AC_DEFINE(P_HAS_INET_NTOP, 1) + AC_MSG_RESULT(yes) + fi else AC_MSG_CHECKING(for IPv6 support) AC_TRY_COMPILE([#include <sys/types.h> Modified: ptlib/trunk/include/ptbuildopts.h.in =================================================================== --- ptlib/trunk/include/ptbuildopts.h.in 2007-11-04 10:10:22 UTC (rev 18788) +++ ptlib/trunk/include/ptbuildopts.h.in 2007-11-04 11:05:34 UTC (rev 18789) @@ -772,6 +772,7 @@ #undef PMEMORY_CHECK #undef P_HAS_RECVMSG #undef P_HAS_UPAD128_T +#undef P_HAS_INET_NTOP #endif // _PT_BUILDOPTS_H Modified: ptlib/trunk/src/ptlib/common/sockets.cxx =================================================================== --- ptlib/trunk/src/ptlib/common/sockets.cxx 2007-11-04 10:10:22 UTC (rev 18788) +++ ptlib/trunk/src/ptlib/common/sockets.cxx 2007-11-04 11:05:34 UTC (rev 18789) @@ -2520,14 +2520,24 @@ str.MakeMinimumSize(); return str; } -#endif -#ifdef P_VXWORKS + +#elif defined(P_VXWORKS) char ipStorage[INET_ADDR_LEN]; inet_ntoa_b(v.four, ipStorage); return ipStorage; -#else // P_VXWORKS + +#elif defined(P_HAS_INET_NTOP) + static PCriticalSection m; return inet_ntoa(v.four); -#endif // P_VXWORKS + +#else + + PString str; + if (inet_ntop(AF_INET, sa, str.GetPointer(INET_ADDRSTRLEN), INET_ADDRSTRLEN) == NULL) + return PString::Empty() + return str; + +#endif } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-11-04 10:10:22
|
Revision: 18788 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18788&view=rev Author: csoutheren Date: 2007-11-04 02:10:22 -0800 (Sun, 04 Nov 2007) Log Message: ----------- made a copy Added Paths: ----------- opal/branches/h323plus/ Copied: opal/branches/h323plus (from rev 18787, opal/trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-11-04 09:52:42
|
Revision: 18787 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18787&view=rev Author: csoutheren Date: 2007-11-04 01:52:42 -0800 (Sun, 04 Nov 2007) Log Message: ----------- Added include Modified Paths: -------------- contrib/t38modem/trunk/opal/manager.cxx Modified: contrib/t38modem/trunk/opal/manager.cxx =================================================================== --- contrib/t38modem/trunk/opal/manager.cxx 2007-11-03 12:00:08 UTC (rev 18786) +++ contrib/t38modem/trunk/opal/manager.cxx 2007-11-04 09:52:42 UTC (rev 18787) @@ -32,6 +32,8 @@ #include <ptlib.h> +#include <sip/sipcon.h> + #include "../pmutils.h" #include "h323ep.h" #include "sipep.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-11-03 12:00:15
|
Revision: 18786 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18786&view=rev Author: csoutheren Date: 2007-11-03 05:00:08 -0700 (Sat, 03 Nov 2007) Log Message: ----------- Updated to use latest PTLib Modified Paths: -------------- opal/branches/PrePresenceBranch/configure Modified: opal/branches/PrePresenceBranch/configure =================================================================== --- opal/branches/PrePresenceBranch/configure 2007-11-03 11:39:41 UTC (rev 18785) +++ opal/branches/PrePresenceBranch/configure 2007-11-03 12:00:08 UTC (rev 18786) @@ -2609,8 +2609,8 @@ audio=yes video=yes -REQUIRED_PWLIB_MAJOR=1 -REQUIRED_PWLIB_MINOR=11 +REQUIRED_PWLIB_MAJOR=2 +REQUIRED_PWLIB_MINOR=1 REQUIRED_PWLIB_BUILD=0 @@ -2684,9 +2684,9 @@ fi if test "${HAS_PTLIB:-unset}" = "unset" ; then - as_ac_File=`echo "ac_cv_file_${OPALDIR}/../pwlib/version.h" | $as_tr_sh` -echo "$as_me:$LINENO: checking for ${OPALDIR}/../pwlib/version.h" >&5 -echo $ECHO_N "checking for ${OPALDIR}/../pwlib/version.h... $ECHO_C" >&6 + as_ac_File=`echo "ac_cv_file_${OPALDIR}/../ptlib/version.h" | $as_tr_sh` +echo "$as_me:$LINENO: checking for ${OPALDIR}/../ptlib/version.h" >&5 +echo $ECHO_N "checking for ${OPALDIR}/../ptlib/version.h... $ECHO_C" >&6 if eval "test \"\${$as_ac_File+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2694,7 +2694,7 @@ { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } -if test -r "${OPALDIR}/../pwlib/version.h"; then +if test -r "${OPALDIR}/../ptlib/version.h"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" @@ -2707,11 +2707,11 @@ fi if test "${HAS_PTLIB:-unset}" != "unset" ; then - PWLIBDIR="${OPALDIR}/../pwlib" + PWLIBDIR="${OPALDIR}/../ptlib" else - as_ac_File=`echo "ac_cv_file_${HOME}/pwlib/include/ptlib.h" | $as_tr_sh` -echo "$as_me:$LINENO: checking for ${HOME}/pwlib/include/ptlib.h" >&5 -echo $ECHO_N "checking for ${HOME}/pwlib/include/ptlib.h... $ECHO_C" >&6 + as_ac_File=`echo "ac_cv_file_${HOME}/ptlib/include/ptlib.h" | $as_tr_sh` +echo "$as_me:$LINENO: checking for ${HOME}/ptlib/include/ptlib.h" >&5 +echo $ECHO_N "checking for ${HOME}/ptlib/include/ptlib.h... $ECHO_C" >&6 if eval "test \"\${$as_ac_File+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2719,7 +2719,7 @@ { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } -if test -r "${HOME}/pwlib/include/ptlib.h"; then +if test -r "${HOME}/ptlib/include/ptlib.h"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" @@ -2732,7 +2732,7 @@ fi if test "${HAS_PTLIB:-unset}" != "unset" ; then - PWLIBDIR="${HOME}/pwlib" + PWLIBDIR="${HOME}/ptlib" else echo "$as_me:$LINENO: checking for /usr/local/include/ptlib.h" >&5 echo $ECHO_N "checking for /usr/local/include/ptlib.h... $ECHO_C" >&6 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-11-03 11:39:37
|
Revision: 18785 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18785&view=rev Author: csoutheren Date: 2007-11-03 04:39:41 -0700 (Sat, 03 Nov 2007) Log Message: ----------- Fixed compilation with latest PTLib Modified Paths: -------------- opal/branches/Phobos/include/sip/sippdu.h opal/branches/Phobos/src/opal/connection.cxx Modified: opal/branches/Phobos/include/sip/sippdu.h =================================================================== --- opal/branches/Phobos/include/sip/sippdu.h 2007-11-02 07:14:36 UTC (rev 18784) +++ opal/branches/Phobos/include/sip/sippdu.h 2007-11-03 11:39:41 UTC (rev 18785) @@ -470,7 +470,7 @@ const PString & password = PString::Empty() ); -#if PWLIB_MAJOR >= 1 && PWLIB_MINOR >= 11 +#if (PWLIB_MAJOR >= 1 && PWLIB_MINOR >= 11) || defined (PTLIB_MAJOR) SIPAuthentication & operator =(const SIPAuthentication & auth) { isProxy = auth.isProxy; Modified: opal/branches/Phobos/src/opal/connection.cxx =================================================================== --- opal/branches/Phobos/src/opal/connection.cxx 2007-11-02 07:14:36 UTC (rev 18784) +++ opal/branches/Phobos/src/opal/connection.cxx 2007-11-03 11:39:41 UTC (rev 18785) @@ -241,6 +241,7 @@ */ #include <ptlib.h> +#include <ptbuildopts.h> #ifdef __GNUC__ #pragma implementation "connection.h" @@ -1064,7 +1065,7 @@ // before the audio is passed on to the sound card (or other output device) // Pass the 16 bit PCM audio through the DTMF decoder -#if PWLIB_MAJOR >= 1 && PWLIB_MINOR >= 11 +#if (PWLIB_MAJOR >= 1 && PWLIB_MINOR >= 11) || defined(PTLIB_MAJOR) PString tones = dtmfDecoder.Decode((short *)frame.GetPayloadPtr(), frame.GetPayloadSize()/2); #else PString tones = dtmfDecoder.Decode(frame.GetPayloadPtr(), frame.GetPayloadSize()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-11-02 07:14:31
|
Revision: 18784 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18784&view=rev Author: csoutheren Date: 2007-11-02 00:14:36 -0700 (Fri, 02 Nov 2007) Log Message: ----------- Fix infinite recursion problems when pronouncing some numbers Modified Paths: -------------- ptlib/trunk/src/ptclib/vxml.cxx Modified: ptlib/trunk/src/ptclib/vxml.cxx =================================================================== --- ptlib/trunk/src/ptclib/vxml.cxx 2007-11-02 04:52:58 UTC (rev 18783) +++ ptlib/trunk/src/ptclib/vxml.cxx 2007-11-02 07:14:36 UTC (rev 18784) @@ -3344,9 +3344,9 @@ int tens = number / 10; number = number % 10; if (tens > 0) - SpeakNumber(tens*10); + SpeakFile(PString(PString::Signed, tens*10)); if (number > 0) - SpeakNumber(number); + SpeakFile(PString(PString::Signed, number)); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-11-02 04:52:57
|
Revision: 18783 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18783&view=rev Author: csoutheren Date: 2007-11-01 21:52:58 -0700 (Thu, 01 Nov 2007) Log Message: ----------- Removed references to PWLib Modified Paths: -------------- opal/branches/csoutheren/devel/plugins/plugins_2005.sln Modified: opal/branches/csoutheren/devel/plugins/plugins_2005.sln =================================================================== --- opal/branches/csoutheren/devel/plugins/plugins_2005.sln 2007-11-02 04:51:33 UTC (rev 18782) +++ opal/branches/csoutheren/devel/plugins/plugins_2005.sln 2007-11-02 04:52:58 UTC (rev 18783) @@ -1,304 +1,272 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GSM 06.10 Audio Codec", "audio\GSM0610\gsm0610_2005.vcproj", "{E6897206-9765-4B73-9A98-DAC5787814CE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iLBC Audio Codec", "audio\iLBC\ilbccodec_2005.vcproj", "{F1C13640-A056-4280-B1C6-6582E5890B89}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Speex Audio Codec", "audio\Speex\Speex_2005.vcproj", "{02AFB070-A9D5-4FB7-A041-311722C9F8D4}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Vic H.261 Video Codec", "video\H.261-vic\h261vic_2005.vcproj", "{4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ffmpeg H.263 Video Codec", "video\H.263-ffmpeg\h263ffmpeg_2005.vcproj", "{3716C952-D6E0-40C2-B132-4F6D1636D31B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LPC-10 Audio Codec", "audio\LPC_10\LPC_10_2005.vcproj", "{9481B85A-4166-4607-ADC4-0C19D2753EB7}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "G.726 Audio Codec", "audio\G726\G726_2005.vcproj", "{269DA9EF-526D-46DE-AA69-D39EFBCB29C0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GSM-AMR Audio Codec", "audio\gsm-amr\gsmamr_2005.vcproj", "{92E9FA1E-2925-42FD-8226-A07CBD237E18}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IMA ADPCM Audio Codec", "audio\IMA_ADPCM\IMA_ADPCM_2005.vcproj", "{25F0AA82-0186-45AD-92C3-EE1F9282A038}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Voice Age G.729 Audio Codec", "audio\VoiceAgeG729\VoiceAgeG729_2005.vcproj", "{3F038BF6-B7B9-4941-AF57-8D539FC05781}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EasyG729A Audio Codec", "audio\EasyCodec\EasyG729A_2005.vcproj", "{B0FD150D-E781-4605-B70D-32019FEFD6F1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EasyG7231 Audio Codec", "audio\EasyCodec\EasyG7231_2005.vcproj", "{7CF86525-9E45-4C67-93DC-5959F1E571AE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IxJ LID", "LID\IxJ\IxJ_2005.vcproj", "{2F7CD8F0-30C8-4B70-A807-E13472EE23CA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "USB HID LID", "LID\USB\USB_2005.vcproj", "{3FCBA070-C605-4EE5-B078-E2461F792B36}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VPB LID", "LID\VPB\VPB_2005.vcproj", "{EE028C0B-AF72-499F-A778-82C3645A90DB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TigerJet LID", "LID\TigerJet\TJ_2005.vcproj", "{9A4E2793-1D97-4B0C-BCFD-130136990E35}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EasyG728 Audio Codec", "audio\EasyCodec\EasyG728_2005.vcproj", "{85E1586D-70E4-41DA-B548-B78E63B25EA2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common ISDN API LID", "LID\CAPI\CAPI_2005.vcproj", "{73808A58-6491-4948-8441-90C8F35B7F59}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PTLib Static", "..\..\pwlib\src\ptlib\msos\Console_2005.vcproj", "{D11E1C9D-406C-4D7C-8F37-913C0BFD9E0D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PTLib DLL", "..\..\pwlib\src\ptlib\msos\PTLib_2005.vcproj", "{85F4F26A-1A5D-4685-A48A-448102C5C5BC}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OPAL Static", "..\src\win32\opal_lib_2005.vcproj", "{ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OPAL_dll", "..\src\win32\opal_dll_2005.vcproj", "{C7546C76-E010-4105-AEAE-48FCD6C09527}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "opalcodecinfo", "..\samples\opalcodecinfo\opalcodecinfo_2005.vcproj", "{7FF55F1C-87EB-4087-8814-FD494BE49170}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CodecTest", "..\samples\codectest\codectest_2005.vcproj", "{7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - No Trace|Win32 = No Trace|Win32 - No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - Release|Win32 = Release|Win32 - Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E6897206-9765-4B73-9A98-DAC5787814CE}.Debug|Win32.ActiveCfg = Debug|Win32 - {E6897206-9765-4B73-9A98-DAC5787814CE}.Debug|Win32.Build.0 = Debug|Win32 - {E6897206-9765-4B73-9A98-DAC5787814CE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {E6897206-9765-4B73-9A98-DAC5787814CE}.No Trace|Win32.ActiveCfg = Debug|Win32 - {E6897206-9765-4B73-9A98-DAC5787814CE}.No Trace|Win32.Build.0 = Debug|Win32 - {E6897206-9765-4B73-9A98-DAC5787814CE}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {E6897206-9765-4B73-9A98-DAC5787814CE}.Release|Win32.ActiveCfg = Release|Win32 - {E6897206-9765-4B73-9A98-DAC5787814CE}.Release|Win32.Build.0 = Release|Win32 - {E6897206-9765-4B73-9A98-DAC5787814CE}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {F1C13640-A056-4280-B1C6-6582E5890B89}.Debug|Win32.ActiveCfg = Debug|Win32 - {F1C13640-A056-4280-B1C6-6582E5890B89}.Debug|Win32.Build.0 = Debug|Win32 - {F1C13640-A056-4280-B1C6-6582E5890B89}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {F1C13640-A056-4280-B1C6-6582E5890B89}.No Trace|Win32.ActiveCfg = Release|Win32 - {F1C13640-A056-4280-B1C6-6582E5890B89}.No Trace|Win32.Build.0 = Release|Win32 - {F1C13640-A056-4280-B1C6-6582E5890B89}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {F1C13640-A056-4280-B1C6-6582E5890B89}.Release|Win32.ActiveCfg = Release|Win32 - {F1C13640-A056-4280-B1C6-6582E5890B89}.Release|Win32.Build.0 = Release|Win32 - {F1C13640-A056-4280-B1C6-6582E5890B89}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {02AFB070-A9D5-4FB7-A041-311722C9F8D4}.Debug|Win32.ActiveCfg = Debug|Win32 - {02AFB070-A9D5-4FB7-A041-311722C9F8D4}.Debug|Win32.Build.0 = Debug|Win32 - {02AFB070-A9D5-4FB7-A041-311722C9F8D4}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {02AFB070-A9D5-4FB7-A041-311722C9F8D4}.No Trace|Win32.ActiveCfg = Debug|Win32 - {02AFB070-A9D5-4FB7-A041-311722C9F8D4}.No Trace|Win32.Build.0 = Debug|Win32 - {02AFB070-A9D5-4FB7-A041-311722C9F8D4}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {02AFB070-A9D5-4FB7-A041-311722C9F8D4}.Release|Win32.ActiveCfg = Release|Win32 - {02AFB070-A9D5-4FB7-A041-311722C9F8D4}.Release|Win32.Build.0 = Release|Win32 - {02AFB070-A9D5-4FB7-A041-311722C9F8D4}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}.Debug|Win32.ActiveCfg = Debug|Win32 - {4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}.Debug|Win32.Build.0 = Debug|Win32 - {4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}.No Trace|Win32.ActiveCfg = Debug|Win32 - {4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}.No Trace|Win32.Build.0 = Debug|Win32 - {4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}.Release|Win32.ActiveCfg = Release|Win32 - {4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}.Release|Win32.Build.0 = Release|Win32 - {4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {3716C952-D6E0-40C2-B132-4F6D1636D31B}.Debug|Win32.ActiveCfg = Debug|Win32 - {3716C952-D6E0-40C2-B132-4F6D1636D31B}.Debug|Win32.Build.0 = Debug|Win32 - {3716C952-D6E0-40C2-B132-4F6D1636D31B}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {3716C952-D6E0-40C2-B132-4F6D1636D31B}.No Trace|Win32.ActiveCfg = Debug|Win32 - {3716C952-D6E0-40C2-B132-4F6D1636D31B}.No Trace|Win32.Build.0 = Debug|Win32 - {3716C952-D6E0-40C2-B132-4F6D1636D31B}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {3716C952-D6E0-40C2-B132-4F6D1636D31B}.Release|Win32.ActiveCfg = Release|Win32 - {3716C952-D6E0-40C2-B132-4F6D1636D31B}.Release|Win32.Build.0 = Release|Win32 - {3716C952-D6E0-40C2-B132-4F6D1636D31B}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {9481B85A-4166-4607-ADC4-0C19D2753EB7}.Debug|Win32.ActiveCfg = Debug|Win32 - {9481B85A-4166-4607-ADC4-0C19D2753EB7}.Debug|Win32.Build.0 = Debug|Win32 - {9481B85A-4166-4607-ADC4-0C19D2753EB7}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {9481B85A-4166-4607-ADC4-0C19D2753EB7}.No Trace|Win32.ActiveCfg = Release|Win32 - {9481B85A-4166-4607-ADC4-0C19D2753EB7}.No Trace|Win32.Build.0 = Release|Win32 - {9481B85A-4166-4607-ADC4-0C19D2753EB7}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {9481B85A-4166-4607-ADC4-0C19D2753EB7}.Release|Win32.ActiveCfg = Release|Win32 - {9481B85A-4166-4607-ADC4-0C19D2753EB7}.Release|Win32.Build.0 = Release|Win32 - {9481B85A-4166-4607-ADC4-0C19D2753EB7}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {269DA9EF-526D-46DE-AA69-D39EFBCB29C0}.Debug|Win32.ActiveCfg = Debug|Win32 - {269DA9EF-526D-46DE-AA69-D39EFBCB29C0}.Debug|Win32.Build.0 = Debug|Win32 - {269DA9EF-526D-46DE-AA69-D39EFBCB29C0}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {269DA9EF-526D-46DE-AA69-D39EFBCB29C0}.No Trace|Win32.ActiveCfg = Debug|Win32 - {269DA9EF-526D-46DE-AA69-D39EFBCB29C0}.No Trace|Win32.Build.0 = Debug|Win32 - {269DA9EF-526D-46DE-AA69-D39EFBCB29C0}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {269DA9EF-526D-46DE-AA69-D39EFBCB29C0}.Release|Win32.ActiveCfg = Release|Win32 - {269DA9EF-526D-46DE-AA69-D39EFBCB29C0}.Release|Win32.Build.0 = Release|Win32 - {269DA9EF-526D-46DE-AA69-D39EFBCB29C0}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {92E9FA1E-2925-42FD-8226-A07CBD237E18}.Debug|Win32.ActiveCfg = Debug|Win32 - {92E9FA1E-2925-42FD-8226-A07CBD237E18}.Debug|Win32.Build.0 = Debug|Win32 - {92E9FA1E-2925-42FD-8226-A07CBD237E18}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {92E9FA1E-2925-42FD-8226-A07CBD237E18}.No Trace|Win32.ActiveCfg = Debug|Win32 - {92E9FA1E-2925-42FD-8226-A07CBD237E18}.No Trace|Win32.Build.0 = Debug|Win32 - {92E9FA1E-2925-42FD-8226-A07CBD237E18}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {92E9FA1E-2925-42FD-8226-A07CBD237E18}.Release|Win32.ActiveCfg = Release|Win32 - {92E9FA1E-2925-42FD-8226-A07CBD237E18}.Release|Win32.Build.0 = Release|Win32 - {92E9FA1E-2925-42FD-8226-A07CBD237E18}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {25F0AA82-0186-45AD-92C3-EE1F9282A038}.Debug|Win32.ActiveCfg = Debug|Win32 - {25F0AA82-0186-45AD-92C3-EE1F9282A038}.Debug|Win32.Build.0 = Debug|Win32 - {25F0AA82-0186-45AD-92C3-EE1F9282A038}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {25F0AA82-0186-45AD-92C3-EE1F9282A038}.No Trace|Win32.ActiveCfg = Release|Win32 - {25F0AA82-0186-45AD-92C3-EE1F9282A038}.No Trace|Win32.Build.0 = Release|Win32 - {25F0AA82-0186-45AD-92C3-EE1F9282A038}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {25F0AA82-0186-45AD-92C3-EE1F9282A038}.Release|Win32.ActiveCfg = Release|Win32 - {25F0AA82-0186-45AD-92C3-EE1F9282A038}.Release|Win32.Build.0 = Release|Win32 - {25F0AA82-0186-45AD-92C3-EE1F9282A038}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {3F038BF6-B7B9-4941-AF57-8D539FC05781}.Debug|Win32.ActiveCfg = Debug|Win32 - {3F038BF6-B7B9-4941-AF57-8D539FC05781}.Debug|Win32.Build.0 = Debug|Win32 - {3F038BF6-B7B9-4941-AF57-8D539FC05781}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {3F038BF6-B7B9-4941-AF57-8D539FC05781}.No Trace|Win32.ActiveCfg = Release|Win32 - {3F038BF6-B7B9-4941-AF57-8D539FC05781}.No Trace|Win32.Build.0 = Release|Win32 - {3F038BF6-B7B9-4941-AF57-8D539FC05781}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {3F038BF6-B7B9-4941-AF57-8D539FC05781}.Release|Win32.ActiveCfg = Release|Win32 - {3F038BF6-B7B9-4941-AF57-8D539FC05781}.Release|Win32.Build.0 = Release|Win32 - {3F038BF6-B7B9-4941-AF57-8D539FC05781}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {B0FD150D-E781-4605-B70D-32019FEFD6F1}.Debug|Win32.ActiveCfg = Debug|Win32 - {B0FD150D-E781-4605-B70D-32019FEFD6F1}.Debug|Win32.Build.0 = Debug|Win32 - {B0FD150D-E781-4605-B70D-32019FEFD6F1}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {B0FD150D-E781-4605-B70D-32019FEFD6F1}.No Trace|Win32.ActiveCfg = Debug|Win32 - {B0FD150D-E781-4605-B70D-32019FEFD6F1}.No Trace|Win32.Build.0 = Debug|Win32 - {B0FD150D-E781-4605-B70D-32019FEFD6F1}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {B0FD150D-E781-4605-B70D-32019FEFD6F1}.Release|Win32.ActiveCfg = Release|Win32 - {B0FD150D-E781-4605-B70D-32019FEFD6F1}.Release|Win32.Build.0 = Release|Win32 - {B0FD150D-E781-4605-B70D-32019FEFD6F1}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {7CF86525-9E45-4C67-93DC-5959F1E571AE}.Debug|Win32.ActiveCfg = Debug|Win32 - {7CF86525-9E45-4C67-93DC-5959F1E571AE}.Debug|Win32.Build.0 = Debug|Win32 - {7CF86525-9E45-4C67-93DC-5959F1E571AE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {7CF86525-9E45-4C67-93DC-5959F1E571AE}.No Trace|Win32.ActiveCfg = Release|Win32 - {7CF86525-9E45-4C67-93DC-5959F1E571AE}.No Trace|Win32.Build.0 = Release|Win32 - {7CF86525-9E45-4C67-93DC-5959F1E571AE}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {7CF86525-9E45-4C67-93DC-5959F1E571AE}.Release|Win32.ActiveCfg = Release|Win32 - {7CF86525-9E45-4C67-93DC-5959F1E571AE}.Release|Win32.Build.0 = Release|Win32 - {7CF86525-9E45-4C67-93DC-5959F1E571AE}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {2F7CD8F0-30C8-4B70-A807-E13472EE23CA}.Debug|Win32.ActiveCfg = Debug|Win32 - {2F7CD8F0-30C8-4B70-A807-E13472EE23CA}.Debug|Win32.Build.0 = Debug|Win32 - {2F7CD8F0-30C8-4B70-A807-E13472EE23CA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {2F7CD8F0-30C8-4B70-A807-E13472EE23CA}.No Trace|Win32.ActiveCfg = Release|Win32 - {2F7CD8F0-30C8-4B70-A807-E13472EE23CA}.No Trace|Win32.Build.0 = Release|Win32 - {2F7CD8F0-30C8-4B70-A807-E13472EE23CA}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {2F7CD8F0-30C8-4B70-A807-E13472EE23CA}.Release|Win32.ActiveCfg = Release|Win32 - {2F7CD8F0-30C8-4B70-A807-E13472EE23CA}.Release|Win32.Build.0 = Release|Win32 - {2F7CD8F0-30C8-4B70-A807-E13472EE23CA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {3FCBA070-C605-4EE5-B078-E2461F792B36}.Debug|Win32.ActiveCfg = Debug|Win32 - {3FCBA070-C605-4EE5-B078-E2461F792B36}.Debug|Win32.Build.0 = Debug|Win32 - {3FCBA070-C605-4EE5-B078-E2461F792B36}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {3FCBA070-C605-4EE5-B078-E2461F792B36}.No Trace|Win32.ActiveCfg = Release|Win32 - {3FCBA070-C605-4EE5-B078-E2461F792B36}.No Trace|Win32.Build.0 = Release|Win32 - {3FCBA070-C605-4EE5-B078-E2461F792B36}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {3FCBA070-C605-4EE5-B078-E2461F792B36}.Release|Win32.ActiveCfg = Release|Win32 - {3FCBA070-C605-4EE5-B078-E2461F792B36}.Release|Win32.Build.0 = Release|Win32 - {3FCBA070-C605-4EE5-B078-E2461F792B36}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {EE028C0B-AF72-499F-A778-82C3645A90DB}.Debug|Win32.ActiveCfg = Debug|Win32 - {EE028C0B-AF72-499F-A778-82C3645A90DB}.Debug|Win32.Build.0 = Debug|Win32 - {EE028C0B-AF72-499F-A778-82C3645A90DB}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {EE028C0B-AF72-499F-A778-82C3645A90DB}.No Trace|Win32.ActiveCfg = Release|Win32 - {EE028C0B-AF72-499F-A778-82C3645A90DB}.No Trace|Win32.Build.0 = Release|Win32 - {EE028C0B-AF72-499F-A778-82C3645A90DB}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {EE028C0B-AF72-499F-A778-82C3645A90DB}.Release|Win32.ActiveCfg = Release|Win32 - {EE028C0B-AF72-499F-A778-82C3645A90DB}.Release|Win32.Build.0 = Release|Win32 - {EE028C0B-AF72-499F-A778-82C3645A90DB}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {9A4E2793-1D97-4B0C-BCFD-130136990E35}.Debug|Win32.ActiveCfg = Debug|Win32 - {9A4E2793-1D97-4B0C-BCFD-130136990E35}.Debug|Win32.Build.0 = Debug|Win32 - {9A4E2793-1D97-4B0C-BCFD-130136990E35}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {9A4E2793-1D97-4B0C-BCFD-130136990E35}.No Trace|Win32.ActiveCfg = Release|Win32 - {9A4E2793-1D97-4B0C-BCFD-130136990E35}.No Trace|Win32.Build.0 = Release|Win32 - {9A4E2793-1D97-4B0C-BCFD-130136990E35}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {9A4E2793-1D97-4B0C-BCFD-130136990E35}.Release|Win32.ActiveCfg = Release|Win32 - {9A4E2793-1D97-4B0C-BCFD-130136990E35}.Release|Win32.Build.0 = Release|Win32 - {9A4E2793-1D97-4B0C-BCFD-130136990E35}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {85E1586D-70E4-41DA-B548-B78E63B25EA2}.Debug|Win32.ActiveCfg = Debug|Win32 - {85E1586D-70E4-41DA-B548-B78E63B25EA2}.Debug|Win32.Build.0 = Debug|Win32 - {85E1586D-70E4-41DA-B548-B78E63B25EA2}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {85E1586D-70E4-41DA-B548-B78E63B25EA2}.No Trace|Win32.ActiveCfg = Debug|Win32 - {85E1586D-70E4-41DA-B548-B78E63B25EA2}.No Trace|Win32.Build.0 = Debug|Win32 - {85E1586D-70E4-41DA-B548-B78E63B25EA2}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {85E1586D-70E4-41DA-B548-B78E63B25EA2}.Release|Win32.ActiveCfg = Release|Win32 - {85E1586D-70E4-41DA-B548-B78E63B25EA2}.Release|Win32.Build.0 = Release|Win32 - {85E1586D-70E4-41DA-B548-B78E63B25EA2}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {73808A58-6491-4948-8441-90C8F35B7F59}.Debug|Win32.ActiveCfg = Debug|Win32 - {73808A58-6491-4948-8441-90C8F35B7F59}.Debug|Win32.Build.0 = Debug|Win32 - {73808A58-6491-4948-8441-90C8F35B7F59}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {73808A58-6491-4948-8441-90C8F35B7F59}.No Trace|Win32.ActiveCfg = Release|Win32 - {73808A58-6491-4948-8441-90C8F35B7F59}.No Trace|Win32.Build.0 = Release|Win32 - {73808A58-6491-4948-8441-90C8F35B7F59}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {73808A58-6491-4948-8441-90C8F35B7F59}.Release|Win32.ActiveCfg = Release|Win32 - {73808A58-6491-4948-8441-90C8F35B7F59}.Release|Win32.Build.0 = Release|Win32 - {73808A58-6491-4948-8441-90C8F35B7F59}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {D11E1C9D-406C-4D7C-8F37-913C0BFD9E0D}.Debug|Win32.ActiveCfg = Debug|Win32 - {D11E1C9D-406C-4D7C-8F37-913C0BFD9E0D}.Debug|Win32.Build.0 = Debug|Win32 - {D11E1C9D-406C-4D7C-8F37-913C0BFD9E0D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {D11E1C9D-406C-4D7C-8F37-913C0BFD9E0D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {D11E1C9D-406C-4D7C-8F37-913C0BFD9E0D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {D11E1C9D-406C-4D7C-8F37-913C0BFD9E0D}.No Trace|Win32.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {D11E1C9D-406C-4D7C-8F37-913C0BFD9E0D}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {D11E1C9D-406C-4D7C-8F37-913C0BFD9E0D}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {D11E1C9D-406C-4D7C-8F37-913C0BFD9E0D}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {D11E1C9D-406C-4D7C-8F37-913C0BFD9E0D}.Release|Win32.ActiveCfg = Release|Win32 - {D11E1C9D-406C-4D7C-8F37-913C0BFD9E0D}.Release|Win32.Build.0 = Release|Win32 - {D11E1C9D-406C-4D7C-8F37-913C0BFD9E0D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {D11E1C9D-406C-4D7C-8F37-913C0BFD9E0D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {D11E1C9D-406C-4D7C-8F37-913C0BFD9E0D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {85F4F26A-1A5D-4685-A48A-448102C5C5BC}.Debug|Win32.ActiveCfg = Debug|Win32 - {85F4F26A-1A5D-4685-A48A-448102C5C5BC}.Debug|Win32.Build.0 = Debug|Win32 - {85F4F26A-1A5D-4685-A48A-448102C5C5BC}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {85F4F26A-1A5D-4685-A48A-448102C5C5BC}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {85F4F26A-1A5D-4685-A48A-448102C5C5BC}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {85F4F26A-1A5D-4685-A48A-448102C5C5BC}.No Trace|Win32.ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {85F4F26A-1A5D-4685-A48A-448102C5C5BC}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {85F4F26A-1A5D-4685-A48A-448102C5C5BC}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {85F4F26A-1A5D-4685-A48A-448102C5C5BC}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {85F4F26A-1A5D-4685-A48A-448102C5C5BC}.Release|Win32.ActiveCfg = Release|Win32 - {85F4F26A-1A5D-4685-A48A-448102C5C5BC}.Release|Win32.Build.0 = Release|Win32 - {85F4F26A-1A5D-4685-A48A-448102C5C5BC}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {85F4F26A-1A5D-4685-A48A-448102C5C5BC}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {85F4F26A-1A5D-4685-A48A-448102C5C5BC}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Debug|Win32.ActiveCfg = Debug|Win32 - {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Debug|Win32.Build.0 = Debug|Win32 - {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.No Trace|Win32.ActiveCfg = No Trace|Win32 - {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.No Trace|Win32.Build.0 = No Trace|Win32 - {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Release|Win32.ActiveCfg = Release|Win32 - {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Release|Win32.Build.0 = Release|Win32 - {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {C7546C76-E010-4105-AEAE-48FCD6C09527}.Debug|Win32.ActiveCfg = Debug|Win32 - {C7546C76-E010-4105-AEAE-48FCD6C09527}.Debug|Win32.Build.0 = Debug|Win32 - {C7546C76-E010-4105-AEAE-48FCD6C09527}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {C7546C76-E010-4105-AEAE-48FCD6C09527}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {C7546C76-E010-4105-AEAE-48FCD6C09527}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {C7546C76-E010-4105-AEAE-48FCD6C09527}.No Trace|Win32.ActiveCfg = No Trace|Win32 - {C7546C76-E010-4105-AEAE-48FCD6C09527}.No Trace|Win32.Build.0 = No Trace|Win32 - {C7546C76-E010-4105-AEAE-48FCD6C09527}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {C7546C76-E010-4105-AEAE-48FCD6C09527}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {C7546C76-E010-4105-AEAE-48FCD6C09527}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {C7546C76-E010-4105-AEAE-48FCD6C09527}.Release|Win32.ActiveCfg = Release|Win32 - {C7546C76-E010-4105-AEAE-48FCD6C09527}.Release|Win32.Build.0 = Release|Win32 - {C7546C76-E010-4105-AEAE-48FCD6C09527}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {C7546C76-E010-4105-AEAE-48FCD6C09527}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {C7546C76-E010-4105-AEAE-48FCD6C09527}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) - {7FF55F1C-87EB-4087-8814-FD494BE49170}.Debug|Win32.ActiveCfg = Debug|Win32 - {7FF55F1C-87EB-4087-8814-FD494BE49170}.Debug|Win32.Build.0 = Debug|Win32 - {7FF55F1C-87EB-4087-8814-FD494BE49170}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {7FF55F1C-87EB-4087-8814-FD494BE49170}.No Trace|Win32.ActiveCfg = No Trace|Win32 - {7FF55F1C-87EB-4087-8814-FD494BE49170}.No Trace|Win32.Build.0 = No Trace|Win32 - {7FF55F1C-87EB-4087-8814-FD494BE49170}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = No Trace|Win32 - {7FF55F1C-87EB-4087-8814-FD494BE49170}.Release|Win32.ActiveCfg = Release|Win32 - {7FF55F1C-87EB-4087-8814-FD494BE49170}.Release|Win32.Build.0 = Release|Win32 - {7FF55F1C-87EB-4087-8814-FD494BE49170}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - {7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}.Debug|Win32.ActiveCfg = Debug|Win32 - {7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}.Debug|Win32.Build.0 = Debug|Win32 - {7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}.No Trace|Win32.ActiveCfg = Debug|Win32 - {7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}.No Trace|Win32.Build.0 = Debug|Win32 - {7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 - {7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}.Release|Win32.ActiveCfg = Release|Win32 - {7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}.Release|Win32.Build.0 = Release|Win32 - {7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GSM 06.10 Audio Codec", "audio\GSM0610\gsm0610_2005.vcproj", "{E6897206-9765-4B73-9A98-DAC5787814CE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iLBC Audio Codec", "audio\iLBC\ilbccodec_2005.vcproj", "{F1C13640-A056-4280-B1C6-6582E5890B89}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Speex Audio Codec", "audio\Speex\Speex_2005.vcproj", "{02AFB070-A9D5-4FB7-A041-311722C9F8D4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Vic H.261 Video Codec", "video\H.261-vic\h261vic_2005.vcproj", "{4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ffmpeg H.263 Video Codec", "video\H.263-ffmpeg\h263ffmpeg_2005.vcproj", "{3716C952-D6E0-40C2-B132-4F6D1636D31B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LPC-10 Audio Codec", "audio\LPC_10\LPC_10_2005.vcproj", "{9481B85A-4166-4607-ADC4-0C19D2753EB7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "G.726 Audio Codec", "audio\G726\G726_2005.vcproj", "{269DA9EF-526D-46DE-AA69-D39EFBCB29C0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GSM-AMR Audio Codec", "audio\gsm-amr\gsmamr_2005.vcproj", "{92E9FA1E-2925-42FD-8226-A07CBD237E18}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IMA ADPCM Audio Codec", "audio\IMA_ADPCM\IMA_ADPCM_2005.vcproj", "{25F0AA82-0186-45AD-92C3-EE1F9282A038}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Voice Age G.729 Audio Codec", "audio\VoiceAgeG729\VoiceAgeG729_2005.vcproj", "{3F038BF6-B7B9-4941-AF57-8D539FC05781}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EasyG729A Audio Codec", "audio\EasyCodec\EasyG729A_2005.vcproj", "{B0FD150D-E781-4605-B70D-32019FEFD6F1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EasyG7231 Audio Codec", "audio\EasyCodec\EasyG7231_2005.vcproj", "{7CF86525-9E45-4C67-93DC-5959F1E571AE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IxJ LID", "LID\IxJ\IxJ_2005.vcproj", "{2F7CD8F0-30C8-4B70-A807-E13472EE23CA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "USB HID LID", "LID\USB\USB_2005.vcproj", "{3FCBA070-C605-4EE5-B078-E2461F792B36}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VPB LID", "LID\VPB\VPB_2005.vcproj", "{EE028C0B-AF72-499F-A778-82C3645A90DB}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TigerJet LID", "LID\TigerJet\TJ_2005.vcproj", "{9A4E2793-1D97-4B0C-BCFD-130136990E35}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EasyG728 Audio Codec", "audio\EasyCodec\EasyG728_2005.vcproj", "{85E1586D-70E4-41DA-B548-B78E63B25EA2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common ISDN API LID", "LID\CAPI\CAPI_2005.vcproj", "{73808A58-6491-4948-8441-90C8F35B7F59}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OPAL Static", "..\src\win32\opal_lib_2005.vcproj", "{ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OPAL_dll", "..\src\win32\opal_dll_2005.vcproj", "{C7546C76-E010-4105-AEAE-48FCD6C09527}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "opalcodecinfo", "..\samples\opalcodecinfo\opalcodecinfo_2005.vcproj", "{7FF55F1C-87EB-4087-8814-FD494BE49170}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CodecTest", "..\samples\codectest\codectest_2005.vcproj", "{7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + No Trace|Win32 = No Trace|Win32 + No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + Release|Win32 = Release|Win32 + Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E6897206-9765-4B73-9A98-DAC5787814CE}.Debug|Win32.ActiveCfg = Debug|Win32 + {E6897206-9765-4B73-9A98-DAC5787814CE}.Debug|Win32.Build.0 = Debug|Win32 + {E6897206-9765-4B73-9A98-DAC5787814CE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {E6897206-9765-4B73-9A98-DAC5787814CE}.No Trace|Win32.ActiveCfg = Debug|Win32 + {E6897206-9765-4B73-9A98-DAC5787814CE}.No Trace|Win32.Build.0 = Debug|Win32 + {E6897206-9765-4B73-9A98-DAC5787814CE}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {E6897206-9765-4B73-9A98-DAC5787814CE}.Release|Win32.ActiveCfg = Release|Win32 + {E6897206-9765-4B73-9A98-DAC5787814CE}.Release|Win32.Build.0 = Release|Win32 + {E6897206-9765-4B73-9A98-DAC5787814CE}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {F1C13640-A056-4280-B1C6-6582E5890B89}.Debug|Win32.ActiveCfg = Debug|Win32 + {F1C13640-A056-4280-B1C6-6582E5890B89}.Debug|Win32.Build.0 = Debug|Win32 + {F1C13640-A056-4280-B1C6-6582E5890B89}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {F1C13640-A056-4280-B1C6-6582E5890B89}.No Trace|Win32.ActiveCfg = Release|Win32 + {F1C13640-A056-4280-B1C6-6582E5890B89}.No Trace|Win32.Build.0 = Release|Win32 + {F1C13640-A056-4280-B1C6-6582E5890B89}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {F1C13640-A056-4280-B1C6-6582E5890B89}.Release|Win32.ActiveCfg = Release|Win32 + {F1C13640-A056-4280-B1C6-6582E5890B89}.Release|Win32.Build.0 = Release|Win32 + {F1C13640-A056-4280-B1C6-6582E5890B89}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {02AFB070-A9D5-4FB7-A041-311722C9F8D4}.Debug|Win32.ActiveCfg = Debug|Win32 + {02AFB070-A9D5-4FB7-A041-311722C9F8D4}.Debug|Win32.Build.0 = Debug|Win32 + {02AFB070-A9D5-4FB7-A041-311722C9F8D4}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {02AFB070-A9D5-4FB7-A041-311722C9F8D4}.No Trace|Win32.ActiveCfg = Debug|Win32 + {02AFB070-A9D5-4FB7-A041-311722C9F8D4}.No Trace|Win32.Build.0 = Debug|Win32 + {02AFB070-A9D5-4FB7-A041-311722C9F8D4}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {02AFB070-A9D5-4FB7-A041-311722C9F8D4}.Release|Win32.ActiveCfg = Release|Win32 + {02AFB070-A9D5-4FB7-A041-311722C9F8D4}.Release|Win32.Build.0 = Release|Win32 + {02AFB070-A9D5-4FB7-A041-311722C9F8D4}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}.Debug|Win32.ActiveCfg = Debug|Win32 + {4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}.Debug|Win32.Build.0 = Debug|Win32 + {4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}.No Trace|Win32.ActiveCfg = Debug|Win32 + {4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}.No Trace|Win32.Build.0 = Debug|Win32 + {4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}.Release|Win32.ActiveCfg = Release|Win32 + {4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}.Release|Win32.Build.0 = Release|Win32 + {4A1B92CB-CA8E-4511-A1D5-B0A322FDE67C}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {3716C952-D6E0-40C2-B132-4F6D1636D31B}.Debug|Win32.ActiveCfg = Debug|Win32 + {3716C952-D6E0-40C2-B132-4F6D1636D31B}.Debug|Win32.Build.0 = Debug|Win32 + {3716C952-D6E0-40C2-B132-4F6D1636D31B}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {3716C952-D6E0-40C2-B132-4F6D1636D31B}.No Trace|Win32.ActiveCfg = Debug|Win32 + {3716C952-D6E0-40C2-B132-4F6D1636D31B}.No Trace|Win32.Build.0 = Debug|Win32 + {3716C952-D6E0-40C2-B132-4F6D1636D31B}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {3716C952-D6E0-40C2-B132-4F6D1636D31B}.Release|Win32.ActiveCfg = Release|Win32 + {3716C952-D6E0-40C2-B132-4F6D1636D31B}.Release|Win32.Build.0 = Release|Win32 + {3716C952-D6E0-40C2-B132-4F6D1636D31B}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {9481B85A-4166-4607-ADC4-0C19D2753EB7}.Debug|Win32.ActiveCfg = Debug|Win32 + {9481B85A-4166-4607-ADC4-0C19D2753EB7}.Debug|Win32.Build.0 = Debug|Win32 + {9481B85A-4166-4607-ADC4-0C19D2753EB7}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {9481B85A-4166-4607-ADC4-0C19D2753EB7}.No Trace|Win32.ActiveCfg = Release|Win32 + {9481B85A-4166-4607-ADC4-0C19D2753EB7}.No Trace|Win32.Build.0 = Release|Win32 + {9481B85A-4166-4607-ADC4-0C19D2753EB7}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {9481B85A-4166-4607-ADC4-0C19D2753EB7}.Release|Win32.ActiveCfg = Release|Win32 + {9481B85A-4166-4607-ADC4-0C19D2753EB7}.Release|Win32.Build.0 = Release|Win32 + {9481B85A-4166-4607-ADC4-0C19D2753EB7}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {269DA9EF-526D-46DE-AA69-D39EFBCB29C0}.Debug|Win32.ActiveCfg = Debug|Win32 + {269DA9EF-526D-46DE-AA69-D39EFBCB29C0}.Debug|Win32.Build.0 = Debug|Win32 + {269DA9EF-526D-46DE-AA69-D39EFBCB29C0}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {269DA9EF-526D-46DE-AA69-D39EFBCB29C0}.No Trace|Win32.ActiveCfg = Debug|Win32 + {269DA9EF-526D-46DE-AA69-D39EFBCB29C0}.No Trace|Win32.Build.0 = Debug|Win32 + {269DA9EF-526D-46DE-AA69-D39EFBCB29C0}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {269DA9EF-526D-46DE-AA69-D39EFBCB29C0}.Release|Win32.ActiveCfg = Release|Win32 + {269DA9EF-526D-46DE-AA69-D39EFBCB29C0}.Release|Win32.Build.0 = Release|Win32 + {269DA9EF-526D-46DE-AA69-D39EFBCB29C0}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {92E9FA1E-2925-42FD-8226-A07CBD237E18}.Debug|Win32.ActiveCfg = Debug|Win32 + {92E9FA1E-2925-42FD-8226-A07CBD237E18}.Debug|Win32.Build.0 = Debug|Win32 + {92E9FA1E-2925-42FD-8226-A07CBD237E18}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {92E9FA1E-2925-42FD-8226-A07CBD237E18}.No Trace|Win32.ActiveCfg = Debug|Win32 + {92E9FA1E-2925-42FD-8226-A07CBD237E18}.No Trace|Win32.Build.0 = Debug|Win32 + {92E9FA1E-2925-42FD-8226-A07CBD237E18}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {92E9FA1E-2925-42FD-8226-A07CBD237E18}.Release|Win32.ActiveCfg = Release|Win32 + {92E9FA1E-2925-42FD-8226-A07CBD237E18}.Release|Win32.Build.0 = Release|Win32 + {92E9FA1E-2925-42FD-8226-A07CBD237E18}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {25F0AA82-0186-45AD-92C3-EE1F9282A038}.Debug|Win32.ActiveCfg = Debug|Win32 + {25F0AA82-0186-45AD-92C3-EE1F9282A038}.Debug|Win32.Build.0 = Debug|Win32 + {25F0AA82-0186-45AD-92C3-EE1F9282A038}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {25F0AA82-0186-45AD-92C3-EE1F9282A038}.No Trace|Win32.ActiveCfg = Release|Win32 + {25F0AA82-0186-45AD-92C3-EE1F9282A038}.No Trace|Win32.Build.0 = Release|Win32 + {25F0AA82-0186-45AD-92C3-EE1F9282A038}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {25F0AA82-0186-45AD-92C3-EE1F9282A038}.Release|Win32.ActiveCfg = Release|Win32 + {25F0AA82-0186-45AD-92C3-EE1F9282A038}.Release|Win32.Build.0 = Release|Win32 + {25F0AA82-0186-45AD-92C3-EE1F9282A038}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {3F038BF6-B7B9-4941-AF57-8D539FC05781}.Debug|Win32.ActiveCfg = Debug|Win32 + {3F038BF6-B7B9-4941-AF57-8D539FC05781}.Debug|Win32.Build.0 = Debug|Win32 + {3F038BF6-B7B9-4941-AF57-8D539FC05781}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {3F038BF6-B7B9-4941-AF57-8D539FC05781}.No Trace|Win32.ActiveCfg = Release|Win32 + {3F038BF6-B7B9-4941-AF57-8D539FC05781}.No Trace|Win32.Build.0 = Release|Win32 + {3F038BF6-B7B9-4941-AF57-8D539FC05781}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {3F038BF6-B7B9-4941-AF57-8D539FC05781}.Release|Win32.ActiveCfg = Release|Win32 + {3F038BF6-B7B9-4941-AF57-8D539FC05781}.Release|Win32.Build.0 = Release|Win32 + {3F038BF6-B7B9-4941-AF57-8D539FC05781}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {B0FD150D-E781-4605-B70D-32019FEFD6F1}.Debug|Win32.ActiveCfg = Debug|Win32 + {B0FD150D-E781-4605-B70D-32019FEFD6F1}.Debug|Win32.Build.0 = Debug|Win32 + {B0FD150D-E781-4605-B70D-32019FEFD6F1}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {B0FD150D-E781-4605-B70D-32019FEFD6F1}.No Trace|Win32.ActiveCfg = Debug|Win32 + {B0FD150D-E781-4605-B70D-32019FEFD6F1}.No Trace|Win32.Build.0 = Debug|Win32 + {B0FD150D-E781-4605-B70D-32019FEFD6F1}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {B0FD150D-E781-4605-B70D-32019FEFD6F1}.Release|Win32.ActiveCfg = Release|Win32 + {B0FD150D-E781-4605-B70D-32019FEFD6F1}.Release|Win32.Build.0 = Release|Win32 + {B0FD150D-E781-4605-B70D-32019FEFD6F1}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {7CF86525-9E45-4C67-93DC-5959F1E571AE}.Debug|Win32.ActiveCfg = Debug|Win32 + {7CF86525-9E45-4C67-93DC-5959F1E571AE}.Debug|Win32.Build.0 = Debug|Win32 + {7CF86525-9E45-4C67-93DC-5959F1E571AE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {7CF86525-9E45-4C67-93DC-5959F1E571AE}.No Trace|Win32.ActiveCfg = Release|Win32 + {7CF86525-9E45-4C67-93DC-5959F1E571AE}.No Trace|Win32.Build.0 = Release|Win32 + {7CF86525-9E45-4C67-93DC-5959F1E571AE}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {7CF86525-9E45-4C67-93DC-5959F1E571AE}.Release|Win32.ActiveCfg = Release|Win32 + {7CF86525-9E45-4C67-93DC-5959F1E571AE}.Release|Win32.Build.0 = Release|Win32 + {7CF86525-9E45-4C67-93DC-5959F1E571AE}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {2F7CD8F0-30C8-4B70-A807-E13472EE23CA}.Debug|Win32.ActiveCfg = Debug|Win32 + {2F7CD8F0-30C8-4B70-A807-E13472EE23CA}.Debug|Win32.Build.0 = Debug|Win32 + {2F7CD8F0-30C8-4B70-A807-E13472EE23CA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {2F7CD8F0-30C8-4B70-A807-E13472EE23CA}.No Trace|Win32.ActiveCfg = Release|Win32 + {2F7CD8F0-30C8-4B70-A807-E13472EE23CA}.No Trace|Win32.Build.0 = Release|Win32 + {2F7CD8F0-30C8-4B70-A807-E13472EE23CA}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {2F7CD8F0-30C8-4B70-A807-E13472EE23CA}.Release|Win32.ActiveCfg = Release|Win32 + {2F7CD8F0-30C8-4B70-A807-E13472EE23CA}.Release|Win32.Build.0 = Release|Win32 + {2F7CD8F0-30C8-4B70-A807-E13472EE23CA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {3FCBA070-C605-4EE5-B078-E2461F792B36}.Debug|Win32.ActiveCfg = Debug|Win32 + {3FCBA070-C605-4EE5-B078-E2461F792B36}.Debug|Win32.Build.0 = Debug|Win32 + {3FCBA070-C605-4EE5-B078-E2461F792B36}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {3FCBA070-C605-4EE5-B078-E2461F792B36}.No Trace|Win32.ActiveCfg = Release|Win32 + {3FCBA070-C605-4EE5-B078-E2461F792B36}.No Trace|Win32.Build.0 = Release|Win32 + {3FCBA070-C605-4EE5-B078-E2461F792B36}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {3FCBA070-C605-4EE5-B078-E2461F792B36}.Release|Win32.ActiveCfg = Release|Win32 + {3FCBA070-C605-4EE5-B078-E2461F792B36}.Release|Win32.Build.0 = Release|Win32 + {3FCBA070-C605-4EE5-B078-E2461F792B36}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {EE028C0B-AF72-499F-A778-82C3645A90DB}.Debug|Win32.ActiveCfg = Debug|Win32 + {EE028C0B-AF72-499F-A778-82C3645A90DB}.Debug|Win32.Build.0 = Debug|Win32 + {EE028C0B-AF72-499F-A778-82C3645A90DB}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {EE028C0B-AF72-499F-A778-82C3645A90DB}.No Trace|Win32.ActiveCfg = Release|Win32 + {EE028C0B-AF72-499F-A778-82C3645A90DB}.No Trace|Win32.Build.0 = Release|Win32 + {EE028C0B-AF72-499F-A778-82C3645A90DB}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {EE028C0B-AF72-499F-A778-82C3645A90DB}.Release|Win32.ActiveCfg = Release|Win32 + {EE028C0B-AF72-499F-A778-82C3645A90DB}.Release|Win32.Build.0 = Release|Win32 + {EE028C0B-AF72-499F-A778-82C3645A90DB}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {9A4E2793-1D97-4B0C-BCFD-130136990E35}.Debug|Win32.ActiveCfg = Debug|Win32 + {9A4E2793-1D97-4B0C-BCFD-130136990E35}.Debug|Win32.Build.0 = Debug|Win32 + {9A4E2793-1D97-4B0C-BCFD-130136990E35}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {9A4E2793-1D97-4B0C-BCFD-130136990E35}.No Trace|Win32.ActiveCfg = Release|Win32 + {9A4E2793-1D97-4B0C-BCFD-130136990E35}.No Trace|Win32.Build.0 = Release|Win32 + {9A4E2793-1D97-4B0C-BCFD-130136990E35}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {9A4E2793-1D97-4B0C-BCFD-130136990E35}.Release|Win32.ActiveCfg = Release|Win32 + {9A4E2793-1D97-4B0C-BCFD-130136990E35}.Release|Win32.Build.0 = Release|Win32 + {9A4E2793-1D97-4B0C-BCFD-130136990E35}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {85E1586D-70E4-41DA-B548-B78E63B25EA2}.Debug|Win32.ActiveCfg = Debug|Win32 + {85E1586D-70E4-41DA-B548-B78E63B25EA2}.Debug|Win32.Build.0 = Debug|Win32 + {85E1586D-70E4-41DA-B548-B78E63B25EA2}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {85E1586D-70E4-41DA-B548-B78E63B25EA2}.No Trace|Win32.ActiveCfg = Debug|Win32 + {85E1586D-70E4-41DA-B548-B78E63B25EA2}.No Trace|Win32.Build.0 = Debug|Win32 + {85E1586D-70E4-41DA-B548-B78E63B25EA2}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {85E1586D-70E4-41DA-B548-B78E63B25EA2}.Release|Win32.ActiveCfg = Release|Win32 + {85E1586D-70E4-41DA-B548-B78E63B25EA2}.Release|Win32.Build.0 = Release|Win32 + {85E1586D-70E4-41DA-B548-B78E63B25EA2}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {73808A58-6491-4948-8441-90C8F35B7F59}.Debug|Win32.ActiveCfg = Debug|Win32 + {73808A58-6491-4948-8441-90C8F35B7F59}.Debug|Win32.Build.0 = Debug|Win32 + {73808A58-6491-4948-8441-90C8F35B7F59}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {73808A58-6491-4948-8441-90C8F35B7F59}.No Trace|Win32.ActiveCfg = Release|Win32 + {73808A58-6491-4948-8441-90C8F35B7F59}.No Trace|Win32.Build.0 = Release|Win32 + {73808A58-6491-4948-8441-90C8F35B7F59}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {73808A58-6491-4948-8441-90C8F35B7F59}.Release|Win32.ActiveCfg = Release|Win32 + {73808A58-6491-4948-8441-90C8F35B7F59}.Release|Win32.Build.0 = Release|Win32 + {73808A58-6491-4948-8441-90C8F35B7F59}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Debug|Win32.ActiveCfg = Debug|Win32 + {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Debug|Win32.Build.0 = Debug|Win32 + {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.No Trace|Win32.ActiveCfg = No Trace|Win32 + {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.No Trace|Win32.Build.0 = No Trace|Win32 + {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Release|Win32.ActiveCfg = Release|Win32 + {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Release|Win32.Build.0 = Release|Win32 + {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {ED9CC7DA-08A6-4CB9-9783-F1C3799398D8}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {C7546C76-E010-4105-AEAE-48FCD6C09527}.Debug|Win32.ActiveCfg = Debug|Win32 + {C7546C76-E010-4105-AEAE-48FCD6C09527}.Debug|Win32.Build.0 = Debug|Win32 + {C7546C76-E010-4105-AEAE-48FCD6C09527}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {C7546C76-E010-4105-AEAE-48FCD6C09527}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {C7546C76-E010-4105-AEAE-48FCD6C09527}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {C7546C76-E010-4105-AEAE-48FCD6C09527}.No Trace|Win32.ActiveCfg = No Trace|Win32 + {C7546C76-E010-4105-AEAE-48FCD6C09527}.No Trace|Win32.Build.0 = No Trace|Win32 + {C7546C76-E010-4105-AEAE-48FCD6C09527}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {C7546C76-E010-4105-AEAE-48FCD6C09527}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {C7546C76-E010-4105-AEAE-48FCD6C09527}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {C7546C76-E010-4105-AEAE-48FCD6C09527}.Release|Win32.ActiveCfg = Release|Win32 + {C7546C76-E010-4105-AEAE-48FCD6C09527}.Release|Win32.Build.0 = Release|Win32 + {C7546C76-E010-4105-AEAE-48FCD6C09527}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {C7546C76-E010-4105-AEAE-48FCD6C09527}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {C7546C76-E010-4105-AEAE-48FCD6C09527}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {7FF55F1C-87EB-4087-8814-FD494BE49170}.Debug|Win32.ActiveCfg = Debug|Win32 + {7FF55F1C-87EB-4087-8814-FD494BE49170}.Debug|Win32.Build.0 = Debug|Win32 + {7FF55F1C-87EB-4087-8814-FD494BE49170}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {7FF55F1C-87EB-4087-8814-FD494BE49170}.No Trace|Win32.ActiveCfg = No Trace|Win32 + {7FF55F1C-87EB-4087-8814-FD494BE49170}.No Trace|Win32.Build.0 = No Trace|Win32 + {7FF55F1C-87EB-4087-8814-FD494BE49170}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = No Trace|Win32 + {7FF55F1C-87EB-4087-8814-FD494BE49170}.Release|Win32.ActiveCfg = Release|Win32 + {7FF55F1C-87EB-4087-8814-FD494BE49170}.Release|Win32.Build.0 = Release|Win32 + {7FF55F1C-87EB-4087-8814-FD494BE49170}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + {7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}.Debug|Win32.ActiveCfg = Debug|Win32 + {7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}.Debug|Win32.Build.0 = Debug|Win32 + {7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}.No Trace|Win32.ActiveCfg = Debug|Win32 + {7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}.No Trace|Win32.Build.0 = Debug|Win32 + {7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}.No Trace|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32 + {7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}.Release|Win32.ActiveCfg = Release|Win32 + {7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}.Release|Win32.Build.0 = Release|Win32 + {7BCC8831-22E0-4D87-8E8B-F6DA0AEFBED0}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-11-02 04:51:32
|
Revision: 18782 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18782&view=rev Author: csoutheren Date: 2007-11-01 21:51:33 -0700 (Thu, 01 Nov 2007) Log Message: ----------- Changed LPC-10 codec to support multi-frame input and output Modified Paths: -------------- opal/branches/csoutheren/devel/plugins/audio/LPC_10/lpc_10_codec.c Modified: opal/branches/csoutheren/devel/plugins/audio/LPC_10/lpc_10_codec.c =================================================================== --- opal/branches/csoutheren/devel/plugins/audio/LPC_10/lpc_10_codec.c 2007-11-01 08:50:27 UTC (rev 18781) +++ opal/branches/csoutheren/devel/plugins/audio/LPC_10/lpc_10_codec.c 2007-11-02 04:51:33 UTC (rev 18782) @@ -88,29 +88,43 @@ unsigned * toLen, unsigned int * flag) { - int i; - INT32 bits[BitsPerFrame]; - real speech[SamplesPerFrame]; unsigned char * buffer = (unsigned char *)to; const short * sampleBuffer = (const short *)from; + real speech[SamplesPerFrame]; + INT32 bits[BitsPerFrame]; + int i; + int stat = 0; - if ((*fromLen)/2 != SamplesPerFrame || *toLen < BytesPerFrame) - return 0; + int srcSize = 0; + int dstSize = 0; - for (i = 0; i < SamplesPerFrame; i++) - speech[i] = (real)(sampleBuffer[i]/SampleValueScale); + for (;;) { - lpc10_encode(speech, bits, (struct lpc10_encoder_state *)context); + if (((*fromLen-srcSize)/2) < SamplesPerFrame || ((*toLen-dstSize) < BytesPerFrame)) + break; - memset(to, 0, BytesPerFrame); - for (i = 0; i < BitsPerFrame; i++) { - if (bits[i]) - buffer[i>>3] |= 1 << (i&7); + for (i = 0; i < SamplesPerFrame; i++) + speech[i] = (real)(*sampleBuffer++/SampleValueScale); + + lpc10_encode(speech, bits, (struct lpc10_encoder_state *)context); + + memset(buffer, 0, BytesPerFrame); + for (i = 0; i < BitsPerFrame; i++) { + if (bits[i]) + buffer[i>>3] |= 1 << (i&7); + } + buffer += BytesPerFrame; + + srcSize += SamplesPerFrame*2; + dstSize += BytesPerFrame; + + stat = 1; } - *toLen = BytesPerFrame; + *fromLen = srcSize; + *toLen = dstSize; - return 1; + return stat; } static void destroy_encoder(const struct PluginCodec_Definition * codec, void * context) @@ -134,31 +148,45 @@ unsigned int * flag) { int i; + short * sampleBuffer = (short *)to; + const unsigned char * buffer = (const unsigned char *)from; INT32 bits[BitsPerFrame]; real speech[SamplesPerFrame]; - short * sampleBuffer = (short *)to; - const unsigned char * buffer = (const unsigned char *)from; + int stat = 0; + + int srcSize = 0; + int dstSize = 0; - if (*fromLen < BytesPerFrame || *toLen < SamplesPerFrame*2) - return 0; + for (;;) { - for (i = 0; i < BitsPerFrame; i++) - bits[i] = (buffer[i>>3]&(1<<(i&7))) != 0; + if ((*fromLen-srcSize) < BytesPerFrame || (*toLen-dstSize) < SamplesPerFrame*2) + break; - lpc10_decode(bits, speech, (struct lpc10_decoder_state *)context); + for (i = 0; i < BitsPerFrame; i++) + bits[i] = (buffer[i>>3]&(1<<(i&7))) != 0; + buffer += BytesPerFrame; - for (i = 0; i < SamplesPerFrame; i++) { - real sample = (real)(speech[i]*SampleValueScale); - if (sample < MinSampleValue) - sample = MinSampleValue; - else if (sample > MaxSampleValue) - sample = MaxSampleValue; - sampleBuffer[i] = (short)sample; + lpc10_decode(bits, speech, (struct lpc10_decoder_state *)context); + + for (i = 0; i < SamplesPerFrame; i++) { + real sample = (real)(speech[i]*SampleValueScale); + if (sample < MinSampleValue) + sample = MinSampleValue; + else if (sample > MaxSampleValue) + sample = MaxSampleValue; + *sampleBuffer++ = (short)sample; + } + + srcSize += BytesPerFrame; + dstSize += SamplesPerFrame*2; + + stat = 1; } - *toLen = SamplesPerFrame*2; + *fromLen = srcSize; + *toLen = dstSize; - return 1; + return stat; } static void destroy_decoder(const struct PluginCodec_Definition * codec, void * context) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-11-01 08:50:22
|
Revision: 18781 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18781&view=rev Author: csoutheren Date: 2007-11-01 01:50:27 -0700 (Thu, 01 Nov 2007) Log Message: ----------- Fix default value for port in PIPSocketAddressAndPort constructor Thanks to Amnon David Modified Paths: -------------- ptlib/trunk/include/ptlib/ipsock.h Modified: ptlib/trunk/include/ptlib/ipsock.h =================================================================== --- ptlib/trunk/include/ptlib/ipsock.h 2007-11-01 00:48:19 UTC (rev 18780) +++ ptlib/trunk/include/ptlib/ipsock.h 2007-11-01 08:50:27 UTC (rev 18781) @@ -999,7 +999,7 @@ { } PIPSocketAddressAndPort(const PString & str, WORD defaultPort = 0, char _sep = ':') - : sep(_sep) + : port(defaultPort), sep(_sep) { Parse(str, defaultPort, sep); } BOOL Parse(const PString & str, WORD defaultPort = 0, char sep = ':'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-11-01 00:48:14
|
Revision: 18780 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18780&view=rev Author: csoutheren Date: 2007-10-31 17:48:19 -0700 (Wed, 31 Oct 2007) Log Message: ----------- Fix compilation when video disabled Modified Paths: -------------- opal/trunk/src/h323/channels.cxx Modified: opal/trunk/src/h323/channels.cxx =================================================================== --- opal/trunk/src/h323/channels.cxx 2007-10-31 11:46:54 UTC (rev 18779) +++ opal/trunk/src/h323/channels.cxx 2007-11-01 00:48:19 UTC (rev 18780) @@ -816,6 +816,7 @@ return; switch (type.GetTag()) { +#if OPAL_VIDEO case H245_MiscellaneousCommand_type::e_videoFastUpdatePicture : mediaStream->ExecuteCommand(OpalVideoUpdatePicture()); break; @@ -833,6 +834,7 @@ mediaStream->ExecuteCommand(OpalVideoUpdatePicture(vfuMB.m_firstGOB, vfuMB.m_firstMB, vfuMB.m_numberOfMBs)); } break; +#endif } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-10-31 11:46:50
|
Revision: 18779 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18779&view=rev Author: csoutheren Date: 2007-10-31 04:46:54 -0700 (Wed, 31 Oct 2007) Log Message: ----------- Initial import from Vox Gratia CVS Added Paths: ----------- contrib/spandsp_util/trunk/COPYING contrib/spandsp_util/trunk/Makefile contrib/spandsp_util/trunk/README contrib/spandsp_util/trunk/spandsp_if.cpp contrib/spandsp_util/trunk/spandsp_if.h contrib/spandsp_util/trunk/spandsp_util.cpp contrib/spandsp_util/trunk/spandsp_util.sln contrib/spandsp_util/trunk/spandsp_util.vcproj contrib/spandsp_util/trunk/tiff_fax_tiff.sh contrib/spandsp_util/trunk/tiff_gw_tiff.sh contrib/spandsp_util/trunk/tiff_t38_tiff.sh Added: contrib/spandsp_util/trunk/COPYING =================================================================== --- contrib/spandsp_util/trunk/COPYING (rev 0) +++ contrib/spandsp_util/trunk/COPYING 2007-10-31 11:46:54 UTC (rev 18779) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Added: contrib/spandsp_util/trunk/Makefile =================================================================== --- contrib/spandsp_util/trunk/Makefile (rev 0) +++ contrib/spandsp_util/trunk/Makefile 2007-10-31 11:46:54 UTC (rev 18779) @@ -0,0 +1,17 @@ +# CXXFLAGS += -DSPANDSP_VER3 + +LDFLAGS =-L /usr/local/lib -lspandsp +CXXFLAGS += -g +LD = g++ + +spandsp_util: spandsp_util.o spandsp_if.o + $(CXX) $(CFLAGS) $(LDFLAGS) -o $@ spandsp_util.o spandsp_if.o + +spandsp_util.o: spandsp_util.cpp + +spandsp_if.o: spandsp_if.cpp + +clean: + rm -f spandsp_util spandsp_util.o spandsp_if.o + + Added: contrib/spandsp_util/trunk/README =================================================================== --- contrib/spandsp_util/trunk/README (rev 0) +++ contrib/spandsp_util/trunk/README 2007-10-31 11:46:54 UTC (rev 18779) @@ -0,0 +1 @@ +Spandsp can be download from http://www.soft-switch.org/downloads/spandsp/ Added: contrib/spandsp_util/trunk/spandsp_if.cpp =================================================================== --- contrib/spandsp_util/trunk/spandsp_if.cpp (rev 0) +++ contrib/spandsp_util/trunk/spandsp_if.cpp 2007-10-31 11:46:54 UTC (rev 18779) @@ -0,0 +1,1298 @@ +/* + * spandsp_if.cpp + * + * A C++ interface to the SpanDSP library + * + * Written by Craig Southeren <cr...@po...> + * + * Copyright (C) 2007 Craig Southeren + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2, as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id: spandsp_if.cpp,v 1.7 2007/07/24 04:39:44 csoutheren Exp $ + */ + +#include <iostream> + +#ifdef _WIN32 +#pragma warning(disable: 4996) +#include <winsock2.h> +#include <Ws2tcpip.h> +#include <io.h> +#include <sys/types.h> +#include <sys/stat.h> +#else +#include <unistd.h> +#include <sys/time.h> +#include <sys/socket.h> +#include <stdint.h> +#include <netinet/in.h> +#include <sys/ioctl.h> +#endif + +#include <sys/types.h> +#include <errno.h> +#include <string.h> +#include <tiffio.h> +#include <fcntl.h> + +#include <string> +#include <queue> +#include <string> +using namespace std; + +#include "spandsp_if.h" + +namespace SpanDSP { +char * progname = "(no mode)"; +char * progmode = "(no mode)"; +} + +static bool firstT38Read = true; +static bool firstT38Write = true; + +static bool firstAudioRead = true; +static bool firstAudioWrite = true; + + +#define SAMPLES_PER_CHUNK 160 + +struct RTPHeader { + unsigned int flags:8; + unsigned int payloadMarker:8; + unsigned int sequence:16; + unsigned int timestamp:32; + unsigned int ssrc:32; +}; + +////////////////////////////////////////////////////////////////////////////////// +// +// Windows specific network functions +// + +#ifdef _WIN32 + +typedef int socklen_t; + +typedef SOCKET socket_t; + +struct iovec { + void *iov_base; /* Starting address */ + size_t iov_len; /* Number of bytes */ +}; + +struct msghdr { + void * msg_name; /* optional address */ + socklen_t msg_namelen; /* size of address */ + struct iovec * msg_iov; /* scatter/gather array */ + size_t msg_iovlen; /* # elements in msg_iov */ + int msg_flags; /* flags on received message */ +}; + +inline int __socket_recvfrom(socket_t fd, void * buf, int len, int flags, sockaddr * from, int * fromLen) { return ::recvfrom(fd, (char *)buf, len, flags, from, fromLen); } +inline int __socket_read (socket_t fd, void * buf, int len) { return ::recvfrom(fd, (char *)buf, len, 0, NULL, NULL); } +inline int __socket_sendto (socket_t fd, const void * data, int len, int flags, sockaddr *to, int toLen) { return ::sendto(fd, (const char *)data, len, flags, to, toLen); } +inline int __socket_ioctl (socket_t fd, int request, int * data) { return ::ioctlsocket(fd, request, (u_long *)data); } + +inline int __socket_getlasterror() { return WSAGetLastError(); } + +ostream & __socket_error(ostream & strm) { int err = __socket_getlasterror(); strm << " code " << err; return strm; } + +inline bool __socket_iseagain(int code) { return code == WSAEWOULDBLOCK || code == WSAECONNRESET; } + +int __socket_sendmsg(socket_t fd, const struct msghdr *msg, int flags) +{ + if (msg == NULL) + return -1; + + // buffer bigger than we should ever send + char buffer[1024]; + size_t bufferLen = 0; + + // copy all of the vectors into the buffer + size_t i; + for (i = 0; i < msg->msg_iovlen && (bufferLen < sizeof(buffer)); ++i) { + if (msg->msg_iov[i].iov_base != NULL && msg->msg_iov[i].iov_len != 0) { + memcpy(buffer+bufferLen, msg->msg_iov[i].iov_base, msg->msg_iov[i].iov_len); + bufferLen += msg->msg_iov[i].iov_len; + } + } + + // now write it + return __socket_sendto(fd, buffer, (int)bufferLen, msg->msg_flags, (sockaddr *)msg->msg_name, (int)msg->msg_namelen); +} + +int __socket_recvmsg(socket_t fd, struct msghdr *msg, int flags) +{ + if (msg == NULL) + return -1; + + // buffer bigger than we should ever receive + char buffer[2000]; + int bufferLen = 0; + + bufferLen = __socket_recvfrom(fd, buffer, sizeof(buffer), flags, NULL, NULL); //(sockaddr *)msg->msg_name, (int *)&msg->msg_namelen); + if (bufferLen <= 0) + return -1; + + size_t i = 0; + size_t lenSoFar = 0; + while (lenSoFar < (size_t)bufferLen && i < msg->msg_iovlen) { + if (msg->msg_iov[i].iov_base != NULL && msg->msg_iov[i].iov_len != 0) { + size_t len = msg->msg_iov[i].iov_len; + if (len > bufferLen - lenSoFar) + len = bufferLen - lenSoFar; + memcpy(msg->msg_iov[i].iov_base, buffer+lenSoFar, len); + lenSoFar += len; + ++i; + } + } + + return (int)lenSoFar; +} + +inline void __sleep(int len) { if (len > 0) ::Sleep(len); } + +#else + +////////////////////////////////////////////////////////////////////////////////// +// +// Unix specific network functions +// + +typedef int socket_t; + +inline int __socket_recvfrom(socket_t fd, void * buf, int len, int flags, sockaddr * from, socklen_t * fromLen) { return ::recvfrom(fd, (char *)buf, len, flags, from, fromLen); } +inline int __socket_read(socket_t fd, void * buf, int len) { return ::read(fd, buf, len); } +inline int __socket_sendto (socket_t fd, const void * data, int len, int flags, sockaddr *to, socklen_t toLen) { return ::sendto(fd, data, len, flags, to, toLen); } +inline int __socket_write (socket_t fd, const void * data, int len) { return ::write(fd, data, len); } +inline int __socket_ioctl (socket_t fd, int request, int * data) { return ::ioctl(fd, request, data); } + +inline int __socket_sendmsg(socket_t fd, const struct msghdr *msg, int flags) { return ::sendmsg(fd, msg, flags); } +inline int __socket_recvmsg(socket_t fd, struct msghdr *msg, int flags) { return ::recvmsg(fd, msg, flags); } + +inline int __socket_getlasterror() { return errno; } +inline bool __socket_iseagain(int code) { return code == EAGAIN; } +inline ostream & __socket_error(ostream & strm) { strm << "(" << __socket_getlasterror() << ") " << strerror(__socket_getlasterror()); return strm; } + +inline void __sleep(int len) { if (len > 0) usleep(len * 1000); } + +#endif + +////////////////////////////////////////////////////////////////////////////////// +// +// Implement an adpative delay that allows approximation of a real timer +// + +SpanDSP::AdaptiveDelay::__time_t SpanDSP::AdaptiveDelay::GetTime() +{ +#ifdef _WIN32 + SYSTEMTIME sysTime; + GetSystemTime(&sysTime); + + FILETIME fileTime; + SystemTimeToFileTime(&sysTime, &fileTime); + + ULARGE_INTEGER uTime; + uTime.HighPart = fileTime.dwHighDateTime; + uTime.LowPart = fileTime.dwLowDateTime; + + return (uTime.QuadPart + 5000)/ 10000; +#else + timeval tv; + gettimeofday(&tv, NULL); + return (tv.tv_sec * 1000) + ((tv.tv_usec + 500) / 1000); +#endif +} + +SpanDSP::AdaptiveDelay::AdaptiveDelay() +{ + Start(); +} + +void SpanDSP::AdaptiveDelay::Start() +{ + first = true; + accumulator = 0; +} + +void SpanDSP::AdaptiveDelay::Delay(int delay) +{ + __sleep(Calculate(delay)); +} + +int SpanDSP::AdaptiveDelay::Calculate(int delay) +{ + if (first) { + lastTime = GetTime(); + accumulator = delay; + first = false; + return delay; + } else { + __time_t now = GetTime(); + __time_t actual = now - lastTime; + + //accumulator = (accumulator * 3) / 4; + accumulator -= actual; + + accumulator += delay; + + if (accumulator < -4*delay) + accumulator = -delay*4; + else if (accumulator > 4*delay) + accumulator = delay*4; + +//cerr << "accum = " << accumulator << "(actual " << actual << ")" << endl; + + lastTime = now; + + if (accumulator > 0) + return (int)accumulator; + + return 0; + } +} + +////////////////////////////////////////////////////////////////////////////////// +// +// print a IP address/port address +// + +static void PrintSocketAddr(const sockaddr_in & addr, ostream & strm) +{ + strm << inet_ntoa(addr.sin_addr) << ":" << htons(addr.sin_port); +} + +////////////////////////////////////////////////////////////////////////////////// +// +// Read a packet of audio from a UDP socket +// + +static bool ReadAudioPacket(socket_t fd, short * data, int & len, sockaddr_in & address, bool & listen, bool verbose) +{ + len = SAMPLES_PER_CHUNK*2; + if (!listen) + len = __socket_read(fd, data, len); + else { + socklen_t sockLen = sizeof(address); + len = __socket_recvfrom(fd, data, len, 0, (sockaddr *)&address, &sockLen); + } + + if (len > 0) { + if (verbose && firstAudioRead) { + cout << SpanDSP::progmode << " first read from audio socket" << endl; + firstAudioRead = false; + } + + if (listen) { + if (verbose) + cout << "info: remote address set to "; + PrintSocketAddr(address, cout); + cout << endl; + listen = false; + int cmd = 0; + if (__socket_ioctl(fd, FIONBIO, &cmd) != 0) { + cerr << SpanDSP::progmode << ": cannot set socket into blocking mode" << endl; + return false; + } + while (len < SAMPLES_PER_CHUNK*2) { + data[len/2] = 0; + len += 2; + } + } + } + else { + int err = __socket_getlasterror(); + if ((len < 0) && (!__socket_iseagain(err))) { + cerr << SpanDSP::progmode << ": read from socket failed " ; __socket_error(cerr) << endl; + return false; + } + if (listen) + len = 0; + else { +// cerr << progmode << " missed audio packet" << endl; + memset(data, 0, SAMPLES_PER_CHUNK*2); + len = SAMPLES_PER_CHUNK*2; + } + } + return true; +} + + +////////////////////////////////////////////////////////////////////////////////// +// +// Implement an entity that sends or receives faxes +// + +SpanDSP::FaxElement::FaxElement(bool _transmitter, bool _verbose) + : transmitter(_transmitter), verbose(_verbose) +{ + finished = false; + useECM = false; +} + +void SpanDSP::FaxElement::phase_b_handler(t30_state_t *s, void *user_data, int result) +{ + FaxElement * element = (FaxElement *)user_data; + if (element != NULL) + element->PhaseBHandler(result); +} + +void SpanDSP::FaxElement::phase_d_handler(t30_state_t *s, void *user_data, int result) +{ + FaxElement * element = (FaxElement *)user_data; + if (element != NULL) + element->PhaseDHandler(result); +} + +void SpanDSP::FaxElement::phase_e_handler(t30_state_t *s, void *user_data, int result) +{ + FaxElement * element = (FaxElement *)user_data; + if (element != NULL) + element->PhaseEHandler(result); +} + +void SpanDSP::FaxElement::PhaseBHandler(int) +{ } + +void SpanDSP::FaxElement::PhaseDHandler(int) +{ } + +void SpanDSP::FaxElement::PhaseEHandler(int) +{ } + +void SpanDSP::FaxElement::SetLocalStationID(const std::string & str) +{ localStationID = str; } + +void SpanDSP::FaxElement::SetECM(bool v) +{ useECM = v; } + +bool SpanDSP::FaxElement::GetECM() const +{ return useECM; } + +////////////////////////////////////////////////////////////////////////////////// +// +// Implement an entity that sends or receives faxes via audio tones to or from TIFF files +// + +SpanDSP::FaxTerminal::FaxTerminal(bool _transmitter, bool _verbose) + : FaxElement(_transmitter, _verbose) +{ } + +SpanDSP::FaxTerminal::~FaxTerminal() +{ + ::fax_release(&faxState); +} + +void SpanDSP::FaxTerminal::Start() +{ + ::fax_init(&faxState, transmitter ? 1 : 0); + faxState.logging.level = verbose ? SPAN_LOG_SHOW_SEVERITY | SPAN_LOG_SHOW_PROTOCOL | SPAN_LOG_DEBUG : 0; + //::t30_set_ecm_capability(&faxState.t30_state, useECM ? 1 : 0); + if (localStationID.length() != 0) + ::t30_set_local_ident(&faxState.t30_state, localStationID.c_str()); + else + ::t30_set_local_ident(&faxState.t30_state, " "); +} + +bool SpanDSP::FaxTerminal::PutPCMData(const short * pcm, unsigned sampleCount) +{ + return (::fax_rx(&faxState, (int16_t *)pcm, sampleCount) != 0) ? false : true; +} + +unsigned SpanDSP::FaxTerminal::GetPCMData(short * pcm, unsigned sampleCount) +{ + unsigned len = ::fax_tx(&faxState, pcm, sampleCount); + if (len < sampleCount) { + memset(pcm + len, 0, (sampleCount - len)*2); + len = sampleCount; + } + return len; +} + +void SpanDSP::FaxTerminal::tx_data_handler(t30_state_t *s, void *user_data, unsigned code, unsigned len) +{ + FaxTerminal * terminal = (FaxTerminal *)user_data; + if (terminal != NULL) + terminal->TXDataHandler(code, len); +} + +void SpanDSP::FaxTerminal::TXDataHandler(unsigned code, unsigned len) +{ +//#if 0 + switch (code) { + case T30_MODEM_NONE: + printf("SILENCE %i\n", len); + break; + case T30_MODEM_PAUSE: + printf("T30_MODEM_PAUSE %i\n", len); + break; + case T30_MODEM_CED: + printf("T30_MODEM_CED %i\n", len); + break; + case T30_MODEM_CNG: + printf("T30_MODEM_CNG %i\n", len); + break; + case T30_MODEM_V21: + printf("T30_MODEM_V21 %i\n", len); + break; + case T30_MODEM_V27TER_2400: + printf("T30_MODEM_V27TER_2400 %i\n", len); + break; + case T30_MODEM_V27TER_4800: + printf("T30_MODEM_V27TER_4800 %i\n", len); + break; + case T30_MODEM_V29_7200: + printf("T30_MODEM_V29_7200 %i\n", len); + break; + case T30_MODEM_V29_9600: + printf("T30_MODEM_V29_9600 %i\n", len); + break; + case T30_MODEM_V17_7200: + printf("T30_MODEM_V17_7200 %i\n", len); + break; + case T30_MODEM_V17_9600: + printf("T30_MODEM_V17_9600 %i\n", len); + break; + case T30_MODEM_V17_12000: + printf("T30_MODEM_V17_12000 %i\n", len); + break; + case T30_MODEM_V17_14400: + printf("T30_MODEM_V17_14400 %i\n", len); + break; + default: + printf("unknown %i\n", code, len); + break; + } +//#endif +} + +void SpanDSP::FaxTerminal::SetLocalStationID(const std::string & str) +{ localStationID = str; } + +bool SpanDSP::FaxTerminal::SendFiller() const +{ return false; } + +bool SpanDSP::FaxTerminal::Serve(socket_t fd) +{ + sockaddr_in peer; + socklen_t len = sizeof(peer); + if (getpeername(fd, (sockaddr *)&peer, &len) != 0) + return false; + return Serve(fd, peer, false); +} + +bool SpanDSP::FaxTerminal::Serve(socket_t fd, sockaddr_in & address, bool listen) +{ + int port; + { + sockaddr_in local; + socklen_t len = sizeof(local); + if (getsockname(fd, (sockaddr *)&local, &len) != 0) { + cerr << progmode << ": cannot get local port number" << endl; + return false; + } + port = ntohs(local.sin_port); + if (verbose) + cout << progmode << " local fax port = " << port << endl; + } + + // set socket into non-blocking mode + int cmd = 1; + if (__socket_ioctl(fd, FIONBIO, &cmd) != 0) { + cerr << progmode << ": cannot set socket into non-blocking mode" << endl; + return false; + } + + AdaptiveDelay delay; + +#if WRITE_PCM_FILES + int outFile; + int inFile; + { + char fn[1024]; + + strcpy(fn, "fax_audio_out_"); + strcat(fn, progmode); + strcat(fn, ".pcm"); + outFile = _open(fn, _O_BINARY | _O_CREAT | _O_TRUNC | _O_WRONLY, _S_IREAD | _S_IWRITE); + if (outFile < 0) { + cerr << progmode << ": cannot open " << fn << endl; + } + else + { + cerr << progmode << ": opened " << fn << endl; + } + + strcpy(fn, "fax_audio_in_"); + strcat(fn, progmode); + strcat(fn, ".pcm"); + inFile = _open(fn, _O_BINARY | _O_CREAT | _O_TRUNC | _O_WRONLY, _S_IREAD | _S_IWRITE); + if (outFile < 0) { + cerr << progmode << ": cannot open " << fn << endl; + } + else + { + cerr << progmode << ": opened " << fn << endl; + } + } +#endif + + while (!finished) { + + delay.Delay(20); + + // get audio data from terminal and send to socket + { + short data[SAMPLES_PER_CHUNK]; + unsigned len = GetPCMData(data, sizeof(data)/2) * 2; + if (!listen) { +#if WRITE_PCM_FILES + if (outFile >= 0) { + if (write(outFile, data, len) < len) { + cerr << progmode << ": cannot write output PCM data to file" << endl; + outFile = -1; + } + } +#endif + + if (__socket_sendto(fd, data, len, 0, (sockaddr *)&address, sizeof(address)) != len) { + if ( __socket_getlasterror() == ENOENT) + cerr << progmode << ": audio write socket not ready" << endl; + else { + cerr << progmode << ": write to audio socket failed\n"; __socket_error(cerr) << endl; + break; + } + } else if (verbose && firstAudioWrite) { + cout << progmode << " first send from audio socket" << endl; + firstAudioWrite = false; + } + } + } + + // get audio data from the fax socket and send to the terminal + int len; + short data[750]; + if (!ReadAudioPacket(fd, data, len, address, listen, verbose)) + break; + if (len > 0) { +#if WRITE_PCM_FILES + if (inFile >= 0) { + if (write(inFile, data, len) < len) { + cerr << progmode << ": cannot write input PCM data to file" << endl; + outFile = -1; + } + } +#endif + + if (!PutPCMData(data, len/2)) { + cerr << progmode << ": write to terminal failed" << endl; + break; + } + } + } + + if (verbose) + cout << progmode << ": fax terminal serve finished" << endl; + + // keep sending silence until the UDP socket closed + if (SendFiller()) { + short data[SAMPLES_PER_CHUNK]; + memset(&data, 0, sizeof(data)); + int i = 100; + while (i-- > 0) { + if (__socket_sendto(fd, data, sizeof(data), 0, (sockaddr *)&address, sizeof(address)) <= 0) + break; + delay.Delay(20); + } + } + + return true; +} + +////////////////////////////////////////////////////////////////////////////////// +// +// Implement an entity that sends faxes via audio tones from a TIFF file +// + +SpanDSP::FaxTerminalSender::FaxTerminalSender(bool verbose) + : FaxTerminal(true, verbose) +{ +} + +bool SpanDSP::FaxTerminalSender::Start(const std::string & filename) +{ + FaxTerminal::Start(); + ::t30_set_tx_file(&faxState.t30_state, filename.c_str(), -1, -1); + ::t30_set_phase_e_handler(&faxState.t30_state, &FaxElement::phase_e_handler, this); + //::t30_set_tx_data_handler(&faxState.t30_state, &FaxSoftModemSender::tx_data_handler, this); + return true; +} + +void SpanDSP::FaxTerminalSender::PhaseEHandler(int result) +{ + //struct ast_channel *chan; + char far_ident[21]; + + //chan = (struct ast_channel *) user_data; + if (result == T30_ERR_OK) { + ::t30_get_far_ident(&faxState.t30_state, far_ident); + if (verbose) + cout << progmode << ": fax transmission successful" << endl; + } + else { + if (verbose) + cout << progmode << ": fax transmission was not successful " << t30_completion_code_to_str(result) << endl; + // fax was not successful + } + finished = true; +} + +////////////////////////////////////////////////////////////////////////////////// +// +// Implement an entity that receives faxes via audio tones into a TIFF file +// + +SpanDSP::FaxTerminalReceiver::FaxTerminalReceiver(bool verbose) + : FaxTerminal(false, verbose) +{ +} + +bool SpanDSP::FaxTerminalReceiver::Start(const std::string & filename) +{ + FaxTerminal::Start(); + ::t30_set_rx_file(&faxState.t30_state, filename.c_str(), -1); + ::t30_set_phase_e_handler(&faxState.t30_state, FaxElement::phase_e_handler, this); + //::t30_set_tx_data_handler(&faxState.t30_state, FaxSoftModemReceiver::tx_data_handler, this); + return true; +} + +void SpanDSP::FaxTerminalReceiver::PhaseEHandler(int result) +{ + if (result == T30_ERR_OK) + { + char local_ident[21]; + char far_ident[21]; + t30_stats_t t; + t30_get_transfer_statistics(&faxState.t30_state, &t); + t30_get_far_ident(&faxState.t30_state, far_ident); + t30_get_local_ident(&faxState.t30_state, local_ident); + if (verbose) + cout << progmode << ": fax receive completed" << endl; + } + else if (verbose) + cout << progmode << ": fax receive not successful " << t30_completion_code_to_str(result) << endl; + + finished = true; +} + +bool SpanDSP::FaxTerminalReceiver::SendFiller() const +{ + return true; +} + +////////////////////////////////////////////////////////////////////////////////// +// +// Implement an entity that sends or receives faxes via T.38 +// + +SpanDSP::T38Element::T38Element(bool _transmitter, bool _verbose) + : FaxElement(_transmitter, _verbose) +{ + txTimestamp = 0; + txFd = -1; + version = T38_VERSION; +} + +void SpanDSP::T38Element::SetVersion(unsigned v) +{ + version = v; +} + +unsigned SpanDSP::T38Element::GetVersion() +{ + return version; +} + +int SpanDSP::T38Element::tx_packet_handler(t38_core_state_t *s, void *user_data, const uint8_t *buf, int len, int count) +{ + T38Element * terminal = (T38Element *)user_data; + if (terminal == NULL) + return 0; + return terminal->TXPacketHandler(buf, len, s->tx_seq_no); +} + +int SpanDSP::T38Element::TXPacketHandler(const uint8_t * buf, int len, int sequence) +{ + if (txFd >= 0) + SendT38Packet(txFd, T38Packet(buf, len, sequence), txAddr); + + return 0; +} + +// +// Send a T.38 packet on a UDP port +// + +bool SpanDSP::T38Element::SendT38Packet(socket_t fd, const T38Packet & pkt, const sockaddr_in & address) +{ + RTPHeader rtpHeader; + rtpHeader.flags = 0x80; + rtpHeader.payloadMarker = 0x00 | 96; + rtpHeader.sequence = htons(pkt.sequence); + rtpHeader.timestamp = htonl(txTimestamp); + rtpHeader.ssrc = 0; + + txTimestamp += 160; + + struct iovec vectors[2]; + vectors[0].iov_base = &rtpHeader; + vectors[0].iov_len = sizeof(rtpHeader); + vectors[1].iov_base = (void *)&pkt[0]; + vectors[1].iov_len = pkt.size(); + + msghdr msg; + memset(&msg, 0, sizeof(msg)); + + msg.msg_iov = vectors; + msg.msg_iovlen = 2; + +#ifdef _WIN32 + msg.msg_name = (void *)&address; + msg.msg_namelen = sizeof(address); +#endif + + if (__socket_sendmsg(fd, &msg, 0) <= 0) { + cerr << progmode << ": sendmsg failed - " ; __socket_error(cerr) << endl; + return true; + } + + if (verbose && firstT38Write) { + cout << progmode << " first write from t38 socket" << endl; + firstT38Write = false; + } + + return true; +} + +// +// Receive a T.38 packet on a UDP port +// + +bool SpanDSP::T38Element::ReceiveT38Packet(socket_t fd, SpanDSP::T38Terminal::T38Packet & pkt, sockaddr_in & address, bool & listen) +{ + pkt.resize(1500); + + RTPHeader rtpHeader; + + struct iovec vectors[2]; + vectors[0].iov_base = &rtpHeader; + vectors[0].iov_len = sizeof(rtpHeader); + vectors[1].iov_base = &pkt[0]; + vectors[1].iov_len = pkt.size(); + + msghdr msg; + memset(&msg, 0, sizeof(msg)); + + msg.msg_iov = vectors; + msg.msg_iovlen = 2; + if (listen) { + msg.msg_name = &address; + msg.msg_namelen = sizeof(address); + } + + int len = __socket_recvmsg(fd, &msg, 0); + + if (len < 0) { + int err = __socket_getlasterror(); + if (__socket_iseagain(err)) { + pkt.resize(0); + return true; + } + cerr << progmode << ": read failed - (" << errno << ") " ; __socket_error(cerr) << endl; + return false; + } + if (len < sizeof(rtpHeader)) { + if (len > 0) + cerr << progmode << ": malformed T.38 packet received via UDP" << endl; + pkt.resize(0); + return true; + } + + pkt.sequence = ntohs(rtpHeader.sequence); + pkt.resize(len - sizeof(rtpHeader)); + + if (listen) { + listen = false; + txFd = fd; + memcpy(&txAddr, &address, sizeof(txAddr)); + if (verbose) { + cout << progmode << ": remote address set to "; + PrintSocketAddr(address, cout); + cout << endl; + } + } + + if (verbose && firstT38Read) { + cout << progmode << " first read from t38 socket" << endl; + firstT38Read = false; + } + + return true; +} + +////////////////////////////////////////////////////////////////////////////////// +// +// Implement an entity that sends or receives faxes via T.38 to or from TIFF files +// + +SpanDSP::T38Terminal::T38Terminal(bool _transmitter, bool _verbose) + : T38Element(_transmitter, _verbose) +{ +} + +SpanDSP::T38Terminal::~T38Terminal() +{ +} + +bool SpanDSP::T38Terminal::PutPCMData(const short *, unsigned) +{ return false; } + +unsigned SpanDSP::T38Terminal::GetPCMData(short *, unsigned) +{ return 0; } + +bool SpanDSP::T38Terminal::Start(const std::string & filename) +{ + if (::t38_terminal_init(&t38TerminalState, transmitter ? TRUE : FALSE, T38Element::tx_packet_handler, this) == NULL) + return false; + + if (verbose) + cout << "starting T.38 terminal with version " << version << endl; + + ::t38_set_t38_version(&t38TerminalState.t38, version); +#if 0 + ::span_log_set_level(&t38TerminalState.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG); + ::span_log_set_tag (&t38TerminalState.logging, "T.38-A"); + ::span_log_set_level(&t38TerminalState.t38.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG); + ::span_log_set_tag (&t38TerminalState.t38.logging, "T.38-A"); + ::span_log_set_level(&t38TerminalState.t30_state.logging, SPAN_LOG_DEBUG | SPAN_LOG_SHOW_TAG); + ::span_log_set_tag (&t38TerminalState.t30_state.logging, "T.38-A"); +#endif + + if (localStationID.length() != 0) + ::t30_set_local_ident(&t38TerminalState.t30_state, localStationID.c_str()); + else + ::t30_set_local_ident(&t38TerminalState.t30_state, " "); + + //::t30_set_ecm_capability(&t38TerminalState.t30_state, useECM ? 1 : 0); + + ::t30_set_phase_b_handler(&t38TerminalState.t30_state, FaxElement::phase_b_handler, this); + ::t30_set_phase_d_handler(&t38TerminalState.t30_state, FaxElement::phase_d_handler, this); + ::t30_set_phase_e_handler(&t38TerminalState.t30_state, FaxElement::phase_e_handler, this); + + return true; +} + +void SpanDSP::T38Terminal::QueuePacket(const T38Packet & pkt) +{ +#if SPANDSP_VER3 + ::t38_core_rx_ifp_packet(&t38TerminalState.t38, pkt.sequence, &pkt[0], pkt.size()); +#else + ::t38_core_rx_ifp_packet(&t38TerminalState.t38, &pkt[0], pkt.size(), pkt.sequence); +#endif +} + + +bool SpanDSP::T38Terminal::Serve(socket_t fd) +{ + sockaddr_in peer; + socklen_t len = sizeof(peer); + if (getpeername(fd, (sockaddr *)&peer, &len) != 0) + return false; + return Serve(fd, peer, false); +} + +bool SpanDSP::T38Terminal::Serve(socket_t fd, sockaddr_in & address, bool listen) +{ + { + sockaddr_in local; + socklen_t len = sizeof(local); + if (getsockname(fd, (sockaddr *)&local, &len) != 0) { + cerr << progmode << ": cannot get local port number" << endl; + return false; + } + } + + if (!listen) { + txFd = fd; + memcpy(&txAddr, &address, sizeof(txAddr)); + } + + // set socket into non-blocking mode + int cmd = 1; + if (__socket_ioctl(fd, FIONBIO, &cmd) != 0) { + cerr << progmode << ": cannot set socket into non-blocking mode" << endl; + return false; + } + + int done = 0; + + AdaptiveDelay delay; + + while (!finished) { + + delay.Delay(20); + + done = ::t38_terminal_send_timeout(&t38TerminalState, SAMPLES_PER_CHUNK); + + SpanDSP::T38Terminal::T38Packet pkt; + + // read incoming packets + if (!ReceiveT38Packet(fd, pkt, address, listen)) { + finished = true; + break; + } + if (pkt.size() != 0) + QueuePacket(pkt); + + if (finished || done) + break; + } + + cout << "finished" << endl; + + return true; +} + +////////////////////////////////////////////////////////////////////////////////// +// +// Implement an entity that sends via faxes T.38 from TIFF files +// + +SpanDSP::T38TerminalSender::T38TerminalSender(bool verbose) + : T38Terminal(true, verbose) +{ +} + +bool SpanDSP::T38TerminalSender::Start(const std::string & filename) +{ + if (!T38Terminal::Start(filename)) + return false; + + ::t30_set_tx_file(&t38TerminalState.t30_state, filename.c_str(), -1, -1); + + return true; +} + +void SpanDSP::T38TerminalSender::PhaseEHandler(int result) +{ + //struct ast_channel *chan; + char far_ident[21]; + + //chan = (struct ast_channel *) user_data; + if (result == T30_ERR_OK) { + ::t30_get_far_ident(&t38TerminalState.t30_state, far_ident); + cout << "fax transmission successful" << endl; + } + else { + cout << "fax transmission was not successful " << t30_completion_code_to_str(result) << endl; + // fax was not successfuE + } + finished = true; +} + +////////////////////////////////////////////////////////////////////////////////// +// +// Implement an entity that receives faxes via T.38 to TIFF files +// + +SpanDSP::T38TerminalReceiver::T38TerminalReceiver(bool verbose) + : T38Terminal(false, verbose) +{ +} + +bool SpanDSP::T38TerminalReceiver::Start(const std::string & filename) +{ + if (!T38Terminal::Start(filename)) + return false; + + ::t30_set_rx_file(&t38TerminalState.t30_state, filename.c_str(), -1); + return true; +} + +void SpanDSP::T38TerminalReceiver::PhaseEHandler(int result) +{ + if (result == T30_ERR_OK) + { + char local_ident[21]; + char far_ident[21]; + t30_stats_t t; + t30_get_transfer_statistics(&t38TerminalState.t30_state, &t); + t30_get_far_ident(&t38TerminalState.t30_state, far_ident); + t30_get_local_ident(&t38TerminalState.t30_state, local_ident); + cout << "fax receive completed" << endl; + } + else + { + cout << "fax receive not successful " << t30_completion_code_to_str(result) << endl; + } + finished = true; +} + +////////////////////////////////////////////////////////////////////////////////// +// +// Implement an entity that gatewayes beteen T.38 and audio tones +// + +SpanDSP::T38Gateway::T38Gateway(bool _verbose) + : T38Element(false, _verbose) +{ +} + +SpanDSP::T38Gateway::~T38Gateway() +{ +} + +bool SpanDSP::T38Gateway::PutPCMData(const short * pcm, unsigned sampleCount) +{ + return (::t38_gateway_rx(&t38GatewayState, (int16_t *)pcm, sampleCount) != 0) ? false : true; +} + +unsigned SpanDSP::T38Gateway::GetPCMData(short * pcm, unsigned sampleCount) +{ + unsigned len = ::t38_gateway_tx(&t38GatewayState, pcm, sampleCount); + if (len < sampleCount) { + memset(pcm + len, 0, (sampleCount - len)*2); + len = sampleCount; + } + return len; +} + +bool SpanDSP::T38Gateway::Start() +{ + if (::t38_gateway_init(&t38GatewayState, tx_packet_handler, this) == NULL) + return false; + + ::t38_set_t38_version(&t38GatewayState.t38, version); + +#if SPANDSP_VER3 + ::t38_gateway_ecm_control(&t38GatewayState, useECM ? 1 : 0); +#endif + + return true; +} + +void SpanDSP::T38Gateway::QueuePacket(const T38Packet & pkt) +{ +#if SPANDSP_VER3 + ::t38_core_rx_ifp_packet(&t38GatewayState.t38, pkt.sequence, &pkt[0], pkt.size()); +#else + ::t38_core_rx_ifp_packet(&t38GatewayState.t38, &pkt[0], pkt.size(), pkt.sequence); +#endif +} + + +bool SpanDSP::T38Gateway::Serve(socket_t fax, socket_t t38) +{ + sockaddr_in t38peer; + socklen_t len = sizeof(t38peer); + memset(&t38peer, 0, len); + if (getpeername(t38, (sockaddr *)&t38peer, &len) != 0) + return false; + + sockaddr_in faxpeer; + len = sizeof(faxpeer); + memset(&faxpeer, 0, len); + if (getpeername(fax, (sockaddr *)&faxpeer, &len) != 0) + return false; + + return Serve(fax, faxpeer, t38, t38peer, false); +} + +bool SpanDSP::T38Gateway::Serve(socket_t fax, sockaddr_in & faxAddress, socket_t t38, sockaddr_in & t38Address, bool listenFlag) +{ + bool faxListen, t38Listen; + faxListen = t38Listen = listenFlag; + + { + sockaddr_in local; + socklen_t len = sizeof(local); + if (getsockname(fax, (sockaddr *)&local, &len) != 0) { + cerr << progmode << ": cannot get local fax port number" << endl; + return false; + } + if (verbose) + cout << progmode << " local fax port = " << ntohs(local.sin_port) << endl; + } + + { + sockaddr_in local; + socklen_t len = sizeof(local); + if (getsockname(t38, (sockaddr *)&local, &len) != 0) { + cerr << progmode << ": cannot get local t38 port number" << endl; + return false; + } + if (verbose) + cout << progmode << " local t38 port = " << ntohs(local.sin_port) << endl; + } + + // set sockets into non-blocking mode + int cmd = 1; + if (__socket_ioctl(fax, FIONBIO, &cmd) != 0) { + cerr << progmode << ": cannot set fax socket into non-blocking mode" << endl; + return false; + } + + // set socket into non-blocking mode + cmd = 1; + if (__socket_ioctl(t38, FIONBIO, &cmd) != 0) { + cerr << progmode << ": cannot set t38 socket into non-blocking mode" << endl; + return false; + } + + if (!listenFlag) { + txFd = t38; + memcpy(&txAddr, &t38Address, sizeof(txAddr)); + } + +#if WRITE_PCM_FILES + int outFile; + int inFile; + { + char fn[1024]; + + strcpy(fn, "gw_audio_out_"); + strcat(fn, progmode); + strcat(fn, ".pcm"); + outFile = _open(fn, _O_BINARY | _O_CREAT | _O_TRUNC | _O_WRONLY, _S_IREAD | _S_IWRITE); + if (outFile < 0) { + cerr << progmode << ": cannot open " << fn << endl; + } + else + { + cerr << progmode << ": opened " << fn << endl; + } + + strcpy(fn, "gw_audio_in_"); + strcat(fn, progmode); + strcat(fn, ".pcm"); + inFile = _open(fn, _O_BINARY | _O_CREAT | _O_TRUNC | _O_WRONLY, _S_IREAD | _S_IWRITE); + if (outFile < 0) { + cerr << progmode << ": cannot open " << fn << endl; + } + else + { + cerr << progmode << ": opened " << fn << endl; + } + } +#endif + + AdaptiveDelay delay; + + while (!finished) { + + delay.Delay(20); + + // get audio data from the fax socket and give to the gateway + { + int len; + short data[750]; + if (ReadAudioPacket(fax, data, len, faxAddress, faxListen, verbose)) { +#if WRITE_PCM_FILES + if (inFile >= 0) { + if (write(inFile, data, len) < len) { + cerr << progmode << ": cannot write input PCM data to file" << endl; + outFile = -1; + } + } +#endif + if (len > 0) { + if (!PutPCMData(data, len/2)) { + cerr << progmode << ": write to terminal failed" << endl; + break; + } + } + } + } + + // get audio data from the gateway and send to the fax socket + { + short data[SAMPLES_PER_CHUNK]; + unsigned len = GetPCMData(data, sizeof(data)/2) * 2; +#if _WIN32 + if (!faxListen && (__socket_sendto(fax, data, len, 0, (sockaddr *)&faxAddress, sizeof(faxAddress)) <= 0)) { +#else + if (__socket_write(fax, data, len) <= 0) { +#endif + if ( __socket_getlasterror() == ENOENT) + cerr << progmode << ": fax write socket not ready" << endl; + else { + cerr << progmode << ": write to fax socket failed\n"; __socket_error(cerr) << endl; + break; + } + } + if (verbose && firstAudioWrite) { + cout << progmode << " first send from audio socket " << len << endl; + firstAudioWrite = false; + } +#if WRITE_PCM_FILES + if (outFile >= 0) { + if (write(outFile, data, len) < len) { + cerr << progmode << ": cannot write output PCM data to file" << endl; + outFile = -1; + } + } +#endif + } + + if (finished) { + if (verbose) + cout << progmode << " finished" << endl; + break; + } + + // read any T38 packets received and send to the gateway + T38Packet pkt; + do { //for (;;) { + if (!ReceiveT38Packet(t38, pkt, t38Address, t38Listen)) { + cerr << progmode << " receive failed" << endl; + finished = true; + break; + } + if (pkt.size() == 0) + break; + QueuePacket(pkt); + } while (0); + + } + + // keep sending silence until the UDP socket closed + { + short data[SAMPLES_PER_CHUNK]; + memset(&data, 0, sizeof(data)); + int i = 100; + while (i-- > 0) { + if (__socket_sendto(fax, data, sizeof(data), 0, (sockaddr *)&faxAddress, sizeof(faxAddress)) <= 0) + break; + delay.Delay(20); + } + } + + if (verbose) + cout << progmode << " t38gw thread ended" << endl; + + return true; +} + +////////////////////////////////////////////////////////////////////////////////// Added: contrib/spandsp_util/trunk/spandsp_if.h =================================================================== --- contrib/spandsp_util/trunk/spandsp_if.h (rev 0) +++ contrib/spandsp_util/trunk/spandsp_if.h 2007-10-31 11:46:54 UTC (rev 18779) @@ -0,0 +1,313 @@ +/* + * spandsp_if.h + * + * A C++ interface to the SpanDSP library + * + * Written by Craig Southeren <cr...@po...> + * + * Copyright (C) 2007 Craig Southeren + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2, as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * $Id: spandsp_if.h,v 1.1 2007/03/29 04:46:38 csoutheren Exp $ + */ + +#include <string> +#include <vector> +#include <queue> +#include <ostream> +#include <math.h> + +#ifdef _WIN32 + +#pragma warning(disable: 4996) + +#ifndef FD_SETSIZE +#include <winsock2.h> +#include <Ws2tcpip.h> +#endif + +typedef SOCKET socket_t; + +#else + +typedef int socket_t; +#include <sys/socket.h> +#include <arpa/inet.h> +#include <netdb.h> + +#endif + + +extern "C" { +#ifdef _WIN32 +#include <tgmath.h> +#else +#define INT16_MAX SHRT_MAX +#define INT16_MIN SHRT_MIN +#endif + +#include "spandsp.h" +}; + +std::ostream & __socket_error(std::ostream & strm); + +#define T38_VERSION 1 + +namespace SpanDSP { + +extern char * progmode; +extern char * progname; + +////////////////////////////////////////////////////////////////////////////////// +// +// Implement an adpative delay that allows approximation of a real timer +// + +class AdaptiveDelay +{ + public: + typedef long long __time_t; + + protected: + bool first; + __time_t lastTime; + __time_t accumulator; + + public: + static __time_t GetTime(); + AdaptiveDelay(); + void Start(); + void Delay(int delay); + int Calculate(int delay); +}; + + +////////////////////////////////////////////////////////////////////////////////// +// +// Implement an entity that sends or receives faxes +// + +class FaxElement +{ + public: + FaxElement(bool _transmitter, bool _verbose = false); + + virtual bool PutPCMData(const short * pcm, unsigned sampleCount) = 0; + virtual unsigned GetPCMData(short * pcm, unsigned sampleCount) = 0; + + static void phase_b_handler(t30_state_t *s, void *user_data, int result); + static void phase_d_handler(t30_state_t *s, void *user_data, int result); + static void phase_e_handler(t30_state_t *s, void *user_data, int result); + + virtual void PhaseBHandler(int); + virtual void PhaseDHandler(int); + virtual void PhaseEHandler(int); + + void SetLocalStationID(const std::string & str); + + void SetECM(bool v = TRUE); + bool GetECM() const; + + protected: + bool transmitter; + bool verbose; + std::string localStationID; + bool finished; + bool useECM; +}; + +///////////////////////////////////////////////////////////////////////////////... [truncated message content] |
From: <cso...@us...> - 2007-10-31 11:39:26
|
Revision: 18778 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18778&view=rev Author: csoutheren Date: 2007-10-31 04:39:20 -0700 (Wed, 31 Oct 2007) Log Message: ----------- Created folder remotely Added Paths: ----------- contrib/spandsp_util/branches/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-10-31 11:38:48
|
Revision: 18777 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18777&view=rev Author: csoutheren Date: 2007-10-31 04:38:53 -0700 (Wed, 31 Oct 2007) Log Message: ----------- Created folder remotely Added Paths: ----------- contrib/spandsp_util/tags/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-10-31 11:38:30
|
Revision: 18776 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18776&view=rev Author: csoutheren Date: 2007-10-31 04:38:34 -0700 (Wed, 31 Oct 2007) Log Message: ----------- Created folder remotely Added Paths: ----------- contrib/spandsp_util/trunk/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-10-31 11:38:06
|
Revision: 18775 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18775&view=rev Author: csoutheren Date: 2007-10-31 04:38:08 -0700 (Wed, 31 Oct 2007) Log Message: ----------- Created folder remotely Added Paths: ----------- contrib/spandsp_util/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-10-31 06:19:07
|
Revision: 18774 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18774&view=rev Author: csoutheren Date: 2007-10-30 23:19:04 -0700 (Tue, 30 Oct 2007) Log Message: ----------- Original import from openh323 Added Paths: ----------- contrib/t38modem/tags/OriginalFromOpenH323/ Copied: contrib/t38modem/tags/OriginalFromOpenH323 (from rev 18773, contrib/t38modem/trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cso...@us...> - 2007-10-31 06:14:02
|
Revision: 18773 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18773&view=rev Author: csoutheren Date: 2007-10-30 23:14:06 -0700 (Tue, 30 Oct 2007) Log Message: ----------- Initial checkin of code from OpenH323 head Added Paths: ----------- contrib/t38modem/trunk/CHANGES contrib/t38modem/trunk/HylaFAX/ contrib/t38modem/trunk/HylaFAX/config.ttyx contrib/t38modem/trunk/Makefile contrib/t38modem/trunk/README contrib/t38modem/trunk/audio.cxx contrib/t38modem/trunk/audio.h contrib/t38modem/trunk/dle.cxx contrib/t38modem/trunk/dle.h contrib/t38modem/trunk/drivers.cxx contrib/t38modem/trunk/drivers.h contrib/t38modem/trunk/drv_c0c.cxx contrib/t38modem/trunk/drv_c0c.h contrib/t38modem/trunk/drv_pty.cxx contrib/t38modem/trunk/drv_pty.h contrib/t38modem/trunk/enginebase.cxx contrib/t38modem/trunk/enginebase.h contrib/t38modem/trunk/fcs.cxx contrib/t38modem/trunk/fcs.h contrib/t38modem/trunk/g711.c contrib/t38modem/trunk/g7231_fake.cxx contrib/t38modem/trunk/g7231_fake.h contrib/t38modem/trunk/hdlc.cxx contrib/t38modem/trunk/hdlc.h contrib/t38modem/trunk/main.cxx contrib/t38modem/trunk/main.h contrib/t38modem/trunk/main_process.cxx contrib/t38modem/trunk/opal/ contrib/t38modem/trunk/opal/h323cap.cxx contrib/t38modem/trunk/opal/h323ep.cxx contrib/t38modem/trunk/opal/h323ep.h contrib/t38modem/trunk/opal/ifpmediafmt.cxx contrib/t38modem/trunk/opal/ifpmediafmt.h contrib/t38modem/trunk/opal/ifptranscoder.cxx contrib/t38modem/trunk/opal/manager.cxx contrib/t38modem/trunk/opal/manager.h contrib/t38modem/trunk/opal/modemep.cxx contrib/t38modem/trunk/opal/modemep.h contrib/t38modem/trunk/opal/modemstrm.cxx contrib/t38modem/trunk/opal/modemstrm.h contrib/t38modem/trunk/opal/opalutils.cxx contrib/t38modem/trunk/opal/opalutils.h contrib/t38modem/trunk/opal/sipep.cxx contrib/t38modem/trunk/opal/sipep.h contrib/t38modem/trunk/opal/t38modem_2005.vcproj contrib/t38modem/trunk/opal/t38session.cxx contrib/t38modem/trunk/opal/t38session.h contrib/t38modem/trunk/pmodem.cxx contrib/t38modem/trunk/pmodem.h contrib/t38modem/trunk/pmodeme.cxx contrib/t38modem/trunk/pmodeme.h contrib/t38modem/trunk/pmodemi.cxx contrib/t38modem/trunk/pmodemi.h contrib/t38modem/trunk/pmutils.cxx contrib/t38modem/trunk/pmutils.h contrib/t38modem/trunk/precompile.cxx contrib/t38modem/trunk/t30.cxx contrib/t38modem/trunk/t30.h contrib/t38modem/trunk/t30tone.cxx contrib/t38modem/trunk/t30tone.h contrib/t38modem/trunk/t38engine.cxx contrib/t38modem/trunk/t38engine.h contrib/t38modem/trunk/t38modem.dsp contrib/t38modem/trunk/t38modem_2005.vcproj contrib/t38modem/trunk/version.h Added: contrib/t38modem/trunk/CHANGES =================================================================== --- contrib/t38modem/trunk/CHANGES (rev 0) +++ contrib/t38modem/trunk/CHANGES 2007-10-31 06:14:06 UTC (rev 18773) @@ -0,0 +1,59 @@ +/* + * CHANGES + * + * T38FAX Pseudo Modem + * + * Original author: Vyacheslav Frolov + * + */ + +Changelog for t38modem 1.0.0 + +* Added OPAL support. +* Implemented voice mode functionality. +* The code optimized for original ASN.1 sequence in T.38 (06/98) + Annex A (it's optimal if you use --old-asn option). Compiling + with OPTIMIZE_CORRIGENDUM_IFP will optimize for CORRIGENDUM No. 1 + fix (it's optimal if you do not use --old-asn option). +* Added ability to continuously re-send last UDPTL packet. +* Added Unix98 PTY support. + +Changelog for t38modem 0.8.4 + +* Fixed incompatibilities with some endpoints. +* Fixed big file descriptors problem. +* Fixed some possible dead locks. +* Implemented AT#HCLR command. +* Added ability to set range of IP ports to use. + + NOTE: To compile t38modem since version 0.8.4 you need + openh323 since version 1.19.1. + +Changelog for t38modem 0.8.3 + +* Fixed race condition on start up. +* Added -v option to keep Debian packaging happy. + +Changelog for t38modem 0.8.2 + +* Fixed incompatibilities with some endpoints. +* Fixed UDPTL size. + +Changelog for t38modem 0.8.1 + +* Fixed incompatibilities with some fax applications. +* Implemented some AT commands. +* Fixed some bugs. + +Changelog for t38modem 0.8.0 + +* Ported to Windows. + +Changelog for t38modem 0.7.0 + +* Implemented FCS generation. The DCE transfers FCS octets after + the HDLC data to the DTE (as it should be). + HylaFax Users: the config parameter "Class1FrameOverhead: 2" + should be discarded if it was used. +* Implemented ECM support. + Added: contrib/t38modem/trunk/HylaFAX/config.ttyx =================================================================== --- contrib/t38modem/trunk/HylaFAX/config.ttyx (rev 0) +++ contrib/t38modem/trunk/HylaFAX/config.ttyx 2007-10-31 06:14:06 UTC (rev 18773) @@ -0,0 +1,45 @@ +# +# HylaFAX configuration for a T38FAX Pseudo Modem +# + +SessionTracing: 0x2FFF +RingsBeforeAnswer: 1 + +ModemType: Class1 # use class 1 interface +ModemFlowControl: rtscts # default + +ModemRevQueryCmd: AT+FREV? + +# +# AT#CID=10 enables ANI/DNIS reporting between the +# first and second RINGs in the form: +# +# RING +# NMBR = <calling number> +# NDID = <called number> +# RING +# +#ModemResetCmds: "AT#CID=10" # enable ANI/DNIS reporting +#RingsBeforeAnswer: 2 # collect info between two RINGs +#QualifyCID: etc/cid # CID access control list file +#CIDNumber: "NMBR = " # pattern string for calling number +#CIDName: "NDID = " # pattern string for called number + + +# +# T.38 dial modifiers +# +# F - enable T.38 mode request after dialing +# V - disable T.38 mode request after dialing (remote host should do it) +# +# calling/called number dial modifiers +# +# L - reset and begin of calling number +# D - continue of called number +# +#ModemDialCmd: ATDF%s # user can override F by dial V +#ModemDialCmd: ATDV%s # user can override V by dial F +#ModemDialCmd: ATD%sF # user can't override F +#ModemDialCmd: ATD%sV # user can't override V +#ModemDialCmd: ATD%sVL # user can't override V or calling number + Added: contrib/t38modem/trunk/Makefile =================================================================== --- contrib/t38modem/trunk/Makefile (rev 0) +++ contrib/t38modem/trunk/Makefile 2007-10-31 06:14:06 UTC (rev 18773) @@ -0,0 +1,193 @@ +# +# Makefile +# +# T38FAX Pseudo Modem +# +# Copyright (c) 2001-2007 Vyacheslav Frolov +# +# Open H323 Project +# +# The contents of this file are subject to the Mozilla Public License +# Version 1.0 (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 Open H323 Library. +# +# The Initial Developer of the Original Code is Vyacheslav Frolov +# +# Contributor(s): Equivalence Pty ltd +# +# $Log: Makefile,v $ +# Revision 1.19 2007/07/20 14:28:38 vfrolov +# Added opalutils.cxx +# +# Revision 1.18 2007/07/17 10:03:22 vfrolov +# Added Unix98 PTY support +# +# Revision 1.17 2007/05/28 12:52:27 vfrolov +# Added OPAL support +# +# Revision 1.16 2007/05/17 08:32:44 vfrolov +# Moved class T38Modem from main.h and main.cxx to main_process.cxx +# +# Revision 1.15 2007/05/03 09:21:47 vfrolov +# Added compile time optimization for original ASN.1 sequence +# in T.38 (06/98) Annex A or for CORRIGENDUM No. 1 fix +# +# Revision 1.14 2007/03/23 10:14:35 vfrolov +# Implemented voice mode functionality +# +# Revision 1.13 2006/10/20 10:06:43 vfrolov +# Added REPEAT_INDICATOR_SENDING ifdef +# +# Revision 1.12 2006/10/19 10:45:59 vfrolov +# Added FD_TRACE_LEVEL ifdef +# +# Revision 1.11 2004/07/07 12:38:32 vfrolov +# The code for pseudo-tty (pty) devices that communicates with fax application formed to PTY driver. +# +# Revision 1.10 2004/03/09 17:22:58 vfrolov +# Added PROCESS_PER_THREAD ifdef +# +# Revision 1.9 2003/12/04 15:56:45 vfrolov +# Added hdlc.cxx t30.cxx fcs.cxx +# +# Revision 1.8 2002/08/05 10:10:29 robertj +# Normalised Makefile usage of openh323u.mak include file, fixing odd messages. +# +# Revision 1.7 2002/04/30 11:05:17 vfrolov +# Implemented T.30 Calling Tone (CNG) generation +# +# Revision 1.6 2002/04/30 03:52:28 craigs +# Added option for G.723.1 codec +# +# Revision 1.5 2002/04/27 10:17:20 vfrolov +# Added checking if COUT_TRACE or MYPTRACE_LEVEL defined +# Do not add -DCOUT_TRACE by default +# +# Revision 1.4 2002/02/11 08:35:08 vfrolov +# myPTRACE() outputs trace to cout only if defined COUT_TRACE +# +# Revision 1.3 2002/01/10 06:10:02 craigs +# Added MPL header +# +# + +PROG = t38modem +SOURCES := pmutils.cxx dle.cxx pmodem.cxx pmodemi.cxx drivers.cxx \ + t30tone.cxx hdlc.cxx t30.cxx fcs.cxx \ + pmodeme.cxx enginebase.cxx t38engine.cxx audio.cxx \ + drv_pty.cxx \ + main_process.cxx + +USE_OPAL = 1 + +# +# Build t38modem for +# - Open Phone Abstraction Library if defined USE_OPAL +# - Open H323 Library if not defined USE_OPAL +# +ifdef USE_OPAL + VPATH_CXX := opal + + SOURCES += ifptranscoder.cxx ifpmediafmt.cxx t38session.cxx \ + opalutils.cxx \ + modemep.cxx modemstrm.cxx \ + h323cap.cxx h323ep.cxx \ + sipep.cxx \ + manager.cxx + + ifndef OPALDIR + OPALDIR=$(HOME)/opal + endif + + OBJDIR_SUFFIX = opal_$(OBJ_SUFFIX) + STDCCFLAGS += -DUSE_OPAL + + include $(OPALDIR)/opal_inc.mak +else + SOURCES += g7231_fake.cxx main.cxx + + ifndef OPENH323DIR + OPENH323DIR=$(HOME)/openh323 + endif + + include $(OPENH323DIR)/openh323u.mak +endif + +# +# If defined COUT_TRACE then enable duplicate the +# output of myPTRACE() to cout +# +ifdef COUT_TRACE +STDCCFLAGS += -DCOUT_TRACE +endif + +# +# By default the code will be optimized for original ASN.1 +# sequence in T.38 (06/98) Annex A (it's optimal if you use +# --old-asn option). +# If defined OPTIMIZE_CORRIGENDUM_IFP then the code will be +# optimized for CORRIGENDUM No. 1 fix (it's optimal if you +# do not use --old-asn option). +# +ifdef OPTIMIZE_CORRIGENDUM_IFP +STDCCFLAGS += -DOPTIMIZE_CORRIGENDUM_IFP +endif + +# +# If defined MYPTRACE_LEVEL=N then myPTRACE() will +# output the trace with level N +# +ifdef MYPTRACE_LEVEL +STDCCFLAGS += -DMYPTRACE_LEVEL=$(MYPTRACE_LEVEL) +endif + +# +# If defined FD_TRACE_LEVEL=N then myPTRACE() will +# output the warnings on level N for big file descriptors +# +ifdef FD_TRACE_LEVEL +STDCCFLAGS += -DFD_TRACE_LEVEL=$(FD_TRACE_LEVEL) +endif + +# +# If defined PROCESS_PER_THREAD then +# - PID will be used in thread name rather then TID +# - CPU usage will be traced +# +ifdef PROCESS_PER_THREAD +STDCCFLAGS += -DPROCESS_PER_THREAD +endif + +# +# If defined REPEAT_INDICATOR_SENDING then t38modem +# will repeat indicator sending on idle +# +ifdef REPEAT_INDICATOR_SENDING +STDCCFLAGS += -DREPEAT_INDICATOR_SENDING +endif + +# +# If defined USE_UNIX98_PTY then t38modem will use +# Unix98 scheme for pty devices. +# If defined USE_LEGACY_PTY or not defined USE_UNIX98_PTY +# then t38modem will use legacy scheme for pty devices. +# Both schemes cen be used simultaneously. +# +ifdef USE_UNIX98_PTY + STDCCFLAGS += -DUSE_UNIX98_PTY + + ifdef USE_LEGACY_PTY + STDCCFLAGS += -DUSE_LEGACY_PTY + endif +else + STDCCFLAGS += -DUSE_LEGACY_PTY +endif + Added: contrib/t38modem/trunk/README =================================================================== --- contrib/t38modem/trunk/README (rev 0) +++ contrib/t38modem/trunk/README 2007-10-31 06:14:06 UTC (rev 18773) @@ -0,0 +1,347 @@ +/* + * README + * + * T38FAX Pseudo Modem + * + * Original author: Vyacheslav Frolov + * + */ + +1. Introduction +--------------- + +What is t38modem? + +From your fax or voice application view point it's a fax/voice modem pool. +From IP network view point it's a H.323 endpoint with T.38 fax support. +From your view point it's a gateway between an application and IP network. + +2. Building +----------- + +2.1. Building for Unix +---------------------- + +Building with Open H323 Library: + + $ make opt + +Building with Open Phone Abstraction Library (OPAL): + + $ make USE_OPAL=1 opt + +2.2. Building for Windows +------------------------- + +Building with Open H323 Library: + + Start Microsoft Visual C++ 2005 with t38modem_2005.vcproj file. + Set Active Configuration to "t38modem - Win32 Release". + Build t38modem.exe. + +Building with Open Phone Abstraction Library (OPAL): + + Start Microsoft Visual C++ 2005 with opal\t38modem_2005.vcproj file. + Set Active Configuration to "t38modem - Win32 Release". + Build t38modem.exe. + +3. Examples +----------- + +3.1. Starting +------------- + +Starting with Open H323 Library: + + $ ./obj_linux_x86_r/t38modem -n -o trace.log -p ttyx0,ttyx1 \ + --route 0@127.0.0.1 --route all@172.16.33.21 + +Starting with OPAL: + + $ ./obj_linux_x86_opal_r/t38modem --no-sip -n -o trace.log -p ttyx0,ttyx1 \ + --route "modem:0.*=h323:<dn!1>@127.0.0.1" \ + --route "modem:.*=h323:<dn>@172.16.33.21" \ + --route "h323:.*=modem:<dn>" + +This will create two modems (/dev/ttyx0 and /dev/ttyx1) and H.323 endpoint. +If dialed number begins with '0' then it will be routed to a local host +(leading '0' will be discarded). Other dialed numbers will be routed to +172.16.33.21. + +Q. I try to use T38modem, but after run "t38modem -p ttyx0" I get a message + "Could not open /dev/ptyx0: No such file or directory". +A. Looks like you don't have legacy PTY devices compiled in your kernel. + You need to re-compile the kernel with 'Legacy PTY Support'. + Alternatively, you can build t38modem with USE_UNIX98_PTY=1 option and use + -p +/dev/ttyx0,+/dev/ttyx1 instead of -p ttyx0,ttyx1. + +FreeBSD Users: You need to use -p ttypa,ttypb instead of -p ttyx0,ttyx1. + Remember to replace ttyx0 with ttypa and ttyx1 with ttypb + when following the rest of these instructions. + This will create two modems /dev/ttypa and /dev/ttypb. + +Windows Users: You need two COM ports connected via Null-modem cable to create one modem. + If your COM1 connected to COM2 and COM3 connected to COM4 you need to use + -p \\.\COM2,\\.\COM4 instead of -p ttyx0,ttyx1. + This will create two modems COM1 and COM3. + Q. How to use t38modem without additional COM port hardware on Windows? + A. Replace a pair of physical COM ports with a pair of virtual COM ports. + See http://com0com.sourceforge.net/ project for details. + Q. What model of modem to select in Add Hardware Wizard? + A. Select "Standard 1440 bps Modem". + +Cisco Users: You additionaly need to use --old-asn (--h323-old-asn with OPAL) and + --h245tunneldisable options. + +3.2. Testing (you need two consoles) +------------------------------------ +(FreeBSD users - remeber to use /dev/ttypa and /dev/ttypb with 'cu -l') +(Windows users - use COM1 and COM3 with HyperTerminal) + +$ cu -l /dev/ttyx0 $ cu -l /dev/ttyx1 +Connected. Connected. +<-- at <-- at +--> OK --> OK + (wait at least 10 secs) +<-- atdt012345 + + --> + --> RING + --> + --> RING + <-- ati9 + --> NDID = 12345 + --> OK + --> + --> RING + --> + --> RING + <-- ata +--> CONNECT --> CONNECT +<-- x +--> OK +<-- ath +--> OK + --> + --> ERROR +<-- at +--> OK + <-- at + --> OK +... ... + + +3.3. Example of Cisco config (loopback) +--------------------------------------- + +10.0.2.12 --> Cisco port 2:D --E1-cable--> Cisco port 3:D --> 10.0.2.12 + +dial-peer voice 3340 voip + incoming called-number 3334.... + codec g711alaw + fax rate 14400 + fax protocol t38 ls-redundancy 0 hs-redundancy 0 + +dial-peer voice 3341 pots + destination-pattern 3334.... + port 2:D + forward-digits 7 + +dial-peer voice 3342 pots + incoming called-number 334.... + direct-inward-dial + port 3:D +exit + +dial-peer voice 3343 voip + destination-pattern 334.... + session target ipv4:10.0.2.12 + codec g711alaw + fax rate 14400 + fax protocol t38 ls-redundancy 0 hs-redundancy 0 +exit + +3.4. Example of HylaFAX modem config files +------------------------------------------ + +Copy HylaFAX/etc/config.ttyx to HylaFAX's etc directory + +Create simbolic links: + +config.ttyx0 -> config.ttyx +config.ttyx1 -> config.ttyx + +Start HylaFAX with new modems: + +$ .../faxgetty -D ttyx0 +$ .../faxgetty -D ttyx1 + +(FreeBSD users - don't forget we are using ttypa and ttypb) + +4. AT commands specific to t38modem +----------------------------------- + +4.1. AT#CID command +------------------- + +4.1.1 calling/called number reporting +------------------------------------- + +#CID=0 - disables calling/called number reporting (default). +#CID=1 - Enables only calling number reporting after the first RING. +#CID=10 - Enables calling/called number reporting after the first RING. +#CID=11 - Enables only called number reporting after the first RING. + +Example: + +<-- AT#CID=10 +--> OK +--> RING +--> NMBR = <calling number> +--> NDID = <called number> +--> RING +--> RING + +4.2. ATI command +---------------- + +4.2.1 calling/called number reporting +------------------------------------- + +I8 - reports calling number for last incoming call. +I9 - reports called number for last incoming call. + +Example: + +<-- ATI8I9 +--> NMBR = <calling number> +--> NDID = <called number> +--> OK + +4.3. ATD command +---------------- + +4.3.1 T.38 mode modifiers +------------------------- + +F - enable T.38 mode request after dialing. +V - disable T.38 mode request after dialing (default). + +Examples: + +<-- ATDF<user's number> + + enables T.38 mode request after dialing but user can override it by + inserting V into <user's number>. + +<-- ATD<user's number>V + + disables T.38 mode request after dialing and user can't override it + by inserting F into <user's number>. + +4.3.2 calling/called number modifiers +------------------------------------- + +L - reset and begin of calling number. +D - continue of called number. + +If calling number is empty after processing ATD command then t38modem's +local party number used. + +Examples: + +<-- ATD<user's number> + + calling number is t38modem's local party number but user can override + it by inserting L<user's calling number> into <user's number> + +<-- ATD<user's number>L + + calling number is t38modem's local party number and user can't override + it by inserting L<user's calling number> into <user's number> + +<-- ATDL<calling number>D<user's number> + + calling number is <calling number> but user can override + it by inserting L<user's calling number> into <user's number> + +<-- ATD<user's number>L<calling number> + + calling number is <calling number> and user can't override + it by inserting L<user's calling number> into <user's number> + +4.4. AT#DFRMC command +--------------------- + +4.4.1 Set delay for CONNECT result code for AT+FRM command +---------------------------------------------------------- + +#DFRMC=0 - disable delay (default). +#DFRMC=25 - set delay to 250 ms. + +4.5. AT#HCLR command +-------------------- + +4.5.1 Set clear call mode for ATH command +----------------------------------------- + +#HCLR=0 - ATH command will not clear not answered incoming call (default). +#HCLR=1 - ATH command will clear not answered incoming call. + + + ----------------------------- + +/* + * $Log: README,v $ + * Revision 1.16 2007/07/17 10:05:26 vfrolov + * Added Unix98 PTY support + * Added OPAL example + * + * Revision 1.15 2007/05/28 13:44:53 vfrolov + * Added OPAL support + * + * Revision 1.14 2007/03/23 10:14:35 vfrolov + * Implemented voice mode functionality + * + * Revision 1.13 2007/02/22 16:00:33 vfrolov + * Implemented AT#HCLR command + * + * Revision 1.12 2007/02/21 08:21:47 vfrolov + * Added question about 'Legacy PTY Support' + * + * Revision 1.11 2005/03/04 16:41:01 vfrolov + * Implemented AT#DFRMC command + * + * Revision 1.10 2005/02/10 15:07:15 vfrolov + * Added more comments for Windows users + * + * Revision 1.9 2005/02/07 10:07:38 vfrolov + * Fixed com0com link + * Moved Log to the bottom + * + * Revision 1.8 2005/02/03 13:20:01 vfrolov + * Added comments for Windows users + * + * Revision 1.7 2002/12/19 10:41:03 vfrolov + * Added "Introduction" and "AT commands" sections and made some fixes + * + * Revision 1.6 2002/11/18 22:57:53 craigs + * Added patches from Vyacheslav Frolov for CORRIGENDUM + * + * Revision 1.5 2002/03/22 09:40:57 vfrolov + * Removed obsoleted option -f + * + * Revision 1.4 2002/01/09 16:14:58 rogerh + * FreeBSD uses /dev/ttypa and /dev/ttypb + * + * Revision 1.3 2002/01/09 16:01:03 rogerh + * Executable is called t38modem + * + * Revision 1.2 2002/01/01 23:11:49 craigs + * New version from Vyacheslav Frolov + * Removed references to unneeded OpenH323 patches + * Removed reference to -k and -m options in usage + * Change to use -route option + * + */ + Added: contrib/t38modem/trunk/audio.cxx =================================================================== --- contrib/t38modem/trunk/audio.cxx (rev 0) +++ contrib/t38modem/trunk/audio.cxx 2007-10-31 06:14:06 UTC (rev 18773) @@ -0,0 +1,373 @@ +/* + * audio.cxx + * + * T38FAX Pseudo Modem + * + * Copyright (c) 2007 Vyacheslav Frolov + * + * Open H323 Project + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (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 Open H323 Library. + * + * The Initial Developer of the Original Code is Vyacheslav Frolov + * + * Contributor(s): + * + * $Log: audio.cxx,v $ + * Revision 1.6 2007/08/27 10:52:13 vfrolov + * Fixed typo + * + * Revision 1.5 2007/05/28 12:44:24 vfrolov + * Added adaptive delay restarting + * Fixed SendOnIdle() + * + * Revision 1.4 2007/04/24 16:28:53 vfrolov + * Added more tracing + * + * Revision 1.3 2007/04/04 09:52:57 vfrolov + * Added missing lastWriteCount setting + * + * Revision 1.2 2007/03/23 14:54:19 vfrolov + * Fixed compiler warnings + * + * Revision 1.1 2007/03/23 09:54:45 vfrolov + * Initial revision + * + * + */ + +#include <ptlib.h> +#include "pmutils.h" +#include "t30tone.h" +#include "audio.h" + +/////////////////////////////////////////////////////////////// +typedef PInt16 SIMPLE_TYPE; +#define BYTES_PER_SIMPLE sizeof(SIMPLE_TYPE) +/////////////////////////////////////////////////////////////// +AudioEngine::AudioEngine(const PString &_name) + : EngineBase(_name), + sendAudio(NULL), + recvAudio(NULL), + recvUserInput(NULL), + t30Tone(NULL), + t30ToneDetect(NULL), + audioClass(FALSE) +{ +} + +AudioEngine::~AudioEngine() +{ + if (sendAudio) + delete sendAudio; + + if (recvAudio) + delete recvAudio; + + if (recvUserInput) + delete recvUserInput; + + if (t30Tone) + delete t30Tone; + + if (t30ToneDetect) + delete t30ToneDetect; +} + +BOOL AudioEngine::Attach(const PNotifier &callback) +{ + PTRACE(1, name << " AudioEngine::Attach"); + + if (!modemCallback.IsNULL()) { + myPTRACE(1, name << " AudioEngine::Attach !modemCallback.IsNULL()"); + return FALSE; + } + + readDelay.Restart(); + writeDelay.Restart(); + modemCallback = callback; + + return TRUE; +} + +void AudioEngine::Detach(const PNotifier &callback) +{ + PTRACE(1, name << " AudioEngine::Detach"); + + if (modemCallback == callback) { + modemCallback = NULL; + + PWaitAndSignal mutexWait(Mutex); + + audioClass = FALSE; + + if (sendAudio) { + delete sendAudio; + sendAudio = NULL; + } + + if (recvAudio) { + delete recvAudio; + recvAudio = NULL; + } + + if (recvUserInput) { + delete recvUserInput; + recvUserInput = NULL; + } + + if (t30Tone) { + delete t30Tone; + t30Tone = NULL; + } + + if (t30ToneDetect) { + delete t30ToneDetect; + t30ToneDetect = NULL; + } + + myPTRACE(1, name << " AudioEngine::Detach Detached"); + } else { + myPTRACE(1, name << " AudioEngine::Detach " + << (modemCallback.IsNULL() ? "Already Detached" : "modemCallback != callback")); + } +} + +void AudioEngine::ModemCallbackWithUnlock(INT extra) +{ + Mutex.Signal(); + ModemCallback(extra); + Mutex.Wait(); +} + +void AudioEngine::AudioClass(BOOL _audioClass) +{ + PWaitAndSignal mutexWait(Mutex); + + audioClass = _audioClass; + + myPTRACE(1, name << " AudioClass=" << (audioClass ? "TRUE" : "FALSE")); + + if (audioClass) { + if (!recvUserInput) + recvUserInput = new DataStream(64); + + if (!t30ToneDetect) + t30ToneDetect = new T30ToneDetect; + } else { + if (recvUserInput) { + delete recvUserInput; + recvUserInput = NULL; + } + + if (t30ToneDetect) { + delete t30ToneDetect; + t30ToneDetect = NULL; + } + } +} +/////////////////////////////////////////////////////////////// +BOOL AudioEngine::Read(void * buffer, PINDEX amount) +{ + Mutex.Wait(); + + if (sendAudio) { + BOOL wasFull = sendAudio->isFull(); + + int count = sendAudio->GetData(buffer, amount); + + if (count < 0) { + delete sendAudio; + sendAudio = NULL; + ModemCallbackWithUnlock(callbackParam); + count = 0; + } else { + if (wasFull && !sendAudio->isFull()) + ModemCallbackWithUnlock(cbpOutBufNoFull); + } + + if (amount > count) + memset((BYTE *)buffer + count, 0, amount - count); + } else { + if (t30Tone) + t30Tone->Read(buffer, amount); + else + memset(buffer, 0, amount); + } + + Mutex.Signal(); + + lastReadCount = amount; + + readDelay.Delay(amount/16); + + return TRUE; +} + +void AudioEngine::SendOnIdle(int _dataType) +{ + PTRACE(2, name << " AudioEngine::SendOnIdle " << _dataType); + + PWaitAndSignal mutexWaitModem(MutexModem); + PWaitAndSignal mutexWait(Mutex); + + if (t30Tone) { + delete t30Tone; + t30Tone = NULL; + } + + switch (_dataType) { + case dtCng: + t30Tone = new T30Tone(T30Tone::cng); + break; + case dtNone: + break; + default: + PTRACE(1, name << " AudioEngine::SendOnIdle dataType(" << _dataType << ") is not supported"); + } +} + +BOOL AudioEngine::SendStart(int PTRACE_PARAM(_dataType), int PTRACE_PARAM(param)) +{ + PWaitAndSignal mutexWaitModem(MutexModem); + PWaitAndSignal mutexWait(Mutex); + + sendAudio = new DataStream(1024*2); + + PTRACE(3, name << " AudioEngine::SendStart _dataType=" << _dataType + << " param=" << param); + + return TRUE; +} + +int AudioEngine::Send(const void *pBuf, PINDEX count) +{ + PWaitAndSignal mutexWaitModem(MutexModem); + PWaitAndSignal mutexWait(Mutex); + + if (sendAudio) + sendAudio->PutData(pBuf, count); + + return count; +} + +BOOL AudioEngine::SendStop(BOOL PTRACE_PARAM(moreFrames), int _callbackParam) +{ + PWaitAndSignal mutexWaitModem(MutexModem); + PWaitAndSignal mutexWait(Mutex); + + if (sendAudio) + sendAudio->PutEof(); + + callbackParam = _callbackParam; + + PTRACE(3, name << " AudioEngine::SendStop moreFrames=" << moreFrames + << " callbackParam=" << callbackParam); + + return TRUE; +} + +BOOL AudioEngine::isOutBufFull() const +{ + PWaitAndSignal mutexWait(Mutex); + + return sendAudio && sendAudio->isFull(); +} +/////////////////////////////////////////////////////////////// +BOOL AudioEngine::Write(const void * buffer, PINDEX len) +{ + Mutex.Wait(); + + if (recvAudio && !recvAudio->isFull()) { + recvAudio->PutData(buffer, len); + ModemCallbackWithUnlock(callbackParam); + } + + BOOL cng = t30ToneDetect && t30ToneDetect->Write(buffer, len); + + Mutex.Signal(); + + if (cng) + WriteUserInput('c'); + + lastWriteCount = len; + + writeDelay.Delay(len/16); + + return TRUE; +} + +BOOL AudioEngine::RecvWait(int /*_dataType*/, int /*param*/, int /*_callbackParam*/, BOOL &done) +{ + done = TRUE; + return TRUE; +} + +BOOL AudioEngine::RecvStart(int _callbackParam) +{ + PWaitAndSignal mutexWaitModem(MutexModem); + PWaitAndSignal mutexWait(Mutex); + + recvAudio = new DataStream(1024*2); + callbackParam = _callbackParam; + + return TRUE; +} + +int AudioEngine::Recv(void * pBuf, PINDEX count) +{ + PWaitAndSignal mutexWaitModem(MutexModem); + PWaitAndSignal mutexWait(Mutex); + + if (!recvAudio) + return -1; + + return recvAudio->GetData(pBuf, count); +} + +void AudioEngine::RecvStop() +{ + PWaitAndSignal mutexWaitModem(MutexModem); + PWaitAndSignal mutexWait(Mutex); + + if (recvAudio) { + delete recvAudio; + recvAudio = NULL; + } +} + +void AudioEngine::WriteUserInput(const PString & value) +{ + myPTRACE(1, name << " AudioEngine::WriteUserInput " << value); + + PWaitAndSignal mutexWait(Mutex); + + if (recvUserInput && !recvUserInput->isFull()) { + recvUserInput->PutData((const char *)value, value.GetLength()); + + ModemCallbackWithUnlock(cbpUserInput); + } +} + +int AudioEngine::RecvUserInput(void * pBuf, PINDEX count) +{ + PWaitAndSignal mutexWaitModem(MutexModem); + PWaitAndSignal mutexWait(Mutex); + + if (!recvUserInput) + return -1; + + return recvUserInput->GetData(pBuf, count); +} +/////////////////////////////////////////////////////////////// + Added: contrib/t38modem/trunk/audio.h =================================================================== --- contrib/t38modem/trunk/audio.h (rev 0) +++ contrib/t38modem/trunk/audio.h 2007-10-31 06:14:06 UTC (rev 18773) @@ -0,0 +1,95 @@ +/* + * audio.h + * + * T38FAX Pseudo Modem + * + * Copyright (c) 2007 Vyacheslav Frolov + * + * Open H323 Project + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (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 Open H323 Library. + * + * The Initial Developer of the Original Code is Vyacheslav Frolov + * + * Contributor(s): + * + * $Log: audio.h,v $ + * Revision 1.1 2007/03/23 09:54:45 vfrolov + * Initial revision + * + * + */ + +#ifndef _PM_AUDIO_H +#define _PM_AUDIO_H + +#include <ptclib/delaychan.h> +#include "enginebase.h" + +/////////////////////////////////////////////////////////////// +class DataStream; +class T30Tone; +class T30ToneDetect; +/////////////////////////////////////////////////////////////// +class AudioEngine : public PChannel, public EngineBase +{ + PCLASSINFO(AudioEngine, PChannel); + + public: + + AudioEngine(const PString &_name = ""); + ~AudioEngine(); + + BOOL Attach(const PNotifier &callback); + void Detach(const PNotifier &callback); + void ModemCallbackWithUnlock(INT extra); + void AudioClass(BOOL _audioClass); + + BOOL Read(void * buffer, PINDEX amount); + void SendOnIdle(int _dataType); + BOOL SendStart(int _dataType, int param); + int Send(const void *pBuf, PINDEX count); + BOOL SendStop(BOOL moreFrames, int _callbackParam); + BOOL isOutBufFull() const; + + BOOL Write(const void * buffer, PINDEX len); + BOOL RecvWait(int _dataType, int param, int _callbackParam, BOOL &done); + BOOL RecvStart(int _callbackParam); + int Recv(void *pBuf, PINDEX count); + void RecvStop(); + void WriteUserInput(const PString & value); + int RecvUserInput(void * pBuf, PINDEX count); + + protected: + + PAdaptiveDelay readDelay; + PAdaptiveDelay writeDelay; + + int callbackParam; + + DataStream *volatile sendAudio; + DataStream *volatile recvAudio; + + DataStream *volatile recvUserInput; + + T30Tone *volatile t30Tone; + T30ToneDetect *volatile t30ToneDetect; + + BOOL audioClass; + + PMutex Mutex; +}; +/////////////////////////////////////////////////////////////// + +#endif // _PM_AUDIO_H + Added: contrib/t38modem/trunk/dle.cxx =================================================================== --- contrib/t38modem/trunk/dle.cxx (rev 0) +++ contrib/t38modem/trunk/dle.cxx 2007-10-31 06:14:06 UTC (rev 18773) @@ -0,0 +1,193 @@ +/* + * dle.cxx + * + * T38FAX Pseudo Modem + * + * Copyright (c) 2001-2007 Vyacheslav Frolov + * + * Open H323 Project + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (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 Open H323 Library. + * + * The Initial Developer of the Original Code is Vyacheslav Frolov + * + * Contributor(s): Equivalence Pty ltd + * + * $Log: dle.cxx,v $ + * Revision 1.10 2007/03/23 09:48:23 vfrolov + * Added deleting DLE shielded codes + * + * Revision 1.9 2007/03/22 16:26:04 vfrolov + * Fixed compiler warnings + * + * Revision 1.8 2004/10/27 13:18:03 vfrolov + * Fixed compiler warning + * + * Revision 1.7 2004/10/22 13:34:20 vfrolov + * Fixed buffer overflow + * + * Revision 1.6 2004/07/06 16:07:24 vfrolov + * Included ptlib.h for precompiling + * + * Revision 1.5 2003/12/04 13:22:22 vfrolov + * Removed ambiguous isEof() + * Improved memory usage in DataStream + * Fixed myPTRACE + * + * Revision 1.4 2003/01/08 16:37:22 vfrolov + * Changed class DataStream: + * members moved to private section and added isEof() + * added threshold and isFull() + * + * Revision 1.3 2002/04/19 14:29:26 vfrolov + * Added Copyright header + * + * Revision 1.2 2002/01/10 06:10:02 craigs + * Added MPL header + * + * + * Revision 1.1 2002/01/01 23:06:54 craigs + * Initial version + * + */ + +#include <ptlib.h> +#include "dle.h" + +/////////////////////////////////////////////////////////////// + +#define new PNEW + +/////////////////////////////////////////////////////////////// +static BYTE BitRevTable[256]; + +static BOOL initBitRevTable() +{ + for( unsigned i = 0 ; i < sizeof(BitRevTable) ; i++ ) { + unsigned in = i, out = 0; + for( int j = 0 ; j < 8 ; j++ ) { + out <<= 1; + out += in & 1; + in >>= 1; + } + BitRevTable[i] = (BYTE)out; + } + return TRUE; +} + +static const BOOL ___InitBitRevTable = initBitRevTable(); +/////////////////////////////////////////////////////////////// +enum { + ETX = 0x03, + DLE = 0x10, +}; +/////////////////////////////////////////////////////////////// +int DLEData::PutDleData(const void *pBuf, PINDEX count) +{ + if (PutData(NULL, 0) < 0) + return -1; + + PINDEX cRest = count; + const BYTE *p = (const BYTE *)pBuf; + + while( cRest > 0 ) { + const BYTE *pScan = p; + PINDEX cScan = cRest; + + if (dle) { + dle = FALSE; + if (*p != DLE) { + if (*p == ETX) { + PutEof(); + cRest--; + break; + } + + p++; + cRest--; + } + pScan++; + cScan--; + } + + const BYTE *pDle = (const BYTE *)memchr(pScan, DLE, cScan); + + PINDEX cPut; + PINDEX cDone; + + if( pDle ) { + dle = TRUE; + cPut = PINDEX(pDle - p); + cDone = cPut + 1; // skip DLE + } else { + cDone = cPut = cRest; + } + + if( cPut ) { + if( bitRev ) { + BYTE tmp[1024]; + while( cPut ) { + PINDEX cTmp = cPut > 1024 ? 1024 : cPut; + for( PINDEX i = 0 ; i < cTmp ; i++ ) { + tmp[i] = BitRevTable[p[i]]; + } + PutData(tmp, cTmp); + cPut -= cTmp; + } + } else { + PutData(p, cPut); + } + } + p += cDone; + cRest -= cDone; + } + + return count - cRest; +} + +int DLEData::GetDleData(void *pBuf, PINDEX count) +{ + if (recvEtx) + return -1; + + BYTE *p = (BYTE *)pBuf; + int done; + + for (done = 0 ; (count - done) >= 4 ; done = int(p - (BYTE *)pBuf)) { + PINDEX cGet = (count - done - 2) / 2; + BYTE tmp[1024]; + + if (cGet > (PINDEX)sizeof(tmp)) + cGet = sizeof(tmp); + + switch( cGet = GetData(tmp, cGet) ) { + case -1: + *p++ = DLE; + *p++ = ETX; + recvEtx = TRUE; + return int(p - (BYTE *)pBuf); + case 0: + return int(p - (BYTE *)pBuf); + default: + for( PINDEX i = 0 ; i < cGet ; i++ ) { + BYTE b = bitRev ? BitRevTable[tmp[i]] : tmp[i]; + if( b == DLE ) + *p++ = DLE; + *p++ = b; + } + } + } + return done; +} +/////////////////////////////////////////////////////////////// + Added: contrib/t38modem/trunk/dle.h =================================================================== --- contrib/t38modem/trunk/dle.h (rev 0) +++ contrib/t38modem/trunk/dle.h 2007-10-31 06:14:06 UTC (rev 18773) @@ -0,0 +1,68 @@ +/* + * dle.h + * + * T38FAX Pseudo Modem + * + * Copyright (c) 2001-2002 Vyacheslav Frolov + * + * Open H323 Project + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (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 Open H323 Library. + * + * The Initial Developer of the Original Code is Vyacheslav Frolov + * + * Contributor(s): Equivalence Pty ltd + * + * $Log: dle.h,v $ + * Revision 1.3 2002/04/19 14:29:30 vfrolov + * Added Copyright header + * + * Revision 1.2 2002/01/10 06:10:02 craigs + * Added MPL header + * + * Revision 1.1 2002/01/01 23:06:54 craigs + * Initial version + * + */ + +#ifndef _DLE_H +#define _DLE_H + +#include "pmutils.h" + +/////////////////////////////////////////////////////////////// +class DLEData : public DataStream +{ + PCLASSINFO(DLEData, DataStream); + public: + DLEData() : dle(FALSE), recvEtx(FALSE), bitRev(FALSE) { } + + int PutDleData(const void *pBuf, PINDEX count); + int GetDleData(void *pBuf, PINDEX count); + + void BitRev(BOOL _bitRev) { bitRev = _bitRev; } + + virtual void Clean() { + DataStream::Clean(); + dle = recvEtx = bitRev = FALSE; + } + protected: + + BOOL dle; + BOOL recvEtx; + BOOL bitRev; +}; +/////////////////////////////////////////////////////////////// + +#endif // _DLE_H + Added: contrib/t38modem/trunk/drivers.cxx =================================================================== --- contrib/t38modem/trunk/drivers.cxx (rev 0) +++ contrib/t38modem/trunk/drivers.cxx 2007-10-31 06:14:06 UTC (rev 18773) @@ -0,0 +1,185 @@ +/* + * drivers.cxx + * + * T38FAX Pseudo Modem + * + * Copyright (c) 2004-2007 Vyacheslav Frolov + * + * Open H323 Project + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (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 Open H323 Library. + * + * The Initial Developer of the Original Code is Vyacheslav Frolov + * + * Contributor(s): + * + * $Log: drivers.cxx,v $ + * Revision 1.3 2007/01/29 12:44:41 vfrolov + * Added ability to put args to drivers + * + * Revision 1.2 2004/07/07 13:45:17 vfrolov + * Added C0C driver for Windows + * + * Revision 1.1 2004/07/07 12:38:32 vfrolov + * The code for pseudo-tty (pty) devices that communicates with fax application formed to PTY driver. + * + * + */ + +#include <ptlib.h> +#include "pmodemi.h" +#include "drivers.h" +#include "drv_pty.h" +#include "drv_c0c.h" + +/////////////////////////////////////////////////////////////// + +#define new PNEW + +/////////////////////////////////////////////////////////////// + +static int numDrivers = 0; + +/////////////////////////////////////////////////////////////// +#define MAX_DRIVERS 10 + +static struct { + const char *name; + BOOL (*CheckTty)( + const PString &_tty + ); + PString (*ArgSpec)(); + PStringArray (*Description)(); + PseudoModem *(*CreatePseudoModem)( + const PString &tty, + const PString &route, + const PConfigArgs &args, + const PNotifier &callbackEndPoint + ); +} drivers[MAX_DRIVERS]; + +static int addDriver( + const char *name, + BOOL (*CheckTty)( + const PString &_tty + ), + PString (*ArgSpec)(), + PStringArray (*Description)(), + PseudoModem *(*CreatePseudoModem)( + const PString &tty, + const PString &route, + const PConfigArgs &args, + const PNotifier &callbackEndPoint + ) +) +{ + if (numDrivers >= MAX_DRIVERS) + return -1; + + drivers[numDrivers].name = name; + drivers[numDrivers].CheckTty = CheckTty; + drivers[numDrivers].ArgSpec = ArgSpec; + drivers[numDrivers].Description = Description; + drivers[numDrivers].CreatePseudoModem = CreatePseudoModem; + return numDrivers++; +} + +/////////////////////////////////////////////////////////////// +#define DECLARE_MODEM_DRIVER(name, suffix) \ + static PseudoModem *CreatePseudoModem##suffix( \ + const PString &tty, \ + const PString &route, \ + const PConfigArgs &args, \ + const PNotifier &callbackEndPoint) \ + { \ + return new \ + PseudoModem##suffix(tty, route, args, callbackEndPoint);\ + } \ + static const int ___addDriver##suffix = addDriver( \ + name, \ + &PseudoModem##suffix::CheckTty, \ + &PseudoModem##suffix::ArgSpec, \ + &PseudoModem##suffix::Description, \ + &CreatePseudoModem##suffix \ + ); \ + +/////////////////////////////////////////////////////////////// +#ifdef MODEM_DRIVER_Pty + DECLARE_MODEM_DRIVER("PTY", Pty) +#endif +#ifdef MODEM_DRIVER_C0C + DECLARE_MODEM_DRIVER("C0C", C0C) +#endif +/////////////////////////////////////////////////////////////// +PseudoModem *PseudoModemDrivers::CreateModem( + const PString &tty, + const PString &route, + const PConfigArgs &args, + const PNotifier &callbackEndPoint +) +{ + PseudoModem *modem = NULL; + + for (int i = 0 ; i < numDrivers ; i++) { + if (drivers[i].CheckTty(tty)) { + modem = drivers[i].CreatePseudoModem(tty, route, args, callbackEndPoint); + + if (!modem) { + myPTRACE(1, "PseudoModemDrivers::CreateModem " << tty << " was not created"); + return NULL; + } + break; + } + } + + if (!modem) { + myPTRACE(1, "PseudoModemDrivers::CreateModem " << tty << " is not a valid value"); + return NULL; + } + + if (!modem->IsValid()) { + myPTRACE(1, "PseudoModemDrivers::CreateModem " << tty << " is not valid"); + delete modem; + return NULL; + } + + return modem; +} + +PString PseudoModemDrivers::ArgSpec() +{ + PString argSpec; + + for (int i = 0 ; i < numDrivers ; i++) + argSpec += drivers[i].ArgSpec(); + + return argSpec; +} + +PStringArray PseudoModemDrivers::Descriptions() +{ + PStringArray descriptions; + + for (int i = 0 ; i < numDrivers ; i++) { + descriptions.Append(new PString(drivers[i].name)); + + PStringArray description = drivers[i].Description(); + + for (PINDEX j = 0 ; j < description.GetSize() ; j++) + descriptions.Append(new PString(PString(" ") + description[j])); + } + + return descriptions; +} +/////////////////////////////////////////////////////////////// + Added: contrib/t38modem/trunk/drivers.h =================================================================== --- contrib/t38modem/trunk/drivers.h (rev 0) +++ contrib/t38modem/trunk/drivers.h 2007-10-31 06:14:06 UTC (rev 18773) @@ -0,0 +1,59 @@ +/* + * drivers.h + * + * T38FAX Pseudo Modem + * + * Copyright (c) 2004-2007 Vyacheslav Frolov + * + * Open H323 Project + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (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 Open H323 Library. + * + * The Initial Developer of the Original Code is Vyacheslav Frolov + * + * Contributor(s): + * + * $Log: drivers.h,v $ + * Revision 1.2 2007/01/29 12:44:41 vfrolov + * Added ability to put args to drivers + * + * Revision 1.1 2004/07/07 12:38:32 vfrolov + * The code for pseudo-tty (pty) devices that communicates with fax application formed to PTY driver. + * + * + */ + +#ifndef _DRIVERS_H +#define _DRIVERS_H + +/////////////////////////////////////////////////////////////// +class PseudoModem; + +class PseudoModemDrivers : protected PObject +{ + PCLASSINFO(PseudoModemDrivers, PObject); + public: + static PseudoModem *CreateModem( + const PString &tty, + const PString &route, + const PConfigArgs &args, + const PNotifier &callbackEndPoint + ); + + static PString ArgSpec(); + static PStringArray Descriptions(); +}; +/////////////////////////////////////////////////////////////// + +#endif // _DRIVERS_H + Added: contrib/t38modem/trunk/drv_c0c.cxx =================================================================== --- contrib/t38modem/trunk/drv_c0c.cxx (rev 0) +++ contrib/t38modem/trunk/drv_c0c.cxx 2007-10-31 06:14:06 UTC (rev 18773) @@ -0,0 +1,872 @@ +/* + * drv_c0c.cxx + * + * T38FAX Pseudo Modem + * + * Copyright (c) 2004-2007 Vyacheslav Frolov + * + * Open H323 Project + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (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 Open H323 Library. + * + * The Initial Developer of the Original Code is Vyacheslav Frolov + * + * Contributor(s): + * + * $Log: drv_c0c.cxx,v $ + * Revision 1.8 2007/03/30 11:01:12 vfrolov + * Replaced strerror() by FormatMessage() + * + * Revision 1.7 2007/03/22 16:22:25 vfrolov + * Added some changes + * + * Revision 1.6 2007/01/29 12:44:41 vfrolov + * Added ability to put args to drivers + * + * Revision 1.5 2005/03/03 16:12:46 vfrolov + * Fixed potential handle leak + * Fixed compiler warnings + * + * Revision 1.4 2005/02/10 15:04:57 vfrolov + * Disabled I/C calls for closed ports + * + * Revision 1.3 2004/10/20 14:00:16 vfrolov + * Fixed race condition with SignalDataReady()/WaitDataReady() + * + * Revision 1.2 2004/08/30 12:11:33 vfrolov + * Enabled input XON/XOFF control + * + * Revision 1.1 2004/07/07 13:36:46 vfrolov + * Initial revision + * + * + */ + +#include <ptlib.h> +#include "drv_c0c.h" + +#ifdef MODEM_DRIVER_C0C + +#define new PNEW + +////////////////////////////////////////////////////////////// +class UniC0C : public ModemThreadChild +{ + PCLASSINFO(UniC0C, ModemThreadChild); + public: + UniC0C(PseudoModemC0C &_parent, HANDLE _hC0C); + protected: + PseudoModemC0C &Parent() { return (PseudoModemC0C &)parent; } + HANDLE hC0C; +}; +/////////////////////////////////////////////////////////////// +class InC0C : public UniC0C +{ + PCLASSINFO(InC0C, UniC0C); + public: + InC0C(PseudoModemC0C &_parent, HANDLE _hC0C); + protected: + virtual void Main(); +}; +/////////////////////////////////////////////////////////////// +class OutC0C : public UniC0C +{ + PCLASSINFO(OutC0C, UniC0C); + public: + OutC0C(PseudoModemC0C &_parent, HANDLE _hC0C); + protected: + virtual void Main(); +}; +/////////////////////////////////////////////////////////////// +UniC0C::UniC0C(PseudoModemC0C &_parent, HANDLE _hC0C) + : ModemThreadChild(_parent), + hC0C(_hC0C) +{ +} +/////////////////////////////////////////////////////////////// +#if PTRACING +static PString strError(DWORD err) +{ + LPVOID pMsgBuf; + + FormatMessage( + FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + err, + MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), + (LPTSTR) &pMsgBuf, + 0, + NULL); + + PString str((const char *)pMsgBuf); + + LocalFree(pMsgBuf); + + return str.Trim() + " (" + PString(err) + ")"; +} + +static void TraceLastError(const PString &head) +{ + DWORD err = ::GetLastError(); + myPTRACE(1, head << " ERROR " << strError(err)); +} +#else +#define TraceLastError(head) +#endif +/////////////////////////////////////////////////////////////// +static void CloseEvents(int num, HANDLE *hEvents) +{ + for (int i = 0 ; i < num ; i++) { + if (hEvents[i]) { + if (!::CloseHandle(hEvents[i])) { + TraceLastError("CloseEvents() CloseHandle()"); + } + hEvents[i] = NULL; + } + } +} + +static BOOL PrepareEvents(int num, HANDLE *hEvents, OVERLAPPED *overlaps) +{ + memset(hEvents, 0, num * sizeof(HANDLE)); + memset(overlaps, 0, num * sizeof(OVERLAPPED)); + + for (int i = 0 ; i < num ; i++) { + overlaps[i].hEvent = hEvents[i] = ::CreateEvent(NULL, TRUE, FALSE, NULL); + if (!hEvents[i]) { + TraceLastError("PrepareEvents() CreateEvent()"); + CloseEvents(i, hEvents); + return FALSE; + } + } + return TRUE; +} + +static BOOL myClearCommError(HANDLE hC0C, DWORD *pErrors) +{ + if (!ClearCommError(hC0C, pErrors, NULL)) { + TraceLastError("ClearCommError()"); + return FALSE; + } + return TRUE; +} + +static BOOL myGetCommState(HANDLE hC0C, DCB *dcb) +{ + dcb->DCBlength = sizeof(*dcb); + + if (!GetCommState(hC0C, dcb)) { + TraceLastError("GetCommState()"); + return FALSE; + } + return TRUE; +} + +static BOOL mySetCommState(HANDLE hC0C, DCB *dcb) +{ + if (!SetCommState(hC0C, dcb)) { + TraceLastError("SetCommState()"); + return FALSE; + } + return TRUE; +} +/////////////////////////////////////////////////////////////// +InC0C::InC0C(PseudoModemC0C &_parent, HANDLE _hC0C) + : UniC0C(_parent, _hC0C) +{ +} + +void InC0C::Main() +{ + RenameCurrentThread(Parent().ptyName() + "(i)"); + myPTRACE(1, "--> Started"); + + enum { + EVENT_READ, + EVENT_STAT, + EVENT_NUM + }; + + HANDLE hEvents[EVENT_NUM]; + OVERLAPPED overlaps[EVENT_NUM]; + + if (!PrepareEvents(EVENT_NUM, hEvents, overlaps)) + SignalStop(); + + if (!SetCommMask(hC0C, EV_CTS|EV_DSR|EV_BREAK)) { + TraceLastError("SetCommMask()"); + SignalStop(); + } + + char cbuf[32]; + DWORD cbufRead = 0; + BOOL waitingRead = FALSE; + DWORD maskStat = 0; + BOOL waitingStat = FALSE; + DWORD lastErrors; + + if (!myClearCommError(hC0C, &lastErrors)) + SignalStop(); + + for (;;) { + if (stop) + break; + + if (!waitingRead) { + if (!ReadFile(hC0C, cbuf, sizeof(cbuf), &cbufRead, &overlaps[EVENT_READ])) { + DWORD err = ::GetLastError(); + if (err != ERROR_IO_PENDING) { + myPTRACE(1, "ReadFile() ERROR " << strError(err)); + SignalStop(); + break; + } + waitingRead = TRUE; + } + } + + if (!waitingStat) { + if (!WaitCommEvent(hC0C, &maskStat, &overlaps[EVENT_STAT])) { + DWORD err = ::GetLastError(); + if (err != ERROR_IO_PENDING) { + myPTRACE(1, "WaitCommEvent() ERROR " << strError(err)); + SignalStop(); + break; + } + waitingStat = TRUE; + } + + DWORD stat; + + if (!GetCommModemStatus(hC0C, &stat)) { + TraceLastError("GetCommModemStatus()"); + SignalStop(); + break; + } + + if (!(stat & MS_DSR_ON)) { + myPTRACE(1, "DSR is OFF"); + Parent().reset = FALSE; + SignalStop(); + break; + } + + DWORD errors; + + if (!myClearCommError(hC0C, &errors)) { + SignalStop(); + break; + } + + DWORD changedErrors = lastErrors^errors; + + if (changedErrors & CE_BREAK) { + if ((errors & CE_BREAK)) { + myPTRACE(1, "BREAK is detected"); + SignalStop(); + break; + } + } + lastErrors = errors; + } + + if (waitingRead && waitingStat) { + DWORD undef; + + switch (WaitForMultipleObjects(EVENT_NUM, hEvents, FALSE, 5000)) { + case WAIT_OBJECT_0 + EVENT_READ: + if (!GetOverlappedResult(hC0C, &overlaps[EVENT_READ], &cbufRead, FALSE)) { + TraceLastError("GetOverlappedResult(EVENT_READ)"); + SignalStop(); + } + waitingRead = FALSE; + break; + case WAIT_OBJECT_0 + EVENT_STAT: + if (!GetOverlappedResult(hC0C, &overlaps[EVENT_STAT], &undef, FALSE)) { + TraceLastError("GetOverlappedResult(EVENT_STAT)"); + SignalStop(); + } + waitingStat = FALSE; + PTRACE(6, "EVENT_STAT " << hex << maskStat); + break; + case WAIT_TIMEOUT: + break; + default: + TraceLastError("WaitForMultipleObjects()"); + SignalStop(); + } + if (stop) + break; + } + + if (!waitingRead && cbufRead) { + PTRACE(6, "--> " << PRTHEX(PBYTEArray((const BYTE *)cbuf, cbufRead))); + Parent().ToInPtyQ(cbuf, cbufRead); + cbufRead = 0; + } + } + + CancelIo(hC0C); + + CloseEvents(EVENT_NUM, hEvents); + + myPTRACE(1, "--> Stopped" << GetThreadTimes(", CPU usage: ")); +} +/////////////////////////////////////////////////////////////// +OutC0C::OutC0C(PseudoModemC0C &_parent, HANDLE _hC0C) + : UniC0C(_parent, _hC0C) +{ +} + +void OutC0C::Main() +{ + RenameCurrentThread(Parent().ptyName() + "(o)"); + myPTRACE(1, "<-- Started"); + + enum { + EVENT_WRITE, + EVENT_NUM + }; + + HANDLE hEvents[EVENT_NUM]; + OVERLAPPED overlaps[EVENT_NUM]; + + if (!PrepareEvents(EVENT_NUM, hEvents, overlaps)) + SignalStop(); + + PBYTEArray *buf = NULL; + PINDEX done = 0; + DWORD written = 0; + BOOL waitingWrite = FALSE; + + for(;;) { + while (!buf) { + if (stop) + break; + buf = Parent().FromOutPtyQ(); + if (buf) { + done = 0; + break; + } + WaitDataReady(); + } + + if (stop) + break; + + if (!waitingWrite) { + if (!WriteFile(hC0C, (const BYTE *)*buf + done, buf->GetSize() - done, &written, &overlaps[EVENT_WRITE])) { + DWORD err = ::GetLastError(); + if (err != ERROR_IO_PENDING) { + myPTRACE(1, "WriteFile() ERROR " << strError(err)); + SignalStop(); + break; + } + waitingWrite = TRUE; + } + } + + if (waitingWrite) { + switch (WaitForMultipleObjects(EVENT_NUM, hEvents, FALSE, 5000)) { + case WAIT_OBJECT_0 + EVENT_WRITE: + if (!GetOverlappedResult(hC0C, &overlaps[EVENT_WRITE], &written, FALSE)) { + TraceLastError("GetOverlappedResult()"); + SignalStop(); + } + waitingWrite = FALSE; + break; + case WAIT_TIMEOUT: + myPTRACE(6, "TIMEOUT"); + break; + default: + TraceLastError("WaitForMultipleObjects()"); + SignalStop(); + } + if (stop) + break; + } + + if (!waitingWrite && written) { + PTRACE(6, "<-- " << PRTHEX(PBYTEArray((const BYTE *)*buf + done, written))); + + done += written; + + if (buf->GetSize() <= done) { + if (buf->GetSize() < done) { + myPTRACE(1, "<-- " << buf->GetSize() << "(size) < (done)" << done << " " << written); + } + delete buf; + buf = NULL; + } + written = 0; + } + } + + CancelIo(hC0C); + + if (buf) { + if (buf->GetSize() != done) + myPTRACE(1, "<-- Not sent " << PRTHEX(PBYTEArray((const BYTE *)*buf + done, buf->GetSize() - done))); + delete buf; + } + + CloseEvents(EVENT_NUM, hEvents); + + myPTRACE(1, "<-- Stopped" << GetThreadTimes(", CPU usage: ")); +} +/////////////////////////////////////////////////////////////// +PseudoModemC0C::PseudoModemC0C( + const PString &_tty, + const PString &_route, + const PConfigArgs &/*args*/, + const PNotifier &_callbackEndPoint) + + : PseudoModemBody(_route, _callbackEndPoint), + hC0C(INVALID_HANDLE_VALUE), + inC0C(NULL), + outC0C(NULL), + ready(FALSE) +{ + if (CheckTty(_tty)) { + ptypath = _tty; + ptyname = &ptypath[4]; + valid = TRUE; + } else { + myPTRACE(1, "PseudoModemC0C::PseudoModemC0C bad on " << _tty); + valid = FALSE; + } +} + +PseudoModemC0C::~PseudoModemC0C() +{ + reset = TRUE; + StopAll(); + CloseC0C(); +} + +inline const char *ttyPrefix() +{ + return "\\\\.\\"; +} + +BOOL PseudoModemC0C::CheckTty(const PString &_tty) +{ + return _tty.Find(ttyPrefix()) == 0 && _tty != ttyPrefix(); +} + +PString PseudoModemC0C::ArgSpec() +{ + return ""; +} + +PStringArray PseudoModemC0C::Description() +{ + PStringArray description; + + description.Append(new PString("Uses serial port to communicate with fax application.")); + description.Append(new PString(PString("The tty format is ") + ttyPrefix() + "port.")); + + return description; +} + +BOOL PseudoModemC0C::IsReady() const +{ + return ready && PseudoModemBody::IsReady(); +} + +const PString &PseudoModemC0C::ttyPath() const +{ + return ptypath; +} + +ModemThreadChild *PseudoModemC0C::GetPtyNotifier() +{ + return outC0C; +} + +BOOL PseudoModemC0C::StartAll() +{ + reset = TRUE; + + if (IsOpenC0C() + && (inC0C = new InC0C(*this, hC0C)) != NULL + && (outC0C = new OutC0C(*this, hC0C)) != NULL + && (PseudoModemBody::StartAll()) + ) { + inC0C->Resume(); + outC0C->Resume(); + ready = TRUE; + return TRUE; + } + StopAll(); + return FALSE; +} + +void PseudoModemC0C::StopAll() +{ + ready = FALSE; + + if (inC0C) { + inC0C->SignalStop(); + inC0C->WaitForTerminati... [truncated message content] |
From: <cso...@us...> - 2007-10-31 06:06:47
|
Revision: 18772 http://opalvoip.svn.sourceforge.net/opalvoip/?rev=18772&view=rev Author: csoutheren Date: 2007-10-30 23:06:51 -0700 (Tue, 30 Oct 2007) Log Message: ----------- Created folder remotely Added Paths: ----------- contrib/t38modem/tags/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |