bump rev to upstream r1401

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16719 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West 2010-02-22 15:43:43 +00:00
parent 12093e9913
commit c7b05ea27c
147 changed files with 5512 additions and 901 deletions

View File

@ -1 +1 @@
Mon Nov 23 10:00:46 CST 2009
Mon Feb 22 09:40:01 CST 2010

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -1,3 +1,5 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = pkgconfig
include_HEADERS = uni_version.h

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -25,7 +28,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy &quot;$(AprDir)\$(ConfigurationName)\libapr-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll&quot; (&#x0D;&#x0A; xcopy &quot;$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A; if exist &quot;$(AprIconvDir)\$(ConfigurationName)\iconv&quot; (&#x0D;&#x0A; if not exist &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv&quot;&#x0D;&#x0A; xcopy &quot;$(AprIconvDir)\$(ConfigurationName)\iconv\*.so&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv\&quot; /Y&#x0D;&#x0A; )&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\pthread\pthreadVC2.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\conf&quot; xcopy &quot;$(SolutionDir)conf\*.xml&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\data&quot; xcopy &quot;$(SolutionDir)data\*&quot; &quot;$(SolutionDir)$(ConfigurationName)\data\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\log&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\log\&quot;&#x0D;&#x0A;"
CommandLine="xcopy &quot;$(AprDir)\$(ConfigurationName)\libapr-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll&quot; (&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(ConfigurationName)\iconv&quot; (&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv&quot;&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(ConfigurationName)\iconv\*.so&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\pthread\pthreadVC2.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\conf&quot; xcopy &quot;$(SolutionDir)conf\*.xml&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\data&quot; xcopy &quot;$(SolutionDir)data\*&quot; &quot;$(SolutionDir)$(ConfigurationName)\data\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\log&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\log\&quot;&#x0D;&#x0A;"
ExcludedFromBuild="false"
/>
<Tool
@ -40,6 +43,8 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="10"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apr.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
CharacterSet="1"
@ -47,7 +52,7 @@
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy &quot;$(AprDir)\$(ConfigurationName)\libapr-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll&quot; (&#x0D;&#x0A; xcopy &quot;$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A; if exist &quot;$(AprIconvDir)\$(ConfigurationName)\iconv&quot; (&#x0D;&#x0A; if not exist &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv&quot;&#x0D;&#x0A; xcopy &quot;$(AprIconvDir)\$(ConfigurationName)\iconv\*.so&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv\&quot; /Y&#x0D;&#x0A; )&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\pthread\pthreadVC2.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\conf&quot; xcopy &quot;$(SolutionDir)conf\*.xml&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\data&quot; xcopy &quot;$(SolutionDir)data\*&quot; &quot;$(SolutionDir)$(ConfigurationName)\data\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\log&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\log\&quot;&#x0D;&#x0A;"
CommandLine="xcopy &quot;$(AprDir)\$(ConfigurationName)\libapr-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll&quot; (&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(ConfigurationName)\iconv&quot; (&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv&quot;&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(ConfigurationName)\iconv\*.so&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\iconv\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\pthread\pthreadVC2.dll&quot; &quot;$(SolutionDir)$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\conf&quot; xcopy &quot;$(SolutionDir)conf\*.xml&quot; &quot;$(SolutionDir)$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\data&quot; xcopy &quot;$(SolutionDir)data\*&quot; &quot;$(SolutionDir)$(ConfigurationName)\data\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(ConfigurationName)\log&quot; mkdir &quot;$(SolutionDir)$(ConfigurationName)\log\&quot;&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
@ -59,6 +64,54 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="10"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apr.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy &quot;$(AprDir)\$(PlatformName)\$(ConfigurationName)\libapr-1.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(AprUtilDir)\$(PlatformName)\$(ConfigurationName)\libaprutil-1.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll&quot; (&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv&quot; (&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv&quot; mkdir &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv&quot;&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv\*.so&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName)\libsofia_sip_ua.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\pthread\$(PlatformName)\pthreadVC2.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf&quot; xcopy &quot;$(SolutionDir)conf\*.xml&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data&quot; xcopy &quot;$(SolutionDir)data\*&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log&quot; mkdir &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log\&quot;&#x0D;&#x0A;"
ExcludedFromBuild="false"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="10"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apr.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy &quot;$(AprDir)\$(PlatformName)\$(ConfigurationName)\libapr-1.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(AprUtilDir)\$(PlatformName)\$(ConfigurationName)\libaprutil-1.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll&quot; (&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;if exist &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv&quot; (&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv&quot; mkdir &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv&quot;&#x0D;&#x0A;xcopy &quot;$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv\*.so&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv\&quot; /Y&#x0D;&#x0A;)&#x0D;&#x0A;)&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName)\libsofia_sip_ua.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SofiaDir)\win32\pthread\$(PlatformName)\pthreadVC2.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf&quot; xcopy &quot;$(SolutionDir)conf\*.xml&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data&quot; xcopy &quot;$(SolutionDir)data\*&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\&quot; /Y&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log&quot; mkdir &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log\&quot;&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -59,6 +62,54 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="10"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\pocketsphinx.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy &quot;$(PocketSphinxDir)\bin\$(PlatformName)\$(ConfigurationName)\pocketsphinx.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SphinxBaseDir)\lib\$(PlatformName)\$(ConfigurationName)\sphinxbase.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(PocketSphinxDir)\model\hmm\wsj1\*&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\wsj1\&quot; /Y&#x0D;&#x0A;copy &quot;$(PocketSphinxDir)\model\lm\cmudict.0.6d&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\default.dic&quot;&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\pocketsphinx.xml&quot; xcopy &quot;$(SolutionDir)plugins\mrcp-pocketsphinx\conf\pocketsphinx.xml&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;"
ExcludedFromBuild="false"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="10"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\pocketsphinx.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="xcopy &quot;$(PocketSphinxDir)\bin\$(PlatformName)\$(ConfigurationName)\pocketsphinx.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;xcopy &quot;$(SphinxBaseDir)\lib\$(PlatformName)\$(ConfigurationName)\sphinxbase.dll&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\&quot; /Y&#x0D;&#x0A;&#x0D;&#x0A;xcopy &quot;$(PocketSphinxDir)\model\hmm\wsj1\*&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\wsj1\&quot; /Y&#x0D;&#x0A;copy &quot;$(PocketSphinxDir)\model\lm\cmudict.0.6d&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\default.dic&quot;&#x0D;&#x0A;&#x0D;&#x0A;if not exist &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\pocketsphinx.xml&quot; xcopy &quot;$(SolutionDir)plugins\mrcp-pocketsphinx\conf\pocketsphinx.xml&quot; &quot;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\&quot; /Y&#x0D;&#x0A;"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -10,6 +10,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -17,7 +20,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unibin.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
@ -79,7 +82,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="1"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unibin.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
@ -139,6 +142,134 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="1"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unibin-x64.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="unimrcpservice.exe.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="1"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unibin-x64.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
LinkTimeCodeGeneration="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="unimrcpservice.exe.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -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.

View File

@ -9,10 +9,6 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(AprDir)\include&quot;;&quot;$(AprUtilDir)\include&quot;"
/>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="&quot;$(AprDir)\$(ConfigurationName)&quot;;&quot;$(AprUtilDir)\$(ConfigurationName)&quot;"
/>
<UserMacro
Name="AprDir"
Value="$(LibRootDir)libs\apr"

View File

@ -10,8 +10,4 @@
AdditionalIncludeDirectories="&quot;$(ProjectRootDir)libs\apr-toolkit\include&quot;"
PreprocessorDefinitions="APT_STATIC_LIB"
/>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
/>
</VisualStudioPropertySheet>

View File

@ -10,8 +10,4 @@
AdditionalIncludeDirectories="&quot;$(ProjectRootDir)libs\mpf\include&quot;"
PreprocessorDefinitions="MPF_STATIC_LIB"
/>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
/>
</VisualStudioPropertySheet>

View File

@ -10,8 +10,4 @@
AdditionalIncludeDirectories="&quot;$(ProjectRootDir)libs\mrcp\include&quot;;&quot;$(ProjectRootDir)libs\mrcp\message\include&quot;;&quot;$(ProjectRootDir)libs\mrcp\control\include&quot;;&quot;$(ProjectRootDir)libs\mrcp\resources\include&quot;"
PreprocessorDefinitions="MRCP_STATIC_LIB"
/>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
/>
</VisualStudioPropertySheet>

View File

@ -9,8 +9,4 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(ProjectRootDir)libs\mrcp-client\include&quot;"
/>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
/>
</VisualStudioPropertySheet>

View File

@ -9,8 +9,4 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(ProjectRootDir)libs\mrcp-engine\include&quot;"
/>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
/>
</VisualStudioPropertySheet>

View File

@ -9,8 +9,4 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(ProjectRootDir)libs\mrcp-server\include&quot;"
/>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
/>
</VisualStudioPropertySheet>

View File

@ -9,8 +9,4 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(ProjectRootDir)libs\mrcp-signaling\include&quot;"
/>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
/>
</VisualStudioPropertySheet>

View File

@ -9,8 +9,4 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(ProjectRootDir)libs\mrcpv2-transport\include&quot;"
/>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
/>
</VisualStudioPropertySheet>

View File

@ -9,10 +9,6 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(SofiaDir)\win32&quot;;&quot;$(SofiaDir)\libsofia-sip-ua\su&quot;;&quot;$(SofiaDir)\libsofia-sip-ua\nua&quot;;&quot;$(SofiaDir)\libsofia-sip-ua\url&quot;;&quot;$(SofiaDir)\libsofia-sip-ua\sip&quot;;&quot;$(SofiaDir)\libsofia-sip-ua\msg&quot;;&quot;$(SofiaDir)\libsofia-sip-ua\sdp&quot;;&quot;$(SofiaDir)\libsofia-sip-ua\nta&quot;;&quot;$(SofiaDir)\libsofia-sip-ua\nea&quot;;&quot;$(SofiaDir)\libsofia-sip-ua\soa&quot;;&quot;$(SofiaDir)\libsofia-sip-ua\iptsec&quot;;&quot;$(SofiaDir)\libsofia-sip-ua\bnf&quot;;&quot;$(SofiaDir)\libsofia-sip-ua\features&quot;"
/>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="&quot;$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)&quot;"
/>
<UserMacro
Name="SofiaDir"
Value="$(LibRootDir)libs\sofia-sip"

View File

@ -3,8 +3,6 @@
ProjectType="Visual C++"
Version="8.00"
Name="unibase"
OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
IntermediateDirectory="$(ConfigurationName)"
>
<Tool
Name="VCCLCompilerTool"
@ -13,10 +11,6 @@
WarnAsError="true"
DisableSpecificWarnings="4100"
/>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
/>
<UserMacro
Name="ProjectRootDir"
Value="$(ProjectDir)..\..\"

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="unibin-x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
InheritedPropertySheets="apr.vsprops;sofiasip.vsprops"
>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="$(AprDir)\$(PlatformName)\$(ConfigurationName);$(AprUtilDir)\$(PlatformName)\$(ConfigurationName);$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName);$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib;$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin"
TargetMachine="17"
/>
</VisualStudioPropertySheet>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="unibin"
OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
IntermediateDirectory="$(ConfigurationName)"
InheritedPropertySheets="apr.vsprops;sofiasip.vsprops"
>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="$(AprDir)\$(ConfigurationName);$(AprUtilDir)\$(ConfigurationName);$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName);$(SolutionDir)$(ConfigurationName)\lib;$(SolutionDir)$(ConfigurationName)\bin"
TargetMachine="1"
/>
</VisualStudioPropertySheet>

View File

@ -13,12 +13,11 @@
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
DebugInformationFormat="4"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
TargetMachine="1"
/>
</VisualStudioPropertySheet>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="unilib-x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
>
<Tool
Name="VCLinkerTool"
TargetMachine="17"
/>
</VisualStudioPropertySheet>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="unilib"
OutputDirectory="$(SolutionDir)$(ConfigurationName)\lib"
IntermediateDirectory="$(ConfigurationName)"
>
<Tool
Name="VCLinkerTool"
TargetMachine="1"
/>
</VisualStudioPropertySheet>

View File

@ -9,10 +9,6 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(ProjectRootDir)platforms\libunimrcp-client\include&quot;;&quot;$(ProjectRootDir)build&quot;"
/>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
/>
<UserMacro
Name="UniMRCPClientLibs"
Value="libunimrcpclient.lib mrcpclient.lib mrcpsignaling.lib mrcp.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib libsofia_sip_ua.lib ws2_32.lib winmm.lib"

View File

@ -9,10 +9,6 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(ProjectRootDir)platforms\libunimrcp-server\include&quot;;&quot;$(ProjectRootDir)build&quot;"
/>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
/>
<UserMacro
Name="UniMRCPServerLibs"
Value="libunimrcpserver.lib mrcpserver.lib mrcpsignaling.lib mrcpengine.lib mrcp.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib libsofia_sip_ua.lib ws2_32.lib winmm.lib"

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="uniplugin-x64"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\plugin"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
InheritedPropertySheets="apr.vsprops;mrcpengine.vsprops"
>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="$(AprDir)\$(PlatformName)\$(ConfigurationName);$(AprUtilDir)\$(PlatformName)\$(ConfigurationName);$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib"
AdditionalDependencies="mrcpengine.lib mrcp.lib mpf.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib ws2_32.lib"
TargetMachine="17"
/>
</VisualStudioPropertySheet>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="uniplugin"
OutputDirectory="$(SolutionDir)$(ConfigurationName)\plugin"
IntermediateDirectory="$(ConfigurationName)"
InheritedPropertySheets="apr.vsprops;mrcpengine.vsprops"
>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="$(AprDir)\$(ConfigurationName);$(AprUtilDir)\$(ConfigurationName);$(SolutionDir)$(ConfigurationName)\lib"
AdditionalDependencies="mrcpengine.lib mrcp.lib mpf.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib ws2_32.lib"
TargetMachine="1"
/>
</VisualStudioPropertySheet>

View File

@ -10,8 +10,4 @@
AdditionalIncludeDirectories="&quot;$(ProjectRootDir)libs\uni-rtsp\include&quot;"
PreprocessorDefinitions="RTSP_STATIC_LIB"
/>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
/>
</VisualStudioPropertySheet>

View File

@ -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

View File

@ -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,
-->
</scenario>
<scenario name="params" class="Params" profile="MRCPv2-Default"/>
<!-- It'd be great to have scriptable custom scenarios as well.
<scenario name="custom" class="UmcXml">
</scenario>

View File

@ -48,7 +48,7 @@
<!-- Media engines -->
<media>
<engine name="Media-Engine-1"/>
<engine name="Media-Engine-1" realtime-rate="1"/>
<rtp name="RTP-Factory-1">
<param name="rtp-ip" value="auto"/>
<!-- <param name="rtp-ext-ip" value="auto"/> -->

View File

@ -44,7 +44,7 @@
<!-- Media engines -->
<media>
<engine name="Media-Engine-1"/>
<engine name="Media-Engine-1" realtime-rate="1"/>
<rtp name="RTP-Factory-1">
<param name="rtp-ip" value="auto"/>
<!-- <param name="rtp-ext-ip" value="auto"/> -->

View File

@ -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

View File

@ -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

View File

@ -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/*"

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -18,7 +21,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
CharacterSet="1"
>
<Tool
@ -70,7 +73,112 @@
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>

View File

@ -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 */

View File

@ -22,7 +22,7 @@
* @brief Generic Name-Value Pair
*/
#include "apr_tables.h"
#include <apr_tables.h>
#include "apt_string.h"
APT_BEGIN_EXTERN_C

View File

@ -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

View File

@ -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 */

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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);
/**

View File

@ -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 */

View File

@ -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 {

View File

@ -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 */

View File

@ -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;
};

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -18,7 +21,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mpf.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mpf.vsprops"
CharacterSet="1"
>
<Tool
@ -71,7 +74,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mpf.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mpf.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@ -122,6 +125,116 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\mpf.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="codecs"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\mpf.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="codecs"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -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
}

View File

@ -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);

View File

@ -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;

View File

@ -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,';');
}
}

View File

@ -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,';');
}
}

View File

@ -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,

View File

@ -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;
}

View File

@ -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;

View File

@ -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);

View File

@ -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

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -18,7 +21,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpclient.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpclient.vsprops"
CharacterSet="1"
>
<Tool
@ -70,7 +73,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpclient.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpclient.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@ -120,6 +123,114 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpclient.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpclient.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include <apr_thread_cond.h>
#include <apr_hash.h>
#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);
}
}

View File

@ -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(

View File

@ -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.

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -18,7 +21,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpengine.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpengine.vsprops"
CharacterSet="1"
>
<Tool
@ -70,7 +73,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpengine.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpengine.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@ -120,6 +123,114 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpengine.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpengine.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -18,7 +21,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpserver.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpserver.vsprops"
CharacterSet="1"
>
<Tool
@ -70,7 +73,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpserver.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpserver.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@ -120,6 +123,114 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpserver.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpserver.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -18,7 +21,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"
CharacterSet="1"
>
<Tool
@ -70,7 +73,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@ -120,6 +123,114 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -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);

View File

@ -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 <CR> and <LF>
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 <LF> */
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 <LF> occurred as a result of message segmentation between <CR> and <LF> */
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;
}

View File

@ -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__*/

View File

@ -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) {

View File

@ -14,6 +14,7 @@
* limitations under the License.
*/
#include <stdio.h>
#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;
}

View File

@ -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;

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -18,7 +21,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcp.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mrcp.vsprops"
CharacterSet="1"
>
<Tool
@ -71,7 +74,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcp.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mrcp.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@ -122,6 +125,116 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\mrcp.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\mrcp.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -14,7 +14,6 @@
* limitations under the License.
*/
#include <stdio.h>
#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);
}

View File

@ -14,7 +14,6 @@
* limitations under the License.
*/
#include <stdio.h>
#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:

View File

@ -14,7 +14,6 @@
* limitations under the License.
*/
#include <stdio.h>
#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);

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -18,7 +21,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops"
CharacterSet="1"
>
<Tool
@ -70,7 +73,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@ -120,6 +123,114 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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 */

View File

@ -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);
}

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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 <CR> and <LF>
of the final empty header */
if(!message->body.length && *(stream->pos-1)== APT_TOKEN_CR) {
/* if this is the case be prepared to skip <LF> */
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 <LF> occurred as a result of message segmentation between <CR> and <LF> */
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;
}

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -18,7 +21,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops"
CharacterSet="1"
>
<Tool
@ -71,7 +74,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@ -122,6 +125,116 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="codecs"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="codecs"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -18,7 +21,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"
CharacterSet="1"
>
<Tool
@ -71,7 +74,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@ -122,6 +125,116 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="include"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="include"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -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; i<control_media->cmid_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));
}

View File

@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
@ -18,7 +21,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
CharacterSet="1"
>
<Tool
@ -71,7 +74,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@ -122,6 +125,116 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="include"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="include"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>

View File

@ -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;
}

View File

@ -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);

View File

@ -0,0 +1,3 @@
#include "setup.txt"
#define release_dir "Release"
OutputBaseFilename=unimrcp-sdk-{#= uni_version}

View File

@ -0,0 +1,4 @@
#include "setup.txt"
#define release_dir "x64\Release"
OutputBaseFilename=unimrcp-x64-sdk-{#= uni_version}
ArchitecturesInstallIn64BitMode=x64

View File

@ -0,0 +1,3 @@
#include "setup.txt"
#define uni_outdir "..\..\Release"
OutputBaseFilename=unimrcp-{#= uni_version}

View File

@ -0,0 +1,5 @@
#include "setup.txt"
#define uni_outdir "..\..\x64\Release"
OutputBaseFilename=unimrcp-x64-{#= uni_version}
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x64

View File

@ -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

View File

@ -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();

Some files were not shown because too many files have changed in this diff Show More