diff --git a/libs/unimrcp/.update b/libs/unimrcp/.update
index a1c014671d..2c9225f323 100644
--- a/libs/unimrcp/.update
+++ b/libs/unimrcp/.update
@@ -1 +1 @@
-Mon Nov 23 10:00:46 CST 2009
+Mon Feb 22 09:40:01 CST 2010
diff --git a/libs/unimrcp/INSTALL b/libs/unimrcp/INSTALL
index b29a738be6..b410e158ae 100644
--- a/libs/unimrcp/INSTALL
+++ b/libs/unimrcp/INSTALL
@@ -63,14 +63,23 @@ use the "--with-sofia-sip=" option.
For example
$ ./configure --with-sofia-sip=/usr/local/sofia-sip
+To cross-compile for 64-bit platform use
+CFLAGS=-m64 CXXFLAGS=-m64 LDFLAGS=-m64 ./configure
+
+To cross-compile for 32-bit platform use
+CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 ./configure
+
To install the default configuration use
+$ cd conf
$ make def-conf
-To generate doxygen documentation from the sources use
+To install the default data use
+$ cd data
+$ make def-data
+
+To generate doxygen documentation from the source use
$ make dox
-To build distribution tarball use
-$ make dist
WINDOWS BUILD
@@ -100,7 +109,10 @@ sofiasip.vsprops
/>
Build procedure
-Open unimrcp.sln solution file and build the solution (Build -> Build Solution).
+- open unimrcp.sln solution file
+- choose an appropriate solution platform (Build -> Configuration Manager) either win32 or x64
+- choose an appropriate solution configuration (Build -> Configuration Manager) either Debug or Release
+- build the solution (Build -> Build Solution)
One-time pre-run output directory preparation
Build prepare.vcproj utility project (right click on tools -> prebuild in
@@ -112,5 +124,6 @@ Output directory layout
bin - binaries (unimrcpserver, unimrcpclient) and all the required dlls
conf - configuration files
data - data files
+lib - libraries
log - log files
plugin - run-time loadable modules
diff --git a/libs/unimrcp/Makefile.am b/libs/unimrcp/Makefile.am
index d2609d008f..eeb00cecb4 100644
--- a/libs/unimrcp/Makefile.am
+++ b/libs/unimrcp/Makefile.am
@@ -14,29 +14,13 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure $(AUX_DIST)
ACLOCAL = aclocal -I $(macrodir)
-SUBDIRS = libs modules plugins platforms build
+SUBDIRS = conf data libs modules plugins platforms build
if TEST_SUITES
SUBDIRS += tests
endif
dox:
doxygen $(top_srcdir)/docs/doxygen.conf
-
-def-conf:
- test -d $(confdir) || $(mkinstalldirs) $(confdir)
- for conffile in `find conf -name \*.xml` ; do \
- filename=`echo $$conffile | sed -e 's|^.*/||'`; \
- $(INSTALL) -m 644 conf/$$filename $(confdir); \
- done
-
-def-data:
- test -d $(datadir) || $(mkinstalldirs) $(datadir)
- for datafile in `find data -name *.pcm -o -name *.xml -o -name *.jsgf -o -name *.txt` ; do \
- filename=`echo $$datafile | sed -e 's|^.*/||'`; \
- $(INSTALL) -m 644 data/$$filename $(datadir); \
- done
-
+
install-data-local:
- test -d $(confdir) || $(MAKE) def-conf
- test -d $(datadir) || $(MAKE) def-data
test -d $(logdir) || $(mkinstalldirs) $(logdir)
diff --git a/libs/unimrcp/README b/libs/unimrcp/README
index bcd2daedd8..57834050a4 100644
--- a/libs/unimrcp/README
+++ b/libs/unimrcp/README
@@ -1,6 +1,6 @@
INTRODUCTION
============
-UniMRCP - Open Source Media Resource Control Protocol Stack.
+UniMRCP is an open source MRCP Project.
INSTALLATION
@@ -21,7 +21,7 @@ Website:
http://www.unimrcp.org
Project Home:
- http://code.google.com/p/unimrcp/
+ http://code.google.com/p/unimrcp
Wiki:
http://code.google.com/p/unimrcp/w/list
@@ -33,7 +33,7 @@ Discussion Group:
http://groups.google.com/group/unimrcp
Version Control Repository (SVN):
- http://unimrcp.googlecode.com/svn/trunk/
+ http://unimrcp.googlecode.com/svn/trunk
UML Documentation File (Enterpise Architect):
http://unimrcp.googlecode.com/svn/misc/unimrcp.eap
@@ -48,4 +48,4 @@ LICENSING
UniMRCP is licensed under terms of the Apache 2.0 license.
See the file "LICENSE" for more information.
-Copyright 2008 Arsen Chaloyan
+Copyright 2008 - 2010 Arsen Chaloyan
diff --git a/libs/unimrcp/build/Makefile.am b/libs/unimrcp/build/Makefile.am
index 76d10e564a..dfacd94fc1 100644
--- a/libs/unimrcp/build/Makefile.am
+++ b/libs/unimrcp/build/Makefile.am
@@ -1,3 +1,5 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = pkgconfig
+
+include_HEADERS = uni_version.h
diff --git a/libs/unimrcp/build/tools/prepare.vcproj b/libs/unimrcp/build/tools/prepare.vcproj
index 2708a8648a..370cabb3f6 100644
--- a/libs/unimrcp/build/tools/prepare.vcproj
+++ b/libs/unimrcp/build/tools/prepare.vcproj
@@ -11,6 +11,9 @@
+
@@ -25,7 +28,7 @@
>
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/build/tools/preparesphinx.vcproj b/libs/unimrcp/build/tools/preparesphinx.vcproj
index 8012033516..1e274a4365 100644
--- a/libs/unimrcp/build/tools/preparesphinx.vcproj
+++ b/libs/unimrcp/build/tools/preparesphinx.vcproj
@@ -11,6 +11,9 @@
+
@@ -59,6 +62,54 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/build/tools/unimrcpservice.vcproj b/libs/unimrcp/build/tools/unimrcpservice.vcproj
index 6aff3bf649..0b3f899e18 100644
--- a/libs/unimrcp/build/tools/unimrcpservice.vcproj
+++ b/libs/unimrcp/build/tools/unimrcpservice.vcproj
@@ -10,6 +10,9 @@
+
@@ -17,7 +20,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/build/uni_version.h b/libs/unimrcp/build/uni_version.h
index 07b10a7d7c..4d5500c9fb 100644
--- a/libs/unimrcp/build/uni_version.h
+++ b/libs/unimrcp/build/uni_version.h
@@ -39,7 +39,7 @@
* Minor API changes that do not cause binary compatibility problems.
* Reset to 0 when upgrading UNI_MAJOR_VERSION
*/
-#define UNI_MINOR_VERSION 8
+#define UNI_MINOR_VERSION 9
/** patch level
* The Patch Level never includes API changes, simply bug fixes.
diff --git a/libs/unimrcp/build/vsprops/apr.vsprops b/libs/unimrcp/build/vsprops/apr.vsprops
index 43f5440142..a37045dcd8 100644
--- a/libs/unimrcp/build/vsprops/apr.vsprops
+++ b/libs/unimrcp/build/vsprops/apr.vsprops
@@ -9,10 +9,6 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""$(AprDir)\include";"$(AprUtilDir)\include""
/>
-
-
diff --git a/libs/unimrcp/build/vsprops/mpf.vsprops b/libs/unimrcp/build/vsprops/mpf.vsprops
index f03cdcc3d9..6e051d8607 100644
--- a/libs/unimrcp/build/vsprops/mpf.vsprops
+++ b/libs/unimrcp/build/vsprops/mpf.vsprops
@@ -10,8 +10,4 @@
AdditionalIncludeDirectories=""$(ProjectRootDir)libs\mpf\include""
PreprocessorDefinitions="MPF_STATIC_LIB"
/>
-
diff --git a/libs/unimrcp/build/vsprops/mrcp.vsprops b/libs/unimrcp/build/vsprops/mrcp.vsprops
index bbb759e793..c51b241a53 100644
--- a/libs/unimrcp/build/vsprops/mrcp.vsprops
+++ b/libs/unimrcp/build/vsprops/mrcp.vsprops
@@ -10,8 +10,4 @@
AdditionalIncludeDirectories=""$(ProjectRootDir)libs\mrcp\include";"$(ProjectRootDir)libs\mrcp\message\include";"$(ProjectRootDir)libs\mrcp\control\include";"$(ProjectRootDir)libs\mrcp\resources\include""
PreprocessorDefinitions="MRCP_STATIC_LIB"
/>
-
diff --git a/libs/unimrcp/build/vsprops/mrcpclient.vsprops b/libs/unimrcp/build/vsprops/mrcpclient.vsprops
index 5a51b5923d..0a866442f2 100644
--- a/libs/unimrcp/build/vsprops/mrcpclient.vsprops
+++ b/libs/unimrcp/build/vsprops/mrcpclient.vsprops
@@ -9,8 +9,4 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""$(ProjectRootDir)libs\mrcp-client\include""
/>
-
diff --git a/libs/unimrcp/build/vsprops/mrcpengine.vsprops b/libs/unimrcp/build/vsprops/mrcpengine.vsprops
index e57efb7ae4..5108cf30d3 100644
--- a/libs/unimrcp/build/vsprops/mrcpengine.vsprops
+++ b/libs/unimrcp/build/vsprops/mrcpengine.vsprops
@@ -9,8 +9,4 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""$(ProjectRootDir)libs\mrcp-engine\include""
/>
-
diff --git a/libs/unimrcp/build/vsprops/mrcpserver.vsprops b/libs/unimrcp/build/vsprops/mrcpserver.vsprops
index 1965a90880..11932f804c 100644
--- a/libs/unimrcp/build/vsprops/mrcpserver.vsprops
+++ b/libs/unimrcp/build/vsprops/mrcpserver.vsprops
@@ -9,8 +9,4 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""$(ProjectRootDir)libs\mrcp-server\include""
/>
-
diff --git a/libs/unimrcp/build/vsprops/mrcpsignaling.vsprops b/libs/unimrcp/build/vsprops/mrcpsignaling.vsprops
index 64d7e14ced..170a8ea14d 100644
--- a/libs/unimrcp/build/vsprops/mrcpsignaling.vsprops
+++ b/libs/unimrcp/build/vsprops/mrcpsignaling.vsprops
@@ -9,8 +9,4 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""$(ProjectRootDir)libs\mrcp-signaling\include""
/>
-
diff --git a/libs/unimrcp/build/vsprops/mrcpv2transport.vsprops b/libs/unimrcp/build/vsprops/mrcpv2transport.vsprops
index 481d85b047..88d046158d 100644
--- a/libs/unimrcp/build/vsprops/mrcpv2transport.vsprops
+++ b/libs/unimrcp/build/vsprops/mrcpv2transport.vsprops
@@ -9,8 +9,4 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""$(ProjectRootDir)libs\mrcpv2-transport\include""
/>
-
diff --git a/libs/unimrcp/build/vsprops/sofiasip.vsprops b/libs/unimrcp/build/vsprops/sofiasip.vsprops
index afc8057a8a..d9a5ad8fe2 100644
--- a/libs/unimrcp/build/vsprops/sofiasip.vsprops
+++ b/libs/unimrcp/build/vsprops/sofiasip.vsprops
@@ -9,10 +9,6 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""$(SofiaDir)\win32";"$(SofiaDir)\libsofia-sip-ua\su";"$(SofiaDir)\libsofia-sip-ua\nua";"$(SofiaDir)\libsofia-sip-ua\url";"$(SofiaDir)\libsofia-sip-ua\sip";"$(SofiaDir)\libsofia-sip-ua\msg";"$(SofiaDir)\libsofia-sip-ua\sdp";"$(SofiaDir)\libsofia-sip-ua\nta";"$(SofiaDir)\libsofia-sip-ua\nea";"$(SofiaDir)\libsofia-sip-ua\soa";"$(SofiaDir)\libsofia-sip-ua\iptsec";"$(SofiaDir)\libsofia-sip-ua\bnf";"$(SofiaDir)\libsofia-sip-ua\features""
/>
-
-
+
+
+
diff --git a/libs/unimrcp/build/vsprops/unibin.vsprops b/libs/unimrcp/build/vsprops/unibin.vsprops
new file mode 100644
index 0000000000..016f9973db
--- /dev/null
+++ b/libs/unimrcp/build/vsprops/unibin.vsprops
@@ -0,0 +1,15 @@
+
+
+
+
diff --git a/libs/unimrcp/build/vsprops/unidebug.vsprops b/libs/unimrcp/build/vsprops/unidebug.vsprops
index 0f67b7427c..0cbede51a2 100644
--- a/libs/unimrcp/build/vsprops/unidebug.vsprops
+++ b/libs/unimrcp/build/vsprops/unidebug.vsprops
@@ -13,12 +13,11 @@
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
- DebugInformationFormat="4"
+ DebugInformationFormat="3"
/>
diff --git a/libs/unimrcp/build/vsprops/unilib-x64.vsprops b/libs/unimrcp/build/vsprops/unilib-x64.vsprops
new file mode 100644
index 0000000000..6faab05c08
--- /dev/null
+++ b/libs/unimrcp/build/vsprops/unilib-x64.vsprops
@@ -0,0 +1,13 @@
+
+
+
+
diff --git a/libs/unimrcp/build/vsprops/unilib.vsprops b/libs/unimrcp/build/vsprops/unilib.vsprops
new file mode 100644
index 0000000000..32ea070327
--- /dev/null
+++ b/libs/unimrcp/build/vsprops/unilib.vsprops
@@ -0,0 +1,13 @@
+
+
+
+
diff --git a/libs/unimrcp/build/vsprops/unimrcpclient.vsprops b/libs/unimrcp/build/vsprops/unimrcpclient.vsprops
index de020ae1b9..613b2ff02f 100644
--- a/libs/unimrcp/build/vsprops/unimrcpclient.vsprops
+++ b/libs/unimrcp/build/vsprops/unimrcpclient.vsprops
@@ -9,10 +9,6 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""$(ProjectRootDir)platforms\libunimrcp-client\include";"$(ProjectRootDir)build""
/>
-
-
+
+
+
diff --git a/libs/unimrcp/build/vsprops/uniplugin.vsprops b/libs/unimrcp/build/vsprops/uniplugin.vsprops
new file mode 100644
index 0000000000..a794952a06
--- /dev/null
+++ b/libs/unimrcp/build/vsprops/uniplugin.vsprops
@@ -0,0 +1,16 @@
+
+
+
+
diff --git a/libs/unimrcp/build/vsprops/unirtsp.vsprops b/libs/unimrcp/build/vsprops/unirtsp.vsprops
index b5dede2b33..b46259472a 100644
--- a/libs/unimrcp/build/vsprops/unirtsp.vsprops
+++ b/libs/unimrcp/build/vsprops/unirtsp.vsprops
@@ -10,8 +10,4 @@
AdditionalIncludeDirectories=""$(ProjectRootDir)libs\uni-rtsp\include""
PreprocessorDefinitions="RTSP_STATIC_LIB"
/>
-
diff --git a/libs/unimrcp/conf/Makefile.am b/libs/unimrcp/conf/Makefile.am
new file mode 100644
index 0000000000..9241bbe561
--- /dev/null
+++ b/libs/unimrcp/conf/Makefile.am
@@ -0,0 +1,11 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+def-conf:
+ test -d $(confdir) || $(mkinstalldirs) $(confdir)
+ for conffile in `find ./ -name \*.xml` ; do \
+ filename=`echo $$conffile | sed -e 's|^.*/||'`; \
+ $(INSTALL) -m 644 $$filename $(confdir); \
+ done
+
+install-data-local:
+ test -d $(confdir) || $(MAKE) def-conf
diff --git a/libs/unimrcp/conf/umcscenarios.xml b/libs/unimrcp/conf/umcscenarios.xml
index ab02487165..a9f1ce67cb 100644
--- a/libs/unimrcp/conf/umcscenarios.xml
+++ b/libs/unimrcp/conf/umcscenarios.xml
@@ -6,6 +6,7 @@ Currently available scenarios are
2. class="Recognizer"
3. class="Recorder"
4. class="DtmfRecofnizer"
+5. class="Params"
More than one scenario of the same type (class) can be defined.
The name (not class) of the scenario is used to run it from console.
@@ -88,6 +89,8 @@ For instance,
-->
+
+
-
+
diff --git a/libs/unimrcp/conf/unimrcpserver.xml b/libs/unimrcp/conf/unimrcpserver.xml
index 7e7c094e27..b48e58a6e8 100644
--- a/libs/unimrcp/conf/unimrcpserver.xml
+++ b/libs/unimrcp/conf/unimrcpserver.xml
@@ -44,7 +44,7 @@
-
+
diff --git a/libs/unimrcp/configure.ac b/libs/unimrcp/configure.ac
index 4a819402c4..1ba581189b 100644
--- a/libs/unimrcp/configure.ac
+++ b/libs/unimrcp/configure.ac
@@ -3,7 +3,7 @@
AC_PREREQ(2.57)
-AC_INIT([unimrcp],[0.8.0])
+AC_INIT([unimrcp],[0.9.0])
AC_CONFIG_AUX_DIR([build])
AC_CONFIG_MACRO_DIR([build/acmacros])
@@ -216,6 +216,8 @@ AC_CONFIG_FILES([
build/pkgconfig/unimrcpclient.pc
build/pkgconfig/unimrcpserver.pc
build/pkgconfig/unimrcpplugin.pc
+ conf/Makefile
+ data/Makefile
])
AC_OUTPUT
diff --git a/libs/unimrcp/data/Makefile.am b/libs/unimrcp/data/Makefile.am
new file mode 100644
index 0000000000..b8a3d4d2d9
--- /dev/null
+++ b/libs/unimrcp/data/Makefile.am
@@ -0,0 +1,11 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+def-data:
+ test -d $(datadir) || $(mkinstalldirs) $(datadir)
+ for datafile in `find ./ -name \*.pcm -o -name \*.xml -o -name \*.jsgf -o -name \*.txt` ; do \
+ filename=`echo $$datafile | sed -e 's|^.*/||'`; \
+ $(INSTALL) -m 644 $$filename $(datadir); \
+ done
+
+install-data-local:
+ test -d $(datadir) || $(MAKE) def-data
diff --git a/libs/unimrcp/docs/doxygen.conf b/libs/unimrcp/docs/doxygen.conf
index 32b0b23eaf..8b375cefd9 100644
--- a/libs/unimrcp/docs/doxygen.conf
+++ b/libs/unimrcp/docs/doxygen.conf
@@ -21,6 +21,7 @@ STRIP_CODE_COMMENTS=NO
FULL_PATH_NAMES=NO
CASE_SENSE_NAMES=NO
+EXCLUDE=platforms/umc platforms/libasr-client platforms/asr-client
EXCLUDE_PATTERNS="*/acconfig.h" \
"*/test/*" \
"*/arch/*"
diff --git a/libs/unimrcp/libs/apr-toolkit/aprtoolkit.vcproj b/libs/unimrcp/libs/apr-toolkit/aprtoolkit.vcproj
index 66d8386294..9ea77e93a6 100644
--- a/libs/unimrcp/libs/apr-toolkit/aprtoolkit.vcproj
+++ b/libs/unimrcp/libs/apr-toolkit/aprtoolkit.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/libs/apr-toolkit/include/apt_log.h b/libs/unimrcp/libs/apr-toolkit/include/apt_log.h
index aee0adb219..ea2c561331 100644
--- a/libs/unimrcp/libs/apr-toolkit/include/apt_log.h
+++ b/libs/unimrcp/libs/apr-toolkit/include/apt_log.h
@@ -77,7 +77,7 @@ typedef enum {
typedef enum {
APT_LOG_OUTPUT_NONE = 0x00, /**< disable logging */
APT_LOG_OUTPUT_CONSOLE = 0x01, /**< enable console output */
- APT_LOG_OUTPUT_FILE = 0x02, /**< enable log file output */
+ APT_LOG_OUTPUT_FILE = 0x02 /**< enable log file output */
} apt_log_output_e;
/** Opaque logger declaration */
diff --git a/libs/unimrcp/libs/apr-toolkit/include/apt_pair.h b/libs/unimrcp/libs/apr-toolkit/include/apt_pair.h
index 9921ae0fa7..36b74dfbaa 100644
--- a/libs/unimrcp/libs/apr-toolkit/include/apt_pair.h
+++ b/libs/unimrcp/libs/apr-toolkit/include/apt_pair.h
@@ -22,7 +22,7 @@
* @brief Generic Name-Value Pair
*/
-#include "apr_tables.h"
+#include
#include "apt_string.h"
APT_BEGIN_EXTERN_C
diff --git a/libs/unimrcp/libs/apr-toolkit/include/apt_string.h b/libs/unimrcp/libs/apr-toolkit/include/apt_string.h
index 9d0a7c9be6..31dd72c0b4 100644
--- a/libs/unimrcp/libs/apr-toolkit/include/apt_string.h
+++ b/libs/unimrcp/libs/apr-toolkit/include/apt_string.h
@@ -26,6 +26,9 @@
APT_BEGIN_EXTERN_C
+/** Empty string */
+#define APT_EMPTY_STRING ""
+
/** String declaration */
typedef struct apt_str_t apt_str_t;
@@ -44,6 +47,27 @@ static APR_INLINE void apt_string_reset(apt_str_t *str)
str->length = 0;
}
+/** Get string buffer. */
+static APR_INLINE const char* apt_string_buffer_get(const apt_str_t *str)
+{
+ if(str->buf) {
+ return str->buf;
+ }
+ return APT_EMPTY_STRING;
+}
+
+/** Get string length. */
+static APR_INLINE apr_size_t apt_string_length_get(const apt_str_t *str)
+{
+ return str->length;
+}
+
+/** Check whether string is empty. */
+static APR_INLINE apr_size_t apt_string_is_empty(const apt_str_t *str)
+{
+ return str->length ? TRUE : FALSE;
+}
+
/**
* Set NULL terminated string.
* @param str the destination string
diff --git a/libs/unimrcp/libs/apr-toolkit/include/apt_text_stream.h b/libs/unimrcp/libs/apr-toolkit/include/apt_text_stream.h
index 3a5a224aa3..e9e40cad5b 100644
--- a/libs/unimrcp/libs/apr-toolkit/include/apt_text_stream.h
+++ b/libs/unimrcp/libs/apr-toolkit/include/apt_text_stream.h
@@ -42,16 +42,21 @@ typedef struct apt_text_stream_t apt_text_stream_t;
/** Text stream is used for message parsing and generation */
struct apt_text_stream_t {
/** Text stream */
- apt_str_t text;
- /** Current position in the buffer */
- char *pos;
+ apt_str_t text;
+
+ /** Current position in the stream */
+ char *pos;
+ /** End of stream pointer */
+ const char *end;
+ /** Is end of stream reached */
+ apt_bool_t is_eos;
};
/**
* Navigate through the lines of the text stream (message).
* @param stream the text stream to navigate
* @param line the read line to return
- * @return TRUE if the length of the line > 0, otherwise FALSE
+ * @return TRUE if the line is successfully read, otherwise FALSE
*/
APT_DECLARE(apt_bool_t) apt_text_line_read(apt_text_stream_t *stream, apt_str_t *line);
@@ -59,7 +64,7 @@ APT_DECLARE(apt_bool_t) apt_text_line_read(apt_text_stream_t *stream, apt_str_t
* Navigate through the headers (name:value pairs) of the text stream (message).
* @param stream the text stream to navigate
* @param pair the read pair to return
- * @return TRUE if the length of the read name > 0, otherwise FALSE
+ * @return TRUE if the header is successfully read, otherwise FALSE
*/
APT_DECLARE(apt_bool_t) apt_text_header_read(apt_text_stream_t *stream, apt_pair_t *pair);
@@ -115,12 +120,20 @@ static APR_INLINE apt_bool_t apt_string_value_generate(const apt_str_t *str, apt
return TRUE;
}
+/** Reset navigation related data of the text stream */
+static APR_INLINE void apt_text_stream_reset(apt_text_stream_t *stream)
+{
+ stream->pos = stream->text.buf;
+ stream->end = stream->text.buf + stream->text.length;
+ stream->is_eos = FALSE;
+}
+
/** Initialize text stream */
static APR_INLINE void apt_text_stream_init(apt_text_stream_t *stream, char *buffer, apr_size_t size)
{
stream->text.buf = buffer;
stream->text.length = size;
- stream->pos = stream->text.buf;
+ apt_text_stream_reset(stream);
}
/** Insert end of the line symbol(s) */
@@ -159,8 +172,7 @@ static APR_INLINE void apt_text_char_skip(apt_text_stream_t *stream, char ch)
/** Check whether end of stream is reached */
static APR_INLINE apt_bool_t apt_text_is_eos(const apt_text_stream_t *stream)
{
- const char *end = stream->text.buf + stream->text.length;
- return (stream->pos >= end) ? TRUE : FALSE;
+ return (stream->pos >= stream->end || stream->is_eos == TRUE) ? TRUE : FALSE;
}
/** Scroll text stream */
diff --git a/libs/unimrcp/libs/apr-toolkit/src/apt_log.c b/libs/unimrcp/libs/apr-toolkit/src/apt_log.c
index a78e61c54c..4ad91a996b 100644
--- a/libs/unimrcp/libs/apr-toolkit/src/apt_log.c
+++ b/libs/unimrcp/libs/apr-toolkit/src/apt_log.c
@@ -227,33 +227,34 @@ APT_DECLARE(apt_bool_t) apt_log(const char *file, int line, apt_log_priority_e p
static apt_bool_t apt_do_log(const char *file, int line, apt_log_priority_e priority, const char *format, va_list arg_ptr)
{
char log_entry[MAX_LOG_ENTRY_SIZE];
+ apr_size_t max_size = MAX_LOG_ENTRY_SIZE - 2;
apr_size_t offset = 0;
apr_time_exp_t result;
apr_time_t now = apr_time_now();
apr_time_exp_lt(&result,now);
if(apt_logger->header & APT_LOG_HEADER_DATE) {
- offset += apr_snprintf(log_entry+offset,MAX_LOG_ENTRY_SIZE-offset,"%4d-%02d-%02d ",
+ offset += apr_snprintf(log_entry+offset,max_size-offset,"%4d-%02d-%02d ",
result.tm_year+1900,
result.tm_mon+1,
result.tm_mday);
}
if(apt_logger->header & APT_LOG_HEADER_TIME) {
- offset += apr_snprintf(log_entry+offset,MAX_LOG_ENTRY_SIZE-offset,"%02d:%02d:%02d:%06d ",
+ offset += apr_snprintf(log_entry+offset,max_size-offset,"%02d:%02d:%02d:%06d ",
result.tm_hour,
result.tm_min,
result.tm_sec,
result.tm_usec);
}
if(apt_logger->header & APT_LOG_HEADER_MARK) {
- offset += apr_snprintf(log_entry+offset,MAX_LOG_ENTRY_SIZE-offset,"%s:%03d ",file,line);
+ offset += apr_snprintf(log_entry+offset,max_size-offset,"%s:%03d ",file,line);
}
if(apt_logger->header & APT_LOG_HEADER_PRIORITY) {
memcpy(log_entry+offset,priority_snames[priority],MAX_PRIORITY_NAME_LENGTH);
offset += MAX_PRIORITY_NAME_LENGTH;
}
- offset += apr_vsnprintf(log_entry+offset,MAX_LOG_ENTRY_SIZE-offset,format,arg_ptr);
+ offset += apr_vsnprintf(log_entry+offset,max_size-offset,format,arg_ptr);
log_entry[offset++] = '\n';
log_entry[offset] = '\0';
if((apt_logger->mode & APT_LOG_OUTPUT_CONSOLE) == APT_LOG_OUTPUT_CONSOLE) {
@@ -269,7 +270,7 @@ static apt_bool_t apt_do_log(const char *file, int line, apt_log_priority_e prio
static const char* apt_log_file_path_make(apt_log_file_data_t *file_data)
{
char *log_file_path = NULL;
- const char *log_file_name = apr_psprintf(file_data->pool,"%s-%d.log",file_data->log_file_name,file_data->cur_file_index);
+ const char *log_file_name = apr_psprintf(file_data->pool,"%s-%"APR_SIZE_T_FMT".log",file_data->log_file_name,file_data->cur_file_index);
apr_filepath_merge(&log_file_path,file_data->log_dir_path,log_file_name,0,file_data->pool);
return log_file_path;
}
diff --git a/libs/unimrcp/libs/apr-toolkit/src/apt_pair.c b/libs/unimrcp/libs/apr-toolkit/src/apt_pair.c
index 982ab1093a..29eb60e4d9 100644
--- a/libs/unimrcp/libs/apr-toolkit/src/apt_pair.c
+++ b/libs/unimrcp/libs/apr-toolkit/src/apt_pair.c
@@ -80,7 +80,7 @@ APT_DECLARE(int) apt_pair_array_size_get(const apt_pair_arr_t *arr)
APT_DECLARE(const apt_pair_t*) apt_pair_array_get(const apt_pair_arr_t *arr, int id)
{
if(id < arr->nelts) {
- return (apt_pair_t*)arr->elts + id;
+ return &APR_ARRAY_IDX(arr,id,apt_pair_t);
}
return NULL;
}
diff --git a/libs/unimrcp/libs/apr-toolkit/src/apt_task.c b/libs/unimrcp/libs/apr-toolkit/src/apt_task.c
index 355a7a62c9..9d7014d592 100644
--- a/libs/unimrcp/libs/apr-toolkit/src/apt_task.c
+++ b/libs/unimrcp/libs/apr-toolkit/src/apt_task.c
@@ -363,9 +363,17 @@ APT_DECLARE(apt_bool_t) apt_task_child_terminate(apt_task_t *task)
while(elem) {
child_task = apt_list_elem_object_get(elem);
if(child_task) {
+#ifdef ENABLE_SIMULT_TASK_TERMINATION
+ if(child_task->thread_handle) {
+ apr_thread_detach(child_task->thread_handle);
+ child_task->thread_handle = NULL;
+ }
if(apt_task_terminate(child_task,FALSE) == TRUE) {
task->pending_term++;
}
+#else
+ apt_task_terminate(child_task,TRUE);
+#endif
}
elem = apt_list_next_elem_get(task->child_tasks,elem);
}
@@ -375,6 +383,7 @@ APT_DECLARE(apt_bool_t) apt_task_child_terminate(apt_task_t *task)
if(task->vtable.on_terminate_complete) {
task->vtable.on_terminate_complete(task);
}
+#ifdef ENABLE_SIMULT_TASK_TERMINATION
if(task->parent_task) {
if(task->msg_pool) {
apt_task_msg_t *msg = apt_task_msg_acquire(task->msg_pool);
@@ -384,6 +393,7 @@ APT_DECLARE(apt_bool_t) apt_task_child_terminate(apt_task_t *task)
apt_task_msg_signal(task->parent_task,msg);
}
}
+#endif
}
return TRUE;
}
@@ -434,5 +444,7 @@ static void* APR_THREAD_FUNC apt_task_run(apr_thread_t *thread_handle, void *dat
if(task->vtable.on_post_run) {
task->vtable.on_post_run(task);
}
+
+ apr_thread_exit(thread_handle,APR_SUCCESS);
return NULL;
}
diff --git a/libs/unimrcp/libs/apr-toolkit/src/apt_text_stream.c b/libs/unimrcp/libs/apr-toolkit/src/apt_text_stream.c
index a276063301..5617dff6fa 100644
--- a/libs/unimrcp/libs/apr-toolkit/src/apt_text_stream.c
+++ b/libs/unimrcp/libs/apr-toolkit/src/apt_text_stream.c
@@ -29,34 +29,40 @@
APT_DECLARE(apt_bool_t) apt_text_line_read(apt_text_stream_t *stream, apt_str_t *line)
{
char *pos = stream->pos;
- const char *end = stream->text.buf + stream->text.length;
- apt_bool_t eol = FALSE;
+ apt_bool_t status = FALSE;
line->length = 0;
line->buf = pos;
/* while not end of stream */
- while(pos < end) {
+ while(pos < stream->end) {
if(*pos == APT_TOKEN_CR) {
/* end of line detected */
line->length = pos - line->buf;
pos++;
- if(pos < end && *pos == APT_TOKEN_LF) {
+ if(pos < stream->end && *pos == APT_TOKEN_LF) {
pos++;
}
- eol = TRUE;
+ status = TRUE;
break;
}
else if(*pos == APT_TOKEN_LF) {
/* end of line detected */
line->length = pos - line->buf;
pos++;
- eol = TRUE;
+ status = TRUE;
break;
}
pos++;
}
- stream->pos = pos;
- return eol;
+ if(status == TRUE) {
+ /* advance stream pos */
+ stream->pos = pos;
+ }
+ else {
+ /* end of stream is reached, do not advance stream pos, but set is_eos flag */
+ stream->is_eos = TRUE;
+ }
+ return status;
}
/** Navigate through the headers (name:value pairs) of the text stream (message)
@@ -74,12 +80,11 @@ APT_DECLARE(apt_bool_t) apt_text_line_read(apt_text_stream_t *stream, apt_str_t
APT_DECLARE(apt_bool_t) apt_text_header_read(apt_text_stream_t *stream, apt_pair_t *pair)
{
char *pos = stream->pos;
- const char *end = stream->text.buf + stream->text.length;
- apt_bool_t eol = FALSE;
+ apt_bool_t status = FALSE;
apt_string_reset(&pair->name);
apt_string_reset(&pair->value);
/* while not end of stream */
- while(pos < end) {
+ while(pos < stream->end) {
if(*pos == APT_TOKEN_CR) {
/* end of line detected */
if(pair->value.buf) {
@@ -87,10 +92,10 @@ APT_DECLARE(apt_bool_t) apt_text_header_read(apt_text_stream_t *stream, apt_pair
pair->value.length = pos - pair->value.buf;
}
pos++;
- if(pos < end && *pos == APT_TOKEN_LF) {
+ if(pos < stream->end && *pos == APT_TOKEN_LF) {
pos++;
}
- eol = TRUE;
+ status = TRUE;
break;
}
else if(*pos == APT_TOKEN_LF) {
@@ -100,7 +105,7 @@ APT_DECLARE(apt_bool_t) apt_text_header_read(apt_text_stream_t *stream, apt_pair
pair->value.length = pos - pair->value.buf;
}
pos++;
- eol = TRUE;
+ status = TRUE;
break;
}
else if(!pair->name.length) {
@@ -122,9 +127,21 @@ APT_DECLARE(apt_bool_t) apt_text_header_read(apt_text_stream_t *stream, apt_pair
pos++;
}
- stream->pos = pos;
- /* if length == 0 && buf -> header is malformed */
- return (eol && (pair->name.length || !pair->name.buf));
+ if(status == TRUE) {
+ /* advance stream pos regardless it's a valid header or not */
+ stream->pos = pos;
+
+ /* if length == 0 && buf => header is malformed */
+ if(!pair->name.length && pair->name.buf) {
+ status = FALSE;
+ }
+ }
+ else {
+ /* end of stream is reached, do not advance stream pos, but set is_eos flag */
+ stream->is_eos = TRUE;
+ }
+
+ return status;
}
@@ -132,17 +149,16 @@ APT_DECLARE(apt_bool_t) apt_text_header_read(apt_text_stream_t *stream, apt_pair
APT_DECLARE(apt_bool_t) apt_text_field_read(apt_text_stream_t *stream, char separator, apt_bool_t skip_spaces, apt_str_t *field)
{
char *pos = stream->pos;
- const char *end = stream->text.buf + stream->text.length;
if(skip_spaces == TRUE) {
- while(pos < end && *pos == APT_TOKEN_SP) pos++;
+ while(pos < stream->end && *pos == APT_TOKEN_SP) pos++;
}
field->buf = pos;
field->length = 0;
- while(pos < end && *pos != separator) pos++;
+ while(pos < stream->end && *pos != separator) pos++;
field->length = pos - field->buf;
- if(pos < end) {
+ if(pos < stream->end) {
/* skip the separator */
pos++;
}
@@ -216,16 +232,19 @@ APT_DECLARE(apt_bool_t) apt_text_header_name_generate(const apt_str_t *name, apt
static apt_bool_t apt_pair_parse(apt_pair_t *pair, const apt_str_t *field, apr_pool_t *pool)
{
apt_text_stream_t stream;
+ apt_str_t item;
stream.text = *field;
- stream.pos = stream.text.buf;
+ apt_text_stream_reset(&stream);
/* read name */
- if(apt_text_field_read(&stream,'=',TRUE,&pair->name) == FALSE) {
+ if(apt_text_field_read(&stream,'=',TRUE,&item) == FALSE) {
return FALSE;
}
+ apt_string_copy(&pair->name,&item,pool);
/* read value */
- apt_text_field_read(&stream,';',TRUE,&pair->value);
+ apt_text_field_read(&stream,';',TRUE,&item);
+ apt_string_copy(&pair->value,&item,pool);
return TRUE;
}
@@ -240,7 +259,7 @@ APT_DECLARE(apt_bool_t) apt_pair_array_parse(apt_pair_arr_t *arr, const apt_str_
}
stream.text = *value;
- stream.pos = stream.text.buf;
+ apt_text_stream_reset(&stream);
/* read name-value pairs */
while(apt_text_field_read(&stream,';',TRUE,&field) == TRUE) {
pair = apr_array_push(arr);
@@ -342,7 +361,7 @@ APT_DECLARE(apt_bool_t) apt_float_value_generate(float value, apt_text_stream_t
}
/* remove trailing 0s (if any) */
- end = stream->pos + length -1;
+ end = stream->pos + length - 1;
while(*end == 0x30 && end != stream->pos) end--;
stream->pos = end + 1;
diff --git a/libs/unimrcp/libs/mpf/include/mpf_dtmf_generator.h b/libs/unimrcp/libs/mpf/include/mpf_dtmf_generator.h
index e5c8548bd6..21953c2b5a 100644
--- a/libs/unimrcp/libs/mpf/include/mpf_dtmf_generator.h
+++ b/libs/unimrcp/libs/mpf/include/mpf_dtmf_generator.h
@@ -60,8 +60,8 @@ typedef struct mpf_dtmf_generator_t mpf_dtmf_generator_t;
MPF_DECLARE(struct mpf_dtmf_generator_t *) mpf_dtmf_generator_create_ex(
const struct mpf_audio_stream_t *stream,
enum mpf_dtmf_generator_band_e band,
- apr_size_t tone_ms,
- apr_size_t silence_ms,
+ apr_uint32_t tone_ms,
+ apr_uint32_t silence_ms,
struct apr_pool_t *pool);
/**
diff --git a/libs/unimrcp/libs/mpf/include/mpf_frame.h b/libs/unimrcp/libs/mpf/include/mpf_frame.h
index 3abba6e282..c5b45a6e61 100644
--- a/libs/unimrcp/libs/mpf/include/mpf_frame.h
+++ b/libs/unimrcp/libs/mpf/include/mpf_frame.h
@@ -40,7 +40,7 @@ typedef enum {
MPF_MARKER_NONE, /**< none */
MPF_MARKER_START_OF_EVENT, /**< start of event */
MPF_MARKER_END_OF_EVENT, /**< end of event */
- MPF_MARKER_NEW_SEGMENT, /**< start of new segment (long-lasting events) */
+ MPF_MARKER_NEW_SEGMENT /**< start of new segment (long-lasting events) */
} mpf_frame_marker_e;
/** Media frame declaration */
diff --git a/libs/unimrcp/libs/mpf/include/mpf_rtcp_packet.h b/libs/unimrcp/libs/mpf/include/mpf_rtcp_packet.h
index b43e4a1213..6773807fcd 100644
--- a/libs/unimrcp/libs/mpf/include/mpf_rtcp_packet.h
+++ b/libs/unimrcp/libs/mpf/include/mpf_rtcp_packet.h
@@ -87,9 +87,9 @@ struct rtcp_header_t {
struct rtcp_sdes_item_t {
/** type of item (rtcp_sdes_type_t) */
apr_byte_t type;
- /* length of item (in octets) */
+ /** length of item (in octets) */
apr_byte_t length;
- /* text, not null-terminated */
+ /** text, not null-terminated */
char data[1];
};
@@ -97,6 +97,7 @@ struct rtcp_sdes_item_t {
struct rtcp_packet_t {
/** common header */
rtcp_header_t header;
+ /** union of RTCP reports */
union {
/** sender report (SR) */
struct {
diff --git a/libs/unimrcp/libs/mpf/include/mpf_rtp_descriptor.h b/libs/unimrcp/libs/mpf/include/mpf_rtp_descriptor.h
index d7fe3afedc..906a3c339c 100644
--- a/libs/unimrcp/libs/mpf/include/mpf_rtp_descriptor.h
+++ b/libs/unimrcp/libs/mpf/include/mpf_rtp_descriptor.h
@@ -97,10 +97,11 @@ struct mpf_jb_config_t {
apr_byte_t adaptive;
};
+/** RTCP BYE transmission policy */
typedef enum {
RTCP_BYE_DISABLE, /**< disable RTCP BYE transmission */
RTCP_BYE_PER_SESSION, /**< transmit RTCP BYE at the end of session */
- RTCP_BYE_PER_TALKSPURT, /**< transmit RTCP BYE at the end of each talkspurt (input) */
+ RTCP_BYE_PER_TALKSPURT /**< transmit RTCP BYE at the end of each talkspurt (input) */
} rtcp_bye_policy_e;
/** RTP config */
diff --git a/libs/unimrcp/libs/mpf/include/mpf_rtp_stat.h b/libs/unimrcp/libs/mpf/include/mpf_rtp_stat.h
index eef43adcd4..2d492ebf4f 100644
--- a/libs/unimrcp/libs/mpf/include/mpf_rtp_stat.h
+++ b/libs/unimrcp/libs/mpf/include/mpf_rtp_stat.h
@@ -64,9 +64,9 @@ struct rtcp_sr_stat_t {
apr_uint32_t ntp_frac;
/** RTP timestamp */
apr_uint32_t rtp_ts;
- /* packets sent */
+ /** packets sent */
apr_uint32_t sent_packets;
- /* octets (bytes) sent */
+ /** octets (bytes) sent */
apr_uint32_t sent_octets;
};
diff --git a/libs/unimrcp/libs/mpf/mpf.vcproj b/libs/unimrcp/libs/mpf/mpf.vcproj
index c1d1d8557d..bf380d1e31 100644
--- a/libs/unimrcp/libs/mpf/mpf.vcproj
+++ b/libs/unimrcp/libs/mpf/mpf.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -122,6 +125,116 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/libs/mpf/src/mpf_activity_detector.c b/libs/unimrcp/libs/mpf/src/mpf_activity_detector.c
index 4aba1579e2..6ef66674eb 100644
--- a/libs/unimrcp/libs/mpf/src/mpf_activity_detector.c
+++ b/libs/unimrcp/libs/mpf/src/mpf_activity_detector.c
@@ -122,7 +122,7 @@ MPF_DECLARE(mpf_detector_event_e) mpf_activity_detector_process(mpf_activity_det
/* first, calculate current activity level of processed frame */
level = mpf_activity_detector_level_calculate(frame);
#if 0
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Activity Detector [%d]",level);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Activity Detector [%"APR_SIZE_T_FMT"]",level);
#endif
}
diff --git a/libs/unimrcp/libs/mpf/src/mpf_dtmf_generator.c b/libs/unimrcp/libs/mpf/src/mpf_dtmf_generator.c
index 66d870f4b8..836561db01 100644
--- a/libs/unimrcp/libs/mpf/src/mpf_dtmf_generator.c
+++ b/libs/unimrcp/libs/mpf/src/mpf_dtmf_generator.c
@@ -114,21 +114,21 @@ struct mpf_dtmf_generator_t {
/** Higher frequency generator */
struct sine_state_t sine2;
/** Sampling rate of audio in Hz; used in tone generator */
- apr_size_t sample_rate_audio;
+ apr_uint32_t sample_rate_audio;
/** Sampling rate of telephone-events in Hz; used for timing */
- apr_size_t sample_rate_events;
+ apr_uint32_t sample_rate_events;
/** How often to issue event packet */
- apr_size_t events_ptime;
+ apr_uint32_t events_ptime;
/** Milliseconds elapsed since last event packet */
- apr_size_t since_last_event;
+ apr_uint32_t since_last_event;
};
MPF_DECLARE(struct mpf_dtmf_generator_t *) mpf_dtmf_generator_create_ex(
const struct mpf_audio_stream_t *stream,
enum mpf_dtmf_generator_band_e band,
- apr_size_t tone_ms,
- apr_size_t silence_ms,
+ apr_uint32_t tone_ms,
+ apr_uint32_t silence_ms,
struct apr_pool_t *pool)
{
struct mpf_dtmf_generator_t *gen;
@@ -170,8 +170,8 @@ MPF_DECLARE(apt_bool_t) mpf_dtmf_generator_enqueue(
qlen = strlen(generator->queue);
if (qlen + dlen > MPF_DTMFGEN_QUEUE_LEN) {
ret = FALSE;
- apt_log(APT_LOG_MARK, APT_PRIO_WARNING, "DTMF queue too short (%d), "
- "cannot add %d digit%s, already has %d", MPF_DTMFGEN_QUEUE_LEN,
+ apt_log(APT_LOG_MARK, APT_PRIO_WARNING, "DTMF queue too short (%"APR_SIZE_T_FMT"), "
+ "cannot add %d digit%s, already has %"APR_SIZE_T_FMT, MPF_DTMFGEN_QUEUE_LEN,
dlen, dlen > 1 ? "s" : "", qlen);
} else {
strcpy(generator->queue + qlen, digits);
diff --git a/libs/unimrcp/libs/mpf/src/mpf_jitter_buffer.c b/libs/unimrcp/libs/mpf/src/mpf_jitter_buffer.c
index 1cc6b33141..0235e762c4 100644
--- a/libs/unimrcp/libs/mpf/src/mpf_jitter_buffer.c
+++ b/libs/unimrcp/libs/mpf/src/mpf_jitter_buffer.c
@@ -36,12 +36,12 @@ struct mpf_jitter_buffer_t {
/* number of frames */
apr_size_t frame_count;
/* frame timestamp units (samples) */
- apr_size_t frame_ts;
+ apr_uint32_t frame_ts;
/* frame size in bytes */
apr_size_t frame_size;
/* playout delay in timetsamp units */
- apr_size_t playout_delay_ts;
+ apr_uint32_t playout_delay_ts;
/* write should be synchronized (offset calculated) */
apr_byte_t write_sync;
@@ -49,14 +49,14 @@ struct mpf_jitter_buffer_t {
int write_ts_offset;
/* write pointer in timestamp units */
- apr_size_t write_ts;
+ apr_uint32_t write_ts;
/* read pointer in timestamp units */
- apr_size_t read_ts;
+ apr_uint32_t read_ts;
/* timestamp event starts at */
- apr_size_t event_write_base_ts;
+ apr_uint32_t event_write_base_ts;
/* the first (base) frame of the event */
- mpf_named_event_frame_t event_write_base;
+ mpf_named_event_frame_t event_write_base;
/* the last received update for the event */
const mpf_named_event_frame_t *event_write_update;
};
@@ -90,7 +90,7 @@ mpf_jitter_buffer_t* mpf_jitter_buffer_create(mpf_jb_config_t *jb_config, mpf_co
jb->config = jb_config;
jb->codec = codec;
- jb->frame_ts = mpf_codec_frame_samples_calculate(descriptor);
+ jb->frame_ts = (apr_uint32_t)mpf_codec_frame_samples_calculate(descriptor);
jb->frame_size = mpf_codec_frame_size_calculate(descriptor,codec->attribs);
jb->frame_count = jb->config->max_playout_delay / CODEC_FRAME_TIME_BASE;
jb->raw_data = apr_palloc(pool,jb->frame_size*jb->frame_count);
@@ -102,8 +102,8 @@ mpf_jitter_buffer_t* mpf_jitter_buffer_create(mpf_jb_config_t *jb_config, mpf_co
frame->codec_frame.buffer = jb->raw_data + i*jb->frame_size;
}
- jb->playout_delay_ts = jb->config->initial_playout_delay *
- descriptor->channel_count * descriptor->sampling_rate / 1000;
+ jb->playout_delay_ts = (apr_uint32_t)(jb->config->initial_playout_delay *
+ descriptor->channel_count * descriptor->sampling_rate / 1000);
jb->write_sync = 1;
jb->write_ts_offset = 0;
@@ -139,7 +139,7 @@ static APR_INLINE mpf_frame_t* mpf_jitter_buffer_frame_get(mpf_jitter_buffer_t *
return &jb->frames[index];
}
-static APR_INLINE jb_result_t mpf_jitter_buffer_write_prepare(mpf_jitter_buffer_t *jb, apr_uint32_t ts, apr_size_t *write_ts)
+static APR_INLINE jb_result_t mpf_jitter_buffer_write_prepare(mpf_jitter_buffer_t *jb, apr_uint32_t ts, apr_uint32_t *write_ts)
{
if(jb->write_sync) {
jb->write_ts_offset = ts - jb->write_ts;
@@ -157,7 +157,7 @@ static APR_INLINE jb_result_t mpf_jitter_buffer_write_prepare(mpf_jitter_buffer_
jb_result_t mpf_jitter_buffer_write(mpf_jitter_buffer_t *jb, void *buffer, apr_size_t size, apr_uint32_t ts)
{
mpf_frame_t *media_frame;
- apr_size_t write_ts;
+ apr_uint32_t write_ts;
apr_size_t available_frame_count;
jb_result_t result = mpf_jitter_buffer_write_prepare(jb,ts,&write_ts);
if(result != JB_OK) {
@@ -176,18 +176,18 @@ jb_result_t mpf_jitter_buffer_write(mpf_jitter_buffer_t *jb, void *buffer, apr_s
}
else {
/* too late */
- JB_TRACE("JB write ts=%d too late\n",write_ts);
+ JB_TRACE("JB write ts=%"APR_SIZE_T_FMT" too late\n",write_ts);
return JB_DISCARD_TOO_LATE;
}
}
available_frame_count = jb->frame_count - (write_ts - jb->read_ts)/jb->frame_ts;
if(available_frame_count <= 0) {
/* too early */
- JB_TRACE("JB write ts=%d too early\n",write_ts);
+ JB_TRACE("JB write ts=%"APR_SIZE_T_FMT" too early\n",write_ts);
return JB_DISCARD_TOO_EARLY;
}
- JB_TRACE("JB write ts=%d size=%d\n",write_ts,size);
+ JB_TRACE("JB write ts=%"APR_SIZE_T_FMT" size=%"APR_SIZE_T_FMT"\n",write_ts,size);
while(available_frame_count && size) {
media_frame = mpf_jitter_buffer_frame_get(jb,write_ts);
media_frame->codec_frame.size = jb->frame_size;
@@ -213,7 +213,7 @@ jb_result_t mpf_jitter_buffer_write(mpf_jitter_buffer_t *jb, void *buffer, apr_s
jb_result_t mpf_jitter_buffer_event_write(mpf_jitter_buffer_t *jb, const mpf_named_event_frame_t *named_event, apr_uint32_t ts, apr_byte_t marker)
{
mpf_frame_t *media_frame;
- apr_size_t write_ts;
+ apr_uint32_t write_ts;
jb_result_t result = mpf_jitter_buffer_write_prepare(jb,ts,&write_ts);
if(result != JB_OK) {
return result;
@@ -221,7 +221,7 @@ jb_result_t mpf_jitter_buffer_event_write(mpf_jitter_buffer_t *jb, const mpf_nam
/* new event detection */
if(!marker) {
- if(jb->event_write_base.event_id != named_event->event_id) {
+ if(jb->event_write_base.event_id != named_event->event_id || !jb->event_write_update) {
/* new event detected, marker is missing though */
marker = 1;
}
@@ -259,18 +259,18 @@ jb_result_t mpf_jitter_buffer_event_write(mpf_jitter_buffer_t *jb, const mpf_nam
if(write_ts < jb->read_ts) {
/* too late */
- JB_TRACE("JB write ts=%d event=%d duration=%d too late\n",
+ JB_TRACE("JB write ts=%"APR_SIZE_T_FMT" event=%d duration=%d too late\n",
write_ts,named_event->event_id,named_event->duration);
return JB_DISCARD_TOO_LATE;
}
else if( (write_ts - jb->read_ts)/jb->frame_ts >= jb->frame_count) {
/* too early */
- JB_TRACE("JB write ts=%d event=%d duration=%d too early\n",
+ JB_TRACE("JB write ts=%"APR_SIZE_T_FMT" event=%d duration=%d too early\n",
write_ts,named_event->event_id,named_event->duration);
return JB_DISCARD_TOO_EARLY;
}
- JB_TRACE("JB write ts=%d event=%d duration=%d\n",
+ JB_TRACE("JB write ts=%"APR_SIZE_T_FMT" event=%d duration=%d\n",
write_ts,named_event->event_id,named_event->duration);
media_frame = mpf_jitter_buffer_frame_get(jb,write_ts);
media_frame->event_frame = *named_event;
@@ -295,7 +295,7 @@ apt_bool_t mpf_jitter_buffer_read(mpf_jitter_buffer_t *jb, mpf_frame_t *media_fr
mpf_frame_t *src_media_frame = mpf_jitter_buffer_frame_get(jb,jb->read_ts);
if(jb->write_ts > jb->read_ts) {
/* normal read */
- JB_TRACE("JB read ts=%d\n", jb->read_ts);
+ JB_TRACE("JB read ts=%"APR_SIZE_T_FMT"\n", jb->read_ts);
media_frame->type = src_media_frame->type;
media_frame->marker = src_media_frame->marker;
if(media_frame->type & MEDIA_FRAME_TYPE_AUDIO) {
@@ -308,7 +308,7 @@ apt_bool_t mpf_jitter_buffer_read(mpf_jitter_buffer_t *jb, mpf_frame_t *media_fr
}
else {
/* underflow */
- JB_TRACE("JB read ts=%d underflow\n", jb->read_ts);
+ JB_TRACE("JB read ts=%"APR_SIZE_T_FMT" underflow\n", jb->read_ts);
media_frame->type = MEDIA_FRAME_TYPE_NONE;
media_frame->marker = MPF_MARKER_NONE;
jb->write_ts += jb->frame_ts;
diff --git a/libs/unimrcp/libs/mpf/src/mpf_mixer.c b/libs/unimrcp/libs/mpf/src/mpf_mixer.c
index 0d5c0f1833..9d46990c30 100644
--- a/libs/unimrcp/libs/mpf/src/mpf_mixer.c
+++ b/libs/unimrcp/libs/mpf/src/mpf_mixer.c
@@ -115,9 +115,7 @@ static void mpf_mixer_trace(mpf_object_t *object)
source = mixer->source_arr[i];
if(source) {
mpf_audio_stream_trace(source,STREAM_DIRECTION_RECEIVE,&output);
- if(apt_text_is_eos(&output) == FALSE) {
- *output.pos++ = ';';
- }
+ apt_text_char_insert(&output,';');
}
}
diff --git a/libs/unimrcp/libs/mpf/src/mpf_multiplier.c b/libs/unimrcp/libs/mpf/src/mpf_multiplier.c
index 289a194b1b..7ea9b88690 100644
--- a/libs/unimrcp/libs/mpf/src/mpf_multiplier.c
+++ b/libs/unimrcp/libs/mpf/src/mpf_multiplier.c
@@ -100,9 +100,7 @@ static void mpf_multiplier_trace(mpf_object_t *object)
sink = multiplier->sink_arr[i];
if(sink) {
mpf_audio_stream_trace(sink,STREAM_DIRECTION_SEND,&output);
- if(apt_text_is_eos(&output) == FALSE) {
- *output.pos++ = ';';
- }
+ apt_text_char_insert(&output,';');
}
}
diff --git a/libs/unimrcp/libs/mpf/src/mpf_rtp_stream.c b/libs/unimrcp/libs/mpf/src/mpf_rtp_stream.c
index 9e98c4144a..0e8ac028a9 100644
--- a/libs/unimrcp/libs/mpf/src/mpf_rtp_stream.c
+++ b/libs/unimrcp/libs/mpf/src/mpf_rtp_stream.c
@@ -177,6 +177,7 @@ static apt_bool_t mpf_rtp_stream_local_media_create(mpf_rtp_stream_t *rtp_stream
}
} while((is_port_ok == FALSE) && (first_port_in_search != rtp_stream->config->rtp_port_cur));
if(is_port_ok == FALSE) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Find Free RTP Port");
local_media->state = MPF_MEDIA_DISABLED;
status = FALSE;
}
@@ -455,7 +456,7 @@ static apt_bool_t mpf_rtp_rx_stream_open(mpf_audio_stream_t *stream, mpf_codec_t
codec,
rtp_stream->pool);
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Open RTP Receiver %s:%hu <- %s:%hu playout [%d ms]",
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Open RTP Receiver %s:%hu <- %s:%hu playout [%"APR_SIZE_T_FMT" ms]",
rtp_stream->rtp_l_sockaddr->hostname,
rtp_stream->rtp_l_sockaddr->port,
rtp_stream->rtp_r_sockaddr->hostname,
@@ -909,7 +910,7 @@ static APR_INLINE apt_bool_t mpf_rtp_data_send(mpf_rtp_stream_t *rtp_stream, rtp
transmitter->packet_data,
&transmitter->packet_size) == APR_SUCCESS) {
transmitter->sr_stat.sent_packets++;
- transmitter->sr_stat.sent_octets += transmitter->packet_size - sizeof(rtp_header_t);
+ transmitter->sr_stat.sent_octets += (apr_uint32_t)transmitter->packet_size - sizeof(rtp_header_t);
}
else {
status = FALSE;
@@ -1033,11 +1034,11 @@ static apr_socket_t* mpf_socket_create(apr_sockaddr_t **l_sockaddr, const char *
0,
pool);
if(!*l_sockaddr) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Sockaddr %s:%hu",ip,port);
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Failed to Get Sockaddr %s:%hu",ip,port);
return NULL;
}
if(apr_socket_create(&socket,(*l_sockaddr)->family,SOCK_DGRAM,0,pool) != APR_SUCCESS) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create Socket %s:%hu", ip,port);
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Failed to Create Socket %s:%hu", ip,port);
return NULL;
}
@@ -1046,7 +1047,7 @@ static apr_socket_t* mpf_socket_create(apr_sockaddr_t **l_sockaddr, const char *
apr_socket_opt_set(socket,APR_SO_REUSEADDR,1);
if(apr_socket_bind(socket,*l_sockaddr) != APR_SUCCESS) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Bind Socket to %s:%hu", ip,port);
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Failed to Bind Socket to %s:%hu", ip,port);
apr_socket_close(socket);
return NULL;
}
@@ -1057,13 +1058,13 @@ static apt_bool_t mpf_rtp_socket_pair_create(mpf_rtp_stream_t *stream, mpf_rtp_m
{
stream->rtp_socket = mpf_socket_create(&stream->rtp_l_sockaddr,local_media->ip.buf,local_media->port,stream->pool);
if(!stream->rtp_socket) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create RTP Socket");
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Failed to Create RTP Socket");
return FALSE;
}
stream->rtcp_socket = mpf_socket_create(&stream->rtcp_l_sockaddr,local_media->ip.buf,local_media->port+1,stream->pool);
if(!stream->rtcp_socket) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create RTCP Socket");
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Failed to Create RTCP Socket");
}
return TRUE;
}
@@ -1226,7 +1227,7 @@ static apt_bool_t mpf_rtcp_report_send(mpf_rtp_stream_t *rtp_stream)
rtcp_packet = (rtcp_packet_t*) (buffer + length);
length += rtcp_sdes_generate(rtp_stream,rtcp_packet,sizeof(buffer)-length);
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Send Compound RTCP Packet [%d bytes] %s:%hu -> %s:%hu",
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Send Compound RTCP Packet [%"APR_SIZE_T_FMT" bytes] %s:%hu -> %s:%hu",
length,
rtp_stream->rtcp_l_sockaddr->hostname,
rtp_stream->rtcp_l_sockaddr->port,
@@ -1238,7 +1239,7 @@ static apt_bool_t mpf_rtcp_report_send(mpf_rtp_stream_t *rtp_stream)
0,
buffer,
&length) != APR_SUCCESS) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Send Compound RTCP Packet [%d bytes] %s:%hu -> %s:%hu",
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Send Compound RTCP Packet [%"APR_SIZE_T_FMT" bytes] %s:%hu -> %s:%hu",
length,
rtp_stream->rtcp_l_sockaddr->hostname,
rtp_stream->rtcp_l_sockaddr->port,
@@ -1275,7 +1276,7 @@ static apt_bool_t mpf_rtcp_bye_send(mpf_rtp_stream_t *rtp_stream, apt_str_t *rea
rtcp_packet = (rtcp_packet_t*) (buffer + length);
length += rtcp_bye_generate(rtp_stream,rtcp_packet,sizeof(buffer)-length,reason);
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Send Compound RTCP Packet [BYE] [%d bytes] %s:%hu -> %s:%hu",
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Send Compound RTCP Packet [BYE] [%"APR_SIZE_T_FMT" bytes] %s:%hu -> %s:%hu",
length,
rtp_stream->rtcp_l_sockaddr->hostname,
rtp_stream->rtcp_l_sockaddr->port,
@@ -1287,7 +1288,7 @@ static apt_bool_t mpf_rtcp_bye_send(mpf_rtp_stream_t *rtp_stream, apt_str_t *rea
0,
buffer,
&length) != APR_SUCCESS) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Send Compound RTCP Packet [BYE] [%d bytes] %s:%hu -> %s:%hu",
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Send Compound RTCP Packet [BYE] [%"APR_SIZE_T_FMT" bytes] %s:%hu -> %s:%hu",
length,
rtp_stream->rtcp_l_sockaddr->hostname,
rtp_stream->rtcp_l_sockaddr->port,
@@ -1384,7 +1385,7 @@ static void mpf_rtcp_rx_timer_proc(mpf_timer_t *timer, void *obj)
apr_size_t length = sizeof(buffer);
if(apr_socket_recv(rtp_stream->rtcp_socket,buffer,&length) == APR_SUCCESS) {
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive Compound RTCP Packet [%d bytes] %s:%hu <- %s:%hu",
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive Compound RTCP Packet [%"APR_SIZE_T_FMT" bytes] %s:%hu <- %s:%hu",
length,
rtp_stream->rtcp_l_sockaddr->hostname,
rtp_stream->rtcp_l_sockaddr->port,
diff --git a/libs/unimrcp/libs/mpf/src/mpf_scheduler.c b/libs/unimrcp/libs/mpf/src/mpf_scheduler.c
index bccc8837e6..24a4c8adf2 100644
--- a/libs/unimrcp/libs/mpf/src/mpf_scheduler.c
+++ b/libs/unimrcp/libs/mpf/src/mpf_scheduler.c
@@ -226,6 +226,7 @@ static void* APR_THREAD_FUNC timer_thread_proc(apr_thread_t *thread, void *data)
#endif
}
+ apr_thread_exit(thread,APR_SUCCESS);
return NULL;
}
diff --git a/libs/unimrcp/libs/mpf/src/mpf_timer_manager.c b/libs/unimrcp/libs/mpf/src/mpf_timer_manager.c
index 4e570cada4..a3c8735869 100644
--- a/libs/unimrcp/libs/mpf/src/mpf_timer_manager.c
+++ b/libs/unimrcp/libs/mpf/src/mpf_timer_manager.c
@@ -57,7 +57,7 @@ MPF_DECLARE(mpf_timer_manager_t*) mpf_timer_manager_create(mpf_scheduler_t *sche
mpf_timer_manager_t *timer_manager = apr_palloc(pool,sizeof(mpf_timer_manager_t));
APR_RING_INIT(&timer_manager->head, mpf_timer_t, link);
timer_manager->elapsed_time = 0;
- timer_manager->resolution = 100; // 100 ms
+ timer_manager->resolution = 100; /* 100 ms */
mpf_scheduler_timer_clock_set(scheduler,timer_manager->resolution,mpf_scheduler_proc,timer_manager);
return timer_manager;
@@ -108,7 +108,7 @@ MPF_DECLARE(apt_bool_t) mpf_timer_set(mpf_timer_t *timer, apr_uint32_t timeout)
/* calculate time to elapse */
timer->scheduled_time = manager->elapsed_time + timeout;
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Set Timer 0x%x [%d]",timer,timer->scheduled_time);
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Set Timer 0x%x [%lu]",timer,timer->scheduled_time);
if(APR_RING_EMPTY(&timer->manager->head, mpf_timer_t, link)) {
APR_RING_INSERT_TAIL(&manager->head,timer,mpf_timer_t,link);
@@ -126,7 +126,7 @@ MPF_DECLARE(apt_bool_t) mpf_timer_kill(mpf_timer_t *timer)
return FALSE;
}
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Kill Timer 0x%x [%d]",timer,timer->scheduled_time);
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Kill Timer 0x%x [%lu]",timer,timer->scheduled_time);
/* remove node (timer) from the list */
APR_RING_REMOVE(timer,link);
timer->scheduled_time = 0;
@@ -163,7 +163,7 @@ static void mpf_scheduler_proc(mpf_scheduler_t *scheduler, void *obj)
/* increment elapsed time */
manager->elapsed_time += manager->resolution;
if(manager->elapsed_time >= 0xFFFF) {
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Reschedule Timers [%d]",manager->elapsed_time);
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Reschedule Timers [%lu]",manager->elapsed_time);
mpf_timers_reschedule(manager);
}
@@ -177,7 +177,7 @@ static void mpf_scheduler_proc(mpf_scheduler_t *scheduler, void *obj)
break;
}
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Timer Elapsed 0x%x [%d]",timer,timer->scheduled_time);
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Timer Elapsed 0x%x [%lu]",timer,timer->scheduled_time);
/* remove the elapsed timer from the list */
APR_RING_REMOVE(timer, link);
timer->scheduled_time = 0;
diff --git a/libs/unimrcp/libs/mrcp-client/include/mrcp_application.h b/libs/unimrcp/libs/mrcp-client/include/mrcp_application.h
index 92bea0a3d4..629c445526 100644
--- a/libs/unimrcp/libs/mrcp-client/include/mrcp_application.h
+++ b/libs/unimrcp/libs/mrcp-client/include/mrcp_application.h
@@ -67,7 +67,6 @@ typedef enum {
/** Enumeration of MRCP signaling events */
typedef enum {
- MRCP_SIG_EVENT_READY,
MRCP_SIG_EVENT_TERMINATE
} mrcp_sig_event_e;
@@ -126,9 +125,6 @@ struct mrcp_app_message_dispatcher_t {
/** Response (event) to mrcp_application_message_send() request */
apt_bool_t (*on_message_receive)(mrcp_application_t *application, mrcp_session_t *session, mrcp_channel_t *channel, mrcp_message_t *message);
- /** Event indicating client stack is started and ready to process requests from the application */
- apt_bool_t (*on_ready)(mrcp_application_t *application, mrcp_sig_status_code_e status);
-
/** Event indicating unexpected session/channel termination */
apt_bool_t (*on_terminate_event)(mrcp_application_t *application, mrcp_session_t *session, mrcp_channel_t *channel);
diff --git a/libs/unimrcp/libs/mrcp-client/include/mrcp_client.h b/libs/unimrcp/libs/mrcp-client/include/mrcp_client.h
index e155b7653e..c62f0e8baf 100644
--- a/libs/unimrcp/libs/mrcp-client/include/mrcp_client.h
+++ b/libs/unimrcp/libs/mrcp-client/include/mrcp_client.h
@@ -27,12 +27,23 @@
APT_BEGIN_EXTERN_C
+/** Event handler used in case of asynchronous start */
+typedef void (*mrcp_client_handler_f)(apt_bool_t status);
+
/**
* Create MRCP client instance.
* @return the created client instance
*/
MRCP_DECLARE(mrcp_client_t*) mrcp_client_create(apt_dir_layout_t *dir_layout);
+/**
+ * Set asynchronous start mode.
+ * @param client the MRCP client to set mode for
+ * @param handler the event handler to signal start completion
+ */
+MRCP_DECLARE(void) mrcp_client_async_start_set(mrcp_client_t *client, mrcp_client_handler_f handler);
+
+
/**
* Start message processing loop.
* @param client the MRCP client to start
diff --git a/libs/unimrcp/libs/mrcp-client/mrcpclient.vcproj b/libs/unimrcp/libs/mrcp-client/mrcpclient.vcproj
index 130fe73d1f..1b156212e2 100644
--- a/libs/unimrcp/libs/mrcp-client/mrcpclient.vcproj
+++ b/libs/unimrcp/libs/mrcp-client/mrcpclient.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -120,6 +123,114 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/libs/mrcp-client/src/mrcp_client.c b/libs/unimrcp/libs/mrcp-client/src/mrcp_client.c
index e289b8e62a..6fee8c09d7 100644
--- a/libs/unimrcp/libs/mrcp-client/src/mrcp_client.c
+++ b/libs/unimrcp/libs/mrcp-client/src/mrcp_client.c
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include
#include
#include "mrcp_client.h"
#include "mrcp_resource_factory.h"
@@ -59,6 +60,14 @@ struct mrcp_client_t {
/** Connection task message pool */
apt_task_msg_pool_t *cnt_msg_pool;
+
+ /** Event handler used in case of async start */
+ mrcp_client_handler_f on_start_complete;
+ /** Wait object used in case of synch start */
+ apr_thread_cond_t *sync_start_object;
+ /** Mutex to protect sync start routine */
+ apr_thread_mutex_t *sync_start_mutex;
+
/** Dir layout structure */
apt_dir_layout_t *dir_layout;
/** Memory pool */
@@ -197,22 +206,58 @@ MRCP_DECLARE(mrcp_client_t*) mrcp_client_create(apt_dir_layout_t *dir_layout)
client->app_table = apr_hash_make(client->pool);
client->session_table = apr_hash_make(client->pool);
+
+ client->on_start_complete = NULL;
+ client->sync_start_object = NULL;
+ client->sync_start_mutex = NULL;
return client;
}
+/** Set asynchronous start mode */
+MRCP_DECLARE(void) mrcp_client_async_start_set(mrcp_client_t *client, mrcp_client_handler_f handler)
+{
+ if(client) {
+ client->on_start_complete = handler;
+ }
+}
+
/** Start message processing loop */
MRCP_DECLARE(apt_bool_t) mrcp_client_start(mrcp_client_t *client)
{
+ apt_bool_t sync_start = TRUE;
apt_task_t *task;
if(!client || !client->task) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Invalid Client");
return FALSE;
}
task = apt_consumer_task_base_get(client->task);
+
+ if(client->on_start_complete) {
+ sync_start = FALSE;
+ }
+
+ if(sync_start == TRUE) {
+ /* get prepared to start stack synchronously */
+ apr_thread_mutex_create(&client->sync_start_mutex,APR_THREAD_MUTEX_DEFAULT,client->pool);
+ apr_thread_cond_create(&client->sync_start_object,client->pool);
+
+ apr_thread_mutex_lock(client->sync_start_mutex);
+ }
+
if(apt_task_start(task) == FALSE) {
+ if(sync_start == TRUE) {
+ apr_thread_mutex_unlock(client->sync_start_mutex);
+ }
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Start Client Task");
return FALSE;
}
+
+ if(sync_start == TRUE) {
+ /* wait for start complete */
+ apr_thread_cond_wait(client->sync_start_object,client->sync_start_mutex);
+ apr_thread_mutex_unlock(client->sync_start_mutex);
+ }
+
return TRUE;
}
@@ -230,6 +275,16 @@ MRCP_DECLARE(apt_bool_t) mrcp_client_shutdown(mrcp_client_t *client)
return FALSE;
}
client->session_table = NULL;
+
+ if(client->sync_start_object) {
+ apr_thread_cond_destroy(client->sync_start_object);
+ client->sync_start_object = NULL;
+ }
+ if(client->sync_start_mutex) {
+ apr_thread_mutex_destroy(client->sync_start_mutex);
+ client->sync_start_mutex = NULL;
+ }
+
return TRUE;
}
@@ -860,22 +915,17 @@ static void mrcp_client_on_start_complete(apt_task_t *task)
{
apt_consumer_task_t *consumer_task = apt_task_object_get(task);
mrcp_client_t *client = apt_consumer_task_object_get(consumer_task);
- void *val;
- mrcp_application_t *application;
- mrcp_app_message_t *app_message;
- apr_hash_index_t *it;
+
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,CLIENT_TASK_NAME" Started");
- it = apr_hash_first(client->pool,client->app_table);
- for(; it; it = apr_hash_next(it)) {
- apr_hash_this(it,NULL,NULL,&val);
- application = val;
- if(!application) continue;
-
- /* raise one-time application-ready event */
- app_message = mrcp_client_app_signaling_event_create(MRCP_SIG_EVENT_READY,client->pool);
- app_message->sig_message.status = MRCP_SIG_STATUS_CODE_SUCCESS;
- app_message->application = application;
- application->handler(app_message);
+ if(client->on_start_complete) {
+ /* async start */
+ client->on_start_complete(TRUE);
+ }
+ else {
+ /* sync start */
+ apr_thread_mutex_lock(client->sync_start_mutex);
+ apr_thread_cond_signal(client->sync_start_object);
+ apr_thread_mutex_unlock(client->sync_start_mutex);
}
}
diff --git a/libs/unimrcp/libs/mrcp-client/src/mrcp_client_session.c b/libs/unimrcp/libs/mrcp-client/src/mrcp_client_session.c
index 845694c5ba..a2659e0f3c 100644
--- a/libs/unimrcp/libs/mrcp-client/src/mrcp_client_session.c
+++ b/libs/unimrcp/libs/mrcp-client/src/mrcp_client_session.c
@@ -39,6 +39,7 @@ static apt_bool_t mrcp_app_session_terminate_raise(mrcp_client_session_t *sessio
static apt_bool_t mrcp_app_sig_response_raise(mrcp_client_session_t *session, apt_bool_t process_pending_requests);
static apt_bool_t mrcp_app_sig_event_raise(mrcp_client_session_t *session, mrcp_channel_t *channel);
static apt_bool_t mrcp_app_control_message_raise(mrcp_client_session_t *session, mrcp_channel_t *channel, mrcp_message_t *mrcp_message);
+static apt_bool_t mrcp_app_failure_message_raise(mrcp_client_session_t *session);
static apt_bool_t mrcp_app_request_dispatch(mrcp_client_session_t *session, const mrcp_app_message_t *app_message);
static apt_bool_t mrcp_client_resource_answer_process(mrcp_client_session_t *session, mrcp_session_descriptor_t *descriptor);
@@ -226,7 +227,7 @@ apt_bool_t mrcp_client_session_terminate_event_process(mrcp_client_session_t *se
if(session->active_request) {
/* raise app response */
session->status = MRCP_SIG_STATUS_CODE_TERMINATE;
- mrcp_app_sig_response_raise(session,FALSE);
+ mrcp_app_failure_message_raise(session);
/* cancel remaing requests, but do process session termination request (if any) */
do {
@@ -242,7 +243,7 @@ apt_bool_t mrcp_client_session_terminate_event_process(mrcp_client_session_t *se
/* cancel pending request */
session->status = MRCP_SIG_STATUS_CODE_CANCEL;
- mrcp_app_sig_response_raise(session,FALSE);
+ mrcp_app_failure_message_raise(session);
}
}
while(session->active_request);
@@ -521,6 +522,32 @@ static apt_bool_t mrcp_app_control_message_raise(mrcp_client_session_t *session,
return TRUE;
}
+static apt_bool_t mrcp_app_failure_message_raise(mrcp_client_session_t *session)
+{
+ mrcp_app_message_t *response;
+ const mrcp_app_message_t *request = session->active_request;
+ if(!request) {
+ return FALSE;
+ }
+ session->active_request = NULL;
+ response = mrcp_client_app_response_create(request,session->status,session->base.pool);
+ if(response->message_type == MRCP_APP_MESSAGE_TYPE_SIGNALING) {
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Raise App Response "APT_PTRSID_FMT" [%d] %s [%d]",
+ MRCP_SESSION_PTRSID(&session->base),
+ response->sig_message.command_id,
+ session->status == MRCP_SIG_STATUS_CODE_SUCCESS ? "SUCCESS" : "FAILURE",
+ session->status);
+ }
+ else if(response->control_message){
+ mrcp_message_t *mrcp_response = mrcp_response_create(response->control_message,response->control_message->pool);
+ mrcp_response->start_line.status_code = MRCP_STATUS_CODE_METHOD_FAILED;
+ response->control_message = mrcp_response;
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Raise App MRCP Response "APT_PTRSID_FMT, MRCP_SESSION_PTRSID(&session->base));
+ }
+ session->application->handler(response);
+ return TRUE;
+}
+
static apt_bool_t mrcp_client_channel_find(mrcp_client_session_t *session, mrcp_channel_t *channel, int *index)
{
int i;
@@ -1264,13 +1291,6 @@ MRCP_DECLARE(apt_bool_t) mrcp_application_message_dispatch(const mrcp_app_messag
}
else if(app_message->sig_message.message_type == MRCP_SIG_MESSAGE_TYPE_EVENT) {
switch(app_message->sig_message.event_id) {
- case MRCP_SIG_EVENT_READY:
- if(dispatcher->on_ready) {
- status = dispatcher->on_ready(
- app_message->application,
- app_message->sig_message.status);
- }
- break;
case MRCP_SIG_EVENT_TERMINATE:
if(dispatcher->on_terminate_event) {
status = dispatcher->on_terminate_event(
diff --git a/libs/unimrcp/libs/mrcp-engine/include/mrcp_engine_plugin.h b/libs/unimrcp/libs/mrcp-engine/include/mrcp_engine_plugin.h
index 103944eb1f..afa5e334c3 100644
--- a/libs/unimrcp/libs/mrcp-engine/include/mrcp_engine_plugin.h
+++ b/libs/unimrcp/libs/mrcp-engine/include/mrcp_engine_plugin.h
@@ -70,7 +70,7 @@ typedef apt_bool_t (*mrcp_plugin_log_accessor_f)(apt_logger_t *logger);
* Minor API changes that do not cause binary compatibility problems.
* Reset to 0 when upgrading PLUGIN_MAJOR_VERSION
*/
-#define PLUGIN_MINOR_VERSION 5
+#define PLUGIN_MINOR_VERSION 6
/** patch level
* The Patch Level never includes API changes, simply bug fixes.
diff --git a/libs/unimrcp/libs/mrcp-engine/mrcpengine.vcproj b/libs/unimrcp/libs/mrcp-engine/mrcpengine.vcproj
index ed21f76c04..c5b163eae1 100644
--- a/libs/unimrcp/libs/mrcp-engine/mrcpengine.vcproj
+++ b/libs/unimrcp/libs/mrcp-engine/mrcpengine.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -120,6 +123,114 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/libs/mrcp-server/mrcpserver.vcproj b/libs/unimrcp/libs/mrcp-server/mrcpserver.vcproj
index 3e3b140374..da47c522b9 100644
--- a/libs/unimrcp/libs/mrcp-server/mrcpserver.vcproj
+++ b/libs/unimrcp/libs/mrcp-server/mrcpserver.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -120,6 +123,114 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/libs/mrcp-signaling/mrcpsignaling.vcproj b/libs/unimrcp/libs/mrcp-signaling/mrcpsignaling.vcproj
index 4297ec9d66..6aa8163acc 100644
--- a/libs/unimrcp/libs/mrcp-signaling/mrcpsignaling.vcproj
+++ b/libs/unimrcp/libs/mrcp-signaling/mrcpsignaling.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -120,6 +123,114 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/libs/mrcp/control/include/mrcp_stream.h b/libs/unimrcp/libs/mrcp/control/include/mrcp_stream.h
index 69643f4874..3cc9d38511 100644
--- a/libs/unimrcp/libs/mrcp/control/include/mrcp_stream.h
+++ b/libs/unimrcp/libs/mrcp/control/include/mrcp_stream.h
@@ -27,12 +27,12 @@
APT_BEGIN_EXTERN_C
-/** Result of MRCP stream processing (parse/generate) */
+/** Status of MRCP stream processing (parse/generate) */
typedef enum {
- MRCP_STREAM_MESSAGE_COMPLETE,
- MRCP_STREAM_MESSAGE_TRUNCATED,
- MRCP_STREAM_MESSAGE_INVALID
-} mrcp_stream_result_e;
+ MRCP_STREAM_STATUS_COMPLETE,
+ MRCP_STREAM_STATUS_INCOMPLETE,
+ MRCP_STREAM_STATUS_INVALID
+} mrcp_stream_status_e;
/** Opaque MRCP parser declaration */
typedef struct mrcp_parser_t mrcp_parser_t;
@@ -40,7 +40,7 @@ typedef struct mrcp_parser_t mrcp_parser_t;
typedef struct mrcp_generator_t mrcp_generator_t;
/** MRCP message handler */
-typedef apt_bool_t (*mrcp_message_handler_f)(void *obj, mrcp_message_t *message, mrcp_stream_result_e result);
+typedef apt_bool_t (*mrcp_message_handler_f)(void *obj, mrcp_message_t *message, mrcp_stream_status_e status);
/** Parse MRCP message (excluding message body) */
MRCP_DECLARE(apt_bool_t) mrcp_message_parse(mrcp_resource_factory_t *resource_factory, mrcp_message_t *message, apt_text_stream_t *stream);
@@ -56,7 +56,7 @@ MRCP_DECLARE(mrcp_parser_t*) mrcp_parser_create(mrcp_resource_factory_t *resourc
MRCP_DECLARE(void) mrcp_parser_resource_name_set(mrcp_parser_t *parser, const apt_str_t *resource_name);
/** Parse MRCP stream */
-MRCP_DECLARE(mrcp_stream_result_e) mrcp_parser_run(mrcp_parser_t *parser, apt_text_stream_t *stream);
+MRCP_DECLARE(mrcp_stream_status_e) mrcp_parser_run(mrcp_parser_t *parser, apt_text_stream_t *stream);
/** Get parsed MRCP message */
MRCP_DECLARE(mrcp_message_t*) mrcp_parser_message_get(const mrcp_parser_t *parser);
@@ -69,7 +69,7 @@ MRCP_DECLARE(mrcp_generator_t*) mrcp_generator_create(mrcp_resource_factory_t *r
MRCP_DECLARE(apt_bool_t) mrcp_generator_message_set(mrcp_generator_t *generator, mrcp_message_t *message);
/** Generate MRCP stream */
-MRCP_DECLARE(mrcp_stream_result_e) mrcp_generator_run(mrcp_generator_t *generator, apt_text_stream_t *stream);
+MRCP_DECLARE(mrcp_stream_status_e) mrcp_generator_run(mrcp_generator_t *generator, apt_text_stream_t *stream);
/** Walk through MRCP stream and call message handler for each parsed message */
MRCP_DECLARE(apt_bool_t) mrcp_stream_walk(mrcp_parser_t *parser, apt_text_stream_t *stream, mrcp_message_handler_f handler, void *obj);
diff --git a/libs/unimrcp/libs/mrcp/control/src/mrcp_stream.c b/libs/unimrcp/libs/mrcp/control/src/mrcp_stream.c
index 43844161f5..daef44c219 100644
--- a/libs/unimrcp/libs/mrcp/control/src/mrcp_stream.c
+++ b/libs/unimrcp/libs/mrcp/control/src/mrcp_stream.c
@@ -20,12 +20,20 @@
#include "mrcp_resource_factory.h"
#include "apt_log.h"
+/** Stage of MRCP stream processing (parse/generate) */
+typedef enum {
+ MRCP_STREAM_STAGE_NONE,
+ MRCP_STREAM_STAGE_START_LINE,
+ MRCP_STREAM_STAGE_RESOURCE,
+ MRCP_STREAM_STAGE_HEADER,
+ MRCP_STREAM_STAGE_BODY
+} mrcp_stream_stage_e;
+
/** MRCP parser */
struct mrcp_parser_t {
mrcp_resource_factory_t *resource_factory;
apt_str_t resource_name;
- mrcp_stream_result_e result;
- char *pos;
+ mrcp_stream_stage_e stage;
apt_bool_t skip_lf;
mrcp_message_t *message;
apr_pool_t *pool;
@@ -34,17 +42,16 @@ struct mrcp_parser_t {
/** MRCP generator */
struct mrcp_generator_t {
mrcp_resource_factory_t *resource_factory;
- mrcp_stream_result_e result;
- char *pos;
+ mrcp_stream_stage_e stage;
mrcp_message_t *message;
apr_pool_t *pool;
};
/** Read MRCP message-body */
-static mrcp_stream_result_e mrcp_message_body_read(mrcp_message_t *message, apt_text_stream_t *stream)
+static apt_bool_t mrcp_message_body_read(mrcp_message_t *message, apt_text_stream_t *stream)
{
- mrcp_stream_result_e result = MRCP_STREAM_MESSAGE_COMPLETE;
+ apt_bool_t status = TRUE;
if(message->body.buf) {
mrcp_generic_header_t *generic_header = mrcp_generic_header_get(message);
/* stream length available to read */
@@ -54,7 +61,7 @@ static mrcp_stream_result_e mrcp_message_body_read(mrcp_message_t *message, apt_
if(required_length > stream_length) {
required_length = stream_length;
/* not complete */
- result = MRCP_STREAM_MESSAGE_TRUNCATED;
+ status = FALSE;
}
memcpy(message->body.buf+message->body.length,stream->pos,required_length);
message->body.length += required_length;
@@ -62,28 +69,13 @@ static mrcp_stream_result_e mrcp_message_body_read(mrcp_message_t *message, apt_
message->body.buf[message->body.length] = '\0';
}
- return result;
-}
-
-/** Parse MRCP message-body */
-static mrcp_stream_result_e mrcp_message_body_parse(mrcp_message_t *message, apt_text_stream_t *stream, apr_pool_t *pool)
-{
- if(mrcp_generic_header_property_check(message,GENERIC_HEADER_CONTENT_LENGTH) == TRUE) {
- mrcp_generic_header_t *generic_header = mrcp_generic_header_get(message);
- if(generic_header && generic_header->content_length) {
- apt_str_t *body = &message->body;
- body->buf = apr_palloc(pool,generic_header->content_length+1);
- body->length = 0;
- return mrcp_message_body_read(message,stream);
- }
- }
- return MRCP_STREAM_MESSAGE_COMPLETE;
+ return status;
}
/** Write MRCP message-body */
-static mrcp_stream_result_e mrcp_message_body_write(mrcp_message_t *message, apt_text_stream_t *stream)
+static apt_bool_t mrcp_message_body_write(mrcp_message_t *message, apt_text_stream_t *stream)
{
- mrcp_stream_result_e result = MRCP_STREAM_MESSAGE_COMPLETE;
+ apt_bool_t status = TRUE;
mrcp_generic_header_t *generic_header = mrcp_generic_header_get(message);
if(generic_header && message->body.length < generic_header->content_length) {
/* stream length available to write */
@@ -93,7 +85,7 @@ static mrcp_stream_result_e mrcp_message_body_write(mrcp_message_t *message, apt
if(required_length > stream_length) {
required_length = stream_length;
/* not complete */
- result = MRCP_STREAM_MESSAGE_TRUNCATED;
+ status = FALSE;
}
memcpy(stream->pos,message->body.buf+message->body.length,required_length);
@@ -101,21 +93,7 @@ static mrcp_stream_result_e mrcp_message_body_write(mrcp_message_t *message, apt
stream->pos += required_length;
}
- return result;
-}
-
-/** Generate MRCP message-body */
-static mrcp_stream_result_e mrcp_message_body_generate(mrcp_message_t *message, apt_text_stream_t *stream)
-{
- if(mrcp_generic_header_property_check(message,GENERIC_HEADER_CONTENT_LENGTH) == TRUE) {
- mrcp_generic_header_t *generic_header = mrcp_generic_header_get(message);
- if(generic_header && generic_header->content_length) {
- apt_str_t *body = &message->body;
- body->length = 0;
- return mrcp_message_body_write(message,stream);
- }
- }
- return MRCP_STREAM_MESSAGE_COMPLETE;
+ return status;
}
/** Parse MRCP message (excluding message body) */
@@ -187,8 +165,7 @@ MRCP_DECLARE(mrcp_parser_t*) mrcp_parser_create(mrcp_resource_factory_t *resourc
mrcp_parser_t *parser = apr_palloc(pool,sizeof(mrcp_parser_t));
parser->resource_factory = resource_factory;
apt_string_reset(&parser->resource_name);
- parser->result = MRCP_STREAM_MESSAGE_INVALID;
- parser->pos = NULL;
+ parser->stage = MRCP_STREAM_STAGE_NONE;
parser->skip_lf = FALSE;
parser->message = NULL;
parser->pool = pool;
@@ -203,46 +180,82 @@ MRCP_DECLARE(void) mrcp_parser_resource_name_set(mrcp_parser_t *parser, const ap
}
}
-static mrcp_stream_result_e mrcp_parser_break(mrcp_parser_t *parser, apt_text_stream_t *stream)
+static mrcp_stream_status_e mrcp_parser_break(mrcp_parser_t *parser, apt_text_stream_t *stream)
{
- /* failed to parse either start-line or header */
+ /* failed to parse message */
if(apt_text_is_eos(stream) == TRUE) {
- /* end of stream reached, rewind/restore stream */
- stream->pos = parser->pos;
- parser->result = MRCP_STREAM_MESSAGE_TRUNCATED;
- parser->message = NULL;
+ /* end of stream reached */
+ return MRCP_STREAM_STATUS_INCOMPLETE;
}
- else {
- /* error case */
- parser->result = MRCP_STREAM_MESSAGE_INVALID;
- }
- return parser->result;
+
+ /* error case */
+ parser->stage = MRCP_STREAM_STAGE_NONE;
+ return MRCP_STREAM_STATUS_INVALID;
}
/** Parse MRCP stream */
-MRCP_DECLARE(mrcp_stream_result_e) mrcp_parser_run(mrcp_parser_t *parser, apt_text_stream_t *stream)
+MRCP_DECLARE(mrcp_stream_status_e) mrcp_parser_run(mrcp_parser_t *parser, apt_text_stream_t *stream)
{
mrcp_message_t *message = parser->message;
- if(message && parser->result == MRCP_STREAM_MESSAGE_TRUNCATED) {
- /* process continuation data */
- parser->result = mrcp_message_body_read(message,stream);
- return parser->result;
- }
-
- /* create new MRCP message */
- message = mrcp_message_create(parser->pool);
- message->channel_id.resource_name = parser->resource_name;
- parser->message = message;
- /* store current position to be able to rewind/restore stream if needed */
- parser->pos = stream->pos;
-
- /* parse start-line and header */
- if(mrcp_message_parse(parser->resource_factory,message,stream) == FALSE) {
- return mrcp_parser_break(parser,stream);
+ if(parser->stage == MRCP_STREAM_STAGE_NONE || !message) {
+ /* create new MRCP message */
+ message = mrcp_message_create(parser->pool);
+ message->channel_id.resource_name = parser->resource_name;
+ parser->message = message;
+ parser->stage = MRCP_STREAM_STAGE_START_LINE;
}
- /* parse body */
- parser->result = mrcp_message_body_parse(message,stream,message->pool);
+ if(parser->stage == MRCP_STREAM_STAGE_START_LINE) {
+ /* parse start-line */
+ if(mrcp_start_line_parse(&message->start_line,stream,message->pool) == FALSE) {
+ return mrcp_parser_break(parser,stream);
+ }
+ parser->stage = MRCP_STREAM_STAGE_RESOURCE;
+ }
+
+ if(parser->stage == MRCP_STREAM_STAGE_RESOURCE) {
+ mrcp_resource_t *resource;
+
+ if(message->start_line.version == MRCP_VERSION_2) {
+ mrcp_channel_id_parse(&message->channel_id,stream,message->pool);
+ }
+
+ /* find resource */
+ resource = mrcp_resource_find(parser->resource_factory,&message->channel_id.resource_name);
+ if(!resource) {
+ return mrcp_parser_break(parser,stream);
+ }
+
+ if(mrcp_message_resource_set(message,resource) == FALSE) {
+ return mrcp_parser_break(parser,stream);
+ }
+ parser->stage = MRCP_STREAM_STAGE_HEADER;
+ }
+
+ if(parser->stage == MRCP_STREAM_STAGE_HEADER) {
+ /* parse header */
+ if(mrcp_message_header_parse(&message->header,stream,message->pool) == FALSE) {
+ return mrcp_parser_break(parser,stream);
+ }
+
+ parser->stage = MRCP_STREAM_STAGE_NONE;
+ if(mrcp_generic_header_property_check(message,GENERIC_HEADER_CONTENT_LENGTH) == TRUE) {
+ mrcp_generic_header_t *generic_header = mrcp_generic_header_get(message);
+ if(generic_header && generic_header->content_length) {
+ apt_str_t *body = &message->body;
+ body->buf = apr_palloc(message->pool,generic_header->content_length+1);
+ body->length = 0;
+ parser->stage = MRCP_STREAM_STAGE_BODY;
+ }
+ }
+ }
+
+ if(parser->stage == MRCP_STREAM_STAGE_BODY) {
+ if(mrcp_message_body_read(message,stream) == FALSE) {
+ return mrcp_parser_break(parser,stream);
+ }
+ parser->stage = MRCP_STREAM_STAGE_NONE;
+ }
/* in the worst case message segmentation may occur between and
of the final empty header */
@@ -250,7 +263,7 @@ MRCP_DECLARE(mrcp_stream_result_e) mrcp_parser_run(mrcp_parser_t *parser, apt_te
/* if this is the case be prepared to skip */
parser->skip_lf = TRUE;
}
- return parser->result;
+ return MRCP_STREAM_STATUS_COMPLETE;
}
/** Get parsed MRCP message */
@@ -265,8 +278,7 @@ MRCP_DECLARE(mrcp_generator_t*) mrcp_generator_create(mrcp_resource_factory_t *r
{
mrcp_generator_t *generator = apr_palloc(pool,sizeof(mrcp_generator_t));
generator->resource_factory = resource_factory;
- generator->result = MRCP_STREAM_MESSAGE_INVALID;
- generator->pos = NULL;
+ generator->stage = MRCP_STREAM_STAGE_NONE;
generator->message = NULL;
generator->pool = pool;
return generator;
@@ -282,64 +294,96 @@ MRCP_DECLARE(apt_bool_t) mrcp_generator_message_set(mrcp_generator_t *generator,
return TRUE;
}
-static mrcp_stream_result_e mrcp_generator_break(mrcp_generator_t *generator, apt_text_stream_t *stream)
+static mrcp_stream_status_e mrcp_generator_break(mrcp_generator_t *generator, apt_text_stream_t *stream)
{
- /* failed to generate either start-line or header */
+ /* failed to generate message */
if(apt_text_is_eos(stream) == TRUE) {
- /* end of stream reached, rewind/restore stream */
- stream->pos = generator->pos;
- generator->result = MRCP_STREAM_MESSAGE_TRUNCATED;
+ /* end of stream reached */
+ return MRCP_STREAM_STATUS_INCOMPLETE;
}
- else {
- /* error case */
- generator->result = MRCP_STREAM_MESSAGE_INVALID;
- }
- return generator->result;
+
+ /* error case */
+ generator->stage = MRCP_STREAM_STAGE_NONE;
+ return MRCP_STREAM_STATUS_INVALID;
}
/** Generate MRCP stream */
-MRCP_DECLARE(mrcp_stream_result_e) mrcp_generator_run(mrcp_generator_t *generator, apt_text_stream_t *stream)
+MRCP_DECLARE(mrcp_stream_status_e) mrcp_generator_run(mrcp_generator_t *generator, apt_text_stream_t *stream)
{
mrcp_message_t *message = generator->message;
if(!message) {
- return MRCP_STREAM_MESSAGE_INVALID;
+ return MRCP_STREAM_STATUS_INVALID;
}
- if(message && generator->result == MRCP_STREAM_MESSAGE_TRUNCATED) {
- /* process continuation data */
- generator->result = mrcp_message_body_write(message,stream);
- return generator->result;
+ if(generator->stage == MRCP_STREAM_STAGE_NONE) {
+ /* validate message */
+ if(mrcp_message_validate(message) == FALSE) {
+ return MRCP_STREAM_STATUS_INVALID;
+ }
+ generator->stage = MRCP_STREAM_STAGE_START_LINE;
+ }
+
+ if(generator->stage == MRCP_STREAM_STAGE_START_LINE) {
+ /* generate start-line */
+ if(mrcp_start_line_generate(&message->start_line,stream) == FALSE) {
+ return mrcp_generator_break(generator,stream);
+ }
+
+ if(message->start_line.version == MRCP_VERSION_2) {
+ mrcp_channel_id_generate(&message->channel_id,stream);
+ }
+
+ /* generate header */
+ if(mrcp_message_header_generate(&message->header,stream) == FALSE) {
+ return mrcp_generator_break(generator,stream);
+ }
+
+ /* finalize start-line generation */
+ if(mrcp_start_line_finalize(&message->start_line,message->body.length,stream) == FALSE) {
+ return mrcp_generator_break(generator,stream);
+ }
+
+ generator->stage = MRCP_STREAM_STAGE_NONE;
+ if(mrcp_generic_header_property_check(message,GENERIC_HEADER_CONTENT_LENGTH) == TRUE) {
+ mrcp_generic_header_t *generic_header = mrcp_generic_header_get(message);
+ if(generic_header && generic_header->content_length) {
+ apt_str_t *body = &message->body;
+ body->length = 0;
+ generator->stage = MRCP_STREAM_STAGE_BODY;
+ }
+ }
}
- /* generate start-line and header */
- if(mrcp_message_generate(generator->resource_factory,message,stream) == FALSE) {
- return mrcp_generator_break(generator,stream);
+ if(generator->stage == MRCP_STREAM_STAGE_BODY) {
+ if(mrcp_message_body_write(message,stream) == FALSE) {
+ return mrcp_generator_break(generator,stream);
+ }
+
+ generator->stage = MRCP_STREAM_STAGE_NONE;
}
- /* generate body */
- generator->result = mrcp_message_body_generate(message,stream);
- return generator->result;
+ return MRCP_STREAM_STATUS_COMPLETE;
}
/** Walk through MRCP stream and invoke message handler for each parsed message */
MRCP_DECLARE(apt_bool_t) mrcp_stream_walk(mrcp_parser_t *parser, apt_text_stream_t *stream, mrcp_message_handler_f handler, void *obj)
{
- mrcp_stream_result_e result;
+ mrcp_stream_status_e status;
if(parser->skip_lf == TRUE) {
/* skip occurred as a result of message segmentation between and */
apt_text_char_skip(stream,APT_TOKEN_LF);
parser->skip_lf = FALSE;
}
do {
- result = mrcp_parser_run(parser,stream);
- if(result == MRCP_STREAM_MESSAGE_COMPLETE) {
+ status = mrcp_parser_run(parser,stream);
+ if(status == MRCP_STREAM_STATUS_COMPLETE) {
/* message is completely parsed */
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Parsed MRCP Message [%lu]", stream->pos - stream->text.buf);
/* invoke message handler */
- handler(obj,parser->message,result);
+ handler(obj,parser->message,status);
}
- else if(result == MRCP_STREAM_MESSAGE_TRUNCATED) {
+ else if(status == MRCP_STREAM_STATUS_INCOMPLETE) {
/* message is partially parsed, to be continued */
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Truncated MRCP Message [%lu]", stream->pos - stream->text.buf);
/* prepare stream for further processing */
@@ -348,11 +392,11 @@ MRCP_DECLARE(apt_bool_t) mrcp_stream_walk(mrcp_parser_t *parser, apt_text_stream
}
return TRUE;
}
- else if(result == MRCP_STREAM_MESSAGE_INVALID){
+ else if(status == MRCP_STREAM_STATUS_INVALID){
/* error case */
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Parse MRCP Message");
/* invoke message handler */
- handler(obj,parser->message,result);
+ handler(obj,parser->message,status);
/* reset stream pos */
stream->pos = stream->text.buf;
return FALSE;
@@ -361,6 +405,6 @@ MRCP_DECLARE(apt_bool_t) mrcp_stream_walk(mrcp_parser_t *parser, apt_text_stream
while(apt_text_is_eos(stream) == FALSE);
/* reset stream pos */
- stream->pos = stream->text.buf;
+ apt_text_stream_reset(stream);
return TRUE;
}
diff --git a/libs/unimrcp/libs/mrcp/message/include/mrcp_header_accessor.h b/libs/unimrcp/libs/mrcp/message/include/mrcp_header_accessor.h
index 209183310f..dbd52d2d47 100644
--- a/libs/unimrcp/libs/mrcp/message/include/mrcp_header_accessor.h
+++ b/libs/unimrcp/libs/mrcp/message/include/mrcp_header_accessor.h
@@ -149,6 +149,10 @@ MRCP_DECLARE(apt_bool_t) mrcp_header_property_check(mrcp_header_accessor_t *acce
/** Add name only property */
MRCP_DECLARE(void) mrcp_header_name_property_add(mrcp_header_accessor_t *accessor, apr_size_t id);
+
+/** Generate completion-cause */
+MRCP_DECLARE(apt_bool_t) mrcp_completion_cause_generate(const apt_str_table_item_t table[], apr_size_t size, apr_size_t cause, apt_text_stream_t *stream);
+
APT_END_EXTERN_C
#endif /*__MRCP_HEADER_ACCESSOR_H__*/
diff --git a/libs/unimrcp/libs/mrcp/message/src/mrcp_generic_header.c b/libs/unimrcp/libs/mrcp/message/src/mrcp_generic_header.c
index 3f2c57ab10..1b1d1a7d7f 100644
--- a/libs/unimrcp/libs/mrcp/message/src/mrcp_generic_header.c
+++ b/libs/unimrcp/libs/mrcp/message/src/mrcp_generic_header.c
@@ -43,7 +43,7 @@ static apt_bool_t mrcp_request_id_list_parse(mrcp_request_id_list_t *request_id_
apt_str_t field;
apt_text_stream_t stream;
stream.text = *value;
- stream.pos = stream.text.buf;
+ apt_text_stream_reset(&stream);
request_id_list->count = 0;
while(request_id_list->count < MAX_ACTIVE_REQUEST_ID_COUNT) {
if(apt_text_field_read(&stream,',',TRUE,&field) == FALSE) {
diff --git a/libs/unimrcp/libs/mrcp/message/src/mrcp_header_accessor.c b/libs/unimrcp/libs/mrcp/message/src/mrcp_header_accessor.c
index 5c293ec11c..ae80b1aa50 100644
--- a/libs/unimrcp/libs/mrcp/message/src/mrcp_header_accessor.c
+++ b/libs/unimrcp/libs/mrcp/message/src/mrcp_header_accessor.c
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include
#include "mrcp_header_accessor.h"
typedef enum {
@@ -191,3 +192,22 @@ MRCP_DECLARE(apt_bool_t) mrcp_header_inherit(mrcp_header_accessor_t *accessor, c
return TRUE;
}
+
+/** Generate completion-cause */
+MRCP_DECLARE(apt_bool_t) mrcp_completion_cause_generate(const apt_str_table_item_t table[], apr_size_t size, apr_size_t cause, apt_text_stream_t *stream)
+{
+ int length;
+ const apt_str_t *name = apt_string_table_str_get(table,size,cause);
+ if(!name) {
+ return FALSE;
+ }
+ length = sprintf(stream->pos,"%03"APR_SIZE_T_FMT" ",cause);
+ if(length <= 0) {
+ return FALSE;
+ }
+ stream->pos += length;
+
+ memcpy(stream->pos,name->buf,name->length);
+ stream->pos += name->length;
+ return TRUE;
+}
diff --git a/libs/unimrcp/libs/mrcp/message/src/mrcp_start_line.c b/libs/unimrcp/libs/mrcp/message/src/mrcp_start_line.c
index 0e7e7a9fe8..2a406663fa 100644
--- a/libs/unimrcp/libs/mrcp/message/src/mrcp_start_line.c
+++ b/libs/unimrcp/libs/mrcp/message/src/mrcp_start_line.c
@@ -328,8 +328,8 @@ MRCP_DECLARE(apt_bool_t) mrcp_start_line_parse(mrcp_start_line_t *start_line, ap
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Cannot parse MRCP start-line");
return FALSE;
}
- line.pos = line.text.buf;
-
+
+ apt_text_stream_reset(&line);
if(apt_text_field_read(&line,APT_TOKEN_SP,TRUE,&field) == FALSE) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Cannot read the first field in start-line");
return FALSE;
diff --git a/libs/unimrcp/libs/mrcp/mrcp.vcproj b/libs/unimrcp/libs/mrcp/mrcp.vcproj
index 9963bbc266..de0721096c 100644
--- a/libs/unimrcp/libs/mrcp/mrcp.vcproj
+++ b/libs/unimrcp/libs/mrcp/mrcp.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -122,6 +125,116 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/libs/mrcp/resources/src/mrcp_recog_header.c b/libs/unimrcp/libs/mrcp/resources/src/mrcp_recog_header.c
index 4a4076faf3..4bfbcbe16e 100644
--- a/libs/unimrcp/libs/mrcp/resources/src/mrcp_recog_header.c
+++ b/libs/unimrcp/libs/mrcp/resources/src/mrcp_recog_header.c
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-#include
#include "mrcp_recog_header.h"
/** String table of MRCPv1 recognizer headers (mrcp_recog_header_id) */
@@ -134,23 +133,6 @@ static const apt_str_table_item_t v2_completion_cause_string_table[] = {
{{"grammar-definition-failure", 26},9}
};
-/** Generate MRCP recognizer completion-cause */
-static apt_bool_t mrcp_completion_cause_generate(mrcp_recog_completion_cause_e completion_cause, const apt_str_t *name, apt_text_stream_t *stream)
-{
- int length = sprintf(stream->pos,"%03"APR_SIZE_T_FMT" ",completion_cause);
- if(length <= 0) {
- return FALSE;
- }
- stream->pos += length;
-
- if(name) {
- memcpy(stream->pos,name->buf,name->length);
- stream->pos += name->length;
- }
- return TRUE;
-}
-
-
/** Initialize recognizer header */
static void mrcp_recog_header_init(mrcp_recog_header_t *recog_header)
{
@@ -461,11 +443,11 @@ static apt_bool_t mrcp_v1_recog_header_generate(mrcp_header_accessor_t *accessor
return apt_size_value_generate_from_float(recog_header->speed_vs_accuracy,value);
}
else if(id == RECOGNIZER_HEADER_COMPLETION_CAUSE) {
- const apt_str_t *name = apt_string_table_str_get(
+ return mrcp_completion_cause_generate(
v1_completion_cause_string_table,
RECOGNIZER_COMPLETION_CAUSE_COUNT,
- recog_header->completion_cause);
- return mrcp_completion_cause_generate(recog_header->completion_cause,name,value);
+ recog_header->completion_cause,
+ value);
}
return mrcp_recog_header_generate(recog_header,id,value);
}
@@ -484,11 +466,11 @@ static apt_bool_t mrcp_v2_recog_header_generate(mrcp_header_accessor_t *accessor
return apt_float_value_generate(recog_header->speed_vs_accuracy,value);
}
else if(id == RECOGNIZER_HEADER_COMPLETION_CAUSE) {
- const apt_str_t *name = apt_string_table_str_get(
+ return mrcp_completion_cause_generate(
v2_completion_cause_string_table,
RECOGNIZER_COMPLETION_CAUSE_COUNT,
- recog_header->completion_cause);
- return mrcp_completion_cause_generate(recog_header->completion_cause,name,value);
+ recog_header->completion_cause,
+ value);
}
return mrcp_recog_header_generate(recog_header,id,value);
}
diff --git a/libs/unimrcp/libs/mrcp/resources/src/mrcp_recorder_header.c b/libs/unimrcp/libs/mrcp/resources/src/mrcp_recorder_header.c
index 1b51da81eb..34902c12c8 100644
--- a/libs/unimrcp/libs/mrcp/resources/src/mrcp_recorder_header.c
+++ b/libs/unimrcp/libs/mrcp/resources/src/mrcp_recorder_header.c
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-#include
#include "mrcp_recorder_header.h"
/** String table of recorder headers (mrcp_recorder_header_id) */
@@ -45,25 +44,6 @@ static const apt_str_table_item_t completion_cause_string_table[] = {
{{"error", 5},0}
};
-/** Generate MRCP recorder completion-cause */
-static apt_bool_t mrcp_completion_cause_generate(
- mrcp_recorder_completion_cause_e completion_cause,
- const apt_str_t *name,
- apt_text_stream_t *stream)
-{
- int length = sprintf(stream->pos,"%03"APR_SIZE_T_FMT" ",completion_cause);
- if(length <= 0) {
- return FALSE;
- }
- stream->pos += length;
-
- if(name) {
- memcpy(stream->pos,name->buf,name->length);
- stream->pos += name->length;
- }
- return TRUE;
-}
-
/** Initialize recorder header */
static void mrcp_recorder_header_init(mrcp_recorder_header_t *recorder_header)
@@ -164,11 +144,11 @@ static apt_bool_t mrcp_recorder_header_generate(mrcp_header_accessor_t *accessor
break;
case RECORDER_HEADER_COMPLETION_CAUSE:
{
- const apt_str_t *name = apt_string_table_str_get(
+ mrcp_completion_cause_generate(
completion_cause_string_table,
RECORDER_COMPLETION_CAUSE_COUNT,
- recorder_header->completion_cause);
- mrcp_completion_cause_generate(recorder_header->completion_cause,name,value);
+ recorder_header->completion_cause,
+ value);
break;
}
case RECORDER_HEADER_COMPLETION_REASON:
diff --git a/libs/unimrcp/libs/mrcp/resources/src/mrcp_synth_header.c b/libs/unimrcp/libs/mrcp/resources/src/mrcp_synth_header.c
index 3a8c804d4d..51ec8667c7 100644
--- a/libs/unimrcp/libs/mrcp/resources/src/mrcp_synth_header.c
+++ b/libs/unimrcp/libs/mrcp/resources/src/mrcp_synth_header.c
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-#include
#include "mrcp_synth_header.h"
/** String table of MRCP synthesizer headers (mrcp_synthesizer_header_id) */
@@ -214,7 +213,7 @@ static apt_bool_t mrcp_speech_length_value_parse(mrcp_speech_length_value_t *spe
apt_str_t str;
apt_text_stream_t stream;
stream.text = *value;
- stream.pos = stream.text.buf;
+ apt_text_stream_reset(&stream);
stream.pos++;
if(apt_text_field_read(&stream,APT_TOKEN_SP,TRUE,&str) == FALSE) {
return FALSE;
@@ -253,25 +252,6 @@ static apt_bool_t mrcp_speech_length_generate(mrcp_speech_length_value_t *speech
return TRUE;
}
-/** Generate MRCP synthesizer completion-cause */
-static apt_bool_t mrcp_completion_cause_generate(mrcp_synth_completion_cause_e completion_cause, apt_text_stream_t *stream)
-{
- int length;
- const apt_str_t *name = apt_string_table_str_get(completion_cause_string_table,SYNTHESIZER_COMPLETION_CAUSE_COUNT,completion_cause);
- if(!name) {
- return FALSE;
- }
- length = sprintf(stream->pos,"%03"APR_SIZE_T_FMT" ",completion_cause);
- if(length <= 0) {
- return FALSE;
- }
- stream->pos += length;
-
- memcpy(stream->pos,name->buf,name->length);
- stream->pos += name->length;
- return TRUE;
-}
-
/** Initialize synthesizer header */
static void mrcp_synth_header_init(mrcp_synth_header_t *synth_header)
{
@@ -398,7 +378,11 @@ static apt_bool_t mrcp_synth_header_generate(mrcp_header_accessor_t *accessor, s
apt_string_value_generate(&synth_header->speaker_profile,value);
break;
case SYNTHESIZER_HEADER_COMPLETION_CAUSE:
- mrcp_completion_cause_generate(synth_header->completion_cause,value);
+ mrcp_completion_cause_generate(
+ completion_cause_string_table,
+ SYNTHESIZER_COMPLETION_CAUSE_COUNT,
+ synth_header->completion_cause,
+ value);
break;
case SYNTHESIZER_HEADER_COMPLETION_REASON:
apt_string_value_generate(&synth_header->completion_reason,value);
diff --git a/libs/unimrcp/libs/mrcpv2-transport/mrcpv2transport.vcproj b/libs/unimrcp/libs/mrcpv2-transport/mrcpv2transport.vcproj
index 2135148cd9..20d8760150 100644
--- a/libs/unimrcp/libs/mrcpv2-transport/mrcpv2transport.vcproj
+++ b/libs/unimrcp/libs/mrcpv2-transport/mrcpv2transport.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -120,6 +123,114 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/libs/mrcpv2-transport/src/mrcp_client_connection.c b/libs/unimrcp/libs/mrcpv2-transport/src/mrcp_client_connection.c
index a94765f042..94b25bad26 100644
--- a/libs/unimrcp/libs/mrcpv2-transport/src/mrcp_client_connection.c
+++ b/libs/unimrcp/libs/mrcpv2-transport/src/mrcp_client_connection.c
@@ -77,7 +77,7 @@ MRCP_DECLARE(mrcp_connection_agent_t*) mrcp_client_connection_agent_create(
apt_task_vtable_t *vtable;
mrcp_connection_agent_t *agent;
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create "MRCPV2_CONNECTION_TASK_NAME" [%d]",max_connection_count);
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create "MRCPV2_CONNECTION_TASK_NAME" [%"APR_SIZE_T_FMT"]",max_connection_count);
agent = apr_palloc(pool,sizeof(mrcp_connection_agent_t));
agent->pool = pool;
agent->pollset = NULL;
@@ -424,7 +424,7 @@ static apt_bool_t mrcp_client_agent_messsage_send(mrcp_connection_agent_t *agent
apt_bool_t status = FALSE;
mrcp_connection_t *connection = channel->connection;
apt_text_stream_t *stream;
- mrcp_stream_result_e result;
+ mrcp_stream_status_e result;
if(!connection || !connection->sock) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"No MRCPv2 Connection");
@@ -436,7 +436,7 @@ static apt_bool_t mrcp_client_agent_messsage_send(mrcp_connection_agent_t *agent
do {
apt_text_stream_init(&connection->tx_stream,connection->tx_buffer,sizeof(connection->tx_buffer)-1);
result = mrcp_generator_run(connection->generator,stream);
- if(result == MRCP_STREAM_MESSAGE_COMPLETE || result == MRCP_STREAM_MESSAGE_TRUNCATED) {
+ if(result != MRCP_STREAM_STATUS_INVALID) {
stream->text.length = stream->pos - stream->text.buf;
*stream->pos = '\0';
@@ -455,7 +455,7 @@ static apt_bool_t mrcp_client_agent_messsage_send(mrcp_connection_agent_t *agent
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Generate MRCPv2 Stream");
}
}
- while(result == MRCP_STREAM_MESSAGE_TRUNCATED);
+ while(result == MRCP_STREAM_STATUS_INCOMPLETE);
if(status == FALSE) {
mrcp_message_t *response = mrcp_response_create(message,message->pool);
@@ -467,9 +467,9 @@ static apt_bool_t mrcp_client_agent_messsage_send(mrcp_connection_agent_t *agent
return TRUE;
}
-static apt_bool_t mrcp_client_message_handler(void *obj, mrcp_message_t *message, mrcp_stream_result_e result)
+static apt_bool_t mrcp_client_message_handler(void *obj, mrcp_message_t *message, mrcp_stream_status_e status)
{
- if(result == MRCP_STREAM_MESSAGE_COMPLETE) {
+ if(status == MRCP_STREAM_STATUS_COMPLETE) {
/* message is completely parsed */
mrcp_connection_t *connection = obj;
mrcp_control_channel_t *channel;
@@ -528,8 +528,8 @@ static apt_bool_t mrcp_client_agent_messsage_receive(mrcp_connection_agent_t *ag
stream->pos);
/* reset pos */
- stream->pos = stream->text.buf;
- /* walk through the stream parsing RTSP messages */
+ apt_text_stream_reset(stream);
+ /* walk through the stream parsing MRCP messages */
return mrcp_stream_walk(connection->parser,stream,mrcp_client_message_handler,connection);
}
diff --git a/libs/unimrcp/libs/mrcpv2-transport/src/mrcp_server_connection.c b/libs/unimrcp/libs/mrcpv2-transport/src/mrcp_server_connection.c
index ba500a20bd..0b370a6498 100644
--- a/libs/unimrcp/libs/mrcpv2-transport/src/mrcp_server_connection.c
+++ b/libs/unimrcp/libs/mrcpv2-transport/src/mrcp_server_connection.c
@@ -88,7 +88,8 @@ MRCP_DECLARE(mrcp_connection_agent_t*) mrcp_server_connection_agent_create(
return NULL;
}
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create "MRCPV2_CONNECTION_TASK_NAME" %s:%hu [%d]",listen_ip,listen_port,max_connection_count);
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create "MRCPV2_CONNECTION_TASK_NAME" %s:%hu [%"APR_SIZE_T_FMT"]",
+ listen_ip,listen_port,max_connection_count);
agent = apr_palloc(pool,sizeof(mrcp_connection_agent_t));
agent->pool = pool;
agent->sockaddr = NULL;
@@ -557,7 +558,7 @@ static apt_bool_t mrcp_server_agent_messsage_send(mrcp_connection_agent_t *agent
{
apt_bool_t status = FALSE;
apt_text_stream_t *stream;
- mrcp_stream_result_e result;
+ mrcp_stream_status_e result;
if(!connection || !connection->sock) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"No MRCPv2 Connection");
return FALSE;
@@ -568,7 +569,7 @@ static apt_bool_t mrcp_server_agent_messsage_send(mrcp_connection_agent_t *agent
do {
apt_text_stream_init(&connection->tx_stream,connection->tx_buffer,sizeof(connection->tx_buffer)-1);
result = mrcp_generator_run(connection->generator,stream);
- if(result == MRCP_STREAM_MESSAGE_COMPLETE || result == MRCP_STREAM_MESSAGE_TRUNCATED) {
+ if(result != MRCP_STREAM_STATUS_INVALID) {
stream->text.length = stream->pos - stream->text.buf;
*stream->pos = '\0';
@@ -587,16 +588,16 @@ static apt_bool_t mrcp_server_agent_messsage_send(mrcp_connection_agent_t *agent
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Generate MRCPv2 Stream");
}
}
- while(result == MRCP_STREAM_MESSAGE_TRUNCATED);
+ while(result == MRCP_STREAM_STATUS_INCOMPLETE);
return status;
}
-static apt_bool_t mrcp_server_message_handler(void *obj, mrcp_message_t *message, mrcp_stream_result_e result)
+static apt_bool_t mrcp_server_message_handler(void *obj, mrcp_message_t *message, mrcp_stream_status_e status)
{
mrcp_connection_t *connection = obj;
mrcp_connection_agent_t *agent = connection->agent;
- if(result == MRCP_STREAM_MESSAGE_COMPLETE) {
+ if(status == MRCP_STREAM_STATUS_COMPLETE) {
/* message is completely parsed */
mrcp_control_channel_t *channel = mrcp_connection_channel_associate(agent,connection,message);
if(channel) {
@@ -609,7 +610,7 @@ static apt_bool_t mrcp_server_message_handler(void *obj, mrcp_message_t *message
connection->id);
}
}
- else if(result == MRCP_STREAM_MESSAGE_INVALID) {
+ else if(status == MRCP_STREAM_STATUS_INVALID) {
/* error case */
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Parse MRCPv2 Stream");
if(message->resource) {
@@ -655,8 +656,8 @@ static apt_bool_t mrcp_server_agent_messsage_receive(mrcp_connection_agent_t *ag
stream->pos);
/* reset pos */
- stream->pos = stream->text.buf;
- /* walk through the stream parsing RTSP messages */
+ apt_text_stream_reset(stream);
+ /* walk through the stream parsing MRCP messages */
return mrcp_stream_walk(connection->parser,stream,mrcp_server_message_handler,connection);
}
diff --git a/libs/unimrcp/libs/uni-rtsp/include/rtsp_stream.h b/libs/unimrcp/libs/uni-rtsp/include/rtsp_stream.h
index 343c1f949d..3d9e31b260 100644
--- a/libs/unimrcp/libs/uni-rtsp/include/rtsp_stream.h
+++ b/libs/unimrcp/libs/uni-rtsp/include/rtsp_stream.h
@@ -26,12 +26,12 @@
APT_BEGIN_EXTERN_C
-/** Result of RTSP stream processing (parse/generate) */
+/** Status of RTSP stream processing (parse/generate) */
typedef enum {
- RTSP_STREAM_MESSAGE_COMPLETE,
- RTSP_STREAM_MESSAGE_TRUNCATED,
- RTSP_STREAM_MESSAGE_INVALID
-} rtsp_stream_result_e;
+ RTSP_STREAM_STATUS_COMPLETE,
+ RTSP_STREAM_STATUS_INCOMPLETE,
+ RTSP_STREAM_STATUS_INVALID
+} rtsp_stream_status_e;
/** Opaque RTSP parser declaration */
typedef struct rtsp_parser_t rtsp_parser_t;
@@ -39,13 +39,13 @@ typedef struct rtsp_parser_t rtsp_parser_t;
typedef struct rtsp_generator_t rtsp_generator_t;
/** RTSP message handler */
-typedef apt_bool_t (*rtsp_message_handler_f)(void *obj, rtsp_message_t *message, rtsp_stream_result_e result);
+typedef apt_bool_t (*rtsp_message_handler_f)(void *obj, rtsp_message_t *message, rtsp_stream_status_e status);
/** Create RTSP stream parser */
RTSP_DECLARE(rtsp_parser_t*) rtsp_parser_create(apr_pool_t *pool);
/** Parse RTSP stream */
-RTSP_DECLARE(rtsp_stream_result_e) rtsp_parser_run(rtsp_parser_t *parser, apt_text_stream_t *stream);
+RTSP_DECLARE(rtsp_stream_status_e) rtsp_parser_run(rtsp_parser_t *parser, apt_text_stream_t *stream);
/** Get parsed RTSP message */
RTSP_DECLARE(rtsp_message_t*) rtsp_parser_message_get(const rtsp_parser_t *parser);
@@ -58,7 +58,7 @@ RTSP_DECLARE(rtsp_generator_t*) rtsp_generator_create(apr_pool_t *pool);
RTSP_DECLARE(apt_bool_t) rtsp_generator_message_set(rtsp_generator_t *generator, rtsp_message_t *message);
/** Generate RTSP stream */
-RTSP_DECLARE(rtsp_stream_result_e) rtsp_generator_run(rtsp_generator_t *generator, apt_text_stream_t *stream);
+RTSP_DECLARE(rtsp_stream_status_e) rtsp_generator_run(rtsp_generator_t *generator, apt_text_stream_t *stream);
/** Walk through RTSP stream and call message handler for each parsed message */
diff --git a/libs/unimrcp/libs/uni-rtsp/src/rtsp_client.c b/libs/unimrcp/libs/uni-rtsp/src/rtsp_client.c
index 8b78005ff6..044dd0623e 100644
--- a/libs/unimrcp/libs/uni-rtsp/src/rtsp_client.c
+++ b/libs/unimrcp/libs/uni-rtsp/src/rtsp_client.c
@@ -138,7 +138,7 @@ RTSP_DECLARE(rtsp_client_t*) rtsp_client_create(
apt_task_msg_pool_t *msg_pool;
rtsp_client_t *client;
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Create RTSP Client [%d]",max_connection_count);
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Create RTSP Client [%"APR_SIZE_T_FMT"]",max_connection_count);
client = apr_palloc(pool,sizeof(rtsp_client_t));
client->pool = pool;
client->obj = obj;
@@ -307,8 +307,9 @@ static apt_bool_t rtsp_client_connection_create(rtsp_client_t *client, rtsp_clie
}
/* Destroy RTSP connection */
-static apt_bool_t rtsp_client_connection_destroy(rtsp_client_t *client, rtsp_client_connection_t *rtsp_connection)
+static apt_bool_t rtsp_client_connection_destroy(rtsp_client_connection_t *rtsp_connection)
{
+ rtsp_client_t *client = rtsp_connection->client;
apt_list_elem_remove(client->connection_list,rtsp_connection->it);
apt_net_client_disconnect(client->task,rtsp_connection->base);
@@ -328,10 +329,6 @@ static apt_bool_t rtsp_client_session_terminate_respond(rtsp_client_t *client, r
session->term_state = TERMINATION_STATE_NONE;
client->vtable->on_session_terminate_response(client,session);
-
- if(apr_hash_count(rtsp_connection->handle_table) == 0) {
- rtsp_client_connection_destroy(client,rtsp_connection);
- }
return TRUE;
}
@@ -378,6 +375,10 @@ static apt_bool_t rtsp_client_session_terminate_process(rtsp_client_t *client, r
/* respond immediately if no resources left */
if(apr_hash_count(session->resource_table) == 0) {
rtsp_client_session_terminate_respond(client,session);
+
+ if(apr_hash_count(rtsp_connection->handle_table) == 0) {
+ rtsp_client_connection_destroy(rtsp_connection);
+ }
}
}
@@ -407,7 +408,7 @@ static apt_bool_t rtsp_client_session_url_generate(rtsp_client_session_t *sessio
static apt_bool_t rtsp_client_request_push(rtsp_client_connection_t *rtsp_connection, rtsp_client_session_t *session, rtsp_message_t *message)
{
/* add request to inprogress request queue */
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Push RTSP Request to In-Progress Queue "APT_PTRSID_FMT" CSeq:%d",
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Push RTSP Request to In-Progress Queue "APT_PTRSID_FMT" CSeq:%"APR_SIZE_T_FMT,
session,
message->header.session_id.buf ? message->header.session_id.buf : "new",
message->header.cseq);
@@ -429,7 +430,7 @@ static apt_bool_t rtsp_client_request_pop(rtsp_client_connection_t *rtsp_connect
if(ret_request) {
*ret_request = session->active_request;
}
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Pop In-Progress RTSP Request "APT_PTR_FMT" CSeq:%d",
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Pop In-Progress RTSP Request "APT_PTR_FMT" CSeq:%"APR_SIZE_T_FMT,
session,
response->header.cseq);
apt_list_elem_remove(rtsp_connection->inprogress_request_queue,elem);
@@ -663,7 +664,7 @@ static apt_bool_t rtsp_client_on_disconnect(rtsp_client_t *client, rtsp_client_c
if(remaining_handles) {
void *val;
apr_hash_index_t *it;
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Terminate Remaining RTSP Handles [%d]",remaining_handles);
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Terminate Remaining RTSP Handles [%"APR_SIZE_T_FMT"]",remaining_handles);
it = apr_hash_first(rtsp_connection->base->pool,rtsp_connection->session_table);
for(; it; it = apr_hash_next(it)) {
apr_hash_this(it,NULL,NULL,&val);
@@ -676,7 +677,7 @@ static apt_bool_t rtsp_client_on_disconnect(rtsp_client_t *client, rtsp_client_c
}
if(!remaining_handles && !cancelled_requests) {
- rtsp_client_connection_destroy(client,rtsp_connection);
+ rtsp_client_connection_destroy(rtsp_connection);
}
return TRUE;
}
@@ -687,7 +688,7 @@ static apt_bool_t rtsp_client_message_send(rtsp_client_t *client, apt_net_client
apt_bool_t status = FALSE;
rtsp_client_connection_t *rtsp_connection;
apt_text_stream_t *stream;
- rtsp_stream_result_e result;
+ rtsp_stream_status_e result;
if(!connection || !connection->sock) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"No RTSP Connection");
@@ -699,9 +700,9 @@ static apt_bool_t rtsp_client_message_send(rtsp_client_t *client, apt_net_client
rtsp_generator_message_set(rtsp_connection->generator,message);
do {
stream->text.length = sizeof(rtsp_connection->tx_buffer)-1;
- stream->pos = stream->text.buf;
+ apt_text_stream_reset(stream);
result = rtsp_generator_run(rtsp_connection->generator,stream);
- if(result == RTSP_STREAM_MESSAGE_COMPLETE || result == RTSP_STREAM_MESSAGE_TRUNCATED) {
+ if(result != RTSP_STREAM_STATUS_INVALID) {
stream->text.length = stream->pos - stream->text.buf;
*stream->pos = '\0';
@@ -720,15 +721,16 @@ static apt_bool_t rtsp_client_message_send(rtsp_client_t *client, apt_net_client
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Generate RTSP Stream");
}
}
- while(result == RTSP_STREAM_MESSAGE_TRUNCATED);
+ while(result == RTSP_STREAM_STATUS_INCOMPLETE);
return status;
}
-static apt_bool_t rtsp_client_message_handler(void *obj, rtsp_message_t *message, rtsp_stream_result_e result)
+/** return TRUE to proceed with the next message in the stream (if any) */
+static apt_bool_t rtsp_client_message_handler(void *obj, rtsp_message_t *message, rtsp_stream_status_e status)
{
rtsp_client_connection_t *rtsp_connection = obj;
- if(result != RTSP_STREAM_MESSAGE_COMPLETE) {
+ if(status != RTSP_STREAM_STATUS_COMPLETE) {
/* message is not completely parsed, nothing to do */
return TRUE;
}
@@ -738,8 +740,9 @@ static apt_bool_t rtsp_client_message_handler(void *obj, rtsp_message_t *message
rtsp_client_session_t *session;
/* at first, pop in-progress request/session */
if(rtsp_client_request_pop(rtsp_connection,message,&request,&session) == FALSE) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unexpected RTSP Response Received CSeq:%d",message->header.cseq);
- return FALSE;
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unexpected RTSP Response Received CSeq:%"APR_SIZE_T_FMT,
+ message->header.cseq);
+ return TRUE;
}
/* next, process session response */
@@ -756,6 +759,12 @@ static apt_bool_t rtsp_client_message_handler(void *obj, rtsp_message_t *message
/* respond if no resources left */
if(apr_hash_count(session->resource_table) == 0) {
rtsp_client_session_terminate_respond(rtsp_connection->client,session);
+
+ if(apr_hash_count(rtsp_connection->handle_table) == 0) {
+ rtsp_client_connection_destroy(rtsp_connection);
+ /* return FALSE to indicate connection has been destroyed */
+ return FALSE;
+ }
}
}
}
@@ -801,7 +810,7 @@ static apt_bool_t rtsp_client_message_receive(apt_net_client_task_t *task, apt_n
stream->pos);
/* reset pos */
- stream->pos = stream->text.buf;
+ apt_text_stream_reset(stream);
/* walk through the stream parsing RTSP messages */
return rtsp_stream_walk(rtsp_connection->parser,stream,rtsp_client_message_handler,rtsp_connection);
}
diff --git a/libs/unimrcp/libs/uni-rtsp/src/rtsp_header.c b/libs/unimrcp/libs/uni-rtsp/src/rtsp_header.c
index b76f2ec383..b090fd7303 100644
--- a/libs/unimrcp/libs/uni-rtsp/src/rtsp_header.c
+++ b/libs/unimrcp/libs/uni-rtsp/src/rtsp_header.c
@@ -117,7 +117,7 @@ static apt_bool_t rtsp_transport_attrib_parse(rtsp_transport_t *transport, const
apt_text_stream_t stream;
stream.text = *field;
- stream.pos = stream.text.buf;
+ apt_text_stream_reset(&stream);
/* read attrib name */
if(apt_text_field_read(&stream,'=',TRUE,&name) == FALSE) {
@@ -160,7 +160,7 @@ static apt_bool_t rtsp_transport_protocol_parse(rtsp_transport_t *transport, con
apt_text_stream_t stream;
stream.text = *value;
- stream.pos = stream.text.buf;
+ apt_text_stream_reset(&stream);
/* set the defaults */
transport->protocol = RTSP_TRANSPORT_RTP;
@@ -203,7 +203,7 @@ static apt_bool_t rtsp_transport_parse(rtsp_transport_t *transport, const apt_st
apt_text_stream_t stream;
stream.text = *line;
- stream.pos = stream.text.buf;
+ apt_text_stream_reset(&stream);
/* read transport protocol (RTP/AVP[/UDP]) */
if(apt_text_field_read(&stream,';',TRUE,&field) == FALSE) {
return FALSE;
diff --git a/libs/unimrcp/libs/uni-rtsp/src/rtsp_server.c b/libs/unimrcp/libs/uni-rtsp/src/rtsp_server.c
index ad7d251c40..c9f6c8c2b3 100644
--- a/libs/unimrcp/libs/uni-rtsp/src/rtsp_server.c
+++ b/libs/unimrcp/libs/uni-rtsp/src/rtsp_server.c
@@ -131,7 +131,8 @@ RTSP_DECLARE(rtsp_server_t*) rtsp_server_create(
return NULL;
}
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Create RTSP Server %s:%hu [%d]",listen_ip,listen_port,max_connection_count);
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Create RTSP Server %s:%hu [%"APR_SIZE_T_FMT"]",
+ listen_ip,listen_port,max_connection_count);
server = apr_palloc(pool,sizeof(rtsp_server_t));
server->pool = pool;
server->obj = obj;
@@ -513,7 +514,7 @@ static apt_bool_t rtsp_server_message_send(rtsp_server_t *server, apt_net_server
apt_bool_t status = FALSE;
rtsp_server_connection_t *rtsp_connection;
apt_text_stream_t *stream;
- rtsp_stream_result_e result;
+ rtsp_stream_status_e result;
if(!connection || !connection->sock) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"No RTSP Connection");
@@ -525,9 +526,9 @@ static apt_bool_t rtsp_server_message_send(rtsp_server_t *server, apt_net_server
rtsp_generator_message_set(rtsp_connection->generator,message);
do {
stream->text.length = sizeof(rtsp_connection->tx_buffer)-1;
- stream->pos = stream->text.buf;
+ apt_text_stream_reset(stream);
result = rtsp_generator_run(rtsp_connection->generator,stream);
- if(result == RTSP_STREAM_MESSAGE_COMPLETE || result == RTSP_STREAM_MESSAGE_TRUNCATED) {
+ if(result != RTSP_STREAM_STATUS_INVALID) {
stream->text.length = stream->pos - stream->text.buf;
*stream->pos = '\0';
@@ -546,15 +547,15 @@ static apt_bool_t rtsp_server_message_send(rtsp_server_t *server, apt_net_server
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Generate RTSP Stream");
}
}
- while(result == RTSP_STREAM_MESSAGE_TRUNCATED);
+ while(result == RTSP_STREAM_STATUS_INCOMPLETE);
return status;
}
-static apt_bool_t rtsp_server_message_handler(void *obj, rtsp_message_t *message, rtsp_stream_result_e result)
+static apt_bool_t rtsp_server_message_handler(void *obj, rtsp_message_t *message, rtsp_stream_status_e status)
{
rtsp_server_connection_t *rtsp_connection = obj;
- if(result == RTSP_STREAM_MESSAGE_COMPLETE) {
+ if(status == RTSP_STREAM_STATUS_COMPLETE) {
/* message is completely parsed */
apt_str_t *destination;
rtsp_message_t *message = rtsp_parser_message_get(rtsp_connection->parser);
@@ -564,7 +565,7 @@ static apt_bool_t rtsp_server_message_handler(void *obj, rtsp_message_t *message
}
rtsp_server_session_request_process(rtsp_connection->server,rtsp_connection,message);
}
- else if(result == RTSP_STREAM_MESSAGE_INVALID) {
+ else if(status == RTSP_STREAM_STATUS_INVALID) {
/* error case */
rtsp_message_t *response;
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Parse RTSP Stream");
@@ -614,7 +615,7 @@ static apt_bool_t rtsp_server_message_receive(apt_net_server_task_t *task, apt_n
stream->pos);
/* reset pos */
- stream->pos = stream->text.buf;
+ apt_text_stream_reset(stream);
/* walk through the stream parsing RTSP messages */
return rtsp_stream_walk(rtsp_connection->parser,stream,rtsp_server_message_handler,rtsp_connection);
}
@@ -657,7 +658,8 @@ static apt_bool_t rtsp_server_on_disconnect(apt_net_server_task_t *task, apt_net
rtsp_server_session_t *session;
void *val;
apr_hash_index_t *it;
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Terminate Remaining RTSP Sessions [%d]",remaining_sessions);
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Terminate Remaining RTSP Sessions [%"APR_SIZE_T_FMT"]",
+ remaining_sessions);
it = apr_hash_first(connection->pool,rtsp_connection->session_table);
for(; it; it = apr_hash_next(it)) {
apr_hash_this(it,NULL,NULL,&val);
diff --git a/libs/unimrcp/libs/uni-rtsp/src/rtsp_start_line.c b/libs/unimrcp/libs/uni-rtsp/src/rtsp_start_line.c
index b6a3fb3e83..24449a8976 100644
--- a/libs/unimrcp/libs/uni-rtsp/src/rtsp_start_line.c
+++ b/libs/unimrcp/libs/uni-rtsp/src/rtsp_start_line.c
@@ -156,8 +156,8 @@ RTSP_DECLARE(apt_bool_t) rtsp_start_line_parse(rtsp_start_line_t *start_line, ap
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Cannot parse RTSP start-line");
return FALSE;
}
- line.pos = line.text.buf;
+ apt_text_stream_reset(&line);
if(apt_text_field_read(&line,APT_TOKEN_SP,TRUE,&field) == FALSE) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Cannot read the first field in start-line");
return FALSE;
diff --git a/libs/unimrcp/libs/uni-rtsp/src/rtsp_stream.c b/libs/unimrcp/libs/uni-rtsp/src/rtsp_stream.c
index 51b791009d..bb8633fb70 100644
--- a/libs/unimrcp/libs/uni-rtsp/src/rtsp_stream.c
+++ b/libs/unimrcp/libs/uni-rtsp/src/rtsp_stream.c
@@ -17,10 +17,17 @@
#include "rtsp_stream.h"
#include "apt_log.h"
+/** Stage of RTSP stream processing (parse/generate) */
+typedef enum {
+ RTSP_STREAM_STAGE_NONE,
+ RTSP_STREAM_STAGE_START_LINE,
+ RTSP_STREAM_STAGE_HEADER,
+ RTSP_STREAM_STAGE_BODY
+} rtsp_stream_stage_e;
+
/** RTSP parser */
struct rtsp_parser_t {
- rtsp_stream_result_e result;
- char *pos;
+ rtsp_stream_stage_e stage;
apt_bool_t skip_lf;
rtsp_message_t *message;
apr_pool_t *pool;
@@ -28,16 +35,15 @@ struct rtsp_parser_t {
/** RTSP generator */
struct rtsp_generator_t {
- rtsp_stream_result_e result;
- char *pos;
+ rtsp_stream_status_e stage;
rtsp_message_t *message;
apr_pool_t *pool;
};
/** Read RTSP message-body */
-static rtsp_stream_result_e rtsp_message_body_read(rtsp_message_t *message, apt_text_stream_t *stream)
+static apt_bool_t rtsp_message_body_read(rtsp_message_t *message, apt_text_stream_t *stream)
{
- rtsp_stream_result_e result = RTSP_STREAM_MESSAGE_COMPLETE;
+ apt_bool_t status = TRUE;
if(message->body.buf) {
/* stream length available to read */
apr_size_t stream_length = stream->text.length - (stream->pos - stream->text.buf);
@@ -46,7 +52,7 @@ static rtsp_stream_result_e rtsp_message_body_read(rtsp_message_t *message, apt_
if(required_length > stream_length) {
required_length = stream_length;
/* not complete */
- result = RTSP_STREAM_MESSAGE_TRUNCATED;
+ status = FALSE;
}
memcpy(message->body.buf+message->body.length,stream->pos,required_length);
message->body.length += required_length;
@@ -54,27 +60,13 @@ static rtsp_stream_result_e rtsp_message_body_read(rtsp_message_t *message, apt_
message->body.buf[message->body.length] = '\0';
}
- return result;
-}
-
-/** Parse RTSP message-body */
-static rtsp_stream_result_e rtsp_message_body_parse(rtsp_message_t *message, apt_text_stream_t *stream, apr_pool_t *pool)
-{
- if(rtsp_header_property_check(&message->header.property_set,RTSP_HEADER_FIELD_CONTENT_LENGTH) == TRUE) {
- if(message->header.content_length) {
- apt_str_t *body = &message->body;
- body->buf = apr_palloc(pool,message->header.content_length+1);
- body->length = 0;
- return rtsp_message_body_read(message,stream);
- }
- }
- return RTSP_STREAM_MESSAGE_COMPLETE;
+ return status;
}
/** Write RTSP message-body */
-static rtsp_stream_result_e rtsp_message_body_write(rtsp_message_t *message, apt_text_stream_t *stream)
+static apt_bool_t rtsp_message_body_write(rtsp_message_t *message, apt_text_stream_t *stream)
{
- rtsp_stream_result_e result = RTSP_STREAM_MESSAGE_COMPLETE;
+ apt_bool_t status = TRUE;
if(message->body.length < message->header.content_length) {
/* stream length available to write */
apr_size_t stream_length = stream->text.length - (stream->pos - stream->text.buf);
@@ -83,7 +75,7 @@ static rtsp_stream_result_e rtsp_message_body_write(rtsp_message_t *message, apt
if(required_length > stream_length) {
required_length = stream_length;
/* not complete */
- result = RTSP_STREAM_MESSAGE_TRUNCATED;
+ status = FALSE;
}
memcpy(stream->pos,message->body.buf+message->body.length,required_length);
@@ -91,83 +83,84 @@ static rtsp_stream_result_e rtsp_message_body_write(rtsp_message_t *message, apt
stream->pos += required_length;
}
- return result;
-}
-
-/** Generate RTSP message-body */
-static rtsp_stream_result_e rtsp_message_body_generate(rtsp_message_t *message, apt_text_stream_t *stream, apr_pool_t *pool)
-{
- if(rtsp_header_property_check(&message->header.property_set,RTSP_HEADER_FIELD_CONTENT_LENGTH) == TRUE) {
- if(message->header.content_length) {
- apt_str_t *body = &message->body;
- body->length = 0;
- return rtsp_message_body_write(message,stream);
- }
- }
- return RTSP_STREAM_MESSAGE_COMPLETE;
+ return status;
}
/** Create RTSP parser */
RTSP_DECLARE(rtsp_parser_t*) rtsp_parser_create(apr_pool_t *pool)
{
rtsp_parser_t *parser = apr_palloc(pool,sizeof(rtsp_parser_t));
- parser->result = RTSP_STREAM_MESSAGE_INVALID;
- parser->pos = NULL;
+ parser->stage = RTSP_STREAM_STAGE_NONE;
parser->skip_lf = FALSE;
parser->message = NULL;
parser->pool = pool;
return parser;
}
-static rtsp_stream_result_e rtsp_parser_break(rtsp_parser_t *parser, apt_text_stream_t *stream)
+static rtsp_stream_status_e rtsp_parser_break(rtsp_parser_t *parser, apt_text_stream_t *stream)
{
- /* failed to parse either start-line or header */
+ /* failed to parse message */
if(apt_text_is_eos(stream) == TRUE) {
- /* end of stream reached, rewind/restore stream */
- stream->pos = parser->pos;
- parser->result = RTSP_STREAM_MESSAGE_TRUNCATED;
- parser->message = NULL;
+ /* end of stream reached */
+ return RTSP_STREAM_STATUS_INCOMPLETE;
}
- else {
- /* error case */
- parser->result = RTSP_STREAM_MESSAGE_INVALID;
- }
- return parser->result;
+
+ /* error case */
+ parser->stage = RTSP_STREAM_STAGE_NONE;
+ return RTSP_STREAM_STATUS_INVALID;
}
/** Parse RTSP stream */
-RTSP_DECLARE(rtsp_stream_result_e) rtsp_parser_run(rtsp_parser_t *parser, apt_text_stream_t *stream)
+RTSP_DECLARE(rtsp_stream_status_e) rtsp_parser_run(rtsp_parser_t *parser, apt_text_stream_t *stream)
{
rtsp_message_t *message = parser->message;
- if(message && parser->result == RTSP_STREAM_MESSAGE_TRUNCATED) {
- /* process continuation data */
- parser->result = rtsp_message_body_read(message,stream);
- return parser->result;
+ if(parser->stage == RTSP_STREAM_STAGE_NONE || !message) {
+ /* create new RTSP message */
+ message = rtsp_message_create(RTSP_MESSAGE_TYPE_UNKNOWN,parser->pool);
+ parser->message = message;
+ parser->stage = RTSP_STREAM_STAGE_START_LINE;
}
- /* create new RTSP message */
- message = rtsp_message_create(RTSP_MESSAGE_TYPE_UNKNOWN,parser->pool);
- parser->message = message;
- /* store current position to be able to rewind/restore stream if needed */
- parser->pos = stream->pos;
- /* parse start-line */
- if(rtsp_start_line_parse(&message->start_line,stream,message->pool) == FALSE) {
- return rtsp_parser_break(parser,stream);
+ if(parser->stage == RTSP_STREAM_STAGE_START_LINE) {
+ /* parse start-line */
+ if(rtsp_start_line_parse(&message->start_line,stream,message->pool) == FALSE) {
+ return rtsp_parser_break(parser,stream);
+ }
+ parser->stage = RTSP_STREAM_STAGE_HEADER;
}
- /* parse header */
- if(rtsp_header_parse(&message->header,stream,message->pool) == FALSE) {
- return rtsp_parser_break(parser,stream);
+
+ if(parser->stage == RTSP_STREAM_STAGE_HEADER) {
+ /* parse header */
+ if(rtsp_header_parse(&message->header,stream,message->pool) == FALSE) {
+ return rtsp_parser_break(parser,stream);
+ }
+
+ parser->stage = RTSP_STREAM_STAGE_NONE;
+ if(rtsp_header_property_check(&message->header.property_set,RTSP_HEADER_FIELD_CONTENT_LENGTH) == TRUE) {
+ if(message->header.content_length) {
+ apt_str_t *body = &message->body;
+ body->buf = apr_palloc(message->pool,message->header.content_length+1);
+ body->length = 0;
+ parser->stage = RTSP_STREAM_STAGE_BODY;
+ }
+ }
}
- /* parse body */
- parser->result = rtsp_message_body_parse(message,stream,message->pool);
-
+
+ if(parser->stage == RTSP_STREAM_STAGE_BODY) {
+ if(rtsp_message_body_read(message,stream) == FALSE) {
+ return rtsp_parser_break(parser,stream);
+ }
+ parser->stage = RTSP_STREAM_STAGE_NONE;
+ }
+
/* in the worst case message segmentation may occur between and
of the final empty header */
if(!message->body.length && *(stream->pos-1)== APT_TOKEN_CR) {
/* if this is the case be prepared to skip */
parser->skip_lf = TRUE;
}
- return parser->result;
+
+ return RTSP_STREAM_STATUS_COMPLETE;
}
/** Get parsed RTSP message */
@@ -181,8 +174,7 @@ RTSP_DECLARE(rtsp_message_t*) rtsp_parser_message_get(const rtsp_parser_t *parse
RTSP_DECLARE(rtsp_generator_t*) rtsp_generator_create(apr_pool_t *pool)
{
rtsp_generator_t *generator = apr_palloc(pool,sizeof(rtsp_generator_t));
- generator->result = RTSP_STREAM_MESSAGE_INVALID;
- generator->pos = NULL;
+ generator->stage = RTSP_STREAM_STAGE_NONE;
generator->message = NULL;
generator->pool = pool;
return generator;
@@ -198,69 +190,80 @@ RTSP_DECLARE(apt_bool_t) rtsp_generator_message_set(rtsp_generator_t *generator,
return TRUE;
}
-static rtsp_stream_result_e rtsp_generator_break(rtsp_generator_t *generator, apt_text_stream_t *stream)
+static rtsp_stream_status_e rtsp_generator_break(rtsp_generator_t *generator, apt_text_stream_t *stream)
{
- /* failed to generate either start-line or header */
+ /* failed to generate message */
if(apt_text_is_eos(stream) == TRUE) {
- /* end of stream reached, rewind/restore stream */
- stream->pos = generator->pos;
- generator->result = RTSP_STREAM_MESSAGE_TRUNCATED;
+ /* end of stream reached */
+ return RTSP_STREAM_STATUS_INCOMPLETE;
}
- else {
- /* error case */
- generator->result = RTSP_STREAM_MESSAGE_INVALID;
- }
- return generator->result;
+
+ /* error case */
+ generator->stage = RTSP_STREAM_STAGE_NONE;
+ return RTSP_STREAM_STATUS_INVALID;
}
/** Generate RTSP stream */
-RTSP_DECLARE(rtsp_stream_result_e) rtsp_generator_run(rtsp_generator_t *generator, apt_text_stream_t *stream)
+RTSP_DECLARE(rtsp_stream_status_e) rtsp_generator_run(rtsp_generator_t *generator, apt_text_stream_t *stream)
{
rtsp_message_t *message = generator->message;
if(!message) {
- return RTSP_STREAM_MESSAGE_INVALID;
+ return RTSP_STREAM_STATUS_INVALID;
}
- if(message && generator->result == RTSP_STREAM_MESSAGE_TRUNCATED) {
- /* process continuation data */
- generator->result = rtsp_message_body_write(message,stream);
- return generator->result;
+ if(generator->stage == RTSP_STREAM_STAGE_NONE) {
+ /* generate start-line */
+ if(rtsp_start_line_generate(&message->start_line,stream) == FALSE) {
+ return rtsp_generator_break(generator,stream);
+ }
+
+ /* generate header */
+ if(rtsp_header_generate(&message->header,stream) == FALSE) {
+ return rtsp_generator_break(generator,stream);
+ }
+
+ generator->stage = RTSP_STREAM_STAGE_NONE;
+ if(rtsp_header_property_check(&message->header.property_set,RTSP_HEADER_FIELD_CONTENT_LENGTH) == TRUE) {
+ if(message->header.content_length) {
+ apt_str_t *body = &message->body;
+ body->length = 0;
+ generator->stage = RTSP_STREAM_STAGE_BODY;
+ }
+ }
}
- /* generate start-line */
- if(rtsp_start_line_generate(&message->start_line,stream) == FALSE) {
- return rtsp_generator_break(generator,stream);
+ if(generator->stage == RTSP_STREAM_STAGE_BODY) {
+ if(rtsp_message_body_write(message,stream) == FALSE) {
+ return rtsp_generator_break(generator,stream);
+ }
+
+ generator->stage = RTSP_STREAM_STAGE_NONE;
}
- /* generate header */
- if(rtsp_header_generate(&message->header,stream) == FALSE) {
- return rtsp_generator_break(generator,stream);
- }
-
- /* generate body */
- generator->result = rtsp_message_body_generate(message,stream,message->pool);
- return generator->result;
+ return RTSP_STREAM_STATUS_COMPLETE;
}
/** Walk through RTSP stream and invoke message handler for each parsed message */
RTSP_DECLARE(apt_bool_t) rtsp_stream_walk(rtsp_parser_t *parser, apt_text_stream_t *stream, rtsp_message_handler_f handler, void *obj)
{
- rtsp_stream_result_e result;
+ rtsp_stream_status_e status;
if(parser->skip_lf == TRUE) {
/* skip occurred as a result of message segmentation between and */
apt_text_char_skip(stream,APT_TOKEN_LF);
parser->skip_lf = FALSE;
}
do {
- result = rtsp_parser_run(parser,stream);
- if(result == RTSP_STREAM_MESSAGE_COMPLETE) {
+ status = rtsp_parser_run(parser,stream);
+ if(status == RTSP_STREAM_STATUS_COMPLETE) {
/* message is completely parsed */
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Parsed RTSP Message [%lu]", stream->pos - stream->text.buf);
- /* invoke message handler */
- handler(obj,parser->message,result);
+ /* connection has already been destroyed, if handler return FALSE */
+ if(handler(obj,parser->message,status) == FALSE) {
+ return TRUE;
+ }
}
- else if(result == RTSP_STREAM_MESSAGE_TRUNCATED) {
+ else if(status == RTSP_STREAM_STATUS_INCOMPLETE) {
/* message is partially parsed, to be continued */
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Truncated RTSP Message [%lu]", stream->pos - stream->text.buf);
/* prepare stream for further processing */
@@ -269,19 +272,20 @@ RTSP_DECLARE(apt_bool_t) rtsp_stream_walk(rtsp_parser_t *parser, apt_text_stream
}
return TRUE;
}
- else if(result == RTSP_STREAM_MESSAGE_INVALID){
+ else if(status == RTSP_STREAM_STATUS_INVALID){
/* error case */
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Parse RTSP Message");
/* invoke message handler */
- handler(obj,parser->message,result);
- /* reset stream pos */
- stream->pos = stream->text.buf;
+ if(handler(obj,parser->message,status) == TRUE) {
+ /* reset stream pos */
+ stream->pos = stream->text.buf;
+ }
return FALSE;
}
}
while(apt_text_is_eos(stream) == FALSE);
/* reset stream pos */
- stream->pos = stream->text.buf;
+ apt_text_stream_reset(stream);
return TRUE;
}
diff --git a/libs/unimrcp/libs/uni-rtsp/unirtsp.vcproj b/libs/unimrcp/libs/uni-rtsp/unirtsp.vcproj
index c441541f8c..b7f07ad279 100644
--- a/libs/unimrcp/libs/uni-rtsp/unirtsp.vcproj
+++ b/libs/unimrcp/libs/uni-rtsp/unirtsp.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -122,6 +125,116 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/modules/mrcp-sofiasip/mrcpsofiasip.vcproj b/libs/unimrcp/modules/mrcp-sofiasip/mrcpsofiasip.vcproj
index f6f9b0015f..d45a60f869 100644
--- a/libs/unimrcp/modules/mrcp-sofiasip/mrcpsofiasip.vcproj
+++ b/libs/unimrcp/modules/mrcp-sofiasip/mrcpsofiasip.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -122,6 +125,116 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/modules/mrcp-sofiasip/src/mrcp_sdp.c b/libs/unimrcp/modules/mrcp-sofiasip/src/mrcp_sdp.c
index 56244af8c8..7af406ff1c 100644
--- a/libs/unimrcp/modules/mrcp-sofiasip/src/mrcp_sdp.c
+++ b/libs/unimrcp/modules/mrcp-sofiasip/src/mrcp_sdp.c
@@ -183,7 +183,7 @@ static apr_size_t sdp_rtp_media_generate(char *buffer, apr_size_t size, const mr
offset += snprintf(buffer+offset,size-offset,"a=ptime:%hu\r\n",audio_media->ptime);
}
}
- offset += snprintf(buffer+offset,size-offset,"a=mid:%d\r\n",audio_media->mid);
+ offset += snprintf(buffer+offset,size-offset,"a=mid:%"APR_SIZE_T_FMT"\r\n",audio_media->mid);
return offset;
}
@@ -248,7 +248,7 @@ static apr_size_t sdp_control_media_generate(char *buffer, apr_size_t size, cons
for(i=0; icmid_arr->nelts; i++) {
offset += snprintf(buffer+offset,size-offset,
- "a=cmid:%d\r\n",
+ "a=cmid:%"APR_SIZE_T_FMT"\r\n",
APR_ARRAY_IDX(control_media->cmid_arr,i,apr_size_t));
}
diff --git a/libs/unimrcp/modules/mrcp-unirtsp/mrcpunirtsp.vcproj b/libs/unimrcp/modules/mrcp-unirtsp/mrcpunirtsp.vcproj
index abc4c2bef1..37855a6356 100644
--- a/libs/unimrcp/modules/mrcp-unirtsp/mrcpunirtsp.vcproj
+++ b/libs/unimrcp/modules/mrcp-unirtsp/mrcpunirtsp.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -122,6 +125,116 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/modules/mrcp-unirtsp/src/mrcp_unirtsp_client_agent.c b/libs/unimrcp/modules/mrcp-unirtsp/src/mrcp_unirtsp_client_agent.c
index 85876f7c47..0b0840b1d7 100644
--- a/libs/unimrcp/modules/mrcp-unirtsp/src/mrcp_unirtsp_client_agent.c
+++ b/libs/unimrcp/modules/mrcp-unirtsp/src/mrcp_unirtsp_client_agent.c
@@ -101,7 +101,7 @@ MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_unirtsp_client_agent_create(rtsp_client_con
apt_task_name_set(task,UNIRTSP_TASK_NAME);
agent->sig_agent->task = task;
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create "UNIRTSP_TASK_NAME" %s:%hu [%d]",
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create "UNIRTSP_TASK_NAME" %s:%hu [%"APR_SIZE_T_FMT"]",
config->server_ip,
config->server_port,
config->max_connection_count);
@@ -208,12 +208,12 @@ static apt_bool_t mrcp_unirtsp_on_announce_response(mrcp_unirtsp_agent_t *agent,
apt_str_t resource_name_str;
text_stream.text = message->body;
- text_stream.pos = text_stream.text.buf;
+ apt_text_stream_reset(&text_stream);
apt_string_set(&resource_name_str,resource_name);
parser = mrcp_parser_create(agent->sig_agent->resource_factory,session->mrcp_session->pool);
mrcp_parser_resource_name_set(parser,&resource_name_str);
- if(mrcp_parser_run(parser,&text_stream) == MRCP_STREAM_MESSAGE_COMPLETE) {
+ if(mrcp_parser_run(parser,&text_stream) == MRCP_STREAM_STATUS_COMPLETE) {
mrcp_message = mrcp_parser_message_get(parser);
mrcp_message->channel_id.session_id = message->header.session_id;
}
diff --git a/libs/unimrcp/modules/mrcp-unirtsp/src/mrcp_unirtsp_server_agent.c b/libs/unimrcp/modules/mrcp-unirtsp/src/mrcp_unirtsp_server_agent.c
index a29a68c127..1ef05e193e 100644
--- a/libs/unimrcp/modules/mrcp-unirtsp/src/mrcp_unirtsp_server_agent.c
+++ b/libs/unimrcp/modules/mrcp-unirtsp/src/mrcp_unirtsp_server_agent.c
@@ -99,7 +99,7 @@ MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_unirtsp_server_agent_create(rtsp_server_con
apt_task_name_set(task,UNIRTSP_TASK_NAME);
agent->sig_agent->task = task;
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create "UNIRTSP_TASK_NAME" %s:%hu [%d]",
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create "UNIRTSP_TASK_NAME" %s:%hu [%"APR_SIZE_T_FMT"]",
config->local_ip,
config->local_port,
config->max_connection_count);
@@ -202,12 +202,12 @@ static apt_bool_t mrcp_unirtsp_session_announce(mrcp_unirtsp_agent_t *agent, mrc
apt_str_t resource_name_str;
text_stream.text = message->body;
- text_stream.pos = text_stream.text.buf;
+ apt_text_stream_reset(&text_stream);
apt_string_set(&resource_name_str,resource_name);
parser = mrcp_parser_create(agent->sig_agent->resource_factory,session->mrcp_session->pool);
mrcp_parser_resource_name_set(parser,&resource_name_str);
- if(mrcp_parser_run(parser,&text_stream) == MRCP_STREAM_MESSAGE_COMPLETE) {
+ if(mrcp_parser_run(parser,&text_stream) == MRCP_STREAM_STATUS_COMPLETE) {
mrcp_message_t *mrcp_message = mrcp_parser_message_get(parser);
mrcp_message->channel_id.session_id = message->header.session_id;
status = mrcp_session_control_request(session->mrcp_session,mrcp_message);
diff --git a/libs/unimrcp/packages/inno-setup/setup-sdk-win32.txt b/libs/unimrcp/packages/inno-setup/setup-sdk-win32.txt
new file mode 100644
index 0000000000..c9599058f9
--- /dev/null
+++ b/libs/unimrcp/packages/inno-setup/setup-sdk-win32.txt
@@ -0,0 +1,3 @@
+#include "setup.txt"
+#define release_dir "Release"
+OutputBaseFilename=unimrcp-sdk-{#= uni_version}
diff --git a/libs/unimrcp/packages/inno-setup/setup-sdk-x64.txt b/libs/unimrcp/packages/inno-setup/setup-sdk-x64.txt
new file mode 100644
index 0000000000..0e5a2fe939
--- /dev/null
+++ b/libs/unimrcp/packages/inno-setup/setup-sdk-x64.txt
@@ -0,0 +1,4 @@
+#include "setup.txt"
+#define release_dir "x64\Release"
+OutputBaseFilename=unimrcp-x64-sdk-{#= uni_version}
+ArchitecturesInstallIn64BitMode=x64
diff --git a/libs/unimrcp/packages/inno-setup/setup-win32.txt b/libs/unimrcp/packages/inno-setup/setup-win32.txt
new file mode 100644
index 0000000000..dab742af23
--- /dev/null
+++ b/libs/unimrcp/packages/inno-setup/setup-win32.txt
@@ -0,0 +1,3 @@
+#include "setup.txt"
+#define uni_outdir "..\..\Release"
+OutputBaseFilename=unimrcp-{#= uni_version}
diff --git a/libs/unimrcp/packages/inno-setup/setup-x64.txt b/libs/unimrcp/packages/inno-setup/setup-x64.txt
new file mode 100644
index 0000000000..74324882bc
--- /dev/null
+++ b/libs/unimrcp/packages/inno-setup/setup-x64.txt
@@ -0,0 +1,5 @@
+#include "setup.txt"
+#define uni_outdir "..\..\x64\Release"
+OutputBaseFilename=unimrcp-x64-{#= uni_version}
+ArchitecturesInstallIn64BitMode=x64
+ArchitecturesAllowed=x64
diff --git a/libs/unimrcp/packages/inno-setup/setup.txt b/libs/unimrcp/packages/inno-setup/setup.txt
new file mode 100644
index 0000000000..6dd7582ded
--- /dev/null
+++ b/libs/unimrcp/packages/inno-setup/setup.txt
@@ -0,0 +1,14 @@
+#define uni_version "0.9.0"
+#define uni_src "..\.."
+
+AppName=UniMRCP
+AppVerName=UniMRCP-{#= uni_version}
+AppPublisher=UniMRCP
+AppPublisherURL=http://www.unimrcp.org/
+AppSupportURL=http://groups.google.com/group/unimrcp
+AppUpdatesURL=http://code.google.com/p/unimrcp/downloads/list
+DefaultDirName={pf}\UniMRCP
+DefaultGroupName=UniMRCP
+Compression=lzma
+InternalCompressLevel=max
+SolidCompression=true
diff --git a/libs/unimrcp/packages/inno-setup/unimrcp-sdk.iss b/libs/unimrcp/packages/inno-setup/unimrcp-sdk.iss
index cf876f736a..6391602921 100644
--- a/libs/unimrcp/packages/inno-setup/unimrcp-sdk.iss
+++ b/libs/unimrcp/packages/inno-setup/unimrcp-sdk.iss
@@ -1,46 +1,47 @@
[Setup]
-#include "setup.iss"
-OutputBaseFilename=unimrcp-sdk-{#= uni_version}
+; include either setup-sdk-win32.txt or setup-sdk-x64.txt
+#include "setup-sdk-win32.txt"
+;#include "setup-sdk-x64.txt"
[Types]
-Name: "full"; Description: "Full installation"
-Name: "sdk"; Description: "SDK installation"
-Name: "docs"; Description: "Documentation installation"
-Name: "custom"; Description: "Custom installation"; Flags: iscustom
+Name: full; Description: Full installation
+Name: sdk; Description: SDK installation
+Name: docs; Description: Documentation installation
+Name: custom; Description: Custom installation; Flags: iscustom
[Components]
-Name: "sdk"; Description: "UniMRCP SDK (client, server and plugin development)"; Types: full sdk
-Name: "docs"; Description: "UniMRCP documentation"; Types: full docs
-Name: "docs\design"; Description: "Design concepts"; Types: full docs
-Name: "docs\api"; Description: "API"; Types: full docs
+Name: sdk; Description: UniMRCP SDK (client, server and plugin development); Types: full sdk
+Name: docs; Description: UniMRCP documentation; Types: full docs
+Name: docs\design; Description: Design concepts; Types: full docs
+Name: docs\api; Description: API; Types: full docs
[Files]
-Source: "..\..\libs\apr\include\*.h"; DestDir: "{app}\include"; Components: sdk
-Source: "..\..\libs\apr-toolkit\include\*.h"; DestDir: "{app}\include"; Components: sdk
-Source: "..\..\libs\mpf\include\*.h"; DestDir: "{app}\include"; Components: sdk
-Source: "..\..\libs\mrcp\include\*.h"; DestDir: "{app}\include"; Components: sdk
-Source: "..\..\libs\mrcp\message\include\*.h"; DestDir: "{app}\include"; Components: sdk
-Source: "..\..\libs\mrcp\control\include\*.h"; DestDir: "{app}\include"; Components: sdk
-Source: "..\..\libs\mrcp\resources\include\*.h"; DestDir: "{app}\include"; Components: sdk
-Source: "..\..\libs\mrcp-engine\include\*.h"; DestDir: "{app}\include"; Components: sdk
-Source: "..\..\libs\mrcp-signaling\include\*.h"; DestDir: "{app}\include"; Components: sdk
-Source: "..\..\libs\mrcpv2-transport\include\*.h"; DestDir: "{app}\include"; Components: sdk
-Source: "..\..\libs\mrcp-client\include\*.h"; DestDir: "{app}\include"; Components: sdk
-Source: "..\..\libs\mrcp-server\include\*.h"; DestDir: "{app}\include"; Components: sdk
-Source: "..\..\platforms\libunimrcp-client\include\*.h"; DestDir: "{app}\include"; Components: sdk
-Source: "..\..\platforms\libunimrcp-server\include\*.h"; DestDir: "{app}\include"; Components: sdk
-Source: "..\..\Release\bin\*.lib"; DestDir: "{app}\lib"; Components: sdk
-Source: "..\..\libs\apr\Release\*.lib"; DestDir: "{app}\lib"; Components: sdk
-Source: "..\..\libs\apr-util\Release\*.lib"; DestDir: "{app}\lib"; Components: sdk
-Source: "..\..\libs\sofia-sip\win32\libsofia-sip-ua\Release\*.lib"; DestDir: "{app}\lib"; Components: sdk
-Source: "..\..\build\vsprops\sdk\*.vsprops"; DestDir: "{app}\vsprops"; Components: sdk; AfterInstall: SetProjectPath()
-Source: "..\..\docs\ea\*"; DestDir: "{app}\doc\ea"; Components: docs/design; Flags: recursesubdirs
-Source: "..\..\docs\dox\*"; DestDir: "{app}\doc\dox"; Components: docs/api; Flags: recursesubdirs
+Source: {#= uni_src}\libs\apr\include\*.h; DestDir: {app}\include; Components: sdk
+Source: {#= uni_src}\libs\apr-toolkit\include\*.h; DestDir: {app}\include; Components: sdk
+Source: {#= uni_src}\libs\mpf\include\*.h; DestDir: {app}\include; Components: sdk
+Source: {#= uni_src}\libs\mrcp\include\*.h; DestDir: {app}\include; Components: sdk
+Source: {#= uni_src}\libs\mrcp\message\include\*.h; DestDir: {app}\include; Components: sdk
+Source: {#= uni_src}\libs\mrcp\control\include\*.h; DestDir: {app}\include; Components: sdk
+Source: {#= uni_src}\libs\mrcp\resources\include\*.h; DestDir: {app}\include; Components: sdk
+Source: {#= uni_src}\libs\mrcp-engine\include\*.h; DestDir: {app}\include; Components: sdk
+Source: {#= uni_src}\libs\mrcp-signaling\include\*.h; DestDir: {app}\include; Components: sdk
+Source: {#= uni_src}\libs\mrcpv2-transport\include\*.h; DestDir: {app}\include; Components: sdk
+Source: {#= uni_src}\libs\mrcp-client\include\*.h; DestDir: {app}\include; Components: sdk
+Source: {#= uni_src}\libs\mrcp-server\include\*.h; DestDir: {app}\include; Components: sdk
+Source: {#= uni_src}\platforms\libunimrcp-client\include\*.h; DestDir: {app}\include; Components: sdk
+Source: {#= uni_src}\platforms\libunimrcp-server\include\*.h; DestDir: {app}\include; Components: sdk
+Source: {#= uni_src}\{#= release_dir}\lib\*.lib; DestDir: {app}\lib; Components: sdk
+Source: {#= uni_src}\libs\apr\{#= release_dir}\*.lib; DestDir: {app}\lib; Components: sdk
+Source: {#= uni_src}\libs\apr-util\{#= release_dir}\*.lib; DestDir: {app}\lib; Components: sdk
+Source: {#= uni_src}\libs\sofia-sip\win32\libsofia-sip-ua\{#= release_dir}\*.lib; DestDir: {app}\lib; Components: sdk
+Source: {#= uni_src}\build\vsprops\sdk\*.vsprops; DestDir: {app}\vsprops; Components: sdk; AfterInstall: SetProjectPath()
+Source: {#= uni_src}\docs\ea\*; DestDir: {app}\doc\ea; Components: docs/design; Flags: recursesubdirs
+Source: {#= uni_src}\docs\dox\*; DestDir: {app}\doc\dox; Components: docs/api; Flags: recursesubdirs
[Icons]
-Name: "{group}\UniMRCP Docs\Design concepts"; Filename: "{app}\doc\ea\index.htm"; Components: docs\design
-Name: "{group}\UniMRCP Docs\API"; Filename: "{app}\doc\dox\html\index.html"; Components: docs\api
-Name: "{group}\Uninstall"; Filename: "{uninstallexe}"
+Name: {group}\UniMRCP Docs\Design concepts; Filename: {app}\doc\ea\index.htm; Components: docs\design
+Name: {group}\UniMRCP Docs\API; Filename: {app}\doc\dox\html\index.html; Components: docs\api
+Name: {group}\Uninstall; Filename: {uninstallexe}
[Code]
procedure SetProjectPath();
diff --git a/libs/unimrcp/packages/inno-setup/unimrcp.iss b/libs/unimrcp/packages/inno-setup/unimrcp.iss
index b582652ab9..0f17729874 100644
--- a/libs/unimrcp/packages/inno-setup/unimrcp.iss
+++ b/libs/unimrcp/packages/inno-setup/unimrcp.iss
@@ -1,55 +1,57 @@
[Setup]
-#include "setup.iss"
-OutputBaseFilename=unimrcp-{#= uni_version}
+; include either setup-win32.txt or setup-x64.txt
+#include "setup-win32.txt"
+;#include "setup-x64.txt"
[Types]
-Name: "full"; Description: "Full installation"
-Name: "server"; Description: "Server installation"
-Name: "client"; Description: "Client installation"
-Name: "custom"; Description: "Custom installation"; Flags: iscustom
+Name: full; Description: Full installation
+Name: server; Description: Server installation
+Name: client; Description: Client installation
+Name: custom; Description: Custom installation; Flags: iscustom
[Components]
-Name: "server"; Description: "UniMRCP server"; Types: full server
-Name: "server\cepstral"; Description: "Cepstral synthesizer plugin"; Types: full server
-Name: "server\demosynth"; Description: "Demo synthesizer plugin"; Types: full server
-Name: "server\demorecog"; Description: "Demo recognizer plugin"; Types: full server
-Name: "client"; Description: "UniMRCP client (demo application)"; Types: full client
+Name: server; Description: UniMRCP server; Types: full server
+Name: server\recorder; Description: Recorder plugin; Types: full server
+Name: server\demosynth; Description: Demo synthesizer plugin; Types: full server
+Name: server\demorecog; Description: Demo recognizer plugin; Types: full server
+Name: client; Description: UniMRCP client (demo application); Types: full client
[Dirs]
-Name: "{app}\data"; Permissions: everyone-full;
-Name: "{app}\log"; Permissions: everyone-full;
+Name: {app}\data; Permissions: everyone-full
+Name: {app}\log; Permissions: everyone-full
[Files]
-#define uni_root "..\..\Release"
-Source: "{#= uni_root}\bin\unimrcpserver.exe"; DestDir: "{app}\bin"; Components: server
-Source: "{#= uni_root}\bin\unimrcpservice.exe"; DestDir: "{app}\bin"; Components: server
-Source: "{#= uni_root}\bin\unimrcpclient.exe"; DestDir: "{app}\bin"; Components: client
-Source: "{#= uni_root}\bin\*.dll"; DestDir: "{app}\bin"; Components: server client
-Source: "{#= uni_root}\plugin\mrcpcepstral.dll"; DestDir: "{app}\plugin"; Components: server/cepstral
-Source: "{#= uni_root}\plugin\demosynth.dll"; DestDir: "{app}\plugin"; Components: server/demosynth
-Source: "{#= uni_root}\plugin\demorecog.dll"; DestDir: "{app}\plugin"; Components: server/demorecog
-Source: "{#= uni_root}\conf\unimrcpserver.xml"; DestDir: "{app}\conf"; Components: server
-Source: "{#= uni_root}\conf\unimrcpclient.xml"; DestDir: "{app}\conf"; Components: client
-Source: "{#= uni_root}\data\*.pcm"; DestDir: "{app}\data"; Components: server client
-Source: "{#= uni_root}\data\*.xml"; DestDir: "{app}\data"; Components: server client
+Source: {#= uni_outdir}\bin\unimrcpserver.exe; DestDir: {app}\bin; Components: server
+Source: {#= uni_outdir}\bin\unimrcpservice.exe; DestDir: {app}\bin; Components: server
+Source: {#= uni_outdir}\bin\unimrcpclient.exe; DestDir: {app}\bin; Components: client
+Source: {#= uni_outdir}\bin\umc.exe; DestDir: {app}\bin; Components: client
+Source: {#= uni_outdir}\bin\*.dll; DestDir: {app}\bin; Components: server client
+Source: {#= uni_outdir}\plugin\mrcprecorder.dll; DestDir: {app}\plugin; Components: server/recorder
+Source: {#= uni_outdir}\plugin\demosynth.dll; DestDir: {app}\plugin; Components: server/demosynth
+Source: {#= uni_outdir}\plugin\demorecog.dll; DestDir: {app}\plugin; Components: server/demorecog
+Source: {#= uni_outdir}\conf\unimrcpserver.xml; DestDir: {app}\conf; Components: server
+Source: {#= uni_outdir}\conf\unimrcpclient.xml; DestDir: {app}\conf; Components: client
+Source: {#= uni_outdir}\conf\umcscenarios.xml; DestDir: {app}\conf; Components: client
+Source: {#= uni_outdir}\data\*.pcm; DestDir: {app}\data; Components: server client
+Source: {#= uni_outdir}\data\*.xml; DestDir: {app}\data; Components: server client
[Icons]
-Name: "{group}\UniMRCP Server Console"; Filename: "{app}\bin\unimrcpserver.exe"; Parameters: "--root-dir ""{app}"""; Components: server
-Name: "{group}\UniMRCP Client Console"; Filename: "{app}\bin\unimrcpclient.exe"; Parameters: "--root-dir ""{app}"""; Components: client
-Name: "{group}\UniMRCP Service\Start Server"; Filename: "{app}\bin\unimrcpservice.exe"; Parameters: "--start"; Components: server
-Name: "{group}\UniMRCP Service\Stop Server"; Filename: "{app}\bin\unimrcpservice.exe"; Parameters: "--stop"; Components: server
-Name: "{group}\Uninstall"; Filename: "{uninstallexe}"
+Name: {group}\UniMRCP Server Console; Filename: {app}\bin\unimrcpserver.exe; Parameters: "--root-dir ""{app}"""; Components: server
+Name: {group}\UniMRCP Client Console; Filename: {app}\bin\unimrcpclient.exe; Parameters: "--root-dir ""{app}"""; Components: client
+Name: {group}\UniMRCP Service\Start Server; Filename: {app}\bin\unimrcpservice.exe; Parameters: --start; Components: server
+Name: {group}\UniMRCP Service\Stop Server; Filename: {app}\bin\unimrcpservice.exe; Parameters: --stop; Components: server
+Name: {group}\Uninstall; Filename: {uninstallexe}
[Run]
-Filename: "{app}\bin\unimrcpservice.exe"; Description: "Register service"; Parameters: "--register ""{app}"""; Components: server
+Filename: {app}\bin\unimrcpservice.exe; Description: Register service; Parameters: "--register ""{app}"""; Components: server
[UninstallRun]
-Filename: "{app}\bin\unimrcpservice.exe"; Parameters: "--unregister"; Components: server
+Filename: {app}\bin\unimrcpservice.exe; Parameters: --unregister; Components: server
[Code]
var
Content: String;
-
+
procedure ModifyPluginConf(PluginName: String; Enable: Boolean);
var
TextFrom: String;
@@ -76,7 +78,7 @@ begin
begin
CfgFile := ExpandConstant('{app}\conf\unimrcpserver.xml');
LoadStringFromFile (CfgFile, Content);
- ModifyPluginConf ('mrcpcepstral', IsComponentSelected('server\cepstral'));
+ ModifyPluginConf ('mrcprecorder', IsComponentSelected('server\recorder'));
ModifyPluginConf ('demosynth', IsComponentSelected('server\demosynth'));
ModifyPluginConf ('demorecog', IsComponentSelected('server\demorecog'));
SaveStringToFile (CfgFile, Content, False);
diff --git a/libs/unimrcp/platforms/asr-client/asrclient.vcproj b/libs/unimrcp/platforms/asr-client/asrclient.vcproj
index cee6a32f22..de7caff797 100644
--- a/libs/unimrcp/platforms/asr-client/asrclient.vcproj
+++ b/libs/unimrcp/platforms/asr-client/asrclient.vcproj
@@ -10,6 +10,9 @@
+
@@ -17,7 +20,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/platforms/libasr-client/libasrclient.vcproj b/libs/unimrcp/platforms/libasr-client/libasrclient.vcproj
index 98fee3b0e6..e48c41e261 100644
--- a/libs/unimrcp/platforms/libasr-client/libasrclient.vcproj
+++ b/libs/unimrcp/platforms/libasr-client/libasrclient.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -144,6 +147,138 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/platforms/libasr-client/src/asr_engine.c b/libs/unimrcp/platforms/libasr-client/src/asr_engine.c
index 491faaf310..0879f4fe98 100644
--- a/libs/unimrcp/platforms/libasr-client/src/asr_engine.c
+++ b/libs/unimrcp/platforms/libasr-client/src/asr_engine.c
@@ -332,12 +332,18 @@ static mrcp_message_t* recognize_message_create(asr_session_t *asr_session)
}
recog_header->no_input_timeout = 5000;
mrcp_resource_header_property_add(mrcp_message,RECOGNIZER_HEADER_NO_INPUT_TIMEOUT);
- recog_header->recognition_timeout = 10000;
+ recog_header->recognition_timeout = 20000;
mrcp_resource_header_property_add(mrcp_message,RECOGNIZER_HEADER_RECOGNITION_TIMEOUT);
+ recog_header->speech_complete_timeout = 400;
+ mrcp_resource_header_property_add(mrcp_message,RECOGNIZER_HEADER_SPEECH_COMPLETE_TIMEOUT);
+ recog_header->dtmf_term_timeout = 3000;
+ mrcp_resource_header_property_add(mrcp_message,RECOGNIZER_HEADER_DTMF_TERM_TIMEOUT);
+ recog_header->dtmf_interdigit_timeout = 3000;
+ mrcp_resource_header_property_add(mrcp_message,RECOGNIZER_HEADER_DTMF_INTERDIGIT_TIMEOUT);
+ recog_header->confidence_threshold = 0.5f;
+ mrcp_resource_header_property_add(mrcp_message,RECOGNIZER_HEADER_CONFIDENCE_THRESHOLD);
recog_header->start_input_timers = TRUE;
mrcp_resource_header_property_add(mrcp_message,RECOGNIZER_HEADER_START_INPUT_TIMERS);
- recog_header->confidence_threshold = 0.87f;
- mrcp_resource_header_property_add(mrcp_message,RECOGNIZER_HEADER_CONFIDENCE_THRESHOLD);
}
}
return mrcp_message;
diff --git a/libs/unimrcp/platforms/libunimrcp-client/libunimrcpclient.vcproj b/libs/unimrcp/platforms/libunimrcp-client/libunimrcpclient.vcproj
index 515c5f1117..1d78a98519 100644
--- a/libs/unimrcp/platforms/libunimrcp-client/libunimrcpclient.vcproj
+++ b/libs/unimrcp/platforms/libunimrcp-client/libunimrcpclient.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -122,6 +125,116 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/platforms/libunimrcp-client/src/unimrcp_client.c b/libs/unimrcp/platforms/libunimrcp-client/src/unimrcp_client.c
index f871e08320..b8eda6546d 100644
--- a/libs/unimrcp/platforms/libunimrcp-client/src/unimrcp_client.c
+++ b/libs/unimrcp/platforms/libunimrcp-client/src/unimrcp_client.c
@@ -447,15 +447,15 @@ static apt_bool_t unimrcp_client_media_engines_load(mrcp_client_t *client, const
for(elem = root->first_child; elem; elem = elem->next) {
if(strcasecmp(elem->name,"engine") == 0) {
mpf_engine_t *media_engine;
- unsigned long rate = 1;
+ unsigned long realtime_rate = 1;
const char *name = NULL;
const apr_xml_attr *attr;
for(attr = elem->attr; attr; attr = attr->next) {
if(strcasecmp(attr->name,"name") == 0) {
name = apr_pstrdup(pool,attr->value);
}
- else if(strcasecmp(attr->name,"rate") == 0) {
- rate = atol(attr->value);
+ else if(strcasecmp(attr->name,"realtime-rate") == 0) {
+ realtime_rate = atol(attr->value);
}
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Attribute <%s>",attr->name);
@@ -464,7 +464,7 @@ static apt_bool_t unimrcp_client_media_engines_load(mrcp_client_t *client, const
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Loading Media Engine");
media_engine = mpf_engine_create(pool);
if(media_engine) {
- mpf_engine_scheduler_rate_set(media_engine,rate);
+ mpf_engine_scheduler_rate_set(media_engine,realtime_rate);
mrcp_client_media_engine_register(client,media_engine,name);
}
}
diff --git a/libs/unimrcp/platforms/libunimrcp-server/libunimrcpserver.vcproj b/libs/unimrcp/platforms/libunimrcp-server/libunimrcpserver.vcproj
index ac1fc73816..877610a9a3 100644
--- a/libs/unimrcp/platforms/libunimrcp-server/libunimrcpserver.vcproj
+++ b/libs/unimrcp/platforms/libunimrcp-server/libunimrcpserver.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -122,6 +125,116 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/platforms/libunimrcp-server/src/unimrcp_server.c b/libs/unimrcp/platforms/libunimrcp-server/src/unimrcp_server.c
index 7ddcad1bde..d2532c6ebf 100644
--- a/libs/unimrcp/platforms/libunimrcp-server/src/unimrcp_server.c
+++ b/libs/unimrcp/platforms/libunimrcp-server/src/unimrcp_server.c
@@ -480,15 +480,15 @@ static apt_bool_t unimrcp_server_media_engines_load(mrcp_server_t *server, const
for(elem = root->first_child; elem; elem = elem->next) {
if(strcasecmp(elem->name,"engine") == 0) {
mpf_engine_t *media_engine;
- unsigned long rate = 1;
+ unsigned long realtime_rate = 1;
const char *name = NULL;
const apr_xml_attr *attr;
for(attr = elem->attr; attr; attr = attr->next) {
if(strcasecmp(attr->name,"name") == 0) {
name = apr_pstrdup(pool,attr->value);
}
- else if(strcasecmp(attr->name,"rate") == 0) {
- rate = atol(attr->value);
+ else if(strcasecmp(attr->name,"realtime-rate") == 0) {
+ realtime_rate = atol(attr->value);
}
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Attribute <%s>",attr->name);
@@ -497,7 +497,7 @@ static apt_bool_t unimrcp_server_media_engines_load(mrcp_server_t *server, const
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Loading Media Engine");
media_engine = mpf_engine_create(pool);
if(media_engine) {
- mpf_engine_scheduler_rate_set(media_engine,rate);
+ mpf_engine_scheduler_rate_set(media_engine,realtime_rate);
mrcp_server_media_engine_register(server,media_engine,name);
}
}
diff --git a/libs/unimrcp/platforms/umc/Makefile.am b/libs/unimrcp/platforms/umc/Makefile.am
index 4071490368..9e450119c8 100644
--- a/libs/unimrcp/platforms/umc/Makefile.am
+++ b/libs/unimrcp/platforms/umc/Makefile.am
@@ -26,7 +26,9 @@ umc_SOURCES = src/main.cpp \
src/recorderscenario.cpp \
src/recordersession.cpp \
src/dtmfscenario.cpp \
- src/dtmfsession.cpp
+ src/dtmfsession.cpp \
+ src/setparamscenario.cpp \
+ src/setparamsession.cpp
umc_LDADD = $(top_builddir)/platforms/libunimrcp-client/libunimrcpclient.la
if ISMAC
diff --git a/libs/unimrcp/platforms/umc/include/dtmfsession.h b/libs/unimrcp/platforms/umc/include/dtmfsession.h
index 6dcc70e937..2bf21bc50c 100644
--- a/libs/unimrcp/platforms/umc/include/dtmfsession.h
+++ b/libs/unimrcp/platforms/umc/include/dtmfsession.h
@@ -48,7 +48,6 @@ protected:
/* ============================ HANDLERS =================================== */
virtual bool OnSessionTerminate(mrcp_sig_status_code_e status);
virtual bool OnChannelAdd(mrcp_channel_t* channel, mrcp_sig_status_code_e status);
- virtual bool OnChannelRemove(mrcp_channel_t* channel, mrcp_sig_status_code_e status);
virtual bool OnMessageReceive(mrcp_channel_t* channel, mrcp_message_t* message);
/* ============================ ACCESSORS ================================== */
diff --git a/libs/unimrcp/platforms/umc/include/recogsession.h b/libs/unimrcp/platforms/umc/include/recogsession.h
index a31b8644fc..bca9f553e9 100644
--- a/libs/unimrcp/platforms/umc/include/recogsession.h
+++ b/libs/unimrcp/platforms/umc/include/recogsession.h
@@ -51,7 +51,6 @@ protected:
/* ============================ HANDLERS =================================== */
virtual bool OnSessionTerminate(mrcp_sig_status_code_e status);
virtual bool OnChannelAdd(mrcp_channel_t* channel, mrcp_sig_status_code_e status);
- virtual bool OnChannelRemove(mrcp_channel_t* channel, mrcp_sig_status_code_e status);
virtual bool OnMessageReceive(mrcp_channel_t* channel, mrcp_message_t* message);
/* ============================ ACCESSORS ================================== */
diff --git a/libs/unimrcp/platforms/umc/include/recordersession.h b/libs/unimrcp/platforms/umc/include/recordersession.h
index 338592ae5b..d2497cd3e1 100644
--- a/libs/unimrcp/platforms/umc/include/recordersession.h
+++ b/libs/unimrcp/platforms/umc/include/recordersession.h
@@ -48,7 +48,6 @@ protected:
/* ============================ HANDLERS =================================== */
virtual bool OnSessionTerminate(mrcp_sig_status_code_e status);
virtual bool OnChannelAdd(mrcp_channel_t* channel, mrcp_sig_status_code_e status);
- virtual bool OnChannelRemove(mrcp_channel_t* channel, mrcp_sig_status_code_e status);
virtual bool OnMessageReceive(mrcp_channel_t* channel, mrcp_message_t* message);
/* ============================ ACCESSORS ================================== */
diff --git a/libs/unimrcp/platforms/umc/include/setparamscenario.h b/libs/unimrcp/platforms/umc/include/setparamscenario.h
new file mode 100644
index 0000000000..3cbdf6a43f
--- /dev/null
+++ b/libs/unimrcp/platforms/umc/include/setparamscenario.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2008 Arsen Chaloyan
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __SETPARAM_SCENARIO_H__
+#define __SETPARAM_SCENARIO_H__
+
+/**
+ * @file setaparamscenario.h
+ * @brief Set Params Scenario
+ */
+
+#include "umcscenario.h"
+
+class SetParamScenario : public UmcScenario
+{
+public:
+/* ============================ CREATORS =================================== */
+
+/* ============================ MANIPULATORS =============================== */
+
+ virtual UmcSession* CreateSession();
+
+/* ============================ ACCESSORS ================================== */
+
+/* ============================ INQUIRIES ================================== */
+protected:
+/* ============================ MANIPULATORS =============================== */
+
+/* ============================ DATA ======================================= */
+};
+
+/* ============================ INLINE METHODS ============================= */
+
+#endif /*__SETPARAM_SCENARIO_H__*/
diff --git a/libs/unimrcp/platforms/umc/include/setparamsession.h b/libs/unimrcp/platforms/umc/include/setparamsession.h
new file mode 100644
index 0000000000..e7fb24bb33
--- /dev/null
+++ b/libs/unimrcp/platforms/umc/include/setparamsession.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2008 Arsen Chaloyan
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __SETPARAM_SESSION_H__
+#define __SETPARAM_SESSION_H__
+
+/**
+ * @file setparamsession.h
+ * @brief Set Recognizer Params
+ */
+
+#include
+#include "umcsession.h"
+
+class SetParamScenario;
+struct RecogChannel;
+
+class SetParamSession : public UmcSession
+{
+public:
+/* ============================ CREATORS =================================== */
+ SetParamSession(const SetParamScenario* pScenario);
+ virtual ~SetParamSession();
+
+protected:
+/* ============================ MANIPULATORS =============================== */
+ virtual bool Start();
+
+ RecogChannel* CreateRecogChannel();
+
+ bool CreateRequestQueue(mrcp_channel_t* pMrcpChannel);
+ mrcp_message_t* CreateSetParams1(mrcp_channel_t* pMrcpChannel);
+ mrcp_message_t* CreateGetParams1(mrcp_channel_t* pMrcpChannel);
+ mrcp_message_t* CreateSetParams2(mrcp_channel_t* pMrcpChannel);
+ mrcp_message_t* CreateGetParams2(mrcp_channel_t* pMrcpChannel);
+ mrcp_message_t* CreateSetParams3(mrcp_channel_t* pMrcpChannel);
+ mrcp_message_t* CreateGetParams3(mrcp_channel_t* pMrcpChannel);
+
+ bool ProcessNextRequest(mrcp_channel_t* pMrcpChannel);
+
+/* ============================ HANDLERS =================================== */
+ virtual bool OnSessionTerminate(mrcp_sig_status_code_e status);
+ virtual bool OnChannelAdd(mrcp_channel_t* channel, mrcp_sig_status_code_e status);
+ virtual bool OnMessageReceive(mrcp_channel_t* channel, mrcp_message_t* message);
+
+/* ============================ ACCESSORS ================================== */
+ const SetParamScenario* GetScenario() const;
+
+private:
+/* ============================ DATA ======================================= */
+ RecogChannel* m_pRecogChannel;
+ apr_array_header_t* m_RequestQueue;
+ int m_CurrentRequest;
+};
+
+
+/* ============================ INLINE METHODS ============================= */
+inline const SetParamScenario* SetParamSession::GetScenario() const
+{
+ return (SetParamScenario*)m_pScenario;
+}
+
+#endif /*__SETPARAM_SESSION_H__*/
diff --git a/libs/unimrcp/platforms/umc/include/synthsession.h b/libs/unimrcp/platforms/umc/include/synthsession.h
index 3b45d50454..59f88711c6 100644
--- a/libs/unimrcp/platforms/umc/include/synthsession.h
+++ b/libs/unimrcp/platforms/umc/include/synthsession.h
@@ -46,7 +46,6 @@ protected:
/* ============================ HANDLERS =================================== */
virtual bool OnSessionTerminate(mrcp_sig_status_code_e status);
virtual bool OnChannelAdd(mrcp_channel_t* channel, mrcp_sig_status_code_e status);
- virtual bool OnChannelRemove(mrcp_channel_t* channel, mrcp_sig_status_code_e status);
virtual bool OnMessageReceive(mrcp_channel_t* channel, mrcp_message_t* message);
/* ============================ ACCESSORS ================================== */
diff --git a/libs/unimrcp/platforms/umc/include/umcframework.h b/libs/unimrcp/platforms/umc/include/umcframework.h
index 36f8082846..34b3dcc933 100644
--- a/libs/unimrcp/platforms/umc/include/umcframework.h
+++ b/libs/unimrcp/platforms/umc/include/umcframework.h
@@ -74,7 +74,6 @@ protected:
friend void UmcOnTerminateComplete(apt_task_t* pTask);
friend apt_bool_t AppMessageHandler(const mrcp_app_message_t* pAppMessage);
- friend apt_bool_t AppOnReady(mrcp_application_t* pMrcpApplication, mrcp_sig_status_code_e status);
friend apt_bool_t AppOnSessionTerminate(mrcp_application_t *application, mrcp_session_t *session, mrcp_sig_status_code_e status);
private:
@@ -86,8 +85,6 @@ private:
mrcp_client_t* m_pMrcpClient;
mrcp_application_t* m_pMrcpApplication;
- bool m_Ready;
-
apr_hash_t* m_pScenarioTable;
apr_hash_t* m_pSessionTable;
};
diff --git a/libs/unimrcp/platforms/umc/src/dtmfsession.cpp b/libs/unimrcp/platforms/umc/src/dtmfsession.cpp
index 38c85cf5ae..83a2ee5ec2 100644
--- a/libs/unimrcp/platforms/umc/src/dtmfsession.cpp
+++ b/libs/unimrcp/platforms/umc/src/dtmfsession.cpp
@@ -168,25 +168,6 @@ bool DtmfSession::OnChannelAdd(mrcp_channel_t* pMrcpChannel, mrcp_sig_status_cod
return StartRecognition(pMrcpChannel);
}
-bool DtmfSession::OnChannelRemove(mrcp_channel_t* pMrcpChannel, mrcp_sig_status_code_e status)
-{
- if(!UmcSession::OnChannelRemove(pMrcpChannel,status))
- return false;
-
- RecogChannel* pRecogChannel = (RecogChannel*) mrcp_application_channel_object_get(pMrcpChannel);
- if(pRecogChannel)
- {
- if(pRecogChannel->m_pDtmfGenerator)
- {
- mpf_dtmf_generator_destroy(pRecogChannel->m_pDtmfGenerator);
- pRecogChannel->m_pDtmfGenerator = NULL;
- }
- }
-
- /* terminate the demo */
- return Terminate();
-}
-
bool DtmfSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_message_t* pMrcpMessage)
{
if(!UmcSession::OnMessageReceive(pMrcpChannel,pMrcpMessage))
@@ -214,8 +195,8 @@ bool DtmfSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_message_t*
}
else
{
- /* received unexpected response, remove channel */
- RemoveMrcpChannel(pMrcpChannel);
+ /* received unexpected response, terminate the session */
+ Terminate();
}
}
else
@@ -232,7 +213,7 @@ bool DtmfSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_message_t*
{
pRecogChannel->m_Streaming = false;
}
- RemoveMrcpChannel(pMrcpChannel);
+ Terminate();
}
else if(pMrcpMessage->start_line.method_id == RECOGNIZER_START_OF_INPUT)
{
diff --git a/libs/unimrcp/platforms/umc/src/recogsession.cpp b/libs/unimrcp/platforms/umc/src/recogsession.cpp
index b519429a7a..6fd6adbe1d 100644
--- a/libs/unimrcp/platforms/umc/src/recogsession.cpp
+++ b/libs/unimrcp/platforms/umc/src/recogsession.cpp
@@ -191,26 +191,6 @@ bool RecogSession::OnChannelAdd(mrcp_channel_t* pMrcpChannel, mrcp_sig_status_co
return StartRecognition(pMrcpChannel);
}
-bool RecogSession::OnChannelRemove(mrcp_channel_t* pMrcpChannel, mrcp_sig_status_code_e status)
-{
- if(!UmcSession::OnChannelRemove(pMrcpChannel,status))
- return false;
-
- RecogChannel* pRecogChannel = (RecogChannel*) mrcp_application_channel_object_get(pMrcpChannel);
- if(pRecogChannel)
- {
- FILE* pAudioIn = pRecogChannel->m_pAudioIn;
- if(pAudioIn)
- {
- pRecogChannel->m_pAudioIn = NULL;
- fclose(pAudioIn);
- }
- }
-
- /* terminate the demo */
- return Terminate();
-}
-
bool RecogSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_message_t* pMrcpMessage)
{
if(!UmcSession::OnMessageReceive(pMrcpChannel,pMrcpMessage))
@@ -229,8 +209,8 @@ bool RecogSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_message_t
}
else
{
- /* received unexpected response, remove channel */
- RemoveMrcpChannel(pMrcpChannel);
+ /* received unexpected response, terminate the session */
+ Terminate();
}
}
else if(pMrcpMessage->start_line.method_id == RECOGNIZER_RECOGNIZE)
@@ -246,8 +226,8 @@ bool RecogSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_message_t
}
else
{
- /* received unexpected response, remove channel */
- RemoveMrcpChannel(pMrcpChannel);
+ /* received unexpected response, terminate the session */
+ Terminate();
}
}
else
@@ -264,7 +244,7 @@ bool RecogSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_message_t
{
pRecogChannel->m_Streaming = false;
}
- RemoveMrcpChannel(pMrcpChannel);
+ Terminate();
}
else if(pMrcpMessage->start_line.method_id == RECOGNIZER_START_OF_INPUT)
{
diff --git a/libs/unimrcp/platforms/umc/src/recordersession.cpp b/libs/unimrcp/platforms/umc/src/recordersession.cpp
index 9e0030c22a..28a7138e80 100644
--- a/libs/unimrcp/platforms/umc/src/recordersession.cpp
+++ b/libs/unimrcp/platforms/umc/src/recordersession.cpp
@@ -164,26 +164,6 @@ bool RecorderSession::OnChannelAdd(mrcp_channel_t* pMrcpChannel, mrcp_sig_status
return StartRecorder(pMrcpChannel);
}
-bool RecorderSession::OnChannelRemove(mrcp_channel_t* pMrcpChannel, mrcp_sig_status_code_e status)
-{
- if(!UmcSession::OnChannelRemove(pMrcpChannel,status))
- return false;
-
- RecorderChannel* pRecorderChannel = (RecorderChannel*) mrcp_application_channel_object_get(pMrcpChannel);
- if(pRecorderChannel)
- {
- FILE* pAudioIn = pRecorderChannel->m_pAudioIn;
- if(pAudioIn)
- {
- pRecorderChannel->m_pAudioIn = NULL;
- fclose(pAudioIn);
- }
- }
-
- /* terminate the demo */
- return Terminate();
-}
-
bool RecorderSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_message_t* pMrcpMessage)
{
if(!UmcSession::OnMessageReceive(pMrcpChannel,pMrcpMessage))
@@ -206,8 +186,8 @@ bool RecorderSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_messag
}
else
{
- /* received unexpected response, remove channel */
- RemoveMrcpChannel(pMrcpChannel);
+ /* received unexpected response, terminate the session */
+ Terminate();
}
}
else
@@ -223,7 +203,7 @@ bool RecorderSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_messag
{
pRecorderChannel->m_Streaming = false;
}
- RemoveMrcpChannel(pMrcpChannel);
+ Terminate();
}
else if(pMrcpMessage->start_line.method_id == RECORDER_START_OF_INPUT)
{
diff --git a/libs/unimrcp/platforms/umc/src/setparamscenario.cpp b/libs/unimrcp/platforms/umc/src/setparamscenario.cpp
new file mode 100644
index 0000000000..60e889297d
--- /dev/null
+++ b/libs/unimrcp/platforms/umc/src/setparamscenario.cpp
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2008 Arsen Chaloyan
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "setparamscenario.h"
+#include "setparamsession.h"
+
+UmcSession* SetParamScenario::CreateSession()
+{
+ return new SetParamSession(this);
+}
diff --git a/libs/unimrcp/platforms/umc/src/setparamsession.cpp b/libs/unimrcp/platforms/umc/src/setparamsession.cpp
new file mode 100644
index 0000000000..403629bfb4
--- /dev/null
+++ b/libs/unimrcp/platforms/umc/src/setparamsession.cpp
@@ -0,0 +1,387 @@
+/*
+ * Copyright 2008 Arsen Chaloyan
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "setparamsession.h"
+#include "setparamscenario.h"
+#include "mrcp_message.h"
+#include "mrcp_generic_header.h"
+#include "mrcp_recog_header.h"
+#include "mrcp_recog_resource.h"
+#include "apt_log.h"
+
+struct RecogChannel
+{
+ /** MRCP control channel */
+ mrcp_channel_t* m_pMrcpChannel;
+};
+
+SetParamSession::SetParamSession(const SetParamScenario* pScenario) :
+ UmcSession(pScenario),
+ m_pRecogChannel(NULL),
+ m_RequestQueue(NULL),
+ m_CurrentRequest(0)
+{
+}
+
+SetParamSession::~SetParamSession()
+{
+}
+
+bool SetParamSession::Start()
+{
+ /* create channel and associate all the required data */
+ m_pRecogChannel = CreateRecogChannel();
+ if(!m_pRecogChannel)
+ return false;
+
+ /* add channel to session (send asynchronous request) */
+ if(!AddMrcpChannel(m_pRecogChannel->m_pMrcpChannel))
+ {
+ delete m_pRecogChannel;
+ m_pRecogChannel = NULL;
+ return false;
+ }
+ return true;
+}
+
+bool SetParamSession::OnSessionTerminate(mrcp_sig_status_code_e status)
+{
+ if(m_pRecogChannel)
+ {
+ delete m_pRecogChannel;
+ m_pRecogChannel = NULL;
+ }
+ return UmcSession::OnSessionTerminate(status);
+}
+
+static apt_bool_t ReadStream(mpf_audio_stream_t* pStream, mpf_frame_t* pFrame)
+{
+ return TRUE;
+}
+
+RecogChannel* SetParamSession::CreateRecogChannel()
+{
+ mrcp_channel_t* pChannel;
+ mpf_termination_t* pTermination;
+ mpf_stream_capabilities_t* pCapabilities;
+ apr_pool_t* pool = GetSessionPool();
+
+ /* create channel */
+ RecogChannel *pRecogChannel = new RecogChannel;
+ pRecogChannel->m_pMrcpChannel = NULL;
+
+ /* create source stream capabilities */
+ pCapabilities = mpf_source_stream_capabilities_create(pool);
+ GetScenario()->InitCapabilities(pCapabilities);
+
+ static const mpf_audio_stream_vtable_t audio_stream_vtable =
+ {
+ NULL,
+ NULL,
+ NULL,
+ ReadStream,
+ NULL,
+ NULL,
+ NULL
+ };
+
+ pTermination = CreateAudioTermination(
+ &audio_stream_vtable, /* virtual methods table of audio stream */
+ pCapabilities, /* capabilities of audio stream */
+ pRecogChannel); /* object to associate */
+
+ pChannel = CreateMrcpChannel(
+ MRCP_RECOGNIZER_RESOURCE, /* MRCP resource identifier */
+ pTermination, /* media termination, used to terminate audio stream */
+ NULL, /* RTP descriptor, used to create RTP termination (NULL by default) */
+ pRecogChannel); /* object to associate */
+ if(!pChannel)
+ {
+ delete pRecogChannel;
+ return NULL;
+ }
+
+ pRecogChannel->m_pMrcpChannel = pChannel;
+ return pRecogChannel;
+}
+
+bool SetParamSession::OnChannelAdd(mrcp_channel_t* pMrcpChannel, mrcp_sig_status_code_e status)
+{
+ if(!UmcSession::OnChannelAdd(pMrcpChannel,status))
+ return false;
+
+ if(status != MRCP_SIG_STATUS_CODE_SUCCESS)
+ {
+ /* error case, just terminate the demo */
+ return Terminate();
+ }
+
+ if(!CreateRequestQueue(pMrcpChannel))
+ {
+ return Terminate();
+ }
+
+ return ProcessNextRequest(pMrcpChannel);
+}
+
+bool SetParamSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_message_t* pMrcpMessage)
+{
+ if(!UmcSession::OnMessageReceive(pMrcpChannel,pMrcpMessage))
+ return false;
+
+ if(pMrcpMessage->start_line.message_type == MRCP_MESSAGE_TYPE_RESPONSE)
+ {
+ /* received MRCP response */
+ if(pMrcpMessage->start_line.method_id == RECOGNIZER_SET_PARAMS || pMrcpMessage->start_line.method_id == RECOGNIZER_GET_PARAMS)
+ {
+ /* received the response */
+ if(pMrcpMessage->start_line.request_state == MRCP_REQUEST_STATE_COMPLETE)
+ {
+ m_CurrentRequest++;
+ ProcessNextRequest(pMrcpChannel);
+ }
+ else
+ {
+ /* received unexpected response, terminate the session */
+ Terminate();
+ }
+ }
+ else
+ {
+ /* received unexpected response */
+ Terminate();
+ }
+ }
+ return true;
+}
+
+bool SetParamSession::ProcessNextRequest(mrcp_channel_t* pMrcpChannel)
+{
+ if(m_CurrentRequest >= m_RequestQueue->nelts)
+ {
+ return Terminate();
+ }
+
+ mrcp_message_t* pMrcpMessage = APR_ARRAY_IDX(m_RequestQueue,m_CurrentRequest,mrcp_message_t*);
+ if(!pMrcpMessage)
+ {
+ return Terminate();
+ }
+
+ return SendMrcpRequest(pMrcpChannel,pMrcpMessage);
+}
+
+bool SetParamSession::CreateRequestQueue(mrcp_channel_t* pMrcpChannel)
+{
+ m_CurrentRequest = 0;
+ m_RequestQueue = apr_array_make(GetSessionPool(),5,sizeof(mrcp_message_t*));
+ mrcp_message_t* pMrcpMessage;
+
+ pMrcpMessage = CreateSetParams1(pMrcpChannel);
+ if(pMrcpMessage)
+ *(mrcp_message_t**)apr_array_push(m_RequestQueue) = pMrcpMessage;
+
+ pMrcpMessage = CreateGetParams1(pMrcpChannel);
+ if(pMrcpMessage)
+ *(mrcp_message_t**)apr_array_push(m_RequestQueue) = pMrcpMessage;
+
+ pMrcpMessage = CreateSetParams2(pMrcpChannel);
+ if(pMrcpMessage)
+ *(mrcp_message_t**)apr_array_push(m_RequestQueue) = pMrcpMessage;
+
+ pMrcpMessage = CreateGetParams2(pMrcpChannel);
+ if(pMrcpMessage)
+ *(mrcp_message_t**)apr_array_push(m_RequestQueue) = pMrcpMessage;
+
+ pMrcpMessage = CreateSetParams3(pMrcpChannel);
+ if(pMrcpMessage)
+ *(mrcp_message_t**)apr_array_push(m_RequestQueue) = pMrcpMessage;
+
+ pMrcpMessage = CreateGetParams3(pMrcpChannel);
+ if(pMrcpMessage)
+ *(mrcp_message_t**)apr_array_push(m_RequestQueue) = pMrcpMessage;
+
+ return true;
+}
+
+mrcp_message_t* SetParamSession::CreateSetParams1(mrcp_channel_t* pMrcpChannel)
+{
+ mrcp_message_t* pMrcpMessage = CreateMrcpMessage(pMrcpChannel,RECOGNIZER_SET_PARAMS);
+ if(!pMrcpMessage)
+ return NULL;
+
+ mrcp_recog_header_t* pRecogHeader;
+ /* get/allocate recog header */
+ pRecogHeader = (mrcp_recog_header_t*) mrcp_resource_header_prepare(pMrcpMessage);
+ if(pRecogHeader)
+ {
+ /* set recog header fields */
+ pRecogHeader->confidence_threshold = 0.4f;
+ mrcp_resource_header_property_add(pMrcpMessage,RECOGNIZER_HEADER_CONFIDENCE_THRESHOLD);
+ pRecogHeader->sensitivity_level = 0.531f;
+ mrcp_resource_header_property_add(pMrcpMessage,RECOGNIZER_HEADER_SENSITIVITY_LEVEL);
+ pRecogHeader->speed_vs_accuracy = 0.5f;
+ mrcp_resource_header_property_add(pMrcpMessage,RECOGNIZER_HEADER_SPEED_VS_ACCURACY);
+ pRecogHeader->n_best_list_length = 5;
+ mrcp_resource_header_property_add(pMrcpMessage,RECOGNIZER_HEADER_N_BEST_LIST_LENGTH);
+ pRecogHeader->no_input_timeout = 5000;
+ mrcp_resource_header_property_add(pMrcpMessage,RECOGNIZER_HEADER_NO_INPUT_TIMEOUT);
+ }
+
+ return pMrcpMessage;
+}
+
+mrcp_message_t* SetParamSession::CreateGetParams1(mrcp_channel_t* pMrcpChannel)
+{
+ mrcp_message_t* pMrcpMessage = CreateMrcpMessage(pMrcpChannel,RECOGNIZER_GET_PARAMS);
+ if(!pMrcpMessage)
+ return NULL;
+
+ mrcp_recog_header_t* pRecogHeader;
+ /* get/allocate recog header */
+ pRecogHeader = (mrcp_recog_header_t*) mrcp_resource_header_prepare(pMrcpMessage);
+ if(pRecogHeader)
+ {
+ /* set recog header fields */
+ mrcp_resource_header_name_property_add(pMrcpMessage,RECOGNIZER_HEADER_CONFIDENCE_THRESHOLD);
+ mrcp_resource_header_name_property_add(pMrcpMessage,RECOGNIZER_HEADER_SENSITIVITY_LEVEL);
+ mrcp_resource_header_name_property_add(pMrcpMessage,RECOGNIZER_HEADER_SPEED_VS_ACCURACY);
+ mrcp_resource_header_name_property_add(pMrcpMessage,RECOGNIZER_HEADER_N_BEST_LIST_LENGTH);
+ mrcp_resource_header_name_property_add(pMrcpMessage,RECOGNIZER_HEADER_NO_INPUT_TIMEOUT);
+ }
+
+ return pMrcpMessage;
+}
+
+mrcp_message_t* SetParamSession::CreateSetParams2(mrcp_channel_t* pMrcpChannel)
+{
+ mrcp_message_t* pMrcpMessage = CreateMrcpMessage(pMrcpChannel,RECOGNIZER_SET_PARAMS);
+ if(!pMrcpMessage)
+ return NULL;
+
+ mrcp_recog_header_t* pRecogHeader;
+ /* get/allocate recog header */
+ pRecogHeader = (mrcp_recog_header_t*) mrcp_resource_header_prepare(pMrcpMessage);
+ if(pRecogHeader)
+ {
+ /* set recog header fields */
+ pRecogHeader->recognition_timeout = 5000;
+ mrcp_resource_header_property_add(pMrcpMessage,RECOGNIZER_HEADER_RECOGNITION_TIMEOUT);
+ pRecogHeader->speech_complete_timeout = 1000;
+ mrcp_resource_header_property_add(pMrcpMessage,RECOGNIZER_HEADER_SPEECH_COMPLETE_TIMEOUT);
+ pRecogHeader->speech_incomplete_timeout = 2000;
+ mrcp_resource_header_property_add(pMrcpMessage,RECOGNIZER_HEADER_SPEECH_INCOMPLETE_TIMEOUT);
+ pRecogHeader->dtmf_interdigit_timeout = 3000;
+ mrcp_resource_header_property_add(pMrcpMessage,RECOGNIZER_HEADER_DTMF_INTERDIGIT_TIMEOUT);
+ }
+
+ return pMrcpMessage;
+}
+
+mrcp_message_t* SetParamSession::CreateGetParams2(mrcp_channel_t* pMrcpChannel)
+{
+ mrcp_message_t* pMrcpMessage = CreateMrcpMessage(pMrcpChannel,RECOGNIZER_GET_PARAMS);
+ if(!pMrcpMessage)
+ return NULL;
+
+ mrcp_recog_header_t* pRecogHeader;
+ /* get/allocate recog header */
+ pRecogHeader = (mrcp_recog_header_t*) mrcp_resource_header_prepare(pMrcpMessage);
+ if(pRecogHeader)
+ {
+ /* set recog header fields */
+ mrcp_resource_header_name_property_add(pMrcpMessage,RECOGNIZER_HEADER_RECOGNITION_TIMEOUT);
+ mrcp_resource_header_name_property_add(pMrcpMessage,RECOGNIZER_HEADER_SPEECH_COMPLETE_TIMEOUT);
+ mrcp_resource_header_name_property_add(pMrcpMessage,RECOGNIZER_HEADER_SPEECH_INCOMPLETE_TIMEOUT);
+ mrcp_resource_header_name_property_add(pMrcpMessage,RECOGNIZER_HEADER_DTMF_INTERDIGIT_TIMEOUT);
+ }
+
+ return pMrcpMessage;
+}
+
+mrcp_message_t* SetParamSession::CreateSetParams3(mrcp_channel_t* pMrcpChannel)
+{
+ mrcp_message_t* pMrcpMessage = CreateMrcpMessage(pMrcpChannel,RECOGNIZER_SET_PARAMS);
+ if(!pMrcpMessage)
+ return NULL;
+
+ mrcp_generic_header_t* pGenericHeader;
+ /* get/allocate generic header */
+ pGenericHeader = (mrcp_generic_header_t*) mrcp_generic_header_prepare(pMrcpMessage);
+ if(pGenericHeader)
+ {
+ apr_pool_t* pool = GetSessionPool();
+ /* set generic header fields */
+ apt_pair_arr_t* pVSP = apt_pair_array_create(3,pool);
+ if(pVSP)
+ {
+ apt_str_t name;
+ apt_str_t value;
+
+ apt_string_set(&name,"confidencelevel");
+ apt_string_set(&value,"500");
+ apt_pair_array_append(pVSP,&name,&value,pool);
+
+ apt_string_set(&name,"sensitivity");
+ apt_string_set(&value,"0.500");
+ apt_pair_array_append(pVSP,&name,&value,pool);
+
+ apt_string_set(&name,"speedvsaccuracy");
+ apt_string_set(&value,"0.789");
+ apt_pair_array_append(pVSP,&name,&value,pool);
+
+ apt_string_set(&name,"timeout");
+ apt_string_set(&value,"1000");
+ apt_pair_array_append(pVSP,&name,&value,pool);
+
+ apt_string_set(&name,"swirec_application_name");
+ apt_string_set(&value,"UniMRCP");
+ apt_pair_array_append(pVSP,&name,&value,pool);
+
+ apt_string_set(&name,"swirec_phoneme_lookahead_beam");
+ apt_string_set(&value,"-50");
+ apt_pair_array_append(pVSP,&name,&value,pool);
+
+ pGenericHeader->vendor_specific_params = pVSP;
+ mrcp_generic_header_property_add(pMrcpMessage,GENERIC_HEADER_VENDOR_SPECIFIC_PARAMS);
+ }
+ }
+
+ return pMrcpMessage;
+}
+
+mrcp_message_t* SetParamSession::CreateGetParams3(mrcp_channel_t* pMrcpChannel)
+{
+ mrcp_message_t* pMrcpMessage = CreateMrcpMessage(pMrcpChannel,RECOGNIZER_GET_PARAMS);
+ if(!pMrcpMessage)
+ return NULL;
+
+ mrcp_generic_header_t* pGenericHeader;
+ /* get/allocate generic header */
+ pGenericHeader = (mrcp_generic_header_t*) mrcp_generic_header_prepare(pMrcpMessage);
+ if(pGenericHeader)
+ {
+ mrcp_generic_header_name_property_add(pMrcpMessage,GENERIC_HEADER_ACCEPT_CHARSET);
+ mrcp_generic_header_name_property_add(pMrcpMessage,GENERIC_HEADER_CACHE_CONTROL);
+ mrcp_generic_header_name_property_add(pMrcpMessage,GENERIC_HEADER_LOGGING_TAG);
+ mrcp_generic_header_name_property_add(pMrcpMessage,GENERIC_HEADER_VENDOR_SPECIFIC_PARAMS);
+ mrcp_generic_header_name_property_add(pMrcpMessage,GENERIC_HEADER_FETCH_TIMEOUT);
+ mrcp_generic_header_name_property_add(pMrcpMessage,GENERIC_HEADER_SET_COOKIE);
+ mrcp_generic_header_name_property_add(pMrcpMessage,GENERIC_HEADER_SET_COOKIE2);
+ }
+
+ return pMrcpMessage;
+}
diff --git a/libs/unimrcp/platforms/umc/src/synthsession.cpp b/libs/unimrcp/platforms/umc/src/synthsession.cpp
index c5a2fad124..a0cb5082a5 100644
--- a/libs/unimrcp/platforms/umc/src/synthsession.cpp
+++ b/libs/unimrcp/platforms/umc/src/synthsession.cpp
@@ -156,26 +156,6 @@ bool SynthSession::OnChannelAdd(mrcp_channel_t* pMrcpChannel, mrcp_sig_status_co
return true;
}
-bool SynthSession::OnChannelRemove(mrcp_channel_t* pMrcpChannel, mrcp_sig_status_code_e status)
-{
- if(!UmcSession::OnChannelRemove(pMrcpChannel,status))
- return false;
-
- SynthChannel* pSynthChannel = (SynthChannel*) mrcp_application_channel_object_get(pMrcpChannel);
- if(pSynthChannel)
- {
- FILE* pAudioOut = pSynthChannel->m_pAudioOut;
- if(pAudioOut)
- {
- pSynthChannel->m_pAudioOut = NULL;
- fclose(pAudioOut);
- }
- }
-
- /* terminate the demo */
- return Terminate();
-}
-
bool SynthSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_message_t* pMrcpMessage)
{
if(!UmcSession::OnMessageReceive(pMrcpChannel,pMrcpMessage))
@@ -193,8 +173,8 @@ bool SynthSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_message_t
}
else
{
- /* received unexpected response, remove channel */
- RemoveMrcpChannel(pMrcpChannel);
+ /* received unexpected response, terminate the session */
+ Terminate();
}
}
else
@@ -207,8 +187,8 @@ bool SynthSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_message_t
/* received MRCP event */
if(pMrcpMessage->start_line.method_id == SYNTHESIZER_SPEAK_COMPLETE)
{
- /* received SPEAK-COMPLETE event, remove channel */
- RemoveMrcpChannel(pMrcpChannel);
+ /* received SPEAK-COMPLETE event, terminate the session */
+ Terminate();
}
}
return true;
diff --git a/libs/unimrcp/platforms/umc/src/umcconsole.cpp b/libs/unimrcp/platforms/umc/src/umcconsole.cpp
index 0881e40beb..203bc442ef 100644
--- a/libs/unimrcp/platforms/umc/src/umcconsole.cpp
+++ b/libs/unimrcp/platforms/umc/src/umcconsole.cpp
@@ -102,7 +102,7 @@ bool UmcConsole::ProcessCmdLine(char* pCmdLine)
char* pScenarioName = apr_strtok(NULL, " ", &last);
if(pScenarioName)
{
- char* pProfileName = apr_strtok(NULL, " ", &last);
+ const char* pProfileName = apr_strtok(NULL, " ", &last);
if(!pProfileName)
{
pProfileName = "MRCPv2-Default";
diff --git a/libs/unimrcp/platforms/umc/src/umcframework.cpp b/libs/unimrcp/platforms/umc/src/umcframework.cpp
index aa9b9ed820..a4620bbf8b 100644
--- a/libs/unimrcp/platforms/umc/src/umcframework.cpp
+++ b/libs/unimrcp/platforms/umc/src/umcframework.cpp
@@ -20,6 +20,7 @@
#include "recogscenario.h"
#include "recorderscenario.h"
#include "dtmfscenario.h"
+#include "setparamscenario.h"
#include "unimrcp_client.h"
#include "apt_log.h"
@@ -52,7 +53,6 @@ UmcFramework::UmcFramework() :
m_pTask(NULL),
m_pMrcpClient(NULL),
m_pMrcpApplication(NULL),
- m_Ready(false),
m_pScenarioTable(NULL),
m_pSessionTable(NULL)
{
@@ -69,19 +69,7 @@ bool UmcFramework::Create(apt_dir_layout_t* pDirLayout, apr_pool_t* pool)
m_pSessionTable = apr_hash_make(m_pPool);
m_pScenarioTable = apr_hash_make(m_pPool);
- if(!CreateTask())
- return false;
-
- /* wait for READY state,
- preferably cond wait object should be used */
- int attempts = 0;
- while(!m_Ready && attempts < 10)
- {
- attempts++;
- apr_sleep(500000);
- }
-
- return true;
+ return CreateTask();
}
void UmcFramework::Destroy()
@@ -155,7 +143,6 @@ bool UmcFramework::CreateTask()
pVtable->on_terminate_complete = UmcOnTerminateComplete;
}
- m_Ready = false;
apt_task_start(pTask);
return true;
}
@@ -186,6 +173,8 @@ UmcScenario* UmcFramework::CreateScenario(const char* pType)
return new RecorderScenario();
else if(strcasecmp(pType,"DtmfRecognizer") == 0)
return new DtmfScenario();
+ else if(strcasecmp(pType,"Params") == 0)
+ return new SetParamScenario();
}
return NULL;
}
@@ -524,13 +513,6 @@ apt_bool_t AppOnResourceDiscover(mrcp_application_t *application, mrcp_session_t
return pSession->OnResourceDiscover(descriptor,status);
}
-apt_bool_t AppOnReady(mrcp_application_t *application, mrcp_sig_status_code_e status)
-{
- UmcFramework* pFramework = (UmcFramework*) mrcp_application_object_get(application);
- pFramework->m_Ready = true;
- return TRUE;
-}
-
void UmcOnStartComplete(apt_task_t* pTask)
{
apt_consumer_task_t* pConsumerTask = (apt_consumer_task_t*) apt_task_object_get(pTask);
@@ -568,7 +550,6 @@ apt_bool_t UmcProcessMsg(apt_task_t *pTask, apt_task_msg_t *pMsg)
AppOnChannelAdd,
AppOnChannelRemove,
AppOnMessageReceive,
- AppOnReady,
AppOnTerminateEvent,
AppOnResourceDiscover
};
@@ -578,26 +559,22 @@ apt_bool_t UmcProcessMsg(apt_task_t *pTask, apt_task_msg_t *pMsg)
}
case UMC_TASK_RUN_SESSION_MSG:
{
- if(pFramework->m_Ready)
- pFramework->ProcessRunRequest(pUmcMsg->m_ScenarioName,pUmcMsg->m_ProfileName);
+ pFramework->ProcessRunRequest(pUmcMsg->m_ScenarioName,pUmcMsg->m_ProfileName);
break;
}
case UMC_TASK_KILL_SESSION_MSG:
{
- if(pFramework->m_Ready)
- pFramework->ProcessKillRequest(pUmcMsg->m_SessionId);
+ pFramework->ProcessKillRequest(pUmcMsg->m_SessionId);
break;
}
case UMC_TASK_SHOW_SCENARIOS_MSG:
{
- if(pFramework->m_Ready)
- pFramework->ProcessShowScenarios();
+ pFramework->ProcessShowScenarios();
break;
}
case UMC_TASK_SHOW_SESSIONS_MSG:
{
- if(pFramework->m_Ready)
- pFramework->ProcessShowSessions();
+ pFramework->ProcessShowSessions();
break;
}
}
diff --git a/libs/unimrcp/platforms/umc/umc.vcproj b/libs/unimrcp/platforms/umc/umc.vcproj
index 6c6bbac567..5862942a50 100644
--- a/libs/unimrcp/platforms/umc/umc.vcproj
+++ b/libs/unimrcp/platforms/umc/umc.vcproj
@@ -10,6 +10,9 @@
+
@@ -17,7 +20,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -176,6 +307,14 @@
RelativePath=".\src\recordersession.cpp"
>
+
+
+
+
@@ -230,6 +369,14 @@
RelativePath=".\include\recordersession.h"
>
+
+
+
+
diff --git a/libs/unimrcp/platforms/unimrcp-client/src/demo_discover_application.c b/libs/unimrcp/platforms/unimrcp-client/src/demo_discover_application.c
index e0b2e35d87..a31b96873c 100644
--- a/libs/unimrcp/platforms/unimrcp-client/src/demo_discover_application.c
+++ b/libs/unimrcp/platforms/unimrcp-client/src/demo_discover_application.c
@@ -41,7 +41,6 @@ static const mrcp_app_message_dispatcher_t discover_application_dispatcher = {
NULL,
NULL,
NULL,
- NULL,
discover_application_on_resource_discover
};
diff --git a/libs/unimrcp/platforms/unimrcp-client/unimrcpclient.vcproj b/libs/unimrcp/platforms/unimrcp-client/unimrcpclient.vcproj
index 647a51c0cd..36b3bf1072 100644
--- a/libs/unimrcp/platforms/unimrcp-client/unimrcpclient.vcproj
+++ b/libs/unimrcp/platforms/unimrcp-client/unimrcpclient.vcproj
@@ -10,6 +10,9 @@
+
@@ -17,7 +20,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/platforms/unimrcp-server/unimrcpserver.vcproj b/libs/unimrcp/platforms/unimrcp-server/unimrcpserver.vcproj
index b9c21ca15b..c2b6f6c3f7 100644
--- a/libs/unimrcp/platforms/unimrcp-server/unimrcpserver.vcproj
+++ b/libs/unimrcp/platforms/unimrcp-server/unimrcpserver.vcproj
@@ -10,6 +10,9 @@
+
@@ -17,7 +20,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/plugins/demo-recog/demorecog.vcproj b/libs/unimrcp/plugins/demo-recog/demorecog.vcproj
index 087a922a91..567aa3d158 100644
--- a/libs/unimrcp/plugins/demo-recog/demorecog.vcproj
+++ b/libs/unimrcp/plugins/demo-recog/demorecog.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -140,6 +143,134 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/plugins/demo-synth/demosynth.vcproj b/libs/unimrcp/plugins/demo-synth/demosynth.vcproj
index 88d55f9ca1..673fb07f30 100644
--- a/libs/unimrcp/plugins/demo-synth/demosynth.vcproj
+++ b/libs/unimrcp/plugins/demo-synth/demosynth.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -140,6 +143,134 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/plugins/demo-synth/src/demo_synth_engine.c b/libs/unimrcp/plugins/demo-synth/src/demo_synth_engine.c
index fe41714fb7..5374fdc75a 100644
--- a/libs/unimrcp/plugins/demo-synth/src/demo_synth_engine.c
+++ b/libs/unimrcp/plugins/demo-synth/src/demo_synth_engine.c
@@ -329,11 +329,13 @@ static apt_bool_t demo_synth_channel_set_params(mrcp_engine_channel_t *channel,
if(req_synth_header) {
/* check voice age header */
if(mrcp_resource_header_property_check(request,SYNTHESIZER_HEADER_VOICE_AGE) == TRUE) {
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Set Voice Age [%d]",req_synth_header->voice_param.age);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Set Voice Age [%"APR_SIZE_T_FMT"]",
+ req_synth_header->voice_param.age);
}
/* check voice name header */
if(mrcp_resource_header_property_check(request,SYNTHESIZER_HEADER_VOICE_NAME) == TRUE) {
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Set Voice Name [%s]",req_synth_header->voice_param.name);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Set Voice Name [%s]",
+ req_synth_header->voice_param.name);
}
}
diff --git a/libs/unimrcp/plugins/mrcp-cepstral/mrcpcepstral.vcproj b/libs/unimrcp/plugins/mrcp-cepstral/mrcpcepstral.vcproj
index 17d528f293..e5a57dea79 100644
--- a/libs/unimrcp/plugins/mrcp-cepstral/mrcpcepstral.vcproj
+++ b/libs/unimrcp/plugins/mrcp-cepstral/mrcpcepstral.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -140,6 +143,134 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/plugins/mrcp-flite/mrcpflite.vcproj b/libs/unimrcp/plugins/mrcp-flite/mrcpflite.vcproj
index 46867d7816..892384ae4f 100644
--- a/libs/unimrcp/plugins/mrcp-flite/mrcpflite.vcproj
+++ b/libs/unimrcp/plugins/mrcp-flite/mrcpflite.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -140,6 +143,134 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/plugins/mrcp-flite/src/mrcp_flite.c b/libs/unimrcp/plugins/mrcp-flite/src/mrcp_flite.c
index 3e70eddb2f..5d691aca80 100644
--- a/libs/unimrcp/plugins/mrcp-flite/src/mrcp_flite.c
+++ b/libs/unimrcp/plugins/mrcp-flite/src/mrcp_flite.c
@@ -61,8 +61,6 @@ static apt_bool_t flite_synth_channel_speak(mrcp_engine_channel_t *channel, mrcp
static apt_bool_t flite_synth_channel_stop(mrcp_engine_channel_t *channel, mrcp_message_t *request, mrcp_message_t *response);
static apt_bool_t flite_synth_channel_pause(mrcp_engine_channel_t *channel, mrcp_message_t *request, mrcp_message_t *response);
static apt_bool_t flite_synth_channel_resume(mrcp_engine_channel_t *channel, mrcp_message_t *request, mrcp_message_t *response);
-// static apt_bool_t flite_synth_channel_setparams(mrcp_engine_channel_t *channel, mrcp_message_t *request, mrcp_message_t *response);
-// static apt_bool_t flite_synth_channel_getparams(mrcp_engine_channel_t *channel, mrcp_message_t *request, mrcp_message_t *response);
static const struct mrcp_engine_channel_method_vtable_t channel_vtable = {
flite_synth_channel_destroy,
@@ -609,9 +607,12 @@ static apt_bool_t flite_synth_stream_read(mpf_audio_stream_t *stream, mpf_frame_
if(synth_channel->speak_request && synth_channel->paused == FALSE) {
/* normal processing */
mpf_buffer_frame_read(synth_channel->audio_buffer,frame);
-// apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "flite_synth_stream_read - channel %d - size %d", synth_channel->iId, mpf_buffer_get_size(synth_channel->audio_buffer));
+#if 0
+ apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "flite_synth_stream_read - channel %d - size %d", synth_channel->iId, mpf_buffer_get_size(synth_channel->audio_buffer));
+#endif
if((frame->type & MEDIA_FRAME_TYPE_EVENT) == MEDIA_FRAME_TYPE_EVENT) {
+ frame->type &= ~MEDIA_FRAME_TYPE_EVENT;
flite_synth_speak_complete_raise(synth_channel);
}
}
diff --git a/libs/unimrcp/plugins/mrcp-pocketsphinx/mrcppocketsphinx.vcproj b/libs/unimrcp/plugins/mrcp-pocketsphinx/mrcppocketsphinx.vcproj
index 73714e9a00..77ed146b54 100644
--- a/libs/unimrcp/plugins/mrcp-pocketsphinx/mrcppocketsphinx.vcproj
+++ b/libs/unimrcp/plugins/mrcp-pocketsphinx/mrcppocketsphinx.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -140,6 +143,134 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/plugins/mrcp-recorder/mrcprecorder.vcproj b/libs/unimrcp/plugins/mrcp-recorder/mrcprecorder.vcproj
index da80adc3bd..71194f7b10 100644
--- a/libs/unimrcp/plugins/mrcp-recorder/mrcprecorder.vcproj
+++ b/libs/unimrcp/plugins/mrcp-recorder/mrcprecorder.vcproj
@@ -11,6 +11,9 @@
+
@@ -18,7 +21,7 @@
@@ -140,6 +143,134 @@
Name="VCPostBuildEventTool"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/plugins/mrcp-recorder/src/mrcp_recorder_engine.c b/libs/unimrcp/plugins/mrcp-recorder/src/mrcp_recorder_engine.c
index 7a928dc8e6..bb30a28a42 100644
--- a/libs/unimrcp/plugins/mrcp-recorder/src/mrcp_recorder_engine.c
+++ b/libs/unimrcp/plugins/mrcp-recorder/src/mrcp_recorder_engine.c
@@ -239,10 +239,12 @@ static apt_bool_t recorder_channel_uri_set(recorder_channel_t *recorder_channel,
return FALSE;
}
- record_uri = apr_psprintf(message->pool,";size=%d;duration=%d",
- recorder_channel->file_name,
- recorder_channel->cur_size,
- recorder_channel->cur_time);
+ record_uri = apr_psprintf(
+ message->pool,
+ ";size=%"APR_SIZE_T_FMT";duration=%"APR_SIZE_T_FMT,
+ recorder_channel->file_name,
+ recorder_channel->cur_size,
+ recorder_channel->cur_time);
apt_string_set(&recorder_header->record_uri,record_uri);
mrcp_resource_header_property_add(message,RECORDER_HEADER_RECORD_URI);
diff --git a/libs/unimrcp/tests/apttest/apttest.vcproj b/libs/unimrcp/tests/apttest/apttest.vcproj
index ad7aa01d66..13294764d8 100644
--- a/libs/unimrcp/tests/apttest/apttest.vcproj
+++ b/libs/unimrcp/tests/apttest/apttest.vcproj
@@ -10,6 +10,9 @@
+
@@ -17,7 +20,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/tests/mpftest/mpftest.vcproj b/libs/unimrcp/tests/mpftest/mpftest.vcproj
index 56c4f3e642..7a359cf1e0 100644
--- a/libs/unimrcp/tests/mpftest/mpftest.vcproj
+++ b/libs/unimrcp/tests/mpftest/mpftest.vcproj
@@ -10,6 +10,9 @@
+
@@ -17,7 +20,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/tests/mrcptest/mrcptest.vcproj b/libs/unimrcp/tests/mrcptest/mrcptest.vcproj
index 1af3fc579d..4741f00e4d 100644
--- a/libs/unimrcp/tests/mrcptest/mrcptest.vcproj
+++ b/libs/unimrcp/tests/mrcptest/mrcptest.vcproj
@@ -10,6 +10,9 @@
+
@@ -17,7 +20,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/tests/mrcptest/src/parse_gen_suite.c b/libs/unimrcp/tests/mrcptest/src/parse_gen_suite.c
index 2c94303e27..3f10c87fae 100644
--- a/libs/unimrcp/tests/mrcptest/src/parse_gen_suite.c
+++ b/libs/unimrcp/tests/mrcptest/src/parse_gen_suite.c
@@ -27,25 +27,25 @@ static apt_bool_t test_stream_generate(mrcp_generator_t *generator, mrcp_message
{
char buffer[500];
apt_text_stream_t stream;
- mrcp_stream_result_e result;
+ mrcp_stream_status_e status;
apt_bool_t continuation;
mrcp_generator_message_set(generator,message);
do {
apt_text_stream_init(&stream,buffer,sizeof(buffer)-1);
continuation = FALSE;
- result = mrcp_generator_run(generator,&stream);
- if(result == MRCP_STREAM_MESSAGE_COMPLETE) {
+ status = mrcp_generator_run(generator,&stream);
+ if(status == MRCP_STREAM_STATUS_COMPLETE) {
stream.text.length = stream.pos - stream.text.buf;
*stream.pos = '\0';
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Generated MRCP Stream [%lu bytes]\n%s",stream.text.length,stream.text.buf);
}
- else if(result == MRCP_STREAM_MESSAGE_TRUNCATED) {
+ else if(status == MRCP_STREAM_STATUS_INCOMPLETE) {
*stream.pos = '\0';
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Generated MRCP Stream [%lu bytes] continuation awaiting\n%s",stream.text.length,stream.text.buf);
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Generated MRCP Stream [%lu bytes] continuation awaited\n%s",stream.text.length,stream.text.buf);
continuation = TRUE;
}
- else {
+ else if(status == MRCP_STREAM_STATUS_INVALID) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Generate MRCP Stream");
}
}
@@ -53,9 +53,9 @@ static apt_bool_t test_stream_generate(mrcp_generator_t *generator, mrcp_message
return TRUE;
}
-static apt_bool_t mrcp_message_handler(void *obj, mrcp_message_t *message, mrcp_stream_result_e result)
+static apt_bool_t mrcp_message_handler(void *obj, mrcp_message_t *message, mrcp_stream_status_e status)
{
- if(result == MRCP_STREAM_MESSAGE_COMPLETE) {
+ if(status == MRCP_STREAM_STATUS_COMPLETE) {
/* message is completely parsed */
mrcp_generator_t *generator = obj;
test_stream_generate(generator,message);
@@ -130,7 +130,7 @@ static apt_bool_t test_file_process(apt_test_suite_t *suite, mrcp_resource_facto
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Parse MRCP Stream [%lu bytes]\n%s",length,stream.pos);
/* reset pos */
- stream.pos = stream.text.buf;
+ apt_text_stream_reset(&stream);
mrcp_stream_walk(parser,&stream,mrcp_message_handler,generator);
}
while(apr_file_eof(file) != APR_EOF);
diff --git a/libs/unimrcp/tests/mrcptest/src/set_get_suite.c b/libs/unimrcp/tests/mrcptest/src/set_get_suite.c
index 19a72f42c5..8ff91db98b 100644
--- a/libs/unimrcp/tests/mrcptest/src/set_get_suite.c
+++ b/libs/unimrcp/tests/mrcptest/src/set_get_suite.c
@@ -104,7 +104,7 @@ static apt_bool_t speak_request_test(mrcp_resource_factory_t *factory, mrcp_mess
if(mrcp_resource_header_property_check(message,SYNTHESIZER_HEADER_VOICE_AGE) == TRUE) {
if(synth_header->voice_param.age == SAMPLE_VOICE_AGE) {
/* OK */
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Get Voice-Age: %d",synth_header->voice_param.age);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Get Voice-Age: %"APR_SIZE_T_FMT,synth_header->voice_param.age);
res = TRUE;
}
}
@@ -250,7 +250,7 @@ static mrcp_message_t* get_params_response_create(mrcp_resource_factory_t *facto
/* test voice age header */
if(mrcp_resource_header_property_check(request,SYNTHESIZER_HEADER_VOICE_AGE) == TRUE) {
res_synth_header->voice_param.age = SAMPLE_VOICE_AGE;
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Set Voice-Age: %d",res_synth_header->voice_param.age);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Set Voice-Age: %"APR_SIZE_T_FMT,res_synth_header->voice_param.age);
mrcp_resource_header_property_add(response,SYNTHESIZER_HEADER_VOICE_AGE);
res = TRUE;
}
diff --git a/libs/unimrcp/tests/rtsptest/rtsptest.vcproj b/libs/unimrcp/tests/rtsptest/rtsptest.vcproj
index 1436330d0b..6051b862bd 100644
--- a/libs/unimrcp/tests/rtsptest/rtsptest.vcproj
+++ b/libs/unimrcp/tests/rtsptest/rtsptest.vcproj
@@ -10,6 +10,9 @@
+
@@ -17,7 +20,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/tests/rtsptest/src/parse_gen_suite.c b/libs/unimrcp/tests/rtsptest/src/parse_gen_suite.c
index c88ac6f86a..be6fec136b 100644
--- a/libs/unimrcp/tests/rtsptest/src/parse_gen_suite.c
+++ b/libs/unimrcp/tests/rtsptest/src/parse_gen_suite.c
@@ -24,22 +24,22 @@ static apt_bool_t test_stream_generate(rtsp_generator_t *generator, rtsp_message
{
char buffer[500];
apt_text_stream_t stream;
- rtsp_stream_result_e result;
+ rtsp_stream_status_e status;
apt_bool_t continuation;
rtsp_generator_message_set(generator,message);
do {
apt_text_stream_init(&stream,buffer,sizeof(buffer)-1);
continuation = FALSE;
- result = rtsp_generator_run(generator,&stream);
- if(result == RTSP_STREAM_MESSAGE_COMPLETE) {
+ status = rtsp_generator_run(generator,&stream);
+ if(status == RTSP_STREAM_STATUS_COMPLETE) {
stream.text.length = stream.pos - stream.text.buf;
*stream.pos = '\0';
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Generated RTSP Stream [%lu bytes]\n%s",stream.text.length,stream.text.buf);
}
- else if(result == RTSP_STREAM_MESSAGE_TRUNCATED) {
+ else if(status == RTSP_STREAM_STATUS_INCOMPLETE) {
*stream.pos = '\0';
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Generated RTSP Stream [%lu bytes] continuation awaiting\n%s",stream.text.length,stream.text.buf);
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Generated RTSP Stream [%lu bytes] continuation awaited\n%s",stream.text.length,stream.text.buf);
continuation = TRUE;
}
else {
@@ -50,9 +50,9 @@ static apt_bool_t test_stream_generate(rtsp_generator_t *generator, rtsp_message
return TRUE;
}
-static apt_bool_t rtsp_message_handler(void *obj, rtsp_message_t *message, rtsp_stream_result_e result)
+static apt_bool_t rtsp_message_handler(void *obj, rtsp_message_t *message, rtsp_stream_status_e status)
{
- if(result == RTSP_STREAM_MESSAGE_COMPLETE) {
+ if(status == RTSP_STREAM_STATUS_COMPLETE) {
/* message is completely parsed */
rtsp_generator_t *generator = obj;
test_stream_generate(generator,message);
@@ -98,7 +98,7 @@ static apt_bool_t test_file_process(apt_test_suite_t *suite, const char *file_pa
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Parse RTSP Stream [%lu bytes]\n%s",length,stream.pos);
/* reset pos */
- stream.pos = stream.text.buf;
+ apt_text_stream_reset(&stream);
rtsp_stream_walk(parser,&stream,rtsp_message_handler,generator);
}
while(apr_file_eof(file) != APR_EOF);
diff --git a/libs/unimrcp/tests/strtablegen/src/main.c b/libs/unimrcp/tests/strtablegen/src/main.c
index 971243ade2..83412a1759 100644
--- a/libs/unimrcp/tests/strtablegen/src/main.c
+++ b/libs/unimrcp/tests/strtablegen/src/main.c
@@ -65,7 +65,7 @@ static size_t string_table_read(apt_str_table_item_t table[], apr_size_t max_cou
text_stream.text.length = fread(parse_buffer, 1, sizeof(parse_buffer)-1, file);
parse_buffer[text_stream.text.length] = '\0';
text_stream.text.buf = parse_buffer;
- text_stream.pos = parse_buffer;
+ apt_text_stream_reset(&text_stream);
do {
if(apt_text_line_read(&text_stream,&line) == FALSE || !line.length) {
diff --git a/libs/unimrcp/tests/strtablegen/strtablegen.vcproj b/libs/unimrcp/tests/strtablegen/strtablegen.vcproj
index 957858ee89..72d6686182 100644
--- a/libs/unimrcp/tests/strtablegen/strtablegen.vcproj
+++ b/libs/unimrcp/tests/strtablegen/strtablegen.vcproj
@@ -10,6 +10,9 @@
+
@@ -17,7 +20,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/unimrcp/unimrcp.sln b/libs/unimrcp/unimrcp.sln
index 84eb159db6..3db7fbe7e1 100644
--- a/libs/unimrcp/unimrcp.sln
+++ b/libs/unimrcp/unimrcp.sln
@@ -27,27 +27,27 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcp", "libs\mrcp\mrcp.vcpr
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpsignaling", "libs\mrcp-signaling\mrcpsignaling.vcproj", "{12A49562-BAB9-43A3-A21D-15B60BBB4C31}"
ProjectSection(ProjectDependencies) = postProject
- {B5A00BFA-6083-4FAE-A097-71642D6473B5} = {B5A00BFA-6083-4FAE-A097-71642D6473B5}
{1C320193-46A6-4B34-9C56-8AB584FC1B56} = {1C320193-46A6-4B34-9C56-8AB584FC1B56}
+ {B5A00BFA-6083-4FAE-A097-71642D6473B5} = {B5A00BFA-6083-4FAE-A097-71642D6473B5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpserver", "libs\mrcp-server\mrcpserver.vcproj", "{18B1F35A-10F8-4287-9B37-2D10501B0B38}"
ProjectSection(ProjectDependencies) = postProject
- {12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {12A49562-BAB9-43A3-A21D-15B60BBB4C31}
{A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA} = {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}
+ {12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {12A49562-BAB9-43A3-A21D-15B60BBB4C31}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunimrcpserver", "platforms\libunimrcp-server\libunimrcpserver.vcproj", "{C98AF157-352E-4737-BD30-A24E2647F5AE}"
ProjectSection(ProjectDependencies) = postProject
- {DEB01ACB-D65F-4A62-AED9-58C1054499E9} = {DEB01ACB-D65F-4A62-AED9-58C1054499E9}
- {18B1F35A-10F8-4287-9B37-2D10501B0B38} = {18B1F35A-10F8-4287-9B37-2D10501B0B38}
{746F3632-5BB2-4570-9453-31D6D58A7D8E} = {746F3632-5BB2-4570-9453-31D6D58A7D8E}
+ {18B1F35A-10F8-4287-9B37-2D10501B0B38} = {18B1F35A-10F8-4287-9B37-2D10501B0B38}
+ {DEB01ACB-D65F-4A62-AED9-58C1054499E9} = {DEB01ACB-D65F-4A62-AED9-58C1054499E9}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpsofiasip", "modules\mrcp-sofiasip\mrcpsofiasip.vcproj", "{746F3632-5BB2-4570-9453-31D6D58A7D8E}"
ProjectSection(ProjectDependencies) = postProject
- {12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {12A49562-BAB9-43A3-A21D-15B60BBB4C31}
{A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA} = {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}
+ {12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {12A49562-BAB9-43A3-A21D-15B60BBB4C31}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpclient", "libs\mrcp-client\mrcpclient.vcproj", "{72782932-37CC-46AE-8C7F-9A7B1A6EE108}"
@@ -57,9 +57,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpclient", "libs\mrcp-cli
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunimrcpclient", "platforms\libunimrcp-client\libunimrcpclient.vcproj", "{EE157390-1E85-416C-946E-620E32C9AD33}"
ProjectSection(ProjectDependencies) = postProject
- {DEB01ACB-D65F-4A62-AED9-58C1054499E9} = {DEB01ACB-D65F-4A62-AED9-58C1054499E9}
- {746F3632-5BB2-4570-9453-31D6D58A7D8E} = {746F3632-5BB2-4570-9453-31D6D58A7D8E}
{72782932-37CC-46AE-8C7F-9A7B1A6EE108} = {72782932-37CC-46AE-8C7F-9A7B1A6EE108}
+ {746F3632-5BB2-4570-9453-31D6D58A7D8E} = {746F3632-5BB2-4570-9453-31D6D58A7D8E}
+ {DEB01ACB-D65F-4A62-AED9-58C1054499E9} = {DEB01ACB-D65F-4A62-AED9-58C1054499E9}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unimrcpclient", "platforms\unimrcp-client\unimrcpclient.vcproj", "{57FAF32E-49FD-491F-895D-132D0D5EFE0A}"
@@ -74,8 +74,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpv2transport", "libs\mrc
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpengine", "libs\mrcp-engine\mrcpengine.vcproj", "{843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}"
ProjectSection(ProjectDependencies) = postProject
- {B5A00BFA-6083-4FAE-A097-71642D6473B5} = {B5A00BFA-6083-4FAE-A097-71642D6473B5}
{1C320193-46A6-4B34-9C56-8AB584FC1B56} = {1C320193-46A6-4B34-9C56-8AB584FC1B56}
+ {B5A00BFA-6083-4FAE-A097-71642D6473B5} = {B5A00BFA-6083-4FAE-A097-71642D6473B5}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demosynth", "plugins\demo-synth\demosynth.vcproj", "{92BFA534-C419-4EB2-AAA3-510653F38F08}"
@@ -127,8 +127,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rtsptest", "tests\rtsptest\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpunirtsp", "modules\mrcp-unirtsp\mrcpunirtsp.vcproj", "{DEB01ACB-D65F-4A62-AED9-58C1054499E9}"
ProjectSection(ProjectDependencies) = postProject
- {12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {12A49562-BAB9-43A3-A21D-15B60BBB4C31}
{504B3154-7A4F-459D-9877-B951021C3F1F} = {504B3154-7A4F-459D-9877-B951021C3F1F}
+ {12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {12A49562-BAB9-43A3-A21D-15B60BBB4C31}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "prepare", "build\tools\prepare.vcproj", "{01D63BF5-7798-4746-852A-4B45229BB735}"
@@ -173,125 +173,243 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{592CF22D-3F8F-4A77-A174-130D77B7623B}.Debug|Win32.ActiveCfg = Debug|Win32
{592CF22D-3F8F-4A77-A174-130D77B7623B}.Debug|Win32.Build.0 = Debug|Win32
+ {592CF22D-3F8F-4A77-A174-130D77B7623B}.Debug|x64.ActiveCfg = Debug|x64
+ {592CF22D-3F8F-4A77-A174-130D77B7623B}.Debug|x64.Build.0 = Debug|x64
{592CF22D-3F8F-4A77-A174-130D77B7623B}.Release|Win32.ActiveCfg = Release|Win32
{592CF22D-3F8F-4A77-A174-130D77B7623B}.Release|Win32.Build.0 = Release|Win32
+ {592CF22D-3F8F-4A77-A174-130D77B7623B}.Release|x64.ActiveCfg = Release|x64
+ {592CF22D-3F8F-4A77-A174-130D77B7623B}.Release|x64.Build.0 = Release|x64
{13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Debug|Win32.ActiveCfg = Debug|Win32
{13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Debug|Win32.Build.0 = Debug|Win32
+ {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Debug|x64.ActiveCfg = Debug|x64
+ {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Debug|x64.Build.0 = Debug|x64
{13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Release|Win32.ActiveCfg = Release|Win32
{13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Release|Win32.Build.0 = Release|Win32
+ {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Release|x64.ActiveCfg = Release|x64
+ {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Release|x64.Build.0 = Release|x64
{B5A00BFA-6083-4FAE-A097-71642D6473B5}.Debug|Win32.ActiveCfg = Debug|Win32
{B5A00BFA-6083-4FAE-A097-71642D6473B5}.Debug|Win32.Build.0 = Debug|Win32
+ {B5A00BFA-6083-4FAE-A097-71642D6473B5}.Debug|x64.ActiveCfg = Debug|x64
+ {B5A00BFA-6083-4FAE-A097-71642D6473B5}.Debug|x64.Build.0 = Debug|x64
{B5A00BFA-6083-4FAE-A097-71642D6473B5}.Release|Win32.ActiveCfg = Release|Win32
{B5A00BFA-6083-4FAE-A097-71642D6473B5}.Release|Win32.Build.0 = Release|Win32
+ {B5A00BFA-6083-4FAE-A097-71642D6473B5}.Release|x64.ActiveCfg = Release|x64
+ {B5A00BFA-6083-4FAE-A097-71642D6473B5}.Release|x64.Build.0 = Release|x64
{1C320193-46A6-4B34-9C56-8AB584FC1B56}.Debug|Win32.ActiveCfg = Debug|Win32
{1C320193-46A6-4B34-9C56-8AB584FC1B56}.Debug|Win32.Build.0 = Debug|Win32
+ {1C320193-46A6-4B34-9C56-8AB584FC1B56}.Debug|x64.ActiveCfg = Debug|x64
+ {1C320193-46A6-4B34-9C56-8AB584FC1B56}.Debug|x64.Build.0 = Debug|x64
{1C320193-46A6-4B34-9C56-8AB584FC1B56}.Release|Win32.ActiveCfg = Release|Win32
{1C320193-46A6-4B34-9C56-8AB584FC1B56}.Release|Win32.Build.0 = Release|Win32
+ {1C320193-46A6-4B34-9C56-8AB584FC1B56}.Release|x64.ActiveCfg = Release|x64
+ {1C320193-46A6-4B34-9C56-8AB584FC1B56}.Release|x64.Build.0 = Release|x64
{12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Debug|Win32.ActiveCfg = Debug|Win32
{12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Debug|Win32.Build.0 = Debug|Win32
+ {12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Debug|x64.ActiveCfg = Debug|x64
+ {12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Debug|x64.Build.0 = Debug|x64
{12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Release|Win32.ActiveCfg = Release|Win32
{12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Release|Win32.Build.0 = Release|Win32
+ {12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Release|x64.ActiveCfg = Release|x64
+ {12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Release|x64.Build.0 = Release|x64
{18B1F35A-10F8-4287-9B37-2D10501B0B38}.Debug|Win32.ActiveCfg = Debug|Win32
{18B1F35A-10F8-4287-9B37-2D10501B0B38}.Debug|Win32.Build.0 = Debug|Win32
+ {18B1F35A-10F8-4287-9B37-2D10501B0B38}.Debug|x64.ActiveCfg = Debug|x64
+ {18B1F35A-10F8-4287-9B37-2D10501B0B38}.Debug|x64.Build.0 = Debug|x64
{18B1F35A-10F8-4287-9B37-2D10501B0B38}.Release|Win32.ActiveCfg = Release|Win32
{18B1F35A-10F8-4287-9B37-2D10501B0B38}.Release|Win32.Build.0 = Release|Win32
+ {18B1F35A-10F8-4287-9B37-2D10501B0B38}.Release|x64.ActiveCfg = Release|x64
+ {18B1F35A-10F8-4287-9B37-2D10501B0B38}.Release|x64.Build.0 = Release|x64
{C98AF157-352E-4737-BD30-A24E2647F5AE}.Debug|Win32.ActiveCfg = Debug|Win32
{C98AF157-352E-4737-BD30-A24E2647F5AE}.Debug|Win32.Build.0 = Debug|Win32
+ {C98AF157-352E-4737-BD30-A24E2647F5AE}.Debug|x64.ActiveCfg = Debug|x64
+ {C98AF157-352E-4737-BD30-A24E2647F5AE}.Debug|x64.Build.0 = Debug|x64
{C98AF157-352E-4737-BD30-A24E2647F5AE}.Release|Win32.ActiveCfg = Release|Win32
{C98AF157-352E-4737-BD30-A24E2647F5AE}.Release|Win32.Build.0 = Release|Win32
+ {C98AF157-352E-4737-BD30-A24E2647F5AE}.Release|x64.ActiveCfg = Release|x64
+ {C98AF157-352E-4737-BD30-A24E2647F5AE}.Release|x64.Build.0 = Release|x64
{746F3632-5BB2-4570-9453-31D6D58A7D8E}.Debug|Win32.ActiveCfg = Debug|Win32
{746F3632-5BB2-4570-9453-31D6D58A7D8E}.Debug|Win32.Build.0 = Debug|Win32
+ {746F3632-5BB2-4570-9453-31D6D58A7D8E}.Debug|x64.ActiveCfg = Debug|x64
+ {746F3632-5BB2-4570-9453-31D6D58A7D8E}.Debug|x64.Build.0 = Debug|x64
{746F3632-5BB2-4570-9453-31D6D58A7D8E}.Release|Win32.ActiveCfg = Release|Win32
{746F3632-5BB2-4570-9453-31D6D58A7D8E}.Release|Win32.Build.0 = Release|Win32
+ {746F3632-5BB2-4570-9453-31D6D58A7D8E}.Release|x64.ActiveCfg = Release|x64
+ {746F3632-5BB2-4570-9453-31D6D58A7D8E}.Release|x64.Build.0 = Release|x64
{72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Debug|Win32.ActiveCfg = Debug|Win32
{72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Debug|Win32.Build.0 = Debug|Win32
+ {72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Debug|x64.ActiveCfg = Debug|x64
+ {72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Debug|x64.Build.0 = Debug|x64
{72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Release|Win32.ActiveCfg = Release|Win32
{72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Release|Win32.Build.0 = Release|Win32
+ {72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Release|x64.ActiveCfg = Release|x64
+ {72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Release|x64.Build.0 = Release|x64
{EE157390-1E85-416C-946E-620E32C9AD33}.Debug|Win32.ActiveCfg = Debug|Win32
{EE157390-1E85-416C-946E-620E32C9AD33}.Debug|Win32.Build.0 = Debug|Win32
+ {EE157390-1E85-416C-946E-620E32C9AD33}.Debug|x64.ActiveCfg = Debug|x64
+ {EE157390-1E85-416C-946E-620E32C9AD33}.Debug|x64.Build.0 = Debug|x64
{EE157390-1E85-416C-946E-620E32C9AD33}.Release|Win32.ActiveCfg = Release|Win32
{EE157390-1E85-416C-946E-620E32C9AD33}.Release|Win32.Build.0 = Release|Win32
+ {EE157390-1E85-416C-946E-620E32C9AD33}.Release|x64.ActiveCfg = Release|x64
+ {EE157390-1E85-416C-946E-620E32C9AD33}.Release|x64.Build.0 = Release|x64
{57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Debug|Win32.ActiveCfg = Debug|Win32
{57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Debug|Win32.Build.0 = Debug|Win32
+ {57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Debug|x64.ActiveCfg = Debug|x64
+ {57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Debug|x64.Build.0 = Debug|x64
{57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Release|Win32.ActiveCfg = Release|Win32
{57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Release|Win32.Build.0 = Release|Win32
+ {57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Release|x64.ActiveCfg = Release|x64
+ {57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Release|x64.Build.0 = Release|x64
{A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Debug|Win32.ActiveCfg = Debug|Win32
{A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Debug|Win32.Build.0 = Debug|Win32
+ {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Debug|x64.ActiveCfg = Debug|x64
+ {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Debug|x64.Build.0 = Debug|x64
{A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Release|Win32.ActiveCfg = Release|Win32
{A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Release|Win32.Build.0 = Release|Win32
+ {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Release|x64.ActiveCfg = Release|x64
+ {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Release|x64.Build.0 = Release|x64
{843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Debug|Win32.ActiveCfg = Debug|Win32
{843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Debug|Win32.Build.0 = Debug|Win32
+ {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Debug|x64.ActiveCfg = Debug|x64
+ {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Debug|x64.Build.0 = Debug|x64
{843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Release|Win32.ActiveCfg = Release|Win32
{843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Release|Win32.Build.0 = Release|Win32
+ {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Release|x64.ActiveCfg = Release|x64
+ {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Release|x64.Build.0 = Release|x64
{92BFA534-C419-4EB2-AAA3-510653F38F08}.Debug|Win32.ActiveCfg = Debug|Win32
{92BFA534-C419-4EB2-AAA3-510653F38F08}.Debug|Win32.Build.0 = Debug|Win32
+ {92BFA534-C419-4EB2-AAA3-510653F38F08}.Debug|x64.ActiveCfg = Debug|x64
+ {92BFA534-C419-4EB2-AAA3-510653F38F08}.Debug|x64.Build.0 = Debug|x64
{92BFA534-C419-4EB2-AAA3-510653F38F08}.Release|Win32.ActiveCfg = Release|Win32
{92BFA534-C419-4EB2-AAA3-510653F38F08}.Release|Win32.Build.0 = Release|Win32
+ {92BFA534-C419-4EB2-AAA3-510653F38F08}.Release|x64.ActiveCfg = Release|x64
+ {92BFA534-C419-4EB2-AAA3-510653F38F08}.Release|x64.Build.0 = Release|x64
{B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Debug|Win32.ActiveCfg = Debug|Win32
{B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Debug|Win32.Build.0 = Debug|Win32
+ {B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Debug|x64.ActiveCfg = Debug|x64
+ {B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Debug|x64.Build.0 = Debug|x64
{B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Release|Win32.ActiveCfg = Release|Win32
{B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Release|Win32.Build.0 = Release|Win32
+ {B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Release|x64.ActiveCfg = Release|x64
+ {B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Release|x64.Build.0 = Release|x64
{79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Debug|Win32.ActiveCfg = Debug|Win32
{79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Debug|Win32.Build.0 = Debug|Win32
+ {79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Debug|x64.ActiveCfg = Debug|x64
+ {79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Debug|x64.Build.0 = Debug|x64
{79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Release|Win32.ActiveCfg = Release|Win32
{79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Release|Win32.Build.0 = Release|Win32
+ {79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Release|x64.ActiveCfg = Release|x64
+ {79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Release|x64.Build.0 = Release|x64
{429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Debug|Win32.ActiveCfg = Debug|Win32
{429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Debug|Win32.Build.0 = Debug|Win32
+ {429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Debug|x64.ActiveCfg = Debug|x64
+ {429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Debug|x64.Build.0 = Debug|x64
{429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Release|Win32.ActiveCfg = Release|Win32
{429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Release|Win32.Build.0 = Release|Win32
+ {429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Release|x64.ActiveCfg = Release|x64
+ {429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Release|x64.Build.0 = Release|x64
{DCF01B1C-5268-44F3-9130-D647FABFB663}.Debug|Win32.ActiveCfg = Debug|Win32
{DCF01B1C-5268-44F3-9130-D647FABFB663}.Debug|Win32.Build.0 = Debug|Win32
+ {DCF01B1C-5268-44F3-9130-D647FABFB663}.Debug|x64.ActiveCfg = Debug|x64
+ {DCF01B1C-5268-44F3-9130-D647FABFB663}.Debug|x64.Build.0 = Debug|x64
{DCF01B1C-5268-44F3-9130-D647FABFB663}.Release|Win32.ActiveCfg = Release|Win32
{DCF01B1C-5268-44F3-9130-D647FABFB663}.Release|Win32.Build.0 = Release|Win32
+ {DCF01B1C-5268-44F3-9130-D647FABFB663}.Release|x64.ActiveCfg = Release|x64
+ {DCF01B1C-5268-44F3-9130-D647FABFB663}.Release|x64.Build.0 = Release|x64
{3CA97077-6210-4362-998A-D15A35EEAA08}.Debug|Win32.ActiveCfg = Debug|Win32
{3CA97077-6210-4362-998A-D15A35EEAA08}.Debug|Win32.Build.0 = Debug|Win32
+ {3CA97077-6210-4362-998A-D15A35EEAA08}.Debug|x64.ActiveCfg = Debug|x64
+ {3CA97077-6210-4362-998A-D15A35EEAA08}.Debug|x64.Build.0 = Debug|x64
{3CA97077-6210-4362-998A-D15A35EEAA08}.Release|Win32.ActiveCfg = Release|Win32
{3CA97077-6210-4362-998A-D15A35EEAA08}.Release|Win32.Build.0 = Release|Win32
+ {3CA97077-6210-4362-998A-D15A35EEAA08}.Release|x64.ActiveCfg = Release|x64
+ {3CA97077-6210-4362-998A-D15A35EEAA08}.Release|x64.Build.0 = Release|x64
{729EF28E-38C9-40DE-A138-87785F021411}.Debug|Win32.ActiveCfg = Debug|Win32
+ {729EF28E-38C9-40DE-A138-87785F021411}.Debug|x64.ActiveCfg = Debug|x64
{729EF28E-38C9-40DE-A138-87785F021411}.Release|Win32.ActiveCfg = Release|Win32
+ {729EF28E-38C9-40DE-A138-87785F021411}.Release|x64.ActiveCfg = Release|x64
{504B3154-7A4F-459D-9877-B951021C3F1F}.Debug|Win32.ActiveCfg = Debug|Win32
{504B3154-7A4F-459D-9877-B951021C3F1F}.Debug|Win32.Build.0 = Debug|Win32
+ {504B3154-7A4F-459D-9877-B951021C3F1F}.Debug|x64.ActiveCfg = Debug|x64
+ {504B3154-7A4F-459D-9877-B951021C3F1F}.Debug|x64.Build.0 = Debug|x64
{504B3154-7A4F-459D-9877-B951021C3F1F}.Release|Win32.ActiveCfg = Release|Win32
{504B3154-7A4F-459D-9877-B951021C3F1F}.Release|Win32.Build.0 = Release|Win32
+ {504B3154-7A4F-459D-9877-B951021C3F1F}.Release|x64.ActiveCfg = Release|x64
+ {504B3154-7A4F-459D-9877-B951021C3F1F}.Release|x64.Build.0 = Release|x64
{17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Debug|Win32.ActiveCfg = Debug|Win32
{17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Debug|Win32.Build.0 = Debug|Win32
+ {17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Debug|x64.ActiveCfg = Debug|x64
+ {17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Debug|x64.Build.0 = Debug|x64
{17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Release|Win32.ActiveCfg = Release|Win32
{17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Release|Win32.Build.0 = Release|Win32
+ {17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Release|x64.ActiveCfg = Release|x64
+ {17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Release|x64.Build.0 = Release|x64
{DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Debug|Win32.ActiveCfg = Debug|Win32
{DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Debug|Win32.Build.0 = Debug|Win32
+ {DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Debug|x64.ActiveCfg = Debug|x64
+ {DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Debug|x64.Build.0 = Debug|x64
{DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Release|Win32.ActiveCfg = Release|Win32
{DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Release|Win32.Build.0 = Release|Win32
+ {DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Release|x64.ActiveCfg = Release|x64
+ {DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Release|x64.Build.0 = Release|x64
{01D63BF5-7798-4746-852A-4B45229BB735}.Debug|Win32.ActiveCfg = Debug|Win32
+ {01D63BF5-7798-4746-852A-4B45229BB735}.Debug|x64.ActiveCfg = Debug|x64
{01D63BF5-7798-4746-852A-4B45229BB735}.Release|Win32.ActiveCfg = Release|Win32
+ {01D63BF5-7798-4746-852A-4B45229BB735}.Release|x64.ActiveCfg = Release|x64
{4714EF49-BFD5-4B22-95F7-95A07F1EAC25}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4714EF49-BFD5-4B22-95F7-95A07F1EAC25}.Debug|x64.ActiveCfg = Debug|x64
{4714EF49-BFD5-4B22-95F7-95A07F1EAC25}.Release|Win32.ActiveCfg = Release|Win32
+ {4714EF49-BFD5-4B22-95F7-95A07F1EAC25}.Release|x64.ActiveCfg = Release|x64
{3C614AE8-B611-4D43-A9AF-1CAA440A9F69}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3C614AE8-B611-4D43-A9AF-1CAA440A9F69}.Debug|x64.ActiveCfg = Debug|x64
{3C614AE8-B611-4D43-A9AF-1CAA440A9F69}.Release|Win32.ActiveCfg = Release|Win32
+ {3C614AE8-B611-4D43-A9AF-1CAA440A9F69}.Release|x64.ActiveCfg = Release|x64
{56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556}.Debug|Win32.ActiveCfg = Debug|Win32
+ {56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556}.Debug|x64.ActiveCfg = Debug|x64
{56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556}.Release|Win32.ActiveCfg = Release|Win32
+ {56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556}.Release|x64.ActiveCfg = Release|x64
{71D62A04-8EF6-4C6B-AC12-0C15A875E53A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {71D62A04-8EF6-4C6B-AC12-0C15A875E53A}.Debug|x64.ActiveCfg = Debug|x64
{71D62A04-8EF6-4C6B-AC12-0C15A875E53A}.Release|Win32.ActiveCfg = Release|Win32
+ {71D62A04-8EF6-4C6B-AC12-0C15A875E53A}.Release|x64.ActiveCfg = Release|x64
{6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Debug|Win32.ActiveCfg = Debug|Win32
{6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Debug|Win32.Build.0 = Debug|Win32
+ {6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Debug|x64.ActiveCfg = Debug|x64
+ {6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Debug|x64.Build.0 = Debug|x64
{6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Release|Win32.ActiveCfg = Release|Win32
{6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Release|Win32.Build.0 = Release|Win32
+ {6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Release|x64.ActiveCfg = Release|x64
+ {6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Release|x64.Build.0 = Release|x64
{272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}.Debug|Win32.ActiveCfg = Debug|Win32
{272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}.Debug|Win32.Build.0 = Debug|Win32
+ {272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}.Debug|x64.ActiveCfg = Debug|x64
+ {272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}.Debug|x64.Build.0 = Debug|x64
{272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}.Release|Win32.ActiveCfg = Release|Win32
{272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}.Release|Win32.Build.0 = Release|Win32
+ {272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}.Release|x64.ActiveCfg = Release|x64
+ {272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}.Release|x64.Build.0 = Release|x64
{CD1C52C1-D8E1-4654-AE65-6CCAB38DE894}.Debug|Win32.ActiveCfg = Debug|Win32
{CD1C52C1-D8E1-4654-AE65-6CCAB38DE894}.Debug|Win32.Build.0 = Debug|Win32
+ {CD1C52C1-D8E1-4654-AE65-6CCAB38DE894}.Debug|x64.ActiveCfg = Debug|x64
+ {CD1C52C1-D8E1-4654-AE65-6CCAB38DE894}.Debug|x64.Build.0 = Debug|x64
{CD1C52C1-D8E1-4654-AE65-6CCAB38DE894}.Release|Win32.ActiveCfg = Release|Win32
{CD1C52C1-D8E1-4654-AE65-6CCAB38DE894}.Release|Win32.Build.0 = Release|Win32
+ {CD1C52C1-D8E1-4654-AE65-6CCAB38DE894}.Release|x64.ActiveCfg = Release|x64
+ {CD1C52C1-D8E1-4654-AE65-6CCAB38DE894}.Release|x64.Build.0 = Release|x64
{5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Debug|Win32.ActiveCfg = Debug|Win32
{5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Debug|Win32.Build.0 = Debug|Win32
+ {5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Debug|x64.ActiveCfg = Debug|x64
+ {5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Debug|x64.Build.0 = Debug|x64
{5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Release|Win32.ActiveCfg = Release|Win32
{5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Release|Win32.Build.0 = Release|Win32
+ {5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Release|x64.ActiveCfg = Release|x64
+ {5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE