[apr] Backport APR_RING_FOREACH and APR_RING_FOREACH_SAFE macros to APR for unimrcp compatibility.
[unimrcp] configure.gnu - need full path, not relative path for library paths
[unimrcp] added uni_revision.h - couldn't get it to autogenerate from build
[mod_unimrcp] add better logging and error checking on module load. Currently dumps core on MRCPv1 TTS attempt
[mod_unimrcp] don't configure MRCPv1 session with a connection agent- causes crash
/unimrcp/build/svnrev/Makefile.in
/unimrcp/build/svnrev/svnrev
!/unimrcp/build/tools/unimrcpservice.exe.manifest
-/unimrcp/build/uni_revision.h
+!/unimrcp/build/uni_revision.h
!/unimrcp/configure.gnu
/unimrcp/conf/Makefile
/unimrcp/conf/Makefile.in
#define APR_RING_REMOVE(ep, link) \
APR_RING_UNSPLICE((ep), (ep), link)
+/**
+ * Iterate over a ring
+ * @param ep The current element
+ * @param head The head of the ring
+ * @param elem The name of the element struct
+ * @param link The name of the APR_RING_ENTRY in the element struct
+ */
+#define APR_RING_FOREACH(ep, head, elem, link) \
+ for (ep = APR_RING_FIRST(head); \
+ ep != APR_RING_SENTINEL(head, elem, link); \
+ ep = APR_RING_NEXT(ep, link))
+
+/**
+ * Iterate over a ring safe against removal of the current element
+ * @param ep1 The current element
+ * @param ep2 Iteration cursor
+ * @param head The head of the ring
+ * @param elem The name of the element struct
+ * @param link The name of the APR_RING_ENTRY in the element struct
+ */
+#define APR_RING_FOREACH_SAFE(ep1, ep2, head, elem, link) \
+ for (ep1 = APR_RING_FIRST(head), ep2 = APR_RING_NEXT(ep1, link); \
+ ep1 != APR_RING_SENTINEL(head, elem, link); \
+ ep1 = ep2, ep2 = APR_RING_NEXT(ep1, link))
/* Debugging tools: */
-Thu Jun 16 15:02:31 UTC 2011
+Mon Nov 17 11:06:30 EST 2014
--- /dev/null
+Changes for UniMRCP-1.2.0
+
+ APR-toolkit library
+
+ * Implemented a new interface for the NLSML parser in accordance with the NSLML schema defined in http://tools.ietf.org/html/rfc6787#section-16.1.
+ * Took out the legacy NLSML interface.
+ * Fixed a gcc warning for strict-aliasing rules.
+ * Implemented apt_pair_array_generate() in 2 passes, apr_pstrcatv() alike.
+ * Prevent compilation warnings for unused-but-set-variable.
+ * Use int instead of apt_task_msg_type_e to suppress a warning triggered by gcc 4.7: case value not in enumerated type 'apt_task_msg_type_e'.
+ * Upon creation of a new memory pool, register apr_abortfunc_t callback which is supposed to be invoked when memory allocation fails within apr_pool.
+ * Added apt_va_log() which accepts va_list as an input argument.
+ * Set the default maximum number of log files used in rotation to 100.
+ * Set thread names for APT tasks to be shown in debuggers. Thanks Vali.
+ * Enable apt_timer logs only if APT_TIMER_DEBUG is defined.
+ * Use a local temporary char buffer to construct the hostname in apt_ip_get() not to allocate memory from a permanent pool.
+ * Unified pointer logging in APT style. Thanks Vali.
+ * Define APT_PTR_FMT as 0x%I64x for 64-bit Windows.
+ * Removed unused function apt_text_boolean_value_insert/apt_boolean_value_insert (inconsistent declaration/definition). Thanks Vali.
+
+ MPF library
+
+ * The function mpf_codec_lists_intersect() now returns FALSE if there is no match for the primary codec descriptor.
+ * Reject the RTP session if there is no match in remote and local codecs.
+ * Use the reserved RTP payload type 19 in case codec list is empty (media stream is rejected).
+ * If the codec list does not match the capabilities, mark the stream as disabled.
+ * Do not set SO_REUSEADDR on RTP sockets.
+ * Made G.711 implementation bit-exact with ITU-T reference implementation.
+ * Use APR typedefs in G.711 implementation.
+ * Improved the RTP port management for those cases when the specified RTP port range is not enough to handle concurrent MRCP sessions.
+ * Check the number of ports per engine to be even to ensure there is a room for a pair of RTP/RTCP ports.
+ * Added debugging capabilities to mpf_frame_buffer.
+ * Copy name string when adding to codec capabilities. Thanks Vali.
+
+ MRCP common library
+
+ * Use apr_snprintf() instead of sprintf() in mrcp_request_id_generate().
+ * Get rid of local fixed-size char buffers and additional string copies. Instead, allocate buffers from memory pool and generate strings straight into the buffers.
+
+ MRCP client library
+
+ * Completed the implementation of the new API function to retrieve a SIP/RTSP response code received from the server (Issue-90).
+ * Fixed a potential crash of the client stack which could happen when the server unexpectedly closes the MRCPv2 connection while the client stack is processing an application request.
+ * Allow a pool/factory of signaling agents to be defined with the MRCPv1 and/or MRCPv2 profiles.
+ * Respond straight away with success to the session termination request if the session creation failed in the first place.
+ * Keep track of associations between RTP termination factories (pools of RTP ports) and media engines.
+ * Allow a pool/factory of media processing engines to be defined with the MRCPv1 and/or MRCPv2 profiles.
+ * Allow a pool/factory of MRCPv2 connection agents to be defined with the MRCPv2 profiles.
+ * Added the ability to specify an IP address by the name of network interface/adapter.
+ * Added a new accessor function to the client API mrcp_client_profiles_get() which retrieves the available profiles.
+ * Store the profile name not only as a key in the profile table but also in the profile structure.
+ * Allow setting an arbitrary tag to the profile.
+
+ MRCP server library
+
+ * Handle separately the case when an RTSP SETUP contains no SDP, which means it's up to the server to decide which codec to use.
+ * Fixed a crash if MRCP resource not found. Thanks Vali.
+ * Keep track of associations between RTP termination factories (pools of RTP ports) and media engines.
+ * Added the ability to specify an IP address by the name of network interface/adapter.
+ * Log maximum engine channel count exceeded. Thanks Vali.
+
+ Sofia-SIP module (MRCPv2 agent)
+
+ * Do not generate media format list for a disabled audio stream.
+ * Use snprintf() consistently in mrcp_sdp.c.
+ * Implemented the log redirection routine of SofiaSIP.
+ * Added an indentifier of the SofiaSIP agent to the log statement "Receive SIP Event".
+
+ RTSP module (MRCPv1 agent)
+
+ * Do not generate media format list for a disabled audio stream.
+
+ Demo plugins
+
+ * Respond with failure if codec descriptor is unavailable (associated media stream is disabled).
+
+ UMC sample application
+
+ * Terminate execution of sample application if media descriptor is unavailable (media stream is disabled).
+ * Use the new NLSML parser interface in sample apps.
+ * Set the header field Save-Waveform to TRUE in the sample umc recog application.
+ * Fixed an invalid read of 8 bytes in umc application: sizeof(mpf_codec_capabilities_t) was meant to be allocated.
+
+ ASR Client application (and library)
+
+ * Get rid of 1Kb grammar file limit in libasrclient. Load the content into an allocated buffer instead.
+
+ Miscellaneous
+
+ * Copy the version and revision header files located in the build directory to the SDK include directory.
+ * Added/fixed support for DESTDIR.
+ * Take into consideration m4 macro files generated for/by libtool 2.
+ * Set ac_macro_dir variable manually, since newer versions of autoconf don't do that.
+ * Enable silent build rules (--enable-silent-rules)and use silent build by default.
+ * Enhanced the report generated by the ./configure script.
+ * Pass no-define to AM_INIT_AUTOMAKE in order not to define PACKAGE and VERSION.
+ * Do not use autoconf generated compiler DEFS by replacing confdefs.h after AC_INIT, AM_INIT_AUTOMAKE and AC_PROG_LIBTOLL getting called.
+ * Updated definition of the macro AX_COMPILER_VENDOR and moved it out from configure.ac to a separate m4 file.
+ * Added missing dereferences of pointers to the (potential) terminal NUL of some strings. Thanks Vali.
+ * Disabled DEFAULT_INCLUDES provided by automake.
+ * Added generic apr_common.m4 in order to use helper m4 macros APR_ADDTO() and APR_CONFIG_NICE().
+ * Generate ./config.nice to reuse ./configure command-line.
+ * Added uni_plugin.m4 which provides generic macros UNI_PLUGIN_ENABLED(name) and UNI_PLUGIN_DISABLED(name).
+ * Added common GNU make rules/vars for plugins, client and server libs/apps alike VS property sheets.
+ * The macro UNIMRCP_CHECK_APR() now checks and sets variables for both APR and APR-util libraries.
+ * Added a brief description of the license definition which is intended to be used for Windows resource files only.
+ * Brought XML schema definitions of configuration file formats up to date.
+ * Cppcheck: printf-like formats fix, possible NULL pointer dereference, member not initialized in the constructor,
+ unused variable/value, method can be made static. Thanks Vali.
+ * Define _WIN64 in Visual Studio x64 targets (for IDE only, the compiler defines _WIN64 anyway). Thanks Vali.
+ * Fixed some GCC warnings. Thanks Vali.
+ * Moved mrcp-flite and mrcp-pocketsphinx plugins out of the source tree into the external solutions directory.
+
+
+Changes for UniMRCP-1.1.0
+
+ APR-toolkit library
+
+ * The function apt_log_file_open() makes a copy of dir_path and file_name variables passed from a user application.
+ * Applied a patch to the apt_log routine which allows the log file to be appended instead of being overwritten. The patch was submitted by Dani. Thanks.
+ * Added a new parameter to the function apt_log_file_open() which specifies whether the log file should be appended or overwritten.
+ * Fixed the formatting of float values in the header fields. Applied a patch submitted by Randy (Issue-108). Thanks.
+ * Fixed apt_log_output_mode_check() which returned TRUE if any mode was enabled or checked regardless their correspondence. Thanks Vali.
+ * Enhanced the debug output by adding task message identifier to the log statements "Signal Message" and "Process Message".
+ * Fixed a potential crash related to the use of pollsets.
+ * Fixed a potential buffer overflow in apt_text_pair_array_insert(). Thanks Vali.
+ * Remove a socket descriptor from the pollset only if the descriptor has been properly added to the pollset. Otherwise, this operation could cause a crash.
+
+ MPF library
+
+ * Tweaked DTMF detector's energy thresholds to eliminate false positives during in-band (from audio) DTMF detection. Thanks Vali.
+ * Took into consideration the RTP marker in order to re-sync the jitter buffer on a new talkspurt. Audio data loss could be experienced in the RTP receiver in case of consecutive SPEAK (for client) or RECOGNIZE (for server) requests.
+ * Instead of discarding a non-aligned RTP packet, adjust the timestamp and write available frames to the jitter buffer (Issue-122).
+ * Added support for the adaptive jitter buffer. Applied a reworked patch submitted by Erik. Thanks.
+ * Enhanced the detection of a new RTP talkspurt by implicitly setting the RTP marker if a gap between two RTP packets is more than the specified threshold (INTER_TALSKPUSRT_GAP = 1000 msec).
+ * Allow the initial playout delay in the jitter buffer to be set to 0.
+ * Implemented a time skew detection algorithm for RTP streams. The detection can be enabled and used for both the adaptive and static jitter buffer.
+ * Added support for redirection of RTP traces (RTP_TRACE, JB_TRACE) to the debug output window of Visual Studio.
+ * Enhanced the processing of the RTP named events.
+
+ RTSP library
+
+ * Use strcasecmp() instead of apr_strnatcasecmp() to match RTSP resource names (Issue-94).
+ * Fixed a crash in the RTSP client stack when the server closes a TCP connection while the associated RTSP session is being destroyed (Issue-124).
+ * Fixed the processing of RTSP TEARDOWN requests being timed out. Applied a patch submitted to Issue-125 by Chris. Thanks.
+ * For logging purposes, pass a string identifier of the RTSP/MRCPv1 signaling agent to the RTSP client and server stacks.
+
+ MRCP common library
+
+ * Added missing recognizer header fields used for voice enrollment (speaker-dependent recognition).
+ * Added support for custom MRCP header fields.
+ * Added support for speaker verification and identification resource.
+ * Added missing recognizer methods used for voice enrollment and interpretation.
+ * Updated the state machine of the recognizer resource to take into consideration requests, responses and events used for interpretation.
+ * Enhanced helper functions which operate on the MRCP header to properly set, get and inherit header fields (Issue-110).
+
+ MRCP client library
+
+ * Added support for SIP redirection with 300 Multiple Choices used by the Nuance Resource Manager.
+ * Added support for feature-tags set in the SIP Accept-Contact header field in an outgoing SIP INVITE message sent to the Nuance Resource Manager.
+ * Added a new accessor function to the client API to get an audio stream associated with the specified channel. The function name is mrcp_application_audio_stream_get().
+ * Added the ability to retrieve an external object associated with the MRCP session through the log handler (apt_log_ext_handler_f).
+ * Fixed the processing of a response to the SIP OPTIONS request used for resource discovery (Issue-112).
+ * Added a new constructor function unimrcp_client_create2() which allows to pass the client XML configuration not by a file, but rather by a string parameter. Thanks Vali.
+ * Fixed the processing of more than one pending application requests upon reception of a SIP BYE message from the server.
+ * Fixed the loading of the client configuration parameter <offer-new-connection>.
+ * Respond to client user application requests with failure if a new session couldn't be created due to an error in initialization of the SIP stack (Issue-127).
+ * When originating an offer from the client, take into account capabilities of an audio stream created by the client user application.
+ * Added a new function to the client API to retrieve a SIP/RTSP response code received from the server (Issue-90). The support is incomplete.
+
+ MRCP server library
+
+ * Fixed an interoperability issue with AVP. The mid attribute is not required when the SDP contains only one m-line.
+ * Fixed the build of C++ MRCP plugins for platforms other than Win32. Thanks Vali.
+ * Added the ability to take and use parameters set by the plugin in a response to the GET-PARAMS request. Thanks Vali.
+
+ Sofia-SIP module
+
+ * Took out unused tags (variables) to compile with Sofia-SIP 1.12.11.
+ * Added support for Sofia-SIP's TPTAG_LOG() and TPTAG_DUMP() tags which can be enabled from the client and server configuration to print out and/or dump SIP messages.
+
+ PocketSphinx plugin
+
+ * In the PocketSphinx plugin, instead of using one common timeout for detection of speech activity and inactivity, use two different timeouts: one for activity and the other for inactivity detection.
+ * In the recognition results sent from the PocketSphinx plugin, set both <instance> and <input> elements.
+ * Fixed a race condition in the PocketSphinx plugin which caused the server to crash.
+ * Fixed the use of recognition timer in the PocketSphinx plugin.
+ * Set an MRCP version specific completion cause in the PocketSphinx plugin.
+
+ UniMRCP server application
+
+ * Enhanced the UniMRCP Windows service manager. Thanks Vali.
+ * Corrected FileType in Windows resources from DLL to APP. Thanks Vali.
+ * Added a Windows resource file for the unimrcpservice application.
+
+ UMC sample application
+
+ * Set the default profile name in umcscenarios.xml to "uni2".
+ * Added sample 8kHz and 16 kHz voiceprints in the data directory which are used by the umc application for a sample verification scenario.
+ * Added mandatory attributes for the SSML <speak> element in the sample speak.xml file.
+ * Added support for a binary recognition grammar used in RecogScenario by the sample umc application. Thanks Vali.
+ * Added a sample SRGS ABNF grammar to the data directory.
+
+ Miscellaneous
+
+ * Added init.d script. The script was originally submitted by pdeschen. Thanks.
+ * Modified the "prepare" utility project to use the new location of PthreadVC2.dll which is now built from source with other dependencies.
+ * Added support for Visual Studio 2010.
+ * Modified the MPF test application to read a raw PCM data from one file, transmit it over RTP, and write the data back to another file.
+ * Set the libtool parameters link_all_deplibs and link_all_deplibs_CXX to "yes" by default, with an option to disable them (--disable-interlib-deps), if ever needed. This fixes a link error on recent Debian/Ubuntu distributions.
+ * Modified the apr.m4 and apu.m4 macros to use '--link-ld' instead of '--link-libtool --libs' for the APR library dependencies. This addresses the problem with a wrong -L path to the expat library.
+ * Set prerequisite version for autoconf to 2.59.
+ * Added a checking for pkg-config to the configure script.
+ * Added a new option (-v or --version) to the unimrcpserver as well as the sample umc and unimrcpclient applications.
BUILD REQUIREMENTS
==================
-UniMRCP depends on a number of third party tools and libraries,
-which are required and must be installed first.
-The easiest and recommended way is to install an appropriate
-dependency package from the download area, which contains APR,
-APR-Util and Sofia-SIP libraries prepackaged for UniMRCP use.
+The UniMRCP project depends on a number of third party tools and libraries which must be installed first.
-http://code.google.com/p/unimrcp/downloads/
+All the required dependencies are available to download prepackaged for the UniMRCP use from the
+following location:
-Alternatively, the original packages of APR, APR-Util and
-Sofia-SIP libraries and patches for them can be downloaded from
+ http://www.unimrcp.org/downloads/dependencies
-http://www.unimrcp.org/dependencies/
+Alternatively, original versions of the libraries as well as patches on them can be downloaded
+separately from the following location:
+
+ http://www.unimrcp.org/dependencies
References:
-
-1. Apache Portable Runtime [>=1.2.x] (http://apr.apache.org/).
-Whenever you want to build any part of UniMRCP, you need the
-Apache Portable Runtime (APR) and the APR Utility (APR-util)
-libraries.
-2. Sofia-SIP [>=1.12.6] (http://sofia-sip.sourceforge.net/).
-Sofia-SIP library is used to implement MRCPv2 specification
-compliant SIP signaling. Sofia-SIP is an open-source SIP User-Agent
-library, compliant with the IETF RFC3261 specification.
+1. Apache Portable Runtime [>=1.2.x] (http://apr.apache.org).
+In order to build any part of the UniMRCP project, the Apache Portable Runtime (APR) and
+the APR Utility (APR-util) libraries are required. The libraries provide a consistent interface to
+underlying platform-specific implementations.
+
+2. Sofia-SIP [>=1.12.6] (http://sofia-sip.sourceforge.net).
+Sofia-SIP is an open-source SIP User-Agent library, compliant with the IETF RFC3261 specification.
+The library is utilized for implementation of SIP signaling for MRCPv2. The SDP message parser is
+also used for both MRCPv2 (SIP/SDP) and MRCPv1 (RTSP/SDP).
GNU BUILD
-===================
-Additional requirements
-- autoconf 2.57 or newer
-- automake
-- libtool 1.4 or newer
-- gcc
-- pkg-config
-
-Build procedure
-$ ./bootstrap
-$ ./configure
-$ make
-$ make install
-
-Installed directory layout
-bin - binaries (unimrcpserver, unimrcpclient)
-conf - configuration files
-data - data files
-include - header files
-lib - shared (convenient) libraries
-log - log files
-plugin - run-time loadable modules
-
-There are a couple of options to "./configure".
-To specify where to look for the APR and APR-util libraries
-use the "--with-apr=" and "--with-apr-util=" options.
-For example
-$ ./configure --with-apr=/usr/local/apr \
- --with-apr-util=/usr/local/apr
-
-To specify where to look for the Sofia-SIP library
-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 install the default data use
-$ cd data
-$ make def-data
-
-To generate doxygen documentation from the source use
-$ make dox
+=========
+
+Prerequisites:
+
+ autoconf 2.59 or newer
+ automake
+ libtool 1.4 or newer
+ gcc
+ pkg-config
+
+
+Procedure:
+
+If the UniMRCP source is checked out from the repository, the "bootstrap" script must be run first
+in order to generate the "configure" script and other required files.
+
+ ./bootstrap
+
+The usual "configure", "make", "make install" sequence of commands should follow in order to build
+and install the project from source.
+
+ ./configure
+ make
+ make install
+
+As a result, the project will be installed in the directory "/usr/local/unimrcp" with the following
+layout:
+
+ bin binaries (unimrcpserver, unimrcpclient, ...)
+ conf configuration files (unimrcpserver.xml, unimrcpclient.xml, ...)
+ data data files
+ include header files
+ lib shared (convenience) libraries
+ log log files
+ plugin run-time loadable modules
+
+There are a couple of options which can additionally be configured.
+In order to specify where to look for the APR and APR-util libraries, use the "--with-apr=" and
+"--with-apr-util=" options respectively. For example:
+
+ ./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr
+In order to specify where to look for the Sofia-SIP library, use the "--with-sofia-sip=" option.
+For example:
+
+ ./configure --with-sofia-sip=/usr/local/sofia-sip
+
+In order to generate executables and shared libraries for x86-64 architecture, use the "-m64"
+option as follows:
+
+ CFLAGS=-m64 CXXFLAGS=-m64 LDFLAGS=-m64 ./configure
+
+In order to generate executables and shared libraries for i386 architecture, use the "-m32" option
+as follows:
+
+ CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 ./configure
+
+In order to install the default configuration, use the following commands:
+
+ cd conf
+ make def-conf
+
+In order to install the default data files, use the following commands:
+
+ cd data
+ make def-data
+
+In order to build a Doxygen generated documentation, use the following command:
+
+ make dox
WINDOWS BUILD
-======================
-Additional requirements
-- Microsoft Visual Studio 2005
+=============
+
+Prerequisites:
+
+ Microsoft Visual Studio 2005 or 2010.
+
+One-time pre-build setup: [optional]
-One-time pre-build preparation
-You may need to adjust the paths for 3-rd party libraries
-in appropriate property sheets to match your local installation,
-while below are the defaults (build/vsprops).
+This step can be skipped if the dependencies are installed in their default locations. Otherwise,
+the paths in the corresponding property sheets must be modified accordingly. Below is the content
+of property sheets for Visual Studio 2005, which are located in the directory "build/vsprops".
+Similarly, property sheets for Visual Studio 2010 can be found in the directory "build/props".
apr.vsprops
<UserMacro
Value="$(SolutionDir)libs\sofia-sip"
/>
-Build procedure
-- 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
-Solution Explorer and select Build from context menu). This is a one-time
-output directory preparation. It copies all the required APR and SofiaSIP
-libraries and the default configuration to the output directory.
-
-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
+Procedure:
+
+1. Open one of the available solution files:
+ * for Visual Studio 2005, use unimrcp.sln,
+ * for Visual Studio 2010, use unimrcp-2010.sln.
+2. Choose a platform (Build -> Configuration Manager):
+ * win32
+ * x64.
+3. Choose a configuration (Build -> Configuration Manager):
+ * Debug
+ * Release.
+4. Build the solution (Build -> Build Solution).
+
+One-time output directory setup:
+
+Build the "prepare.vcproj" utility project by right clicking on the project icon from the Solution
+Explorer (tools->prepare) and selecting the Build command from the context menu. This routine will
+setup the output directory and copy all the required APR, APR-Util, and Sofia-SIP libraries as well
+as the default configuration and data files. As a result, the output directory layout will look
+like the following:
+
+ bin binaries (unimrcpserver, unimrcpclient, ...) and all the required dlls
+ conf configuration files (unimrcpserver.xml, unimrcpclient.xml, ...)
+ data data files
+ lib libraries
+ log log files
+ plugin run-time loadable modules
-macrodir = @ac_macro_dir@
-auxdir = @ac_aux_dir@
-AUX_DIST = $(auxdir)/config.guess \
- $(auxdir)/config.sub \
- $(auxdir)/install-sh \
- $(auxdir)/ltconfig \
- $(auxdir)/ltmain.sh \
- $(auxdir)/depcomp \
- $(auxdir)/missing
-EXTRA_DIST = bootstrap
-
-AUTOMAKE_OPTIONS = foreign
-MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure $(AUX_DIST)
-
-ACLOCAL = aclocal
-
-SUBDIRS = build conf data libs modules plugins platforms
+macrodir = @ac_macro_dir@
+auxdir = @ac_aux_dir@
+
+AUX_DIST = $(auxdir)/compile \
+ $(auxdir)/config.guess \
+ $(auxdir)/config.sub \
+ $(auxdir)/install-sh \
+ $(auxdir)/ltconfig \
+ $(auxdir)/ltmain.sh \
+ $(auxdir)/depcomp \
+ $(auxdir)/missing
+
+MACRO_DIST = $(macrodir)/libtool.m4 \
+ $(macrodir)/ltoptions.m4 \
+ $(macrodir)/ltsugar.m4 \
+ $(macrodir)/ltversion.m4 \
+ $(macrodir)/lt~obsolete.m4
+
+EXTRA_DIST = bootstrap
+
+AUTOMAKE_OPTIONS = foreign
+MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure config.nice $(AUX_DIST) $(MACRO_DIST)
+
+ACLOCAL = aclocal -I $(macrodir)
+
+SUBDIRS = build conf data libs modules plugins platforms
if TEST_SUITES
-SUBDIRS += tests
+SUBDIRS += tests
endif
dox:
doxygen $(top_srcdir)/docs/doxygen.conf
-
+
install-data-local:
- test -d $(logdir) || $(mkinstalldirs) $(logdir)
+ test -d $(DESTDIR)$(logdir) || $(mkinstalldirs) $(DESTDIR)$(logdir)
+ test -d $(DESTDIR)$(vardir) || $(mkinstalldirs) $(DESTDIR)$(vardir)
INTRODUCTION
============
-UniMRCP is an open source MRCP Project.
+
+UniMRCP is an open source project compliant with the IETF RFC6787 (MRCPv2) and RFC4463 (MRCPv1)
+specifications.
INSTALLATION
============
-See the file "INSTALLATION" for installation tips.
+
+See the file "INSTALL" for installation tips.
DOCUMENTATION
=============
-See the directory "docs/dox" for doxygen generated documentation.
-See the directory "docs/ea" for UML based design concepts
- (Enterpise Architect generated HTML pages).
+
+Use the directory "docs/dox" for a documentation generated by Doxygen.
+Use the directory "docs/ea" for UML based design concepts, HTML pages generated by Enterpise Architect.
REFERENCES
==========
+
Website:
http://www.unimrcp.org
-Project Home:
- http://code.google.com/p/unimrcp
+Downloads:
+ http://www.unimrcp.org/downloads
+
+Documentation:
+ http://www.unimrcp.org/documentation
-Wiki:
- http://code.google.com/p/unimrcp/w/list
+Google Code:
+ http://code.google.com/p/unimrcp
Issue Tracker:
http://code.google.com/p/unimrcp/issues/list
LICENSING
=========
-UniMRCP is licensed under terms of the Apache 2.0 license.
+
+UniMRCP is licensed under terms of the Apache License 2.0.
See the file "LICENSE" for more information.
-Copyright 2008 - 2010 Arsen Chaloyan
+Copyright 2008 - 2014 Arsen Chaloyan
m4_include([build/acmacros/apr.m4])
-m4_include([build/acmacros/apu.m4])
m4_include([build/acmacros/find_apr.m4])
m4_include([build/acmacros/find_apu.m4])
m4_include([build/acmacros/sofia-sip.m4])
-m4_include([build/acmacros/sphinxbase.m4])
-m4_include([build/acmacros/pocketsphinx.m4])
-m4_include([build/acmacros/flite.m4])
+m4_include([build/acmacros/ax_compiler_vendor.m4])
+m4_include([build/acmacros/apr_common.m4])
+m4_include([build/acmacros/uni_plugin.m4])
MAINTAINERCLEANFILES = Makefile.in
-CLEANFILES = uni_revision.h
-SUBDIRS = pkgconfig svnrev
+SUBDIRS = pkgconfig
include_HEADERS = uni_version.h uni_revision.h
-
-uni_revision.h :
- svnrev/svnrev -rsvnrev/svnrev.input -p../ -ouni_revision.h
-dnl UNIMRCP_CHECK_APR
-
+dnl
+dnl UNIMRCP_CHECK_APR
+dnl
+dnl This macro attempts to find APR and APR-util libraries and
+dnl set corresponding variables on exit.
+dnl
AC_DEFUN([UNIMRCP_CHECK_APR],
[
AC_MSG_NOTICE([Apache Portable Runtime (APR) library configuration])
fi
dnl check APR version number
-
apr_version="`$apr_config --version`"
AC_MSG_RESULT([$apr_version])
dnl Get build information from APR
+ APR_ADDTO(CPPFLAGS,`$apr_config --cppflags`)
+ APR_ADDTO(CFLAGS,`$apr_config --cflags`)
+ APR_ADDTO(LDFLAGS,`$apr_config --ldflags`)
+
+ APR_ADDTO(UNIMRCP_APR_INCLUDES,`$apr_config --includes`)
+ APR_ADDTO(UNIMRCP_APR_LIBS,`$apr_config --link-ld`)
+
+ AC_MSG_NOTICE([Apache Portable Runtime Utility (APU) library configuration])
- CPPFLAGS="$CPPFLAGS `$apr_config --cppflags`"
- CFLAGS="$CFLAGS `$apr_config --cflags`"
- LDFLAGS="$LDFLAGS `$apr_config --ldflags`"
+ APR_FIND_APU("", "", 1, 1)
- UNIMRCP_APR_INCLUDES="`$apr_config --includes`"
- UNIMRCP_APR_LIBS="`$apr_config --link-libtool --libs`"
+ if test $apu_found = "no"; then
+ AC_MSG_WARN([APU not found])
+ UNIMRCP_DOWNLOAD_APU
+ fi
+
+ if test $apu_found = "reconfig"; then
+ AC_MSG_WARN([APU reconfig])
+ fi
+
+ dnl check APU version number
+ apu_version="`$apu_config --version`"
+ AC_MSG_RESULT([$apu_version])
+
+ dnl Get build information from APU
+ APR_ADDTO(LDFLAGS,`$apu_config --ldflags`)
+
+ APR_ADDTO(UNIMRCP_APR_INCLUDES,`$apu_config --includes`)
+ APR_ADDTO(UNIMRCP_APR_LIBS,`$apu_config --link-ld`)
AC_SUBST(UNIMRCP_APR_INCLUDES)
AC_SUBST(UNIMRCP_APR_LIBS)
echo "--with-apr option to 'configure'"
AC_MSG_ERROR([no suitable APR found])
])
+
+dnl UNIMRCP_DOWNLOAD_APU
+dnl no apr-util found, print out a message telling the user what to do
+AC_DEFUN([UNIMRCP_DOWNLOAD_APU],
+[
+ echo "The Apache Portable Runtime Utility (APU) library cannot be found."
+ echo "Please install APRUTIL on this system and supply the appropriate"
+ echo "--with-apr-util option to 'configure'"
+ AC_MSG_ERROR([no suitable APU found])
+])
--- /dev/null
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl
+dnl apr_common.m4: APR's general-purpose autoconf macros
+dnl
+
+dnl
+dnl APR_CONFIG_NICE(filename)
+dnl
+dnl Saves a snapshot of the configure command-line for later reuse
+dnl
+AC_DEFUN([APR_CONFIG_NICE], [
+ rm -f $1
+ cat >$1<<EOF
+#! /bin/sh
+#
+# Created by configure
+
+EOF
+ if test -n "$CC"; then
+ echo "CC=\"$CC\"; export CC" >> $1
+ fi
+ if test -n "$CFLAGS"; then
+ echo "CFLAGS=\"$CFLAGS\"; export CFLAGS" >> $1
+ fi
+ if test -n "$CPPFLAGS"; then
+ echo "CPPFLAGS=\"$CPPFLAGS\"; export CPPFLAGS" >> $1
+ fi
+ if test -n "$LDFLAGS"; then
+ echo "LDFLAGS=\"$LDFLAGS\"; export LDFLAGS" >> $1
+ fi
+ if test -n "$LTFLAGS"; then
+ echo "LTFLAGS=\"$LTFLAGS\"; export LTFLAGS" >> $1
+ fi
+ if test -n "$LIBS"; then
+ echo "LIBS=\"$LIBS\"; export LIBS" >> $1
+ fi
+ if test -n "$INCLUDES"; then
+ echo "INCLUDES=\"$INCLUDES\"; export INCLUDES" >> $1
+ fi
+ if test -n "$NOTEST_CFLAGS"; then
+ echo "NOTEST_CFLAGS=\"$NOTEST_CFLAGS\"; export NOTEST_CFLAGS" >> $1
+ fi
+ if test -n "$NOTEST_CPPFLAGS"; then
+ echo "NOTEST_CPPFLAGS=\"$NOTEST_CPPFLAGS\"; export NOTEST_CPPFLAGS" >> $1
+ fi
+ if test -n "$NOTEST_LDFLAGS"; then
+ echo "NOTEST_LDFLAGS=\"$NOTEST_LDFLAGS\"; export NOTEST_LDFLAGS" >> $1
+ fi
+ if test -n "$NOTEST_LIBS"; then
+ echo "NOTEST_LIBS=\"$NOTEST_LIBS\"; export NOTEST_LIBS" >> $1
+ fi
+
+ # Retrieve command-line arguments.
+ eval "set x $[0] $ac_configure_args"
+ shift
+
+ for arg
+ do
+ APR_EXPAND_VAR(arg, $arg)
+ echo "\"[$]arg\" \\" >> $1
+ done
+ echo '"[$]@"' >> $1
+ chmod +x $1
+])dnl
+
+dnl APR_MKDIR_P_CHECK(fallback-mkdir-p)
+dnl checks whether mkdir -p works
+AC_DEFUN([APR_MKDIR_P_CHECK], [
+ AC_CACHE_CHECK(for working mkdir -p, ac_cv_mkdir_p,[
+ test -d conftestdir && rm -rf conftestdir
+ mkdir -p conftestdir/somedir >/dev/null 2>&1
+ if test -d conftestdir/somedir; then
+ ac_cv_mkdir_p=yes
+ else
+ ac_cv_mkdir_p=no
+ fi
+ rm -rf conftestdir
+ ])
+ if test "$ac_cv_mkdir_p" = "yes"; then
+ mkdir_p="mkdir -p"
+ else
+ mkdir_p="$1"
+ fi
+])
+
+dnl
+dnl APR_SUBDIR_CONFIG(dir [, sub-package-cmdline-args, args-to-drop])
+dnl
+dnl dir: directory to find configure in
+dnl sub-package-cmdline-args: arguments to add to the invocation (optional)
+dnl args-to-drop: arguments to drop from the invocation (optional)
+dnl
+dnl Note: This macro relies on ac_configure_args being set properly.
+dnl
+dnl The args-to-drop argument is shoved into a case statement, so
+dnl multiple arguments can be separated with a |.
+dnl
+dnl Note: Older versions of autoconf do not single-quote args, while 2.54+
+dnl places quotes around every argument. So, if you want to drop the
+dnl argument called --enable-layout, you must pass the third argument as:
+dnl [--enable-layout=*|\'--enable-layout=*]
+dnl
+dnl Trying to optimize this is left as an exercise to the reader who wants
+dnl to put up with more autoconf craziness. I give up.
+dnl
+AC_DEFUN([APR_SUBDIR_CONFIG], [
+ # save our work to this point; this allows the sub-package to use it
+ AC_CACHE_SAVE
+
+ echo "configuring package in $1 now"
+ ac_popdir=`pwd`
+ apr_config_subdirs="$1"
+ test -d $1 || $mkdir_p $1
+ ac_abs_srcdir=`(cd $srcdir/$1 && pwd)`
+ cd $1
+
+changequote(, )dnl
+ # A "../" for each directory in /$config_subdirs.
+ ac_dots=`echo $apr_config_subdirs|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
+changequote([, ])dnl
+
+ # Make the cache file pathname absolute for the subdirs
+ # required to correctly handle subdirs that might actually
+ # be symlinks
+ case "$cache_file" in
+ /*) # already absolute
+ ac_sub_cache_file=$cache_file ;;
+ *) # Was relative path.
+ ac_sub_cache_file="$ac_popdir/$cache_file" ;;
+ esac
+
+ ifelse($3, [], [apr_configure_args=$ac_configure_args],[
+ apr_configure_args=
+ apr_sep=
+ for apr_configure_arg in $ac_configure_args
+ do
+ case "$apr_configure_arg" in
+ $3)
+ continue ;;
+ esac
+ apr_configure_args="$apr_configure_args$apr_sep'$apr_configure_arg'"
+ apr_sep=" "
+ done
+ ])
+
+ dnl autoconf doesn't add --silent to ac_configure_args; explicitly pass it
+ test "x$silent" = "xyes" && apr_configure_args="$apr_configure_args --silent"
+
+ dnl AC_CONFIG_SUBDIRS silences option warnings, emulate this for 2.62
+ apr_configure_args="--disable-option-checking $apr_configure_args"
+
+ dnl The eval makes quoting arguments work - specifically the second argument
+ dnl where the quoting mechanisms used is "" rather than [].
+ dnl
+ dnl We need to execute another shell because some autoconf/shell combinations
+ dnl will choke after doing repeated APR_SUBDIR_CONFIG()s. (Namely Solaris
+ dnl and autoconf-2.54+)
+ if eval $SHELL $ac_abs_srcdir/configure $apr_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_abs_srcdir $2
+ then :
+ echo "$1 configured properly"
+ else
+ echo "configure failed for $1"
+ exit 1
+ fi
+
+ cd $ac_popdir
+
+ # grab any updates from the sub-package
+ AC_CACHE_LOAD
+])dnl
+
+dnl
+dnl APR_SAVE_THE_ENVIRONMENT(variable_name)
+dnl
+dnl Stores the variable (usually a Makefile macro) for later restoration
+dnl
+AC_DEFUN([APR_SAVE_THE_ENVIRONMENT], [
+ apr_ste_save_$1="$$1"
+])dnl
+
+dnl
+dnl APR_RESTORE_THE_ENVIRONMENT(variable_name, prefix_)
+dnl
+dnl Uses the previously saved variable content to figure out what configure
+dnl has added to the variable, moving the new bits to prefix_variable_name
+dnl and restoring the original variable contents. This makes it possible
+dnl for a user to override configure when it does something stupid.
+dnl
+AC_DEFUN([APR_RESTORE_THE_ENVIRONMENT], [
+dnl Check whether $apr_ste_save_$1 is empty or
+dnl only whitespace. The verbatim "X" is token number 1,
+dnl the following whitespace will be ignored.
+set X $apr_ste_save_$1
+if test ${#} -eq 1; then
+ $2$1="$$1"
+ $1=
+else
+ if test "x$apr_ste_save_$1" = "x$$1"; then
+ $2$1=
+ else
+ $2$1=`echo "$$1" | sed -e "s%${apr_ste_save_$1}%%"`
+ $1="$apr_ste_save_$1"
+ fi
+fi
+if test "x$silent" != "xyes"; then
+ echo " restoring $1 to \"$$1\""
+ echo " setting $2$1 to \"$$2$1\""
+fi
+AC_SUBST($2$1)
+])dnl
+
+dnl
+dnl APR_SETIFNULL(variable, value)
+dnl
+dnl Set variable iff it's currently null
+dnl
+AC_DEFUN([APR_SETIFNULL], [
+ if test -z "$$1"; then
+ test "x$silent" != "xyes" && echo " setting $1 to \"$2\""
+ $1="$2"
+ fi
+])dnl
+
+dnl
+dnl APR_SETVAR(variable, value)
+dnl
+dnl Set variable no matter what
+dnl
+AC_DEFUN([APR_SETVAR], [
+ test "x$silent" != "xyes" && echo " forcing $1 to \"$2\""
+ $1="$2"
+])dnl
+
+dnl
+dnl APR_ADDTO(variable, value)
+dnl
+dnl Add value to variable
+dnl
+AC_DEFUN([APR_ADDTO], [
+ if test "x$$1" = "x"; then
+ test "x$silent" != "xyes" && echo " setting $1 to \"$2\""
+ $1="$2"
+ else
+ apr_addto_bugger="$2"
+ for i in $apr_addto_bugger; do
+ apr_addto_duplicate="0"
+ for j in $$1; do
+ if test "x$i" = "x$j"; then
+ apr_addto_duplicate="1"
+ break
+ fi
+ done
+ if test $apr_addto_duplicate = "0"; then
+ test "x$silent" != "xyes" && echo " adding \"$i\" to $1"
+ $1="$$1 $i"
+ fi
+ done
+ fi
+])dnl
+
+dnl
+dnl APR_REMOVEFROM(variable, value)
+dnl
+dnl Remove a value from a variable
+dnl
+AC_DEFUN([APR_REMOVEFROM], [
+ if test "x$$1" = "x$2"; then
+ test "x$silent" != "xyes" && echo " nulling $1"
+ $1=""
+ else
+ apr_new_bugger=""
+ apr_removed=0
+ for i in $$1; do
+ if test "x$i" != "x$2"; then
+ apr_new_bugger="$apr_new_bugger $i"
+ else
+ apr_removed=1
+ fi
+ done
+ if test $apr_removed = "1"; then
+ test "x$silent" != "xyes" && echo " removed \"$2\" from $1"
+ $1=$apr_new_bugger
+ fi
+ fi
+]) dnl
+
+dnl
+dnl APR_CHECK_DEFINE_FILES( symbol, header_file [header_file ...] )
+dnl
+AC_DEFUN([APR_CHECK_DEFINE_FILES], [
+ AC_CACHE_CHECK([for $1 in $2],ac_cv_define_$1,[
+ ac_cv_define_$1=no
+ for curhdr in $2
+ do
+ AC_EGREP_CPP(YES_IS_DEFINED, [
+#include <$curhdr>
+#ifdef $1
+YES_IS_DEFINED
+#endif
+ ], ac_cv_define_$1=yes)
+ done
+ ])
+ if test "$ac_cv_define_$1" = "yes"; then
+ AC_DEFINE(HAVE_$1, 1, [Define if $1 is defined])
+ fi
+])
+
+
+dnl
+dnl APR_CHECK_DEFINE(symbol, header_file)
+dnl
+AC_DEFUN([APR_CHECK_DEFINE], [
+ AC_CACHE_CHECK([for $1 in $2],ac_cv_define_$1,[
+ AC_EGREP_CPP(YES_IS_DEFINED, [
+#include <$2>
+#ifdef $1
+YES_IS_DEFINED
+#endif
+ ], ac_cv_define_$1=yes, ac_cv_define_$1=no)
+ ])
+ if test "$ac_cv_define_$1" = "yes"; then
+ AC_DEFINE(HAVE_$1, 1, [Define if $1 is defined in $2])
+ fi
+])
+
+dnl
+dnl APR_CHECK_APR_DEFINE( symbol )
+dnl
+AC_DEFUN([APR_CHECK_APR_DEFINE], [
+apr_old_cppflags=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $INCLUDES"
+AC_EGREP_CPP(YES_IS_DEFINED, [
+#include <apr.h>
+#if $1
+YES_IS_DEFINED
+#endif
+], ac_cv_define_$1=yes, ac_cv_define_$1=no)
+CPPFLAGS=$apr_old_cppflags
+])
+
+dnl APR_CHECK_FILE(filename); set ac_cv_file_filename to
+dnl "yes" if 'filename' is readable, else "no".
+dnl @deprecated! - use AC_CHECK_FILE instead
+AC_DEFUN([APR_CHECK_FILE], [
+dnl Pick a safe variable name
+define([apr_cvname], ac_cv_file_[]translit([$1], [./+-], [__p_]))
+AC_CACHE_CHECK([for $1], [apr_cvname],
+[if test -r $1; then
+ apr_cvname=yes
+ else
+ apr_cvname=no
+ fi])
+])
+
+define(APR_IFALLYES,[dnl
+ac_rc=yes
+for ac_spec in $1; do
+ ac_type=`echo "$ac_spec" | sed -e 's/:.*$//'`
+ ac_item=`echo "$ac_spec" | sed -e 's/^.*://'`
+ case $ac_type in
+ header )
+ ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
+ ac_var="ac_cv_header_$ac_item"
+ ;;
+ file )
+ ac_item=`echo "$ac_item" | sed 'y%./+-%__p_%'`
+ ac_var="ac_cv_file_$ac_item"
+ ;;
+ func ) ac_var="ac_cv_func_$ac_item" ;;
+ struct ) ac_var="ac_cv_struct_$ac_item" ;;
+ define ) ac_var="ac_cv_define_$ac_item" ;;
+ custom ) ac_var="$ac_item" ;;
+ esac
+ eval "ac_val=\$$ac_var"
+ if test ".$ac_val" != .yes; then
+ ac_rc=no
+ break
+ fi
+done
+if test ".$ac_rc" = .yes; then
+ :
+ $2
+else
+ :
+ $3
+fi
+])
+
+
+define(APR_BEGIN_DECISION,[dnl
+ac_decision_item='$1'
+ac_decision_msg='FAILED'
+ac_decision=''
+])
+
+
+AC_DEFUN([APR_DECIDE],[dnl
+dnl Define the flag (or not) in apr_private.h via autoheader
+AH_TEMPLATE($1, [Define if $2 will be used])
+ac_decision='$1'
+ac_decision_msg='$2'
+ac_decision_$1=yes
+ac_decision_$1_msg='$2'
+])
+
+
+define(APR_DECISION_OVERRIDE,[dnl
+ ac_decision=''
+ for ac_item in $1; do
+ eval "ac_decision_this=\$ac_decision_${ac_item}"
+ if test ".$ac_decision_this" = .yes; then
+ ac_decision=$ac_item
+ eval "ac_decision_msg=\$ac_decision_${ac_item}_msg"
+ fi
+ done
+])
+
+
+define(APR_DECISION_FORCE,[dnl
+ac_decision="$1"
+eval "ac_decision_msg=\"\$ac_decision_${ac_decision}_msg\""
+])
+
+
+define(APR_END_DECISION,[dnl
+if test ".$ac_decision" = .; then
+ echo "[$]0:Error: decision on $ac_decision_item failed" 1>&2
+ exit 1
+else
+ if test ".$ac_decision_msg" = .; then
+ ac_decision_msg="$ac_decision"
+ fi
+ AC_DEFINE_UNQUOTED(${ac_decision_item})
+ AC_MSG_RESULT([decision on $ac_decision_item... $ac_decision_msg])
+fi
+])
+
+
+dnl
+dnl APR_CHECK_SIZEOF_EXTENDED(INCLUDES, TYPE [, CROSS_SIZE])
+dnl
+dnl A variant of AC_CHECK_SIZEOF which allows the checking of
+dnl sizes of non-builtin types
+dnl
+AC_DEFUN([APR_CHECK_SIZEOF_EXTENDED],
+[changequote(<<, >>)dnl
+dnl The name to #define.
+define(<<AC_TYPE_NAME>>, translit(sizeof_$2, [a-z *], [A-Z_P]))dnl
+dnl The cache variable name.
+define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$2, [ *], [_p]))dnl
+changequote([, ])dnl
+AC_MSG_CHECKING(size of $2)
+AC_CACHE_VAL(AC_CV_NAME,
+[AC_TRY_RUN([#include <stdio.h>
+$1
+#ifdef WIN32
+#define binmode "b"
+#else
+#define binmode
+#endif
+main()
+{
+ FILE *f=fopen("conftestval", "w" binmode);
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof($2));
+ exit(0);
+}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$3],,,
+AC_CV_NAME=$3))])dnl
+AC_MSG_RESULT($AC_CV_NAME)
+AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The size of ]$2)
+undefine([AC_TYPE_NAME])dnl
+undefine([AC_CV_NAME])dnl
+])
+
+
+dnl
+dnl APR_TRY_COMPILE_NO_WARNING(INCLUDES, FUNCTION-BODY,
+dnl [ACTIONS-IF-NO-WARNINGS], [ACTIONS-IF-WARNINGS])
+dnl
+dnl Tries a compile test with warnings activated so that the result
+dnl is false if the code doesn't compile cleanly. For compilers
+dnl where it is not known how to activate a "fail-on-error" mode,
+dnl it is undefined which of the sets of actions will be run.
+dnl
+AC_DEFUN([APR_TRY_COMPILE_NO_WARNING],
+[apr_save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $CFLAGS_WARN"
+ if test "$ac_cv_prog_gcc" = "yes"; then
+ CFLAGS="$CFLAGS -Werror"
+ fi
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [#include "confdefs.h"
+ ]
+ [[$1]]
+ [int main(int argc, const char *const *argv) {]
+ [[$2]]
+ [ return 0; }]
+ )],
+ [$3], [$4])
+ CFLAGS=$apr_save_CFLAGS
+])
+
+dnl
+dnl APR_CHECK_STRERROR_R_RC
+dnl
+dnl Decide which style of retcode is used by this system's
+dnl strerror_r(). It either returns int (0 for success, -1
+dnl for failure), or it returns a pointer to the error
+dnl string.
+dnl
+dnl
+AC_DEFUN([APR_CHECK_STRERROR_R_RC], [
+AC_MSG_CHECKING(for type of return code from strerror_r)
+AC_TRY_RUN([
+#include <errno.h>
+#include <string.h>
+#include <stdio.h>
+main()
+{
+ char buf[1024];
+ if (strerror_r(ERANGE, buf, sizeof buf) < 1) {
+ exit(0);
+ }
+ else {
+ exit(1);
+ }
+}], [
+ ac_cv_strerror_r_rc_int=yes ], [
+ ac_cv_strerror_r_rc_int=no ], [
+ ac_cv_strerror_r_rc_int=no ] )
+if test "x$ac_cv_strerror_r_rc_int" = xyes; then
+ AC_DEFINE(STRERROR_R_RC_INT, 1, [Define if strerror returns int])
+ msg="int"
+else
+ msg="pointer"
+fi
+AC_MSG_RESULT([$msg])
+] )
+
+dnl
+dnl APR_CHECK_DIRENT_INODE
+dnl
+dnl Decide if d_fileno or d_ino are available in the dirent
+dnl structure on this platform. Single UNIX Spec says d_ino,
+dnl BSD uses d_fileno. Undef to find the real beast.
+dnl
+AC_DEFUN([APR_CHECK_DIRENT_INODE], [
+AC_CACHE_CHECK([for inode member of struct dirent], apr_cv_dirent_inode, [
+apr_cv_dirent_inode=no
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <dirent.h>
+],[
+#ifdef d_ino
+#undef d_ino
+#endif
+struct dirent de; de.d_fileno;
+], apr_cv_dirent_inode=d_fileno)
+if test "$apr_cv_dirent_inode" = "no"; then
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <dirent.h>
+],[
+#ifdef d_fileno
+#undef d_fileno
+#endif
+struct dirent de; de.d_ino;
+], apr_cv_dirent_inode=d_ino)
+fi
+])
+if test "$apr_cv_dirent_inode" != "no"; then
+ AC_DEFINE_UNQUOTED(DIRENT_INODE, $apr_cv_dirent_inode,
+ [Define if struct dirent has an inode member])
+fi
+])
+
+dnl
+dnl APR_CHECK_DIRENT_TYPE
+dnl
+dnl Decide if d_type is available in the dirent structure
+dnl on this platform. Not part of the Single UNIX Spec.
+dnl Note that this is worthless without DT_xxx macros, so
+dnl look for one while we are at it.
+dnl
+AC_DEFUN([APR_CHECK_DIRENT_TYPE], [
+AC_CACHE_CHECK([for file type member of struct dirent], apr_cv_dirent_type,[
+apr_cv_dirent_type=no
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <dirent.h>
+],[
+struct dirent de; de.d_type = DT_REG;
+], apr_cv_dirent_type=d_type)
+])
+if test "$apr_cv_dirent_type" != "no"; then
+ AC_DEFINE_UNQUOTED(DIRENT_TYPE, $apr_cv_dirent_type,
+ [Define if struct dirent has a d_type member])
+fi
+])
+
+dnl the following is a newline, a space, a tab, and a backslash (the
+dnl backslash is used by the shell to skip newlines, but m4 sees it;
+dnl treat it like whitespace).
+dnl WARNING: don't reindent these lines, or the space/tab will be lost!
+define([apr_whitespace],[
+ \])
+
+dnl
+dnl APR_COMMA_ARGS(ARG1 ...)
+dnl convert the whitespace-separated arguments into comman-separated
+dnl arguments.
+dnl
+dnl APR_FOREACH(CODE-BLOCK, ARG1, ARG2, ...)
+dnl subsitute CODE-BLOCK for each ARG[i]. "eachval" will be set to ARG[i]
+dnl within each iteration.
+dnl
+changequote({,})
+define({APR_COMMA_ARGS},{patsubst([$}{1],[[}apr_whitespace{]+],[,])})
+define({APR_FOREACH},
+ {ifelse($}{2,,,
+ [define([eachval],
+ $}{2)$}{1[]APR_FOREACH([$}{1],
+ builtin([shift],
+ builtin([shift], $}{@)))])})
+changequote([,])
+
+dnl APR_FLAG_HEADERS(HEADER-FILE ... [, FLAG-TO-SET ] [, "yes" ])
+dnl we set FLAG-TO-SET to 1 if we find HEADER-FILE, otherwise we set to 0
+dnl if FLAG-TO-SET is null, we automagically determine it's name
+dnl by changing all "/" to "_" in the HEADER-FILE and dropping
+dnl all "." and "-" chars. If the 3rd parameter is "yes" then instead of
+dnl setting to 1 or 0, we set FLAG-TO-SET to yes or no.
+dnl
+AC_DEFUN([APR_FLAG_HEADERS], [
+AC_CHECK_HEADERS($1)
+for aprt_i in $1
+do
+ ac_safe=`echo "$aprt_i" | sed 'y%./+-%__p_%'`
+ aprt_2=`echo "$aprt_i" | sed -e 's%/%_%g' -e 's/\.//g' -e 's/-//g'`
+ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ eval "ifelse($2,,$aprt_2,$2)=ifelse($3,yes,yes,1)"
+ else
+ eval "ifelse($2,,$aprt_2,$2)=ifelse($3,yes,no,0)"
+ fi
+done
+])
+
+dnl APR_FLAG_FUNCS(FUNC ... [, FLAG-TO-SET] [, "yes" ])
+dnl if FLAG-TO-SET is null, we automagically determine it's name
+dnl prepending "have_" to the function name in FUNC, otherwise
+dnl we use what's provided as FLAG-TO-SET. If the 3rd parameter
+dnl is "yes" then instead of setting to 1 or 0, we set FLAG-TO-SET
+dnl to yes or no.
+dnl
+AC_DEFUN([APR_FLAG_FUNCS], [
+AC_CHECK_FUNCS($1)
+for aprt_j in $1
+do
+ aprt_3="have_$aprt_j"
+ if eval "test \"`echo '$ac_cv_func_'$aprt_j`\" = yes"; then
+ eval "ifelse($2,,$aprt_3,$2)=ifelse($3,yes,yes,1)"
+ else
+ eval "ifelse($2,,$aprt_3,$2)=ifelse($3,yes,no,0)"
+ fi
+done
+])
+
+dnl Iteratively interpolate the contents of the second argument
+dnl until interpolation offers no new result. Then assign the
+dnl final result to $1.
+dnl
+dnl Example:
+dnl
+dnl foo=1
+dnl bar='${foo}/2'
+dnl baz='${bar}/3'
+dnl APR_EXPAND_VAR(fraz, $baz)
+dnl $fraz is now "1/2/3"
+dnl
+AC_DEFUN([APR_EXPAND_VAR], [
+ap_last=
+ap_cur="$2"
+while test "x${ap_cur}" != "x${ap_last}";
+do
+ ap_last="${ap_cur}"
+ ap_cur=`eval "echo ${ap_cur}"`
+done
+$1="${ap_cur}"
+])
+
+dnl
+dnl Removes the value of $3 from the string in $2, strips of any leading
+dnl slashes, and returns the value in $1.
+dnl
+dnl Example:
+dnl orig_path="${prefix}/bar"
+dnl APR_PATH_RELATIVE(final_path, $orig_path, $prefix)
+dnl $final_path now contains "bar"
+AC_DEFUN([APR_PATH_RELATIVE], [
+ap_stripped=`echo $2 | sed -e "s#^$3##"`
+# check if the stripping was successful
+if test "x$2" != "x${ap_stripped}"; then
+ # it was, so strip of any leading slashes
+ $1="`echo ${ap_stripped} | sed -e 's#^/*##'`"
+else
+ # it wasn't so return the original
+ $1="$2"
+fi
+])
+
+dnl APR_HELP_STRING(LHS, RHS)
+dnl Autoconf 2.50 can not handle substr correctly. It does have
+dnl AC_HELP_STRING, so let's try to call it if we can.
+dnl Note: this define must be on one line so that it can be properly returned
+dnl as the help string. When using this macro with a multi-line RHS, ensure
+dnl that you surround the macro invocation with []s
+AC_DEFUN([APR_HELP_STRING], [ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING([$1],[$2]),[ ][$1] substr([ ],len($1))[$2])])
+
+dnl
+dnl APR_LAYOUT(configlayout, layoutname [, extravars])
+dnl
+AC_DEFUN([APR_LAYOUT], [
+ if test ! -f $srcdir/config.layout; then
+ echo "** Error: Layout file $srcdir/config.layout not found"
+ echo "** Error: Cannot use undefined layout '$LAYOUT'"
+ exit 1
+ fi
+ # Catch layout names including a slash which will otherwise
+ # confuse the heck out of the sed script.
+ case $2 in
+ */*)
+ echo "** Error: $2 is not a valid layout name"
+ exit 1 ;;
+ esac
+ pldconf=./config.pld
+ changequote({,})
+ sed -e "1s/[ ]*<[lL]ayout[ ]*$2[ ]*>[ ]*//;1t" \
+ -e "1,/[ ]*<[lL]ayout[ ]*$2[ ]*>[ ]*/d" \
+ -e '/[ ]*<\/Layout>[ ]*/,$d' \
+ -e "s/^[ ]*//g" \
+ -e "s/:[ ]*/=\'/g" \
+ -e "s/[ ]*$/'/g" \
+ $1 > $pldconf
+ layout_name=$2
+ if test ! -s $pldconf; then
+ echo "** Error: unable to find layout $layout_name"
+ exit 1
+ fi
+ . $pldconf
+ rm $pldconf
+ for var in prefix exec_prefix bindir sbindir libexecdir mandir \
+ sysconfdir datadir includedir localstatedir runtimedir \
+ logfiledir libdir installbuilddir libsuffix $3; do
+ eval "val=\"\$$var\""
+ case $val in
+ *+)
+ val=`echo $val | sed -e 's;\+$;;'`
+ eval "$var=\"\$val\""
+ autosuffix=yes
+ ;;
+ *)
+ autosuffix=no
+ ;;
+ esac
+ val=`echo $val | sed -e 's:\(.\)/*$:\1:'`
+ val=`echo $val | sed -e 's:[\$]\([a-z_]*\):${\1}:g'`
+ if test "$autosuffix" = "yes"; then
+ if echo $val | grep apache >/dev/null; then
+ addtarget=no
+ else
+ addtarget=yes
+ fi
+ if test "$addtarget" = "yes"; then
+ val="$val/apache2"
+ fi
+ fi
+ eval "$var='$val'"
+ done
+ changequote([,])
+])dnl
+
+dnl
+dnl APR_ENABLE_LAYOUT(default layout name [, extra vars])
+dnl
+AC_DEFUN([APR_ENABLE_LAYOUT], [
+AC_ARG_ENABLE(layout,
+[ --enable-layout=LAYOUT],[
+ LAYOUT=$enableval
+])
+
+if test -z "$LAYOUT"; then
+ LAYOUT="$1"
+fi
+APR_LAYOUT($srcdir/config.layout, $LAYOUT, $2)
+
+AC_MSG_CHECKING(for chosen layout)
+AC_MSG_RESULT($layout_name)
+])
+
+
+dnl
+dnl APR_PARSE_ARGUMENTS
+dnl a reimplementation of autoconf's argument parser,
+dnl used here to allow us to co-exist layouts and argument based
+dnl set ups.
+AC_DEFUN([APR_PARSE_ARGUMENTS], [
+ac_prev=
+# Retrieve the command-line arguments. The eval is needed because
+# the arguments are quoted to preserve accuracy.
+eval "set x $ac_configure_args"
+shift
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[[^=]]*=\(.*\)'`
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [[\\/$]]* | ?:[[\\/]]* | NONE | '' ) ;;
+ *) AC_MSG_ERROR([expected an absolute path for --$ac_var: $ac_val]);;
+ esac
+done
+
+])dnl
+
+dnl
+dnl APR_CHECK_DEPEND
+dnl
+dnl Determine what program we can use to generate .deps-style dependencies
+dnl
+AC_DEFUN([APR_CHECK_DEPEND], [
+dnl Try to determine what depend program we can use
+dnl All GCC-variants should have -MM.
+dnl If not, then we can check on those, too.
+if test "$GCC" = "yes"; then
+ MKDEP='$(CC) -MM'
+else
+ rm -f conftest.c
+dnl <sys/types.h> should be available everywhere!
+ cat > conftest.c <<EOF
+#include <sys/types.h>
+ int main() { return 0; }
+EOF
+ MKDEP="true"
+ for i in "$CC -MM" "$CC -M" "$CPP -MM" "$CPP -M" "cpp -M"; do
+ AC_MSG_CHECKING([if $i can create proper make dependencies])
+ if $i conftest.c 2>/dev/null | grep 'conftest.o: conftest.c' >/dev/null; then
+ MKDEP=$i
+ AC_MSG_RESULT(yes)
+ break;
+ fi
+ AC_MSG_RESULT(no)
+ done
+ rm -f conftest.c
+fi
+
+AC_SUBST(MKDEP)
+])
+
+dnl
+dnl APR_CHECK_TYPES_COMPATIBLE(TYPE-1, TYPE-2, [ACTION-IF-TRUE])
+dnl
+dnl Try to determine whether two types are the same. Only works
+dnl for gcc and icc.
+dnl
+AC_DEFUN([APR_CHECK_TYPES_COMPATIBLE], [
+define([apr_cvname], apr_cv_typematch_[]translit([$1], [ ], [_])_[]translit([$2], [ ], [_]))
+AC_CACHE_CHECK([whether $1 and $2 are the same], apr_cvname, [
+AC_TRY_COMPILE(AC_INCLUDES_DEFAULT, [
+ int foo[0 - !__builtin_types_compatible_p($1, $2)];
+], [apr_cvname=yes
+$3], [apr_cvname=no])])
+])
-dnl UNIMRCP_CHECK_APU
-
-AC_DEFUN([UNIMRCP_CHECK_APU],
-[
- AC_MSG_NOTICE([Apache Portable Runtime Utility (APU) library configuration])
-
- APR_FIND_APU("", "", 1, 1)
-
- if test $apu_found = "no"; then
- AC_MSG_WARN([APU not found])
- UNIMRCP_DOWNLOAD_APU
- fi
-
- if test $apu_found = "reconfig"; then
- AC_MSG_WARN([APU reconfig])
- fi
-
- dnl check APU version number
-
- apu_version="`$apu_config --version`"
- AC_MSG_RESULT([$apu_version])
-
- dnl Get build information from APU
-
- LDFLAGS="$LDFLAGS `$apu_config --ldflags`"
-
- UNIMRCP_APU_INCLUDES="`$apu_config --includes`"
- UNIMRCP_APU_LIBS="`$apu_config --link-libtool --libs`"
-
- AC_SUBST(UNIMRCP_APU_INCLUDES)
- AC_SUBST(UNIMRCP_APU_LIBS)
-])
-
-dnl UNIMRCP_DOWNLOAD_APU
-dnl no apr-util found, print out a message telling the user what to do
-AC_DEFUN([UNIMRCP_DOWNLOAD_APU],
-[
- echo "The Apache Portable Runtime Utility (APU) library cannot be found."
- echo "Please install APRUTIL on this system and supply the appropriate"
- echo "--with-apr-util option to 'configure'"
- AC_MSG_ERROR([no suitable APU found])
-])
+dnl The macro UNIMRCP_CHECK_APU() has been merged with the macro UNIMRCP_CHECK_APR().
+dnl This file is no longer used and pending for removal.
--- /dev/null
+dnl Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun,
+dnl hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft,
+dnl watcom, etc. The vendor is returned in the cache variable
+dnl $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++.
+
+AC_DEFUN([AX_COMPILER_VENDOR],
+[AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
+ [dnl note: don't check for gcc first since some other compilers define __GNUC__
+ vendors="intel: __ICC,__ECC,__INTEL_COMPILER
+ ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__
+ pathscale: __PATHCC__,__PATHSCALE__
+ clang: __clang__
+ gnu: __GNUC__
+ sun: __SUNPRO_C,__SUNPRO_CC
+ hp: __HP_cc,__HP_aCC
+ dec: __DECC,__DECCXX,__DECC_VER,__DECCXX_VER
+ borland: __BORLANDC__,__TURBOC__
+ comeau: __COMO__
+ cray: _CRAYC
+ kai: __KCC
+ lcc: __LCC__
+ sgi: __sgi,sgi
+ microsoft: _MSC_VER
+ metrowerks: __MWERKS__
+ watcom: __WATCOMC__
+ portland: __PGI
+ unknown: UNKNOWN"
+ for ventest in $vendors; do
+ case $ventest in
+ *:) vendor=$ventest; continue ;;
+ *) vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;;
+ esac
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
+ #if !($vencpp)
+ thisisanerror;
+ #endif
+ ])], [break])
+ done
+ ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=`echo $vendor | cut -d: -f1`
+ ])
+])
+++ /dev/null
-dnl UNIMRCP_CHECK_FLITE
-
-AC_DEFUN([UNIMRCP_CHECK_FLITE],
-[
- AC_MSG_NOTICE([Flite library configuration])
-
- AC_MSG_CHECKING([for Flite])
- AC_ARG_WITH(flite,
- [ --with-flite=PATH path to Flite build tree],
- [flite_path=$withval],
- [flite_path="/usr/src/flite"]
- )
-
- found_flite="no"
-
- flite_config="config/config"
- for dir in $flite_path ; do
- cd $dir && flite_dir=`pwd` && cd - > /dev/null
- if test -f "$flite_dir/$flite_config"; then
- target_os=`grep TARGET_OS "$flite_dir/$flite_config" | sed "s/^.*= //"` ;\
- target_cpu=`grep TARGET_CPU "$flite_dir/$flite_config" | sed "s/^.*= //"` ;\
- flite_libdir=$flite_dir/build/$target_cpu-$target_os/lib
- if test -d "$flite_libdir"; then
- UNIMRCP_FLITE_INCLUDES="-I$flite_dir/include"
- UNIMRCP_FLITE_LIBS="$flite_libdir/libflite_cmu_us_awb.a \
- $flite_libdir/libflite_cmu_us_kal.a \
- $flite_libdir/libflite_cmu_us_rms.a \
- $flite_libdir/libflite_cmu_us_slt.a \
- $flite_libdir/libflite_cmulex.a \
- $flite_libdir/libflite_usenglish.a \
- $flite_libdir/libflite.a"
- found_flite="yes"
- break
- else
- AC_MSG_WARN(Cannot find Flite lib dir: $flite_libdir)
- fi
- fi
- done
-
- if test x_$found_flite != x_yes; then
- AC_MSG_ERROR(Cannot find Flite - looked for srcdir:$flite_srcdir in $flite_path)
- else
- AC_MSG_RESULT([$found_flite])
-
-case "$host" in
- *darwin*)
- UNIMRCP_FLITE_LIBS="$UNIMRCP_FLITE_LIBS -framework CoreFoundation -framework SystemConfiguration" ;;
-esac
-
- AC_SUBST(UNIMRCP_FLITE_INCLUDES)
- AC_SUBST(UNIMRCP_FLITE_LIBS)
- fi
-])
+++ /dev/null
-dnl UNIMRCP_CHECK_POCKETSPHINX
-
-AC_DEFUN([UNIMRCP_CHECK_POCKETSPHINX],
-[
- AC_MSG_NOTICE([PocketSphinx library configuration])
-
- AC_MSG_CHECKING([for PocketSphinx])
- AC_ARG_WITH(pocketsphinx,
- [ --with-pocketsphinx=PATH prefix for installed PocketSphinx or
- path to PocketSphinx build tree],
- [pocketsphinx_path=$withval],
- [pocketsphinx_path="/usr/local"]
- )
-
- found_pocketsphinx="no"
- pocketsphinx_config="lib/pkgconfig/pocketsphinx.pc"
- pocketsphinx_srcdir="src"
- for dir in $pocketsphinx_path ; do
- cd $dir && pocketsphinx_dir=`pwd` && cd - > /dev/null
- if test -f "$dir/$pocketsphinx_config"; then
- found_pocketsphinx="yes"
- UNIMRCP_POCKETSPHINX_INCLUDES="`pkg-config --cflags $dir/$pocketsphinx_config`"
- UNIMRCP_POCKETSPHINX_LIBS="`pkg-config --libs $dir/$pocketsphinx_config`"
- UNIMRCP_POCKETSPHINX_MODELS=
- pocketsphinx_version="`pkg-config --modversion $dir/$pocketsphinx_config`"
- break
- fi
- if test -d "$dir/$pocketsphinx_srcdir"; then
- found_pocketsphinx="yes"
- UNIMRCP_POCKETSPHINX_INCLUDES="-I$pocketsphinx_dir/include"
- UNIMRCP_POCKETSPHINX_LIBS="$pocketsphinx_dir/$pocketsphinx_srcdir/libpocketsphinx/libpocketsphinx.la"
- UNIMRCP_POCKETSPHINX_MODELS="$pocketsphinx_dir/model"
- pocketsphinx_version="`pkg-config --modversion $pocketsphinx_dir/pocketsphinx.pc`"
- break
- fi
- done
-
- if test x_$found_pocketsphinx != x_yes; then
- AC_MSG_ERROR(Cannot find PocketSphinx - looked for pocketsphinx-config:$pocketsphinx_config and srcdir:$pocketsphinx_srcdir in $pocketsphinx_path)
- else
- AC_MSG_RESULT([$found_pocketsphinx])
- AC_MSG_RESULT([$pocketsphinx_version])
-
-case "$host" in
- *darwin*)
- UNIMRCP_POCKETSPHINX_LIBS="$UNIMRCP_POCKETSPHINX_LIBS -framework CoreFoundation -framework SystemConfiguration" ;;
-esac
-
- AC_SUBST(UNIMRCP_POCKETSPHINX_INCLUDES)
- AC_SUBST(UNIMRCP_POCKETSPHINX_LIBS)
- AC_SUBST(UNIMRCP_POCKETSPHINX_MODELS)
- fi
-])
+dnl
dnl UNIMRCP_CHECK_SOFIA
-
+dnl
+dnl This macro attempts to find the Sofia-SIP library and
+dnl set corresponding variables on exit.
+dnl
AC_DEFUN([UNIMRCP_CHECK_SOFIA],
-[
+[
AC_MSG_NOTICE([Sofia SIP library configuration])
AC_MSG_CHECKING([for Sofia-SIP])
AC_ARG_WITH(sofia-sip,
- [ --with-sofia-sip=PATH prefix for installed Sofia-SIP or
- path to Sofia-SIP build tree],
+ [ --with-sofia-sip=PATH prefix for installed Sofia-SIP,
+ path to Sofia-SIP source/build tree,
+ or the full path to Sofia-SIP pkg-config],
[sofia_path=$withval],
[sofia_path="/usr/local"]
)
-
+
found_sofia="no"
- sofiaconfig="lib/pkgconfig/sofia-sip-ua.pc"
- sofiasrcdir="libsofia-sip-ua"
- for dir in $sofia_path ; do
- cd $dir && sofiadir=`pwd` && cd - > /dev/null
- sofiadirsrc=`(cd $srcdir/$dir && pwd)`
- if test -f "$dir/$sofiaconfig"; then
+
+ if test -n "$PKG_CONFIG"; then
+ dnl Check for installed Sofia-SIP
+ for dir in $sofia_path ; do
+ sofia_config_path=$dir/lib/pkgconfig/sofia-sip-ua.pc
+ if test -f "$sofia_config_path" && $PKG_CONFIG $sofia_config_path > /dev/null 2>&1; then
+ found_sofia="yes"
+ break
+ fi
+ done
+
+ dnl Check for full path to Sofia-SIP pkg-config file
+ if test "$found_sofia" != "yes" && test -f "$sofia_path" && $PKG_CONFIG $sofia_path > /dev/null 2>&1 ; then
found_sofia="yes"
- UNIMRCP_SOFIA_INCLUDES="`pkg-config --cflags $dir/$sofiaconfig`"
- UNIMRCP_SOFIA_LIBS="`pkg-config --libs $dir/$sofiaconfig`"
- sofia_version="`pkg-config --modversion $dir/$sofiaconfig`"
- break
+ sofia_config_path=$sofia_path
fi
- if test -d "$dir/$sofiasrcdir"; then
- found_sofia="yes"
- UNIMRCP_SOFIA_INCLUDES="-I$sofiadir/$sofiasrcdir -I$sofiadir/$sofiasrcdir/bnf -I$sofiadir/$sofiasrcdir/features -I$sofiadir/$sofiasrcdir/http -I$sofiadir/$sofiasrcdir/ipt -I$sofiadir/$sofiasrcdir/iptsec -I$sofiadir/$sofiasrcdir/msg -I$sofiadir/$sofiasrcdir/nea -I$sofiadir/$sofiasrcdir/nta -I$sofiadir/$sofiasrcdir/nth -I$sofiadir/$sofiasrcdir/nua -I$sofiadir/$sofiasrcdir/sdp -I$sofiadir/$sofiasrcdir/sip -I$sofiadir/$sofiasrcdir/soa -I$sofiadir/$sofiasrcdir/sresolv -I$sofiadir/$sofiasrcdir/stun -I$sofiadir/$sofiasrcdir/su -I$sofiadir/$sofiasrcdir/tport -I$sofiadir/$sofiasrcdir/url -I$sofiadirsrc/$sofiasrcdir -I$sofiadirsrc/$sofiasrcdir/bnf -I$sofiadirsrc/$sofiasrcdir/features -I$sofiadirsrc/$sofiasrcdir/http -I$sofiadirsrc/$sofiasrcdir/ipt -I$sofiadirsrc/$sofiasrcdir/iptsec -I$sofiadirsrc/$sofiasrcdir/msg -I$sofiadirsrc/$sofiasrcdir/nea -I$sofiadirsrc/$sofiasrcdir/nta -I$sofiadirsrc/$sofiasrcdir/nth -I$sofiadirsrc/$sofiasrcdir/nua -I$sofiadirsrc/$sofiasrcdir/sdp -I$sofiadirsrc/$sofiasrcdir/sip -I$sofiadirsrc/$sofiasrcdir/soa -I$sofiadirsrc/$sofiasrcdir/sresolv -I$sofiadirsrc/$sofiasrcdir/stun -I$sofiadirsrc/$sofiasrcdir/su -I$sofiadirsrc/$sofiasrcdir/tport -I$sofiadirsrc/$sofiasrcdir/url"
- UNIMRCP_SOFIA_LIBS="$sofiadir/$sofiasrcdir/libsofia-sip-ua.la"
- sofia_version="`pkg-config --modversion $sofiadir/packages/sofia-sip-ua.pc`"
- break
+
+ if test "$found_sofia" = "yes" ; then
+ UNIMRCP_SOFIA_INCLUDES="`$PKG_CONFIG --cflags $sofia_config_path`"
+ UNIMRCP_SOFIA_LIBS="`$PKG_CONFIG --libs $sofia_config_path`"
+ sofia_version="`$PKG_CONFIG --modversion $sofia_config_path`"
fi
- done
+ fi
- if test x_$found_sofia != x_yes; then
- AC_MSG_ERROR(Cannot find Sofia-SIP - looked for sofia-config:$sofiaconfig and srcdir:$sofiasrcdir in $sofia_path)
+ if test "$found_sofia" != "yes" ; then
+ dnl Check for path to Sofia-SIP source/build tree
+ for dir in $sofia_path ; do
+ sofia_uadir="$dir/libsofia-sip-ua"
+ if test -d "$sofia_uadir"; then
+ found_sofia="yes"
+ UNIMRCP_SOFIA_INCLUDES="-I$sofia_uadir -I$sofia_uadir/bnf -I$sofia_uadir/features -I$sofia_uadir/http -I$sofia_uadir/ipt -I$sofia_uadir/iptsec -I$sofia_uadir/msg -I$sofia_uadir/nea -I$sofia_uadir/nta -I$sofia_uadir/nth -I$sofia_uadir/nua -I$sofia_uadir/sdp -I$sofia_uadir/sip -I$sofia_uadir/soa -I$sofia_uadir/sresolv -I$sofia_uadir/stun -I$sofia_uadir/su -I$sofia_uadir/tport -I$sofia_uadir/url"
+ UNIMRCP_SOFIA_LIBS="$sofia_uadir/libsofia-sip-ua.la"
+ sofia_version="`sed -n 's/#define SOFIA_SIP_VERSION.* "\(.*\)"/\1/p' $sofia_uadir/features/sofia-sip/sofia_features.h`"
+ break
+ fi
+ done
+ fi
+
+ if test $found_sofia != "yes" ; then
+ if test -n "$PKG_CONFIG"; then
+ AC_MSG_ERROR(Cannot find Sofia-SIP - looked for sofia-config and libsofia-sip-ua in $sofia_path)
+ else
+ AC_MSG_ERROR(Cannot find Sofia-SIP - pkg-config not available, looked for libsofia-sip-ua in $sofia_path)
+ fi
else
AC_MSG_RESULT([$found_sofia])
AC_MSG_RESULT([$sofia_version])
case "$host" in
*darwin*)
- UNIMRCP_SOFIA_LIBS="$UNIMRCP_SOFIA_LIBS -framework CoreFoundation -framework SystemConfiguration" ;;
+ UNIMRCP_SOFIA_LIBS="$UNIMRCP_SOFIA_LIBS -framework CoreFoundation -framework SystemConfiguration"
+ ;;
esac
AC_SUBST(UNIMRCP_SOFIA_INCLUDES)
+++ /dev/null
-dnl UNIMRCP_CHECK_SPHINXBASE
-
-AC_DEFUN([UNIMRCP_CHECK_SPHINXBASE],
-[
- AC_MSG_NOTICE([SphinxBase library configuration])
-
- AC_MSG_CHECKING([for SphinxBase])
- AC_ARG_WITH(sphinxbase,
- [ --with-sphinxbase=PATH prefix for installed SphinxBase or
- path to SphinxBase build tree],
- [sphinxbase_path=$withval],
- [sphinxbase_path="/usr/local"]
- )
-
- found_sphinxbase="no"
- sphinxbase_config="lib/pkgconfig/sphinxbase.pc"
- sphinxbase_srcdir="src"
- for dir in $sphinxbase_path ; do
- cd $dir && sphinxbase_dir=`pwd` && cd - > /dev/null
- if test -f "$dir/$sphinxbase_config"; then
- found_sphinxbase="yes"
- UNIMRCP_SPHINXBASE_INCLUDES="`pkg-config --cflags $dir/$sphinxbase_config`"
- UNIMRCP_SPHINXBASE_LIBS="`pkg-config --libs $dir/$sphinxbase_config`"
- sphinxbase_version="`pkg-config --modversion $dir/$sphinxbase_config`"
- break
- fi
- if test -d "$dir/$sphinxbase_srcdir"; then
- found_sphinxbase="yes"
- UNIMRCP_SPHINXBASE_INCLUDES="-I$sphinxbase_dir/include"
- UNIMRCP_SPHINXBASE_LIBS="$sphinxbase_dir/$sphinxbase_srcdir/libsphinxbase/libsphinxbase.la $sphinxbase_dir/$sphinxbase_srcdir/libsphinxad/libsphinxad.la"
- sphinxbase_version="`pkg-config --modversion $sphinxbase_dir/sphinxbase.pc`"
- break
- fi
- done
-
- if test x_$found_sphinxbase != x_yes; then
- AC_MSG_ERROR(Cannot find SphinxBase - looked for sphinxbase-config:$sphinxbase_config and srcdir:$sphinxbase_srcdir in $sphinxbase_path)
- else
- AC_MSG_RESULT([$found_sphinxbase])
- AC_MSG_RESULT([$sphinxbase_version])
-
-case "$host" in
- *darwin*)
- UNIMRCP_SPHINXBASE_LIBS="$UNIMRCP_SPHINXBASE_LIBS -framework CoreFoundation -framework SystemConfiguration" ;;
-esac
-
- AC_SUBST(UNIMRCP_SPHINXBASE_INCLUDES)
- AC_SUBST(UNIMRCP_SPHINXBASE_LIBS)
- fi
-])
--- /dev/null
+dnl
+dnl UNI_PLUGIN_ENABLED(name)
+dnl
+dnl where name is the name of the plugin.
+dnl
+dnl This macro can be used for a plugin which must be enabled by default.
+dnl
+dnl Adds the following argument to the configure script:
+dnl
+dnl --disable-$1-plugin
+dnl
+dnl Sets the following variable on exit:
+dnl
+dnl enable_$1_plugin : "yes" or "no"
+dnl
+AC_DEFUN([UNI_PLUGIN_ENABLED],[
+ AC_ARG_ENABLE(
+ [$1-plugin],
+ [AC_HELP_STRING([--disable-$1-plugin],[exclude $1 plugin from build])],
+ [enable_$1_plugin="$enableval"],
+ [enable_$1_plugin="yes"])
+])
+
+dnl
+dnl UNI_PLUGIN_DISABLED(name)
+dnl
+dnl where name is the name of the plugin.
+dnl
+dnl This macro can be used for a plugin which must be disabled by default.
+dnl
+dnl Adds the following argument to the configure script:
+dnl
+dnl --enable-$1-plugin
+dnl
+dnl Sets the following variable on exit:
+dnl
+dnl enable_$1_plugin : "yes" or "no"
+dnl
+AC_DEFUN([UNI_PLUGIN_DISABLED],[
+ AC_ARG_ENABLE(
+ [$1-plugin],
+ [AC_HELP_STRING([--enable-$1-plugin],[include $1 plugin in build])],
+ [enable_$1_plugin="$enableval"],
+ [enable_$1_plugin="no"])
+])
-#!/bin/sh
-#
-# unimrcp-server This shell script takes care of starting and stopping the UniMRCP server.
-#
-# chkconfig: 2345 65 35
-# description: UniMRCP is an open source MRCP v1 & v2 server
-
-# Some global variables
-
-# Application
-APP_NAME="unimrcpserver"
-APP_LONG_NAME="unimrcpserver"
-UNIMRCP_DIR="/usr/local/unimrcp/"
-
-EXEC="${UNIMRCP_DIR}bin/${APP_NAME} -d -o 2 -r ${UNIMRCP_DIR}"
-
-# sudo user
-USERNAME=root
-
-# Priority at which to run the server. See "man nice" for valid priorities.
-# nice is only used if a priority is specified.
-PRIORITY=
-
-# Location of the pid file.
-PIDDIR="/var/run/"
-pid=
-
-LOG="/var/log/${APP_NAME}.log"
-
-if [ -e $PIDDIR ]; then
-echo
-else
-mkdir $PIDDIR
-fi
-
-# Allow configuration overrides in /etc/sysconfig/$APP_NAME
-CONFIGFILE=/etc/sysconfig/$APP_NAME
-
-[ -x $CONFIGFILE ] && . $CONFIGFILE
-
-# Do not modify anything beyond this point
-#-----------------------------------------------------------------------------
-
-# Get the fully qualified path to the script
-case $0 in
- /*)
- SCRIPT="$0"
- ;;
- *)
- PWD=`pwd`
- SCRIPT="$PWD/$0"
- ;;
-esac
-
-# Change spaces to ":" so the tokens can be parsed.
-SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'`
-# Get the real path to this script, resolving any symbolic links
-TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'`
-REALPATH=
-for C in $TOKENS; do
-REALPATH="$REALPATH/$C"
- while [ -h "$REALPATH" ] ; do
-LS="`ls -ld "$REALPATH"`"
- LINK="`expr "$LS" : '.*-> \(.*\)$'`"
- if expr "$LINK" : '/.*' > /dev/null; then
-REALPATH="$LINK"
- else
-REALPATH="`dirname "$REALPATH"`""/$LINK"
- fi
-done
-done
-# Change ":" chars back to spaces.
-REALPATH=`echo $REALPATH | sed -e 's;:; ;g'`
-
-# Change the current directory to the location of the script
-cd "`dirname "$REALPATH"`"
-
-chown $USERNAME $PIDDIR
-
-# Process ID
-PIDFILE="$PIDDIR/$APP_NAME.pid"
-
-# Resolve the location of the 'ps' command
-PSEXE="/usr/bin/ps"
-if [ ! -x $PSEXE ]
-then
-PSEXE="/bin/ps"
- if [ ! -x $PSEXE ]
- then
-echo "Unable to locate 'ps'."
- echo "Please report this with the location on your system."
- exit 1
- fi
-fi
-
-# Build the nice clause
-if [ "X$PRIORITY" = "X" ]
-then
-CMDNICE=""
-else
-CMDNICE="nice -$PRIORITY"
-fi
-
-getpid() {
- if [ -f $PIDFILE ]
- then
-if [ -r $PIDFILE ]
- then
-pid=`cat $PIDFILE`
- if [ "X$pid" != "X" ]
- then
- # Verify that a process with this pid is still running.
- pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1`
- if [ "X$pid" = "X" ]
- then
- # This is a stale pid file.
- rm -f $PIDFILE
- echo "Removed stale pid file: $PIDFILE"
- fi
-fi
-else
-echo "Cannot read $PIDFILE."
- exit 1
- fi
-fi
-}
-
-testpid() {
- pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1`
- if [ "X$pid" = "X" ]
- then
- # Process is gone so remove the pid file.
- rm -f $PIDFILE
- fi
-}
-
-console() {
- echo "Running $APP_LONG_NAME..."
- getpid
- if [ "X$pid" = "X" ]
- then
-exec sudo -u $USERNAME $CMDNICE $EXEC
- else
-echo "$APP_LONG_NAME is already running."
- exit 1
- fi
-}
-
-start() {
- echo "Starting $APP_LONG_NAME..."
- getpid
- if [ "X$pid" = "X" ]
- then
-sudo -u $USERNAME $CMDNICE $EXEC
- pid=`$PSEXE -C $APP_NAME -o pid=`
-echo $pid
-echo $pid > $PIDFILE
- else
-echo "$APP_LONG_NAME is already running."
- exit 1
- fi
-}
-
-stopit() {
- echo "Stopping $APP_LONG_NAME..."
- getpid
- if [ "X$pid" = "X" ]
- then
-echo "$APP_LONG_NAME was not running."
- else
- # Running so try to stop it.
- sudo -u $USERNAME kill $pid
- if [ $? -ne 0 ]
- then
- # An explanation for the failure should have been given
- echo "Unable to stop $APP_LONG_NAME."
- exit 1
- fi
-
- # We can not predict how long it will take for the wrapper to
- # actually stop as it depends on settings in wrapper.conf.
- # Loop until it does.
- savepid=$pid
- CNT=0
- TOTCNT=0
- while [ "X$pid" != "X" ]
- do
- # Loop for up to 5 minutes
- if [ "$TOTCNT" -lt "300" ]
- then
-if [ "$CNT" -lt "5" ]
- then
-CNT=`expr $CNT + 1`
- else
-echo "Waiting for $APP_LONG_NAME to exit..."
- CNT=0
- fi
-TOTCNT=`expr $TOTCNT + 1`
-
- sleep 1
-
- testpid
- else
-pid=
- fi
-done
-
-pid=$savepid
- testpid
- if [ "X$pid" != "X" ]
- then
-echo "Timed out waiting for $APP_LONG_NAME to exit."
- echo " Attempting a forced exit..."
- kill -9 $pid
- fi
-
-pid=$savepid
- testpid
- if [ "X$pid" != "X" ]
- then
-echo "Failed to stop $APP_LONG_NAME."
- exit 1
- else
-echo "Stopped $APP_LONG_NAME."
- fi
-fi
-}
-
-status() {
- getpid
- if [ "X$pid" = "X" ]
- then
-echo "$APP_LONG_NAME is not running."
- exit 1
- else
-echo "$APP_LONG_NAME is running ($pid)."
- exit 0
- fi
-}
-
-case "$1" in
-
- 'console')
- console
- ;;
-
- 'start')
- start
- ;;
-
- 'stop')
- stopit
- ;;
-
- 'restart')
- stopit
- start
- ;;
-
- 'status')
- status
- ;;
-
- *)
- echo "Usage: $0 { console | start | stop | restart | status }"
- exit 1
- ;;
-esac
-
-exit 0
-
+#!/bin/sh\r
+#\r
+# unimrcp-server This shell script takes care of starting and stopping the UniMRCP server.\r
+#\r
+# chkconfig: 2345 65 35\r
+# description: UniMRCP is an open source MRCP v1 & v2 server.\r
+\r
+# Some global variables\r
+\r
+# Application\r
+APP_NAME="unimrcpserver"\r
+APP_LONG_NAME="UniMRCP Server"\r
+UNIMRCP_DIR="/usr/local/unimrcp/"\r
+DAEMON_ARGS="-d -r ${UNIMRCP_DIR}"\r
+APP_ARGS="-o 2"\r
+\r
+EXEC="${UNIMRCP_DIR}bin/${APP_NAME}"\r
+\r
+# sudo user\r
+USERNAME=root\r
+\r
+# Priority at which to run the server. See "man nice" for valid priorities.\r
+# nice is only used if a priority is specified.\r
+PRIORITY=\r
+\r
+# Location of the pid file.\r
+PIDDIR="/var/run/"\r
+pid=\r
+\r
+if [ -e $PIDDIR ]; then\r
+ echo\r
+else\r
+ mkdir $PIDDIR\r
+fi\r
+\r
+# Allow configuration overrides in /etc/sysconfig/$APP_NAME\r
+CONFIGFILE=/etc/sysconfig/$APP_NAME\r
+\r
+[ -x $CONFIGFILE ] && . $CONFIGFILE\r
+\r
+# Do not modify anything beyond this point\r
+#-----------------------------------------------------------------------------\r
+\r
+# Get the fully qualified path to the script\r
+case $0 in\r
+ /*)\r
+ SCRIPT="$0"\r
+ ;;\r
+ *)\r
+ PWD=`pwd`\r
+ SCRIPT="$PWD/$0"\r
+ ;;\r
+esac\r
+\r
+# Change spaces to ":" so the tokens can be parsed.\r
+SCRIPT=`echo $SCRIPT | sed -e 's; ;:;g'`\r
+# Get the real path to this script, resolving any symbolic links\r
+TOKENS=`echo $SCRIPT | sed -e 's;/; ;g'`\r
+REALPATH=\r
+for C in $TOKENS; do\r
+ REALPATH="$REALPATH/$C"\r
+ while [ -h "$REALPATH" ] ; do\r
+ LS="`ls -ld "$REALPATH"`"\r
+ LINK="`expr "$LS" : '.*-> \(.*\)$'`"\r
+ if expr "$LINK" : '/.*' > /dev/null; then\r
+ REALPATH="$LINK"\r
+ else\r
+ REALPATH="`dirname "$REALPATH"`""/$LINK"\r
+ fi\r
+ done\r
+done\r
+# Change ":" chars back to spaces.\r
+REALPATH=`echo $REALPATH | sed -e 's;:; ;g'`\r
+\r
+# Change the current directory to the location of the script\r
+cd "`dirname "$REALPATH"`"\r
+\r
+chown $USERNAME $PIDDIR\r
+\r
+# Process ID\r
+PIDFILE="$PIDDIR/$APP_NAME.pid"\r
+\r
+# Resolve the location of the 'ps' command\r
+PSEXE="/usr/bin/ps"\r
+if [ ! -x $PSEXE ]\r
+then\r
+ PSEXE="/bin/ps"\r
+ if [ ! -x $PSEXE ]\r
+ then\r
+ echo "Unable to locate 'ps'."\r
+ echo "Please report this with the location on your system."\r
+ exit 1\r
+ fi\r
+fi\r
+\r
+# Build the nice clause\r
+if [ "X$PRIORITY" = "X" ]\r
+then\r
+ CMDNICE=""\r
+else\r
+ CMDNICE="nice -$PRIORITY"\r
+fi\r
+\r
+getpid() {\r
+ if [ -f $PIDFILE ]\r
+ then\r
+ if [ -r $PIDFILE ]\r
+ then\r
+ pid=`cat $PIDFILE`\r
+ if [ "X$pid" != "X" ]\r
+ then\r
+ # Verify that a process with this pid is still running.\r
+ pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1`\r
+ if [ "X$pid" = "X" ]\r
+ then\r
+ # This is a stale pid file.\r
+ rm -f $PIDFILE\r
+ echo "Removed stale pid file: $PIDFILE"\r
+ fi\r
+ fi\r
+ else\r
+ echo "Cannot read $PIDFILE."\r
+ exit 1\r
+ fi\r
+ fi\r
+}\r
+\r
+testpid() {\r
+ pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1`\r
+ if [ "X$pid" = "X" ]\r
+ then\r
+ # Process is gone so remove the pid file.\r
+ rm -f $PIDFILE\r
+ fi\r
+}\r
+\r
+console() {\r
+ echo "Running $APP_LONG_NAME..."\r
+ getpid\r
+ if [ "X$pid" = "X" ]\r
+ then\r
+ exec sudo -u $USERNAME $CMDNICE $EXEC $APP_ARGS\r
+ echo $pid > $PIDFILE\r
+ else\r
+ echo "$APP_LONG_NAME is already running."\r
+ exit 1\r
+ fi\r
+}\r
+\r
+start() {\r
+ echo "Starting $APP_LONG_NAME..."\r
+ getpid\r
+ if [ "X$pid" = "X" ]\r
+ then\r
+ sudo -u $USERNAME $CMDNICE $EXEC $DAEMON_ARGS $APP_ARGS\r
+ pid=`$PSEXE -C $APP_NAME -o pid=`\r
+ echo $pid > $PIDFILE\r
+ else\r
+ echo "$APP_LONG_NAME is already running."\r
+ exit 1\r
+ fi\r
+}\r
+\r
+stopit() {\r
+ echo "Stopping $APP_LONG_NAME..."\r
+ getpid\r
+ if [ "X$pid" = "X" ]\r
+ then\r
+ echo "$APP_LONG_NAME was not running."\r
+ else\r
+ # Running so try to stop it.\r
+ sudo -u $USERNAME kill $pid\r
+ if [ $? -ne 0 ]\r
+ then\r
+ # An explanation for the failure should have been given\r
+ echo "Unable to stop $APP_LONG_NAME."\r
+ exit 1\r
+ fi\r
+\r
+ # We can not predict how long it will take for the wrapper to\r
+ # actually stop as it depends on settings in wrapper.conf.\r
+ # Loop until it does.\r
+ savepid=$pid\r
+ CNT=0\r
+ TOTCNT=0\r
+ while [ "X$pid" != "X" ]\r
+ do\r
+ # Loop for up to 5 minutes\r
+ if [ "$TOTCNT" -lt "300" ]\r
+ then\r
+ if [ "$CNT" -lt "5" ]\r
+ then\r
+ CNT=`expr $CNT + 1`\r
+ else\r
+ echo "Waiting for $APP_LONG_NAME to exit..."\r
+ CNT=0\r
+ fi\r
+ TOTCNT=`expr $TOTCNT + 1`\r
+\r
+ sleep 1\r
+\r
+ testpid\r
+ else\r
+ pid=\r
+ fi\r
+ done\r
+\r
+ pid=$savepid\r
+ testpid\r
+ if [ "X$pid" != "X" ]\r
+ then\r
+ echo "Timed out waiting for $APP_LONG_NAME to exit."\r
+ echo " Attempting a forced exit..."\r
+ kill -9 $pid\r
+ fi\r
+\r
+ pid=$savepid\r
+ testpid\r
+ if [ "X$pid" != "X" ]\r
+ then\r
+ echo "Failed to stop $APP_LONG_NAME."\r
+ exit 1\r
+ else\r
+ echo "Stopped $APP_LONG_NAME."\r
+ fi\r
+ fi\r
+}\r
+\r
+status() {\r
+ getpid\r
+ if [ "X$pid" = "X" ]\r
+ then\r
+ echo "$APP_LONG_NAME is not running."\r
+ exit 1\r
+ else\r
+ echo "$APP_LONG_NAME is running ($pid)."\r
+ exit 0\r
+ fi\r
+}\r
+\r
+case "$1" in\r
+\r
+ 'console')\r
+ console\r
+ ;;\r
+\r
+ 'start')\r
+ start\r
+ ;;\r
+\r
+ 'stop')\r
+ stopit\r
+ ;;\r
+\r
+ 'restart')\r
+ stopit\r
+ start\r
+ ;;\r
+\r
+ 'status')\r
+ status\r
+ ;;\r
+\r
+ *)\r
+ echo "Usage: $0 { console | start | stop | restart | status }"\r
+ exit 1\r
+ ;;\r
+esac\r
+\r
+exit 0\r
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
-includedir=@includedir@ @UNIMRCP_APR_INCLUDES@ @UNIMRCP_APU_INCLUDES@
+includedir=@includedir@ @UNIMRCP_APR_INCLUDES@
Name: unimrcpclient
Description: UniMRCP Client Stack
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
-includedir=@includedir@ @UNIMRCP_APR_INCLUDES@ @UNIMRCP_APU_INCLUDES@
+includedir=@includedir@ @UNIMRCP_APR_INCLUDES@
Name: unimrcpplugin
Description: UniMRCP Server Plugin
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
-includedir=@includedir@ @UNIMRCP_APR_INCLUDES@ @UNIMRCP_APU_INCLUDES@
+includedir=@includedir@ @UNIMRCP_APR_INCLUDES@
Name: unimrcpserver
Description: UniMRCP Server Stack
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ImportGroup Label="PropertySheets">\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unibase.props" Condition=" '$(UnibasePropsImported)' == '' "/>\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros">\r
- <AprDir>$(LibRootDir)libs\apr</AprDir>\r
- <AprUtilDir>$(LibRootDir)libs\apr-util</AprUtilDir>\r
- <AprIconvDir>$(LibRootDir)libs\apr-iconv</AprIconvDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>$(AprDir)\include;$(AprUtilDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <BuildMacro Include="AprDir">\r
- <Value>$(AprDir)</Value>\r
- </BuildMacro>\r
- <BuildMacro Include="AprUtilDir">\r
- <Value>$(AprUtilDir)</Value>\r
- </BuildMacro>\r
- <BuildMacro Include="AprIconvDir">\r
- <Value>$(AprIconvDir)</Value>\r
- </BuildMacro>\r
- </ItemGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(ProjectDir)..\..\build\props\unibase.props" Condition=" '$(UniBaseImported)' == '' "/>
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros">
+ <AprDir>$(LibRootDir)libs\apr</AprDir>
+ <AprUtilDir>$(LibRootDir)libs\apr-util</AprUtilDir>
+ <AprIconvDir>$(LibRootDir)libs\apr-iconv</AprIconvDir>
+ </PropertyGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup>
+ <AprImported>true</AprImported>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(AprDir)\include;$(AprUtilDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <BuildMacro Include="AprDir">
+ <Value>$(AprDir)</Value>
+ </BuildMacro>
+ <BuildMacro Include="AprUtilDir">
+ <Value>$(AprUtilDir)</Value>
+ </BuildMacro>
+ <BuildMacro Include="AprIconvDir">
+ <Value>$(AprIconvDir)</Value>
+ </BuildMacro>
+ </ItemGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ImportGroup Label="PropertySheets">\r
- <Import Project="apr.props" />\r
- </ImportGroup>\r
- <PropertyGroup>\r
- <AptPropsImported>true</AptPropsImported>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>$(ProjectRootDir)libs\apr-toolkit\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="apr.props" Condition=" '$(AprImported)' == '' "/>
+ </ImportGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup>
+ <AptImported>true</AptImported>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)libs\apr-toolkit\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemDefinitionGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ImportGroup Label="PropertySheets">\r
- <Import Project="apt.props" Condition=" '$(AptPropsImported)' == '' "/>\r
- </ImportGroup>\r
- <ItemDefinitionGroup>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>$(ProjectRootDir)libs\mpf\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>MPF_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="apt.props" Condition=" '$(AptImported)' == '' "/>
+ </ImportGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup>
+ <MpfImported>true</MpfImported>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)libs\mpf\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>MPF_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemDefinitionGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ImportGroup Label="PropertySheets">\r
- <Import Project="apt.props" Condition=" '$(AptPropsImported)' == '' "/>\r
- </ImportGroup>\r
- <PropertyGroup>\r
- <MrcpPropsImported>true</MrcpPropsImported>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>$(ProjectRootDir)libs\mrcp\include;$(ProjectRootDir)libs\mrcp\message\include;$(ProjectRootDir)libs\mrcp\control\include;$(ProjectRootDir)libs\mrcp\resources\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="apt.props" Condition=" '$(AptImported)' == '' "/>
+ </ImportGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup>
+ <MrcpImported>true</MrcpImported>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)libs\mrcp\include;$(ProjectRootDir)libs\mrcp\message\include;$(ProjectRootDir)libs\mrcp\control\include;$(ProjectRootDir)libs\mrcp\resources\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemDefinitionGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ImportGroup Label="PropertySheets">\r
- <Import Project="mrcpsignaling.props" />\r
- <Import Project="mrcpv2transport.props" />\r
- </ImportGroup>\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>$(ProjectRootDir)libs\mrcp-client\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="mrcpsignaling.props" />
+ <Import Project="mrcpv2transport.props" />
+ </ImportGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)libs\mrcp-client\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="mpf.props" Condition=" '$(MpfImported)' == '' " />
+ <Import Project="mrcp.props" Condition=" '$(MrcpImported)' == '' "/>
+ </ImportGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)libs\mrcp-engine\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="mrcpengine.props" />
+ <Import Project="mrcpsignaling.props" />
+ <Import Project="mrcpv2transport.props" />
+ </ImportGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)libs\mrcp-server\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ImportGroup Label="PropertySheets">\r
- <Import Project="mpf.props" />\r
- <Import Project="mrcp.props" Condition=" '$(MrcpPropsImported)' == ''" />\r
- </ImportGroup>\r
- <ItemDefinitionGroup>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>$(ProjectRootDir)libs\mrcp-signaling\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="mpf.props" Condition=" '$(MpfImported)' == '' " />
+ <Import Project="mrcp.props" Condition=" '$(MrcpImported)' == '' "/>
+ </ImportGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)libs\mrcp-signaling\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ImportGroup Label="PropertySheets">\r
- <Import Project="mrcp.props" Condition=" '$(MrcpPropsImported)' == '' "/>\r
- </ImportGroup>\r
- <ItemDefinitionGroup>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>$(ProjectRootDir)libs\mrcpv2-transport\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="mrcp.props" Condition=" '$(MrcpImported)' == '' "/>
+ </ImportGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)libs\mrcpv2-transport\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="unimrcpsdk.props"/>
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <Link>
+ <AdditionalDependencies>libunimrcpclient.lib mrcpsofiasip.lib mrcpunirtsp.lib unirtsp.lib mrcpclient.lib mrcpv2transport.lib mrcpsignaling.lib libsofia_sip_ua.lib ws2_32.lib winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup />
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="unimrcpsdk.props"/>
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <Link>
+ <AdditionalDependencies>mrcpengine.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup />
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets" />
+ <PropertyGroup Label="UserMacros">
+ <ProjectRootDir>C:\Program Files\UniMRCP</ProjectRootDir>
+ </PropertyGroup>
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <AdditionalLibraryDirectories>$(ProjectRootDir)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>mrcp.lib;mpf.lib;aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <BuildMacro Include="ProjectRootDir">
+ <Value>$(ProjectRootDir)</Value>
+ </BuildMacro>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="unimrcpsdk.props"/>
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <Link>
+ <AdditionalDependencies>libunimrcpserver.lib mrcpsofiasip.lib mrcpunirtsp.lib unirtsp.lib mrcpserver.lib mrcpv2transport.lib mrcpsignaling.lib mrcpengine.lib libsofia_sip_ua.lib ws2_32.lib winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup />
+</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ImportGroup Label="PropertySheets">\r
- <Import Project="unibase.props" Condition=" '$(UnibasePropsImported)' == '' "/>\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros">\r
- <SofiaDir>$(LibRootDir)libs\sofia-sip</SofiaDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>$(SofiaDir)\win32;$(SofiaDir)\libsofia-sip-ua\su;$(SofiaDir)\libsofia-sip-ua\nua;$(SofiaDir)\libsofia-sip-ua\url;$(SofiaDir)\libsofia-sip-ua\sip;$(SofiaDir)\libsofia-sip-ua\msg;$(SofiaDir)\libsofia-sip-ua\sdp;$(SofiaDir)\libsofia-sip-ua\nta;$(SofiaDir)\libsofia-sip-ua\nea;$(SofiaDir)\libsofia-sip-ua\soa;$(SofiaDir)\libsofia-sip-ua\iptsec;$(SofiaDir)\libsofia-sip-ua\bnf;$(SofiaDir)\libsofia-sip-ua\features;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <BuildMacro Include="SofiaDir">\r
- <Value>$(SofiaDir)</Value>\r
- </BuildMacro>\r
- </ItemGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(ProjectDir)..\..\build\props\unibase.props" Condition=" '$(UniBaseImported)' == '' "/>
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros">
+ <SofiaDir>$(LibRootDir)libs\sofia-sip</SofiaDir>
+ </PropertyGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup>
+ <SofiaSipImported>true</SofiaSipImported>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(SofiaDir)\win32;$(SofiaDir)\libsofia-sip-ua\su;$(SofiaDir)\libsofia-sip-ua\nua;$(SofiaDir)\libsofia-sip-ua\url;$(SofiaDir)\libsofia-sip-ua\sip;$(SofiaDir)\libsofia-sip-ua\msg;$(SofiaDir)\libsofia-sip-ua\sdp;$(SofiaDir)\libsofia-sip-ua\nta;$(SofiaDir)\libsofia-sip-ua\nea;$(SofiaDir)\libsofia-sip-ua\soa;$(SofiaDir)\libsofia-sip-ua\iptsec;$(SofiaDir)\libsofia-sip-ua\bnf;$(SofiaDir)\libsofia-sip-ua\features;$(SofiaDir)\libsofia-sip-ua\tport;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <BuildMacro Include="SofiaDir">
+ <Value>$(SofiaDir)</Value>
+ </BuildMacro>
+ </ItemGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <PropertyGroup Label="UserMacros">\r
- <ProjectRootDir>$(ProjectDir)..\..\</ProjectRootDir>\r
- <LibRootDir>$(SolutionDir)</LibRootDir>\r
- </PropertyGroup>\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- </PropertyGroup>\r
- <PropertyGroup>\r
- <UnibasePropsImported>true</UnibasePropsImported>\r
- </PropertyGroup><ItemDefinitionGroup>\r
- <ClCompile>\r
- <PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <WarningLevel>Level4</WarningLevel>\r
- <TreatWarningAsError>true</TreatWarningAsError>\r
- <DisableSpecificWarnings>4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <BuildMacro Include="ProjectRootDir">\r
- <Value>$(ProjectRootDir)</Value>\r
- </BuildMacro>\r
- <BuildMacro Include="LibRootDir">\r
- <Value>$(LibRootDir)</Value>\r
- </BuildMacro>\r
- </ItemGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Label="UserMacros">
+ <ProjectRootDir>$(ProjectDir)..\..\</ProjectRootDir>
+ <LibRootDir>$(SolutionDir)</LibRootDir>
+ </PropertyGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup>
+ <UniBaseImported>true</UniBaseImported>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level4</WarningLevel>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <DisableSpecificWarnings>4100;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <BuildMacro Include="ProjectRootDir">
+ <Value>$(ProjectRootDir)</Value>
+ </BuildMacro>
+ <BuildMacro Include="LibRootDir">
+ <Value>$(LibRootDir)</Value>
+ </BuildMacro>
+ </ItemGroup>
</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="apr.props" Condition=" '$(AprImported)' == '' "/>
+ <Import Project="sofiasip.props" Condition=" '$(SofiaSipImported)' == '' "/>
+ </ImportGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir>$(SolutionDir)$(PlatformName)\$(Configuration)\bin\</OutDir>
+ <IntDir>$(PlatformName)\$(Configuration)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <PreprocessorDefinitions>_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <AdditionalLibraryDirectories>$(AprDir)\$(Platform)\$(Configuration);$(AprUtilDir)\$(Platform)\$(Configuration);$(SofiaDir)\win32\libsofia-sip-ua\$(Platform)\$(Configuration);$(SolutionDir)$(Platform)\$(Configuration)\lib;$(SolutionDir)$(Platform)\$(Configuration)\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="apr.props" Condition=" '$(AprImported)' == '' "/>
+ <Import Project="sofiasip.props" Condition=" '$(SofiaSipImported)' == '' "/>
+ </ImportGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir>$(SolutionDir)$(Configuration)\bin\</OutDir>
+ <IntDir>$(Configuration)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <Link>
+ <AdditionalLibraryDirectories>$(AprDir)\$(Configuration);$(AprUtilDir)\$(Configuration);$(SofiaDir)\win32\libsofia-sip-ua\$(Configuration);$(SolutionDir)$(Configuration)\lib;$(SolutionDir)$(Configuration)\bin;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ImportGroup Label="PropertySheets" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup>\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>true</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(ProjectDir)..\..\build\props\unibase.props" Condition=" '$(UniBaseImported)' == '' "/>
+ </ImportGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir>$(SolutionDir)$(PlatformName)\$(Configuration)\lib\</OutDir>
+ <IntDir>$(PlatformName)\$(Configuration)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <PreprocessorDefinitions>_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemDefinitionGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir>$(SolutionDir)$(Configuration)\lib\</OutDir>
+ <IntDir>$(Configuration)\</IntDir>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="mrcpclient.props" />
+ <Import Project="sofiasip.props" Condition=" '$(SofiaSipImported)' == '' "/>
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros">
+ <UniMRCPClientLibs>libunimrcpclient.lib;mrcpsofiasip.lib;mrcpunirtsp.lib;unirtsp.lib;mrcpclient.lib;mrcpv2transport.lib;mrcpsignaling.lib;mrcp.lib;mpf.lib;aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;libsofia_sip_ua.lib;ws2_32.lib;winmm.lib</UniMRCPClientLibs>
+ </PropertyGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)platforms\libunimrcp-client\include;$(ProjectRootDir)build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <BuildMacro Include="UniMRCPClientLibs">
+ <Value>$(UniMRCPClientLibs)</Value>
+ </BuildMacro>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="mrcpserver.props" />
+ <Import Project="sofiasip.props" Condition=" '$(SofiaSipImported)' == '' "/>
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros">
+ <UniMRCPServerLibs>libunimrcpserver.lib;mrcpsofiasip.lib;mrcpunirtsp.lib;unirtsp.lib;mrcpserver.lib;mrcpv2transport.lib;mrcpsignaling.lib;mrcpengine.lib;mrcp.lib;mpf.lib;aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;libsofia_sip_ua.lib;ws2_32.lib;winmm.lib</UniMRCPServerLibs>
+ </PropertyGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)platforms\libunimrcp-server\include;$(ProjectRootDir)build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <BuildMacro Include="UniMRCPServerLibs">
+ <Value>$(UniMRCPServerLibs)</Value>
+ </BuildMacro>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="apr.props" Condition=" '$(AprImported)' == '' "/>
+ <Import Project="mrcpengine.props" />
+ </ImportGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir>$(SolutionDir)$(PlatformName)\$(Configuration)\plugin\</OutDir>
+ <IntDir>$(PlatformName)\$(Configuration)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <PreprocessorDefinitions>_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <AdditionalLibraryDirectories>$(AprDir)\$(Platform)\$(Configuration);$(AprUtilDir)\$(Platform)\$(Configuration);$(SolutionDir)$(Platform)\$(Configuration)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>mrcpengine.lib;mrcp.lib;mpf.lib;aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="apr.props" Condition=" '$(AprImported)' == '' "/>
+ <Import Project="mrcpengine.props" />
+ </ImportGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir>$(SolutionDir)$(Configuration)\plugin\</OutDir>
+ <IntDir>$(Configuration)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <Link>
+ <AdditionalLibraryDirectories>$(AprDir)\$(Configuration);$(AprUtilDir)\$(Configuration);$(SolutionDir)$(Configuration)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>mrcpengine.lib;mrcp.lib;mpf.lib;aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ImportGroup Label="PropertySheets" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup>\r
- <ClCompile>\r
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(ProjectDir)..\..\build\props\unibase.props" Condition=" '$(UniBaseImported)' == '' "/>
+ </ImportGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ImportGroup Label="PropertySheets">\r
- <Import Project="apt.props" Condition=" '$(AptPropsImported)' == '' "/>\r
- </ImportGroup>\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>$(ProjectRootDir)libs\uni-rtsp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>RTSP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="apt.props" Condition=" '$(AptImported)' == '' "/>
+ </ImportGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)libs\uni-rtsp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>RTSP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemDefinitionGroup>
</Project>
\ No newline at end of file
--- /dev/null
+MAINTAINERCLEANFILES = Makefile.in
+
+# Includes
+UNIMRCP_CLIENTAPP_INCLUDES = -I$(top_srcdir)/platforms/libunimrcp-client/include \
+ -I$(top_srcdir)/libs/mrcp-client/include \
+ -I$(top_srcdir)/libs/mrcp-signaling/include \
+ -I$(top_srcdir)/libs/mrcpv2-transport/include \
+ -I$(top_srcdir)/libs/mrcp/include \
+ -I$(top_srcdir)/libs/mrcp/message/include \
+ -I$(top_srcdir)/libs/mrcp/control/include \
+ -I$(top_srcdir)/libs/mrcp/resources/include \
+ -I$(top_srcdir)/libs/mpf/include \
+ -I$(top_srcdir)/libs/apr-toolkit/include \
+ -I$(top_srcdir)/build \
+ $(UNIMRCP_APR_INCLUDES)
+
+# Libraries (LDADD)
+UNIMRCP_CLIENTAPP_LIBS = $(top_builddir)/platforms/libunimrcp-client/libunimrcpclient.la
+
+# Linker options (LDFLAGS)
+UNIMRCP_CLIENTAPP_OPTS =
+if ISMAC
+UNIMRCP_CLIENTAPP_OPTS += -framework CoreFoundation -framework SystemConfiguration
+endif
--- /dev/null
+MAINTAINERCLEANFILES = Makefile.in
+
+# Includes
+UNIMRCP_CLIENTLIB_INCLUDES = -I$(top_srcdir)/modules/mrcp-sofiasip/include \
+ -I$(top_srcdir)/modules/mrcp-unirtsp/include \
+ -I$(top_srcdir)/libs/mrcp-client/include \
+ -I$(top_srcdir)/libs/mrcp-signaling/include \
+ -I$(top_srcdir)/libs/mrcpv2-transport/include \
+ -I$(top_srcdir)/libs/mrcp/include \
+ -I$(top_srcdir)/libs/mrcp/message/include \
+ -I$(top_srcdir)/libs/mrcp/control/include \
+ -I$(top_srcdir)/libs/mrcp/resources/include \
+ -I$(top_srcdir)/libs/mpf/include \
+ -I$(top_srcdir)/libs/apr-toolkit/include \
+ -I$(top_srcdir)/build \
+ $(UNIMRCP_APR_INCLUDES)
+
+# Libraries (LIBADD)
+UNIMRCP_CLIENTLIB_LIBS = $(top_builddir)/modules/mrcp-sofiasip/libmrcpsofiasip.la \
+ $(top_builddir)/modules/mrcp-unirtsp/libmrcpunirtsp.la \
+ $(top_builddir)/libs/mrcpv2-transport/libmrcpv2transport.la \
+ $(top_builddir)/libs/mrcp-client/libmrcpclient.la \
+ $(top_builddir)/libs/mrcp-signaling/libmrcpsignaling.la \
+ $(top_builddir)/libs/mrcp/libmrcp.la \
+ $(top_builddir)/libs/mpf/libmpf.la \
+ $(top_builddir)/libs/apr-toolkit/libaprtoolkit.la \
+ $(UNIMRCP_APR_LIBS) $(UNIMRCP_SOFIA_LIBS) -lm
+
+# Linker options (LDFLAGS)
+UNIMRCP_CLIENTLIB_OPTS = $(UNI_LT_VERSION)
--- /dev/null
+MAINTAINERCLEANFILES = Makefile.in
+
+# Includes
+UNIMRCP_PLUGIN_INCLUDES = -I$(top_srcdir)/libs/mrcp-engine/include \
+ -I$(top_srcdir)/libs/mrcp/include \
+ -I$(top_srcdir)/libs/mrcp/message/include \
+ -I$(top_srcdir)/libs/mrcp/control/include \
+ -I$(top_srcdir)/libs/mrcp/resources/include \
+ -I$(top_srcdir)/libs/mpf/include \
+ -I$(top_srcdir)/libs/apr-toolkit/include \
+ $(UNIMRCP_APR_INCLUDES)
+
+# Linker options (LDFLAGS)
+UNIMRCP_PLUGIN_OPTS = -module $(PLUGIN_LT_VERSION)
--- /dev/null
+MAINTAINERCLEANFILES = Makefile.in
+
+# Includes
+UNIMRCP_SERVERAPP_INCLUDES = -I$(top_srcdir)/platforms/libunimrcp-server/include \
+ -I$(top_srcdir)/libs/mrcp-server/include \
+ -I$(top_srcdir)/libs/mrcp-engine/include \
+ -I$(top_srcdir)/libs/mrcp-signaling/include \
+ -I$(top_srcdir)/libs/mrcpv2-transport/include \
+ -I$(top_srcdir)/libs/mrcp/include \
+ -I$(top_srcdir)/libs/mrcp/message/include \
+ -I$(top_srcdir)/libs/mrcp/control/include \
+ -I$(top_srcdir)/libs/mrcp/resources/include \
+ -I$(top_srcdir)/libs/mpf/include \
+ -I$(top_srcdir)/libs/apr-toolkit/include \
+ -I$(top_srcdir)/build \
+ $(UNIMRCP_APR_INCLUDES)
+
+# Libraries (LDADD)
+UNIMRCP_SERVERAPP_LIBS = $(top_builddir)/platforms/libunimrcp-server/libunimrcpserver.la
+
+# Linker options (LDFLAGS)
+UNIMRCP_SERVERAPP_OPTS =
+if ISMAC
+UNIMRCP_SERVERAPP_OPTS += -framework CoreFoundation -framework SystemConfiguration
+endif
--- /dev/null
+MAINTAINERCLEANFILES = Makefile.in
+
+# Includes
+UNIMRCP_SERVERLIB_INCLUDES = -I$(top_srcdir)/modules/mrcp-sofiasip/include \
+ -I$(top_srcdir)/modules/mrcp-unirtsp/include \
+ -I$(top_srcdir)/libs/mrcp-server/include \
+ -I$(top_srcdir)/libs/mrcp-engine/include \
+ -I$(top_srcdir)/libs/mrcp-signaling/include \
+ -I$(top_srcdir)/libs/mrcpv2-transport/include \
+ -I$(top_srcdir)/libs/mrcp/include \
+ -I$(top_srcdir)/libs/mrcp/message/include \
+ -I$(top_srcdir)/libs/mrcp/control/include \
+ -I$(top_srcdir)/libs/mrcp/resources/include \
+ -I$(top_srcdir)/libs/mpf/include \
+ -I$(top_srcdir)/libs/apr-toolkit/include \
+ -I$(top_srcdir)/build \
+ $(UNIMRCP_APR_INCLUDES)
+
+# Libraries (LIBADD)
+UNIMRCP_SERVERLIB_LIBS = $(top_builddir)/modules/mrcp-sofiasip/libmrcpsofiasip.la \
+ $(top_builddir)/modules/mrcp-unirtsp/libmrcpunirtsp.la \
+ $(top_builddir)/libs/mrcp-server/libmrcpserver.la \
+ $(top_builddir)/libs/mrcp-signaling/libmrcpsignaling.la \
+ $(top_builddir)/libs/mrcpv2-transport/libmrcpv2transport.la \
+ $(top_builddir)/libs/mrcp-engine/libmrcpengine.la \
+ $(top_builddir)/libs/mrcp/libmrcp.la \
+ $(top_builddir)/libs/mpf/libmpf.la \
+ $(top_builddir)/libs/apr-toolkit/libaprtoolkit.la \
+ $(UNIMRCP_APR_LIBS) $(UNIMRCP_SOFIA_LIBS) -lm
+
+# Linker options (LDFLAGS)
+UNIMRCP_SERVERLIB_OPTS = $(UNI_LT_VERSION)
+++ /dev/null
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
-
-noinst_PROGRAMS = svnrev
-svnrev_LDADD = $(UNIMRCP_APR_LIBS) $(UNIMRCP_APU_LIBS)
-svnrev_SOURCES = svnrev.c
-
-rev:
- ./svnrev -rsvnrev.input -p../../ -o../uni_revision.h
+++ /dev/null
-/* SvnRev
- *
- * This utility retrieves the highest number that follows the "$Id:Â $" keyword
- * or a combination of the $Rev:Â $ and $Date:Â $ keywords. The Subversion
- * version control system expands these keywords and keeps them up to date.
- * For an example of the tag, see the end of this comment.
- *
- * Details on the usage and the operation of this utility is available on-line
- * at http://www.compuphase.com/svnrev.htm.
- *
- *
- * Acknowledgements
- *
- * The support for .java files is contributed by Tom McCann (tommc@spoken.com).
- * The option for prefixing and/or suffixing the build number (in the string
- * constant SVN_REVSTR) was suggested by Robert Nitzel.
- *
- *
- * License
- *
- * Copyright (c) 2005-2009, ITB CompuPhase (www.compuphase.com).
- *
- * This software is provided "as-is", without any express or implied warranty.
- * In no event will the authors be held liable for any damages arising from
- * the use of this software.
- *
- * Permission is granted to anyone to use this software for any purpose,
- * including commercial applications, and to alter it and redistribute it
- * freely, subject to the following restrictions:
- *
- * 1. The origin of this software must not be misrepresented; you must not
- * claim that you wrote the original software. If you use this software in
- * a product, an acknowledgment in the product documentation would be
- * appreciated but is not required.
- * 2. Altered source versions must be plainly marked as such, and must not be
- * misrepresented as being the original software.
- * 3. This notice may not be removed or altered from any source distribution.
- *
- * Version: $Id: svnrev.c 1497 2010-02-12 17:20:21Z achaloyan $
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <apr_pools.h>
-#include <apr_file_io.h>
-
-
-#if defined __WIN32__ || defined _Win32 || defined _WIN32
- #define DIRSEP '\\'
-#elif defined macintosh
- #define DIRSEP ':'
-#else
- /* assume Linux/Unix */
- #define DIRSEP '/'
-#endif
-
-#define MAX_LINELENGTH 512
-#define MAX_SYMBOLLENGTH 32
-
-static void about(void)
-{
- printf("svnrev 1.7.\n\n");
- printf("Usage: svnrev [options] <input> [input [...]]\n\n"
- "Options:\n"
- "-ofilename\tOutput filename for the file with the build number. When no\n"
- "\t\tfilename follows \"-o\", the result is written to stdout. The\n"
- "\t\tdefault filename is \"svnrev.h\" for C/C++ and \"VersionInfo.java\"\n"
- "\t\tfor Java.\n\n"
- "-fpattern\tFormat: Adds text before or after the build number in the\n"
- "\t\tconstant SVN_REVSTR. The pattern has the form \"text#text\"\n"
- "\t\t(without the quotes) where \"text\" is arbitrary text and \"#\"\n"
- "\t\twill be replaced by the build number.\n\n"
- "-i\t\tIncremental: this option should be used when the list of input\n"
- "\t\tfiles is a subset of all files in the project. When -i is\n"
- "\t\tpresent, svnrev also scans the output file that was generated\n"
- "\t\ton a previous run.\n\n"
- "-jname\t\tJava: this option writes a java package file instead of a C/C++\n"
- "\t\theader file. The name of the Java package must follow the\n"
- "\t\toption (this is not the filename).\n\n"
- "-v\t\tVerbose: prints the names of files that are modified since the\n"
- "\t\tlast commit (into version control) to stderr.\n");
- exit(1);
-}
-
-static void processfile(const char *name, int failsilent,
- int *max_build, int *accum_build,
- int *max_year, int *max_month, int *max_day,
- int *ismodified)
-
-{
- char str[MAX_LINELENGTH], str_base[MAX_LINELENGTH];
- char name_base[MAX_LINELENGTH];
- char *p1;
- FILE *fp, *fp_base;
- int build, maj_build;
- int year, month, day;
- int cnt;
- char modchar;
-
- /* since we also want to verify whether the file is modified in version
- * control, get the path to the working copy name
- * for every source file "<path>\<filename>, the "working copy" base can
- * be found in "<path>\.svn\text-base\<filename>.svn-base"
- */
- if ((p1 = strrchr(name, DIRSEP)) != NULL) {
- ++p1; /* skip directory separator character ('\' in Windows, '/' in Linux) */
- strncpy(name_base, name, (int)(p1 - name));
- name_base[(int)(p1 - name)] = '\0';
- } else {
- name_base[0] = '\0';
- p1 = (char*)name;
- } /* if */
- sprintf(name_base + strlen(name_base), ".svn%ctext-base%c%s.svn-base",
- DIRSEP, DIRSEP, p1);
-
- /* first extract the revision keywords */
- fp = fopen(name, "r");
- if (fp == NULL) {
- if (!failsilent)
- fprintf(stderr, "Failed to open input file '%s'\n", name);
- return;
- } /* if */
- fp_base = fopen(name_base, "r"); /* fail silently */
- build = 0;
- maj_build = 0; /* RCS / CVS */
- year = month = day = 0;
-
- while (fgets(str, sizeof str, fp) != NULL) {
- if (fp_base == NULL || fgets(str_base, sizeof str_base, fp_base) == NULL)
- str_base[0] = '\0';
- if ((p1 = strstr(str, "$Id:")) != NULL && strchr(p1+1, '$') != NULL) {
- if (sscanf(p1, "$Id: %*s %d %d-%d-%d", &build, &year, &month, &day) < 4
- && sscanf(p1, "$Id: %*s %d %d/%d/%d", &build, &year, &month, &day) < 4)
- if (sscanf(p1, "$Id: %*s %d.%d %d-%d-%d", &maj_build, &build, &year, &month, &day) < 5)
- sscanf(p1, "$Id: %*s %d.%d %d/%d/%d", &maj_build, &build, &year, &month, &day);
- } else if ((p1 = strstr(str, "$Rev:")) != NULL && strchr(p1+1, '$') != NULL) {
- if (sscanf(p1, "$Rev: %d.%d", &maj_build, &build) < 2) {
- sscanf(p1, "$Rev: %d", &build);
- maj_build = 0;
- } /* if */
- } else if ((p1 = strstr(str, "$Revision:")) != NULL && strchr(p1+1, '$') != NULL) {
- if (sscanf(p1, "$Revision: %d.%d", &maj_build, &build) < 2) {
- /* SvnRev also writes this keyword in its own generated file; read it
- * back for partial updates
- */
- cnt = sscanf(p1, "$Revision: %d%c", &build, &modchar);
- if (cnt == 2 && modchar == 'M' && ismodified != NULL)
- *ismodified = 1;
- maj_build = 0;
- } /* if */
- } else if ((p1 = strstr(str, "$Date:")) != NULL && strchr(p1+1, '$') != NULL) {
- if (sscanf(p1, "$Date: %d-%d-%d", &year, &month, &day) < 3)
- sscanf(p1, "$Date: %d/%d/%d", &year, &month, &day);
- } else if (ismodified != NULL && *ismodified == 0 && fp_base != NULL) {
- /* no keyword present, compare the lines for equivalence */
- *ismodified = strcmp(str, str_base) != 0;
- } /* if */
-
- if (maj_build)
- *accum_build += build; /* RCS / CVS */
- else if (build > *max_build)
- *max_build = build; /* Subversion */
- if (year > *max_year
- || (year == *max_year && month > *max_month)
- || (year == *max_year && month == *max_month && day > *max_day))
- {
- *max_year = year;
- *max_month = month;
- *max_day = day;
- } /* if */
- if (build > 0 && year > 0 && (fp_base == NULL || ismodified == NULL || *ismodified != 0))
- break; /* both build # and date found, not comparing or modification
- * already found => no need to search further */
-
- } /* while */
- fclose(fp);
- if (fp_base != NULL)
- fclose(fp_base);
-}
-
-int main(int argc, char *argv[])
-{
- char *outname = NULL;
- FILE *fp;
- FILE *input_file;
- char *input_file_name = NULL;
- char *path_prefix = NULL;
- int index;
- int process_self = 0;
- int verbose = 0;
- int max_build, accum_build;
- int max_year, max_month, max_day;
- int ismodified, filemodified;
- char prefix[MAX_SYMBOLLENGTH], suffix[MAX_SYMBOLLENGTH];
- char modified_suffix[2];
- int write_java = 0; /* flag for Java output, 0=.h output, 1=.java output */
- /* java package to put revision info in.
- * REVIEW - I assume if you want Java output you will specify a package. */
- char *java_package = NULL;
-
- if (argc <= 1)
- about();
-
- /* collect the options */
- prefix[0] = '\0';
- suffix[0] = '\0';
-
- for (index = 1; index < argc; index++) {
- /* check for options */
- if (argv[index][0] == '-'
-#if defined __WIN32__ || defined _Win32 || defined _WIN32
- || argv[index][0] == '/'
-#endif
- )
- {
- switch (argv[index][1]) {
- case 'f': {
- int len;
- char *ptr = strchr(&argv[index][2], '#');
- len = (ptr != NULL) ? (int)(ptr - &argv[index][2]) : (int)strlen(&argv[index][2]);
- if (len >= MAX_SYMBOLLENGTH)
- len = MAX_SYMBOLLENGTH - 1;
- strncpy(prefix, &argv[index][2], len);
- prefix[len] = '\0';
- ptr = (ptr != NULL) ? ptr + 1 : strchr(argv[index], '\0');
- len = (int)strlen(ptr);
- if (len >= MAX_SYMBOLLENGTH)
- len = MAX_SYMBOLLENGTH - 1;
- strncpy(suffix, ptr, len);
- suffix[len] = '\0';
- break;
- } /* case */
- case 'i':
- process_self = 1;
- break;
- case 'j':
- write_java=1;
- java_package = &argv[index][2];
- break;
- case 'o':
- outname = &argv[index][2];
- break;
- case 'r':
- input_file_name = &argv[index][2];
- break;
- case 'p':
- path_prefix = &argv[index][2];
- break;
- case 'v':
- verbose = 1;
- break;
- default:
- fprintf(stderr, "Invalid option '%s'\n", argv[index]);
- about();
- } /* switch */
- } /* if */
- } /* for */
-
- if (outname == NULL)
- outname = write_java ? "SvnRevision.java" : "uni_revision.h";
- if (!process_self && *outname != '\0')
- remove(outname);
-
- /* phase 1: scan through all files and get the highest build number */
-
- max_build = 0;
- accum_build = 0; /* for RCS / CVS */
- max_year = max_month = max_day = 0;
- ismodified = 0;
-
- if(input_file_name) {
- input_file = fopen(input_file_name, "r");
- if (input_file != NULL) {
- apr_dir_t *dir;
- apr_finfo_t finfo;
- apr_status_t rv;
- apr_pool_t *pool;
- char *file_path;
- char dir_path[256]; /* line */
- int offset = 0;
- if(path_prefix)
- offset = sprintf(dir_path, "%s", path_prefix);
- else
- offset = sprintf(dir_path, "../../");
-
- apr_initialize();
- apr_pool_create(&pool,NULL);
- while (fgets(dir_path + offset, sizeof(dir_path) - offset, input_file) != NULL ) { /* read a line */
- size_t len = strlen(dir_path)-1;
- if(dir_path[len] == '\n')
- dir_path[len] = 0;
- rv = apr_dir_open(&dir,dir_path,pool);
- if(rv == APR_SUCCESS) {
- while (apr_dir_read(&finfo, APR_FINFO_NAME, dir) == APR_SUCCESS) { /* get next file */
- if(finfo.filetype != APR_REG) continue;
-
- apr_filepath_merge(&file_path,dir_path,finfo.name,0,pool);
-
- filemodified = 0;
- if (strcasecmp(file_path, outname)!=0)
- processfile(file_path, 0, &max_build, &accum_build, &max_year, &max_month, &max_day, &filemodified);
- if (filemodified && verbose)
- fprintf(stderr, "\tNotice: modified file '%s'\n", file_path);
- ismodified = ismodified || filemodified;
- }
- apr_dir_close(dir);
- }
- else {
- fprintf(stderr, "No such directory '%s'\n", dir_path);
- }
- }
- fclose (input_file);
- apr_pool_destroy(pool);
- apr_terminate();
- }
- else {
- fprintf(stderr, "No such input file '%s'\n", input_file_name);
- }
- }
- else {
- for (index = 1; index < argc; index++) {
- /* skip the options (already handled) */
- if (argv[index][0] == '-'
-#if defined __WIN32__ || defined _Win32 || defined _WIN32
- || argv[index][0] == '/'
-#endif
- )
- continue;
-
- filemodified = 0;
- if (strcasecmp(argv[index], outname)!=0)
- processfile(argv[index], 0, &max_build, &accum_build, &max_year, &max_month, &max_day, &filemodified);
- if (filemodified && verbose)
- fprintf(stderr, "\tNotice: modified file '%s'\n", argv[index]);
- ismodified = ismodified || filemodified;
- } /* for */
- }
-
- /* also run over the existing header file, if any */
- if (process_self && *outname != '\0')
- processfile(outname, 1, &max_build, &accum_build, &max_year, &max_month, &max_day, NULL/*&ismodified*/);
-
- if (accum_build > max_build)
- max_build = accum_build;
- modified_suffix[0] = ismodified ? 'M' : '\0';
- modified_suffix[1] = '\0';
-
- /* phase 2: write a file with this highest build number */
- if (*outname == '\0') {
- fp = stdout;
- } else if ((fp = fopen(outname, "w")) == NULL) {
- fprintf(stderr, "Failed to create output file '%s'\n", outname);
- return 2;
- } /* if */
- if (*outname != '\0') {
- /* don't print the comments to stdout */
- fprintf(fp, "/* This file was generated by the \"svnrev\" utility\n"
- " * (http://www.compuphase.com/svnrev.htm).\n"
- " * You should not modify it manually, as it may be re-generated.\n"
- " *\n"
- " * $Revision: %d%s$\n"
- " * $Date: %04d-%02d-%02d$\n"
- " */\n\n", max_build, modified_suffix, max_year, max_month, max_day);
- } /* if */
-
- fprintf(fp, "#ifndef UNI_REVISION_H\n");
- fprintf(fp, "#define UNI_REVISION_H\n\n");
- fprintf(fp, "#define UNI_REVISION\t\t%d\n", max_build);
- fprintf(fp, "#define UNI_REVISION_STRING\t\"%s%d%s%s\"\n", prefix, max_build, modified_suffix, suffix);
- fprintf(fp, "#define UNI_REVISION_DATE\t\"%04d-%02d-%02d\"\n", max_year, max_month, max_day);
- fprintf(fp, "#define UNI_REVISION_STAMP\t%04d%02d%02dL\n", max_year, max_month, max_day);
- fprintf(fp, "#define UNI_REVISION_MODIFIED\t%d\n", ismodified);
- fprintf(fp, "\n#endif /* UNI_REVISION_H */\n");
-
- if (*outname != '\0')
- fclose(fp);
-
- return 0;
-}
+++ /dev/null
-build
-libs/apr-toolkit/include
-libs/apr-toolkit/src
-libs/mpf/include
-libs/mpf/src
-libs/mrcp/control/include
-libs/mrcp/control/src
-libs/mrcp/include
-libs/mrcp/message/include
-libs/mrcp/message/src
-libs/mrcp/resources/include
-libs/mrcp/resources/src
-libs/mrcp-client/include
-libs/mrcp-client/src
-libs/mrcp-server/include
-libs/mrcp-server/src
-libs/mrcp-engine/include
-libs/mrcp-engine/src
-libs/mrcp-signaling/include
-libs/mrcp-signaling/src
-libs/mrcpv2-transport/include
-libs/mrcpv2-transport/src
-libs/uni-rtsp/include
-libs/uni-rtsp/src
-modules/mrcp-sofiasip/include
-modules/mrcp-sofiasip/src
-modules/mrcp-unirtsp/include
-modules/mrcp-unirtsp/src
-platforms/libunimrcp-client/include
-platforms/libunimrcp-client/src
-platforms/libunimrcp-server/include
-platforms/libunimrcp-server/src
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="svnrev"
- ProjectGUID="{49AAB3FE-63D3-41CA-B92B-65828B79902B}"
- RootNamespace="svnrev"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="1"
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apt.vsprops;$(ProjectDir)..\..\build\vsprops\unibin.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="$(SolutionDir)$(ConfigurationName)\bin\svnrev -r$(SolutionDir)build\svnrev\svnrev.input -p$(SolutionDir) -o$(SolutionDir)build\uni_revision.h
"
- Outputs="$(SolutionDir)build\uni_revision.h"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="4"
- DisableSpecificWarnings="4996"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
- GenerateDebugInformation="true"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="1"
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apt.vsprops;$(ProjectDir)..\..\build\vsprops\unibin-x64.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\svnrev -r$(SolutionDir)build\svnrev\svnrev.input -p$(SolutionDir) -o$(SolutionDir)build\uni_revision.h
"
- Outputs="$(SolutionDir)build\uni_revision.h"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- DisableSpecificWarnings="4996"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
- GenerateDebugInformation="true"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="1"
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apt.vsprops;$(ProjectDir)..\..\build\vsprops\unibin.vsprops"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="$(SolutionDir)$(ConfigurationName)\bin\svnrev -r$(SolutionDir)build\svnrev\svnrev.input -p$(SolutionDir) -o$(SolutionDir)build\uni_revision.h
"
- Outputs="$(SolutionDir)build\uni_revision.h"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- RuntimeLibrary="2"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
- GenerateDebugInformation="true"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="1"
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apt.vsprops;$(ProjectDir)..\..\build\vsprops\unibin-x64.vsprops"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\svnrev -r$(SolutionDir)build\svnrev\svnrev.input -p$(SolutionDir) -o$(SolutionDir)build\uni_revision.h
"
- Outputs="$(SolutionDir)build\uni_revision.h"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- RuntimeLibrary="2"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="libaprutil-1.lib libapr-1.lib"
- GenerateDebugInformation="true"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\svnrev.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="prepare"\r
- ProjectGUID="{01D63BF5-7798-4746-852A-4B45229BB735}"\r
- RootNamespace="prepare"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="10"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apr.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- CommandLine="xcopy "$(AprDir)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\pthreadVC2.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(ConfigurationName)\conf" xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\log" mkdir "$(SolutionDir)$(ConfigurationName)\log\"
"\r
- ExcludedFromBuild="false"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="10"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\apr.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- CommandLine="xcopy "$(AprDir)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\pthreadVC2.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(ConfigurationName)\conf" xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\log" mkdir "$(SolutionDir)$(ConfigurationName)\log\"
"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- </Files>\r
-</VisualStudioProject>\r
>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="xcopy "$(AprDir)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\pthreadVC2.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(ConfigurationName)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\client-profiles\" /Y
)

if not exist "$(SolutionDir)$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\log" mkdir "$(SolutionDir)$(ConfigurationName)\log\"
"
+ CommandLine="xcopy "$(AprDir)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\$(ConfigurationName)\pthreadVC2.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(ConfigurationName)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\client-profiles\" /Y
)

if not exist "$(SolutionDir)$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\log" mkdir "$(SolutionDir)$(ConfigurationName)\log\"
if not exist "$(SolutionDir)$(ConfigurationName)\var" mkdir "$(SolutionDir)$(ConfigurationName)\var\"
"
ExcludedFromBuild="false"
/>
<Tool
>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="xcopy "$(AprDir)\$(PlatformName)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(PlatformName)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\$(PlatformName)\pthreadVC2.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\client-profiles\" /Y
)

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log\"
"
+ CommandLine="xcopy "$(AprDir)\$(PlatformName)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(PlatformName)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\$(PlatformName)\$(ConfigurationName)\pthreadVC2.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\client-profiles\" /Y
)

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log\"
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\var" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\var\"
"
ExcludedFromBuild="false"
/>
<Tool
>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="xcopy "$(AprDir)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\pthreadVC2.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(ConfigurationName)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\client-profiles\" /Y
)

if not exist "$(SolutionDir)$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\log" mkdir "$(SolutionDir)$(ConfigurationName)\log\"
"
+ CommandLine="xcopy "$(AprDir)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\$(ConfigurationName)\pthreadVC2.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(ConfigurationName)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(ConfigurationName)\conf\client-profiles\" /Y
)

if not exist "$(SolutionDir)$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(ConfigurationName)\log" mkdir "$(SolutionDir)$(ConfigurationName)\log\"
if not exist "$(SolutionDir)$(ConfigurationName)\var" mkdir "$(SolutionDir)$(ConfigurationName)\var\"
"
/>
<Tool
Name="VCCustomBuildTool"
>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="xcopy "$(AprDir)\$(PlatformName)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(PlatformName)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\$(PlatformName)\pthreadVC2.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\client-profiles\" /Y
)

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log\"
"
+ CommandLine="xcopy "$(AprDir)\$(PlatformName)\$(ConfigurationName)\libapr-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(AprUtilDir)\$(PlatformName)\$(ConfigurationName)\libaprutil-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" (
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\libapriconv-1.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
if exist "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv" (
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv"
xcopy "$(AprIconvDir)\$(PlatformName)\$(ConfigurationName)\iconv\*.so" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\iconv\" /Y
)
)

xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(PlatformName)\$(ConfigurationName)\libsofia_sip_ua.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(SofiaDir)\win32\pthread\$(PlatformName)\$(ConfigurationName)\pthreadVC2.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf" (
xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\client-profiles\" /Y
)

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\" /Y
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\log\"
if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\var" mkdir "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\var\"
"
/>
<Tool
Name="VCCustomBuildTool"
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{01D63BF5-7798-4746-852A-4B45229BB735}</ProjectGuid>
+ <RootNamespace>prepare</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Utility</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Utility</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Utility</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Utility</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\apr.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\apr.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\apr.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\apr.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+ <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreBuildEventUseInBuild>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
+ <PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</PreBuildEventUseInBuild>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <PreBuildEvent>
+ <Command>xcopy "$(AprDir)\$(Configuration)\libapr-1.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
+xcopy "$(AprUtilDir)\$(Configuration)\libaprutil-1.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
+
+if exist "$(AprIconvDir)\$(Configuration)\libapriconv-1.dll" (
+xcopy "$(AprIconvDir)\$(Configuration)\libapriconv-1.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
+if exist "$(AprIconvDir)\$(Configuration)\iconv" (
+if not exist "$(SolutionDir)$(Configuration)\bin\iconv" mkdir "$(SolutionDir)$(Configuration)\bin\iconv"
+xcopy "$(AprIconvDir)\$(Configuration)\iconv\*.so" "$(SolutionDir)$(Configuration)\bin\iconv\" /Y
+)
+)
+
+xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(Configuration)\libsofia_sip_ua.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
+xcopy "$(SofiaDir)\win32\pthread\$(Configuration)\pthreadVC2.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
+
+if not exist "$(SolutionDir)$(Configuration)\conf" (
+xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(Configuration)\conf\" /Y
+xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(Configuration)\conf\" /Y
+xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(Configuration)\conf\client-profiles\" /Y
+)
+
+if not exist "$(SolutionDir)$(Configuration)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(Configuration)\data\" /Y
+if not exist "$(SolutionDir)$(Configuration)\log" mkdir "$(SolutionDir)$(Configuration)\log\"
+if not exist "$(SolutionDir)$(Configuration)\var" mkdir "$(SolutionDir)$(Configuration)\var\"
+</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <PreBuildEvent>
+ <Command>xcopy "$(AprDir)\$(Platform)\$(Configuration)\libapr-1.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
+xcopy "$(AprUtilDir)\$(Platform)\$(Configuration)\libaprutil-1.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
+
+if exist "$(AprIconvDir)\$(Platform)\$(Configuration)\libapriconv-1.dll" (
+xcopy "$(AprIconvDir)\$(Platform)\$(Configuration)\libapriconv-1.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
+if exist "$(AprIconvDir)\$(Platform)\$(Configuration)\iconv" (
+if not exist "$(SolutionDir)$(Platform)\$(Configuration)\bin\iconv" mkdir "$(SolutionDir)$(Platform)\$(Configuration)\bin\iconv"
+xcopy "$(AprIconvDir)\$(Platform)\$(Configuration)\iconv\*.so" "$(SolutionDir)$(Platform)\$(Configuration)\bin\iconv\" /Y
+)
+)
+
+xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(Platform)\$(Configuration)\libsofia_sip_ua.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
+xcopy "$(SofiaDir)\win32\pthread\$(Platform)\$(Configuration)\pthreadVC2.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
+
+if not exist "$(SolutionDir)$(Platform)\$(Configuration)\conf" (
+xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(Platform)\$(Configuration)\conf\" /Y
+xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(Platform)\$(Configuration)\conf\" /Y
+xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(Platform)\$(Configuration)\conf\client-profiles\" /Y
+)
+
+if not exist "$(SolutionDir)$(Platform)\$(Configuration)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(Platform)\$(Configuration)\data\" /Y
+if not exist "$(SolutionDir)$(Platform)\$(Configuration)\log" mkdir "$(SolutionDir)$(Platform)\$(Configuration)\log\"
+if not exist "$(SolutionDir)$(Platform)\$(Configuration)\var" mkdir "$(SolutionDir)$(Platform)\$(Configuration)\var\"
+</Command>
+ </PreBuildEvent>
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <PreBuildEvent>
+ <Command>xcopy "$(AprDir)\$(Configuration)\libapr-1.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
+xcopy "$(AprUtilDir)\$(Configuration)\libaprutil-1.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
+
+if exist "$(AprIconvDir)\$(Configuration)\libapriconv-1.dll" (
+xcopy "$(AprIconvDir)\$(Configuration)\libapriconv-1.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
+if exist "$(AprIconvDir)\$(Configuration)\iconv" (
+if not exist "$(SolutionDir)$(Configuration)\bin\iconv" mkdir "$(SolutionDir)$(Configuration)\bin\iconv"
+xcopy "$(AprIconvDir)\$(Configuration)\iconv\*.so" "$(SolutionDir)$(Configuration)\bin\iconv\" /Y
+)
+)
+
+xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(Configuration)\libsofia_sip_ua.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
+xcopy "$(SofiaDir)\win32\pthread\$(Configuration)\pthreadVC2.dll" "$(SolutionDir)$(Configuration)\bin\" /Y
+
+if not exist "$(SolutionDir)$(Configuration)\conf" (
+xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(Configuration)\conf\" /Y
+xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(Configuration)\conf\" /Y
+xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(Configuration)\conf\client-profiles\" /Y
+)
+
+if not exist "$(SolutionDir)$(Configuration)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(Configuration)\data\" /Y
+if not exist "$(SolutionDir)$(Configuration)\log" mkdir "$(SolutionDir)$(Configuration)\log\"
+if not exist "$(SolutionDir)$(Configuration)\var" mkdir "$(SolutionDir)$(Configuration)\var\"
+</Command>
+ </PreBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <PreBuildEvent>
+ <Command>xcopy "$(AprDir)\$(Platform)\$(Configuration)\libapr-1.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
+xcopy "$(AprUtilDir)\$(Platform)\$(Configuration)\libaprutil-1.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
+
+if exist "$(AprIconvDir)\$(Platform)\$(Configuration)\libapriconv-1.dll" (
+xcopy "$(AprIconvDir)\$(Platform)\$(Configuration)\libapriconv-1.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
+if exist "$(AprIconvDir)\$(Platform)\$(Configuration)\iconv" (
+if not exist "$(SolutionDir)$(Platform)\$(Configuration)\bin\iconv" mkdir "$(SolutionDir)$(Platform)\$(Configuration)\bin\iconv"
+xcopy "$(AprIconvDir)\$(Platform)\$(Configuration)\iconv\*.so" "$(SolutionDir)$(Platform)\$(Configuration)\bin\iconv\" /Y
+)
+)
+
+xcopy "$(SofiaDir)\win32\libsofia-sip-ua\$(Platform)\$(Configuration)\libsofia_sip_ua.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
+xcopy "$(SofiaDir)\win32\pthread\$(Platform)\$(Configuration)\pthreadVC2.dll" "$(SolutionDir)$(Platform)\$(Configuration)\bin\" /Y
+
+if not exist "$(SolutionDir)$(Platform)\$(Configuration)\conf" (
+xcopy "$(SolutionDir)conf\*.xml" "$(SolutionDir)$(Platform)\$(Configuration)\conf\" /Y
+xcopy "$(SolutionDir)conf\*.xsd" "$(SolutionDir)$(Platform)\$(Configuration)\conf\" /Y
+xcopy "$(SolutionDir)conf\client-profiles\*.xml" "$(SolutionDir)$(Platform)\$(Configuration)\conf\client-profiles\" /Y
+)
+
+if not exist "$(SolutionDir)$(Platform)\$(Configuration)\data" xcopy "$(SolutionDir)data\*" "$(SolutionDir)$(Platform)\$(Configuration)\data\" /Y
+if not exist "$(SolutionDir)$(Platform)\$(Configuration)\log" mkdir "$(SolutionDir)$(Platform)\$(Configuration)\log\"
+if not exist "$(SolutionDir)$(Platform)\$(Configuration)\var" mkdir "$(SolutionDir)$(Platform)\$(Configuration)\var\"
+</Command>
+ </PreBuildEvent>
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="preparesphinx"\r
- ProjectGUID="{71D62A04-8EF6-4C6B-AC12-0C15A875E53A}"\r
- RootNamespace="preparesphinx"\r
- Keyword="Win32Proj"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- <Platform\r
- Name="x64"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="10"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\pocketsphinx.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- CommandLine="xcopy "$(PocketSphinxDir)\bin\$(ConfigurationName)\pocketsphinx.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SphinxBaseDir)\lib\$(ConfigurationName)\sphinxbase.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

xcopy "$(PocketSphinxDir)\model\hmm\wsj1\*" "$(SolutionDir)$(ConfigurationName)\data\wsj1\" /Y
copy "$(PocketSphinxDir)\model\lm\cmudict.0.6d" "$(SolutionDir)$(ConfigurationName)\data\default.dic"

if not exist "$(SolutionDir)$(ConfigurationName)\conf\pocketsphinx.xml" xcopy "$(SolutionDir)plugins\mrcp-pocketsphinx\conf\pocketsphinx.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
"\r
- ExcludedFromBuild="false"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="10"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\pocketsphinx.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- CommandLine="xcopy "$(PocketSphinxDir)\bin\$(ConfigurationName)\pocketsphinx.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y
xcopy "$(SphinxBaseDir)\lib\$(ConfigurationName)\sphinxbase.dll" "$(SolutionDir)$(ConfigurationName)\bin\" /Y

xcopy "$(PocketSphinxDir)\model\hmm\wsj1\*" "$(SolutionDir)$(ConfigurationName)\data\wsj1\" /Y
copy "$(PocketSphinxDir)\model\lm\cmudict.0.6d" "$(SolutionDir)$(ConfigurationName)\data\default.dic"

if not exist "$(SolutionDir)$(ConfigurationName)\conf\pocketsphinx.xml" xcopy "$(SolutionDir)plugins\mrcp-pocketsphinx\conf\pocketsphinx.xml" "$(SolutionDir)$(ConfigurationName)\conf\" /Y
"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="10"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\pocketsphinx.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- CommandLine="xcopy "$(PocketSphinxDir)\bin\$(PlatformName)\$(ConfigurationName)\pocketsphinx.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(SphinxBaseDir)\lib\$(PlatformName)\$(ConfigurationName)\sphinxbase.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

xcopy "$(PocketSphinxDir)\model\hmm\wsj1\*" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\wsj1\" /Y
copy "$(PocketSphinxDir)\model\lm\cmudict.0.6d" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\default.dic"

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\pocketsphinx.xml" xcopy "$(SolutionDir)plugins\mrcp-pocketsphinx\conf\pocketsphinx.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
"\r
- ExcludedFromBuild="false"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="10"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\pocketsphinx.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- CommandLine="xcopy "$(PocketSphinxDir)\bin\$(PlatformName)\$(ConfigurationName)\pocketsphinx.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y
xcopy "$(SphinxBaseDir)\lib\$(PlatformName)\$(ConfigurationName)\sphinxbase.dll" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\bin\" /Y

xcopy "$(PocketSphinxDir)\model\hmm\wsj1\*" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\wsj1\" /Y
copy "$(PocketSphinxDir)\model\lm\cmudict.0.6d" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\data\default.dic"

if not exist "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\pocketsphinx.xml" xcopy "$(SolutionDir)plugins\mrcp-pocketsphinx\conf\pocketsphinx.xml" "$(SolutionDir)$(PlatformName)\$(ConfigurationName)\conf\" /Y
"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: unimrcp_service.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: unimrcp_service.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <windows.h>
#include <apr_getopt.h>
+#include <apr_file_info.h>
+#include <apr_strings.h>
#include "apt.h"
#include "apt_pool.h"
#define WIN_SERVICE_NAME "unimrcp"
+/** UniMRCP service register command enumeration */
+typedef enum uni_service_register_e {
+ USR_NONE, USR_REGISTER, USR_UNREGISTER
+} uni_service_register_e;
+
+/** UniMRCP service control command enumeration */
+typedef enum uni_service_control_e {
+ USC_NONE, USC_START, USC_STOP
+} uni_service_control_e;
+
+
+/** Display error message with Windows error code and description */
+static void winerror(const char *msg)
+{
+ char buf[128];
+ DWORD err = GetLastError();
+ int ret = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL,
+ err,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ buf, sizeof(buf), NULL);
+ printf("%s: %lu %.*s\n", msg, err, ret, buf);
+}
/** Register/install service in SCM */
-static apt_bool_t uni_service_register(const char *root_dir_path, apr_pool_t *pool)
+static apt_bool_t uni_service_register(const char *root_dir_path, apr_pool_t *pool,
+ const char *name,
+ apt_bool_t autostart,
+ unsigned long recover,
+ int log_priority,
+ const char *disp_name,
+ const char *description)
{
- char *bin_path;
+ apr_status_t status;
+ char buf[4096];
+ static const size_t len = sizeof(buf);
+ size_t pos = 0;
+ char *root_dir;
SERVICE_DESCRIPTION desc;
SC_HANDLE sch_service;
- SC_HANDLE sch_manager = OpenSCManager(0,0,SC_MANAGER_ALL_ACCESS);
- if(!sch_manager) {
- printf("Failed to Open SCManager %d\n", GetLastError());
+ SC_HANDLE sch_manager;
+
+ /* Normalize root directory path and make it absolute */
+ status = apr_filepath_merge(&root_dir, NULL, root_dir_path,
+ APR_FILEPATH_NOTRELATIVE | APR_FILEPATH_NATIVE | APR_FILEPATH_TRUENAME, pool);
+ if (status != APR_SUCCESS) {
+ printf("Error making root directory absolute: %d %.512s\n", status,
+ apr_strerror(status, buf, 512));
return FALSE;
}
+ buf[pos++] = '"';
+ pos = apr_cpystrn(buf + pos, root_dir, len - pos) - buf;
+ if ((buf[pos - 1] != '\\') && (pos < len))
+ /* Add trailing backslash */
+ buf[pos++] = '\\';
+ pos = apr_cpystrn(buf + pos, "bin\\unimrcpserver.exe\" --service -o 2", len - pos) - buf;
+ if (log_priority >= 0) {
+ pos = apr_cpystrn(buf + pos, " -l ", len - pos) - buf;
+ if (pos < len - 34)
+ pos += strlen(itoa(log_priority, buf + pos, 10));
+ }
+ if (name) {
+ pos = apr_cpystrn(buf + pos, " --name \"", len - pos) - buf;
+ pos = apr_cpystrn(buf + pos, name, len - pos) - buf;
+ if ((buf[pos - 1] == '\\') && (pos < len))
+ /* `\"' might be misinterpreted as escape, so replace `\' with `\\' */
+ buf[pos++] = '\\';
+ if (pos < len)
+ buf[pos++] = '"';
+ }
+ pos = apr_cpystrn(buf + pos, " --root-dir \"", len - pos) - buf;
+ pos = apr_cpystrn(buf + pos, root_dir, len - pos) - buf;
+ if ((buf[pos - 1] == '\\') && (pos < len))
+ /* `\"' might be misinterpreted as escape, so replace `\' with `\\' */
+ buf[pos++] = '\\';
+ if (pos < len)
+ buf[pos++] = '"';
+ if (pos < len)
+ buf[pos] = 0;
+ else {
+ puts("Service Command Too Long");
+ return FALSE;
+ }
+ if (!disp_name || !*disp_name) {
+ if (name)
+ disp_name = apr_pstrcat(pool, name, " ", "UniMRCP Server", NULL);
+ else
+ disp_name = "UniMRCP Server";
+ }
+ if (!description || !*description)
+ description = "Launches UniMRCP Server";
- bin_path = apr_psprintf(pool,"%s\\bin\\unimrcpserver.exe --service --root-dir \"%s\" -o 2",
- root_dir_path,
- root_dir_path);
+ sch_manager = OpenSCManager(0,0,SC_MANAGER_ALL_ACCESS);
+ if(!sch_manager) {
+ winerror("Failed to Open SCManager");
+ return FALSE;
+ }
sch_service = CreateService(
sch_manager,
- WIN_SERVICE_NAME,
- "UniMRCP Server",
+ name ? name : WIN_SERVICE_NAME,
+ disp_name,
GENERIC_EXECUTE | SERVICE_CHANGE_CONFIG,
SERVICE_WIN32_OWN_PROCESS,
- SERVICE_DEMAND_START,
+ autostart ? SERVICE_AUTO_START : SERVICE_DEMAND_START,
SERVICE_ERROR_NORMAL,
- bin_path,0,0,0,0,0);
+ buf,0,0,0,0,0);
if(!sch_service) {
- printf("Failed to Create Service %d\n", GetLastError());
+ winerror("Failed to Create Service");
CloseServiceHandle(sch_manager);
return FALSE;
}
- desc.lpDescription = "Launches UniMRCP Server";
+ desc.lpDescription = (char *) description;
if(!ChangeServiceConfig2(sch_service,SERVICE_CONFIG_DESCRIPTION,&desc)) {
- printf("Failed to Set Service Description %d\n", GetLastError());
+ winerror("Failed to Set Service Description");
+ }
+
+ if (recover) {
+ SERVICE_FAILURE_ACTIONS sfa;
+ SC_ACTION action;
+ sfa.dwResetPeriod = 0;
+ sfa.lpCommand = "";
+ sfa.lpRebootMsg = "";
+ sfa.cActions = 1;
+ sfa.lpsaActions = &action;
+ action.Delay = recover * 1000;
+ action.Type = SC_ACTION_RESTART;
+ if (!ChangeServiceConfig2(sch_service,SERVICE_CONFIG_FAILURE_ACTIONS,&sfa)) {
+ winerror("Failed to Set Service Restart on Failure");
+ }
}
CloseServiceHandle(sch_service);
CloseServiceHandle(sch_manager);
+ printf("UniMRCP service %s registered\n", name ? name : WIN_SERVICE_NAME);
return TRUE;
}
/** Unregister/uninstall service from SCM */
-static apt_bool_t uni_service_unregister()
+static apt_bool_t uni_service_unregister(const char *name)
{
apt_bool_t status = TRUE;
SERVICE_STATUS ss_status;
SC_HANDLE sch_service;
SC_HANDLE sch_manager = OpenSCManager(0,0,SC_MANAGER_ALL_ACCESS);
+ if (!name) name = WIN_SERVICE_NAME;
if(!sch_manager) {
- printf("Failed to Open SCManager %d\n", GetLastError());
+ winerror("Failed to Open SCManager");
return FALSE;
}
- sch_service = OpenService(sch_manager,WIN_SERVICE_NAME,DELETE|SERVICE_STOP);
+ sch_service = OpenService(sch_manager,name,DELETE|SERVICE_STOP);
if(!sch_service) {
- printf("Failed to Open Service %d\n", GetLastError());
+ winerror("Failed to Open Service");
CloseServiceHandle(sch_manager);
return FALSE;
}
ControlService(sch_service,SERVICE_CONTROL_STOP,&ss_status);
if(!DeleteService(sch_service)) {
- printf("Failed to Delete Service %d\n", GetLastError());
+ winerror("Failed to Delete Service");
status = FALSE;
- }
+ } else
+ printf("UniMRCP service %s unregistered\n", name);
CloseServiceHandle(sch_service);
CloseServiceHandle(sch_manager);
return status;
}
/** Start service */
-static apt_bool_t uni_service_start()
+static apt_bool_t uni_service_start(const char *name)
{
apt_bool_t status = TRUE;
SC_HANDLE sch_service;
SC_HANDLE sch_manager = OpenSCManager(0,0,SC_MANAGER_ALL_ACCESS);
+ if (!name) name = WIN_SERVICE_NAME;
if(!sch_manager) {
- printf("Failed to Open SCManager %d\n", GetLastError());
+ winerror("Failed to Open SCManager");
return FALSE;
}
- sch_service = OpenService(sch_manager,WIN_SERVICE_NAME,SERVICE_START);
+ sch_service = OpenService(sch_manager,name,SERVICE_START);
if(!sch_service) {
- printf("Failed to Open Service %d\n", GetLastError());
+ winerror("Failed to Open Service");
CloseServiceHandle(sch_manager);
return FALSE;
}
if(!StartService(sch_service,0,NULL)) {
- printf("Failed to Start Service %d\n", GetLastError());
+ winerror("Failed to Start Service");
status = FALSE;
- }
+ } else
+ printf("UniMRCP service %s started\n", name);
CloseServiceHandle(sch_service);
CloseServiceHandle(sch_manager);
return status;
}
/** Stop service */
-static apt_bool_t uni_service_stop()
+static apt_bool_t uni_service_stop(const char *name)
{
apt_bool_t status = TRUE;
SERVICE_STATUS ss_status;
SC_HANDLE sch_service;
SC_HANDLE sch_manager = OpenSCManager(0,0,SC_MANAGER_ALL_ACCESS);
+ if (!name) name = WIN_SERVICE_NAME;
if(!sch_manager) {
- printf("Failed to Open SCManager %d\n", GetLastError());
+ winerror("Failed to Open SCManager");
return FALSE;
}
- sch_service = OpenService(sch_manager,WIN_SERVICE_NAME,SERVICE_STOP);
+ sch_service = OpenService(sch_manager,name,SERVICE_STOP);
if(!sch_service) {
- printf("Failed to Open Service %d\n", GetLastError());
+ winerror("Failed to Open Service");
CloseServiceHandle(sch_manager);
return FALSE;
}
if(!ControlService(sch_service,SERVICE_CONTROL_STOP,&ss_status)) {
- printf("Failed to Stop Service %d\n", GetLastError());
+ winerror("Failed to Stop Service");
status = FALSE;
- }
+ } else
+ printf("UniMRCP service %s stopped\n", name);
CloseServiceHandle(sch_service);
CloseServiceHandle(sch_manager);
static void usage()
{
+ static apt_bool_t written = FALSE;
+ if (written) return;
printf(
"\n"
"Usage:\n"
"\n"
" -t [--stop] : Stop the Windows service.\n"
"\n"
+ " -n [--name] svcname : Service name (default: unimrcp)\n"
+ "\n"
+ " -a [--autostart] : Start service after boot-up\n"
+ "\n"
+ " -f [--fail-restart] n : If crashed, restart after n secs\n"
+ "\n"
+ " -l [--log-prio] priority: Set the log priority.\n"
+ " (0-emergency, ..., 7-debug)\n"
+ " -p [--disp-name] title : Set service display name\n"
+ " (default: [svcname] UniMRCP Server)\n"
+ " -c [--description] desc : Set service description\n"
+ " (default: Launches UniMRCP Server)\n"
" -h [--help] : Show the help.\n"
"\n");
+ written = TRUE;
}
int main(int argc, const char * const *argv)
apr_pool_t *pool;
apr_status_t rv;
apr_getopt_t *opt;
+ apt_bool_t ret = TRUE;
+ uni_service_register_e reg = USR_NONE;
+ uni_service_control_e control = USC_NONE;
+ const char *root_dir = "..";
+ const char *name = NULL;
+ apt_bool_t autostart = FALSE;
+ unsigned long recover = 0;
+ int log_priority = -1;
+ const char *disp_name = NULL;
+ const char *description = NULL;
static const apr_getopt_option_t opt_option[] = {
/* long-option, short-option, has-arg flag, description */
- { "register", 'r', TRUE, "register service" }, /* -r or --register arg */
- { "unregister", 'u', FALSE, "unregister service" },/* -u or --unregister */
- { "start", 's', FALSE, "start service" }, /* -s or --start */
- { "stop", 't', FALSE, "stop service" }, /* -t or --stop */
- { "help", 'h', FALSE, "show help" }, /* -h or --help */
- { NULL, 0, 0, NULL }, /* end */
+ { "register", 'r', TRUE, "register service" }, /* -r or --register arg */
+ { "unregister", 'u', FALSE, "unregister service" }, /* -u or --unregister */
+ { "start", 's', FALSE, "start service" }, /* -s or --start */
+ { "stop", 't', FALSE, "stop service" }, /* -t or --stop */
+ { "name", 'n', TRUE, "service name" }, /* -n or --name arg */
+ { "autostart", 'a', FALSE, "start automatically" },/* -a or --autostart */
+ { "fail-restart",'f', TRUE, "restart if fails" }, /* -f or --fail-restart arg */
+ { "log-prio", 'l', TRUE, "log priority" }, /* -l arg or --log-prio arg */
+ { "disp-name", 'p', TRUE, "display name" }, /* -p arg or --disp-name arg */
+ { "description", 'c', TRUE, "description" }, /* -c arg or --description arg */
+ { "help", 'h', FALSE, "show help" }, /* -h or --help */
+ { NULL, 0, 0, NULL }, /* end */
};
/* APR global initialization */
if(apr_initialize() != APR_SUCCESS) {
apr_terminate();
- return 0;
+ return 1;
}
/* create APR pool */
pool = apt_pool_create();
if(!pool) {
apr_terminate();
- return 0;
+ return 1;
}
rv = apr_getopt_init(&opt, pool , argc, argv);
while((rv = apr_getopt_long(opt, opt_option, &optch, &optarg)) == APR_SUCCESS) {
switch(optch) {
case 'r':
- uni_service_register(optarg,pool);
+ if ((reg == USR_NONE) || (reg == USR_REGISTER)) {
+ reg = USR_REGISTER;
+ root_dir = optarg;
+ } else {
+ puts("Incosistent arguments");
+ ret = FALSE;
+ }
break;
case 'u':
- uni_service_unregister();
+ if ((reg == USR_NONE) || (reg == USR_UNREGISTER))
+ reg = USR_UNREGISTER;
+ else {
+ puts("Incosistent arguments");
+ ret = FALSE;
+ }
break;
case 's':
- uni_service_start();
+ if ((control == USC_NONE) || (control == USC_START))
+ control = USC_START;
+ else {
+ puts("Incosistent arguments");
+ ret = FALSE;
+ }
break;
case 't':
- uni_service_stop();
+ if ((control == USC_NONE) || (control == USC_STOP))
+ control = USC_STOP;
+ else {
+ puts("Incosistent arguments");
+ ret = FALSE;
+ }
+ break;
+ case 'n':
+ name = optarg;
+ break;
+ case 'a':
+ autostart = TRUE;
+ break;
+ case 'f':
+ if (sscanf(optarg, "%lu", &recover) != 1) {
+ puts("Invalid value for param --fail-restart");
+ ret = FALSE;
+ }
+ break;
+ case 'l':
+ if ((sscanf(optarg, "%d", &log_priority) != 1) ||
+ (log_priority < 0) || (log_priority > 7))
+ {
+ puts("Invalid value for param --log-prio");
+ ret = FALSE;
+ }
+ break;
+ case 'p':
+ disp_name = optarg;
+ break;
+ case 'c':
+ description = optarg;
break;
case 'h':
usage();
break;
}
+ if (!ret) break;
}
- if(rv != APR_EOF) {
+ if (ret &&
+ (((reg == USR_REGISTER) && (control == USC_STOP)) ||
+ ((reg == USR_UNREGISTER) && (control == USC_START)))) {
+ ret = FALSE;
+ puts("Inconsistent arguments");
+ }
+ if((rv != APR_EOF) || !ret || (!reg && !control)) {
+ ret = FALSE;
usage();
}
}
+ while (ret) { /* No problem so far */
+ if (reg == USR_REGISTER)
+ ret = uni_service_register(root_dir, pool, name, autostart, recover, log_priority, disp_name, description);
+ if (!ret) break;
+
+ if (control == USC_START)
+ ret = uni_service_start(name);
+ if (!ret) break;
+
+ if (control == USC_STOP)
+ ret = uni_service_stop(name);
+ /* Do not break here, stop failure should not matter before unregistration */
+
+ if (reg == USR_UNREGISTER)
+ ret = uni_service_unregister(name);
+ break;
+ }
+
/* destroy APR pool */
apr_pool_destroy(pool);
/* APR global termination */
apr_terminate();
- return 0;
+ return ret ? 0 : 1;
}
+++ /dev/null
-<?xml version="1.0" encoding="windows-1251"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="unimrcpservice"\r
- ProjectGUID="{4714EF49-BFD5-4B22-95F7-95A07F1EAC25}"\r
- RootNamespace="unimrcpservice"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- ConfigurationType="1"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="libaprutil-1.lib libapr-1.lib"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- AdditionalManifestFiles="unimrcpservice.exe.manifest"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="1"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="libaprutil-1.lib libapr-1.lib"\r
- LinkTimeCodeGeneration="1"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- AdditionalManifestFiles="unimrcpservice.exe.manifest"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- <File\r
- RelativePath=".\unimrcp_service.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
--- /dev/null
+#include "uni_version.h"
+
+1 VERSIONINFO
+ FILEVERSION UNI_VERSION_STRING_CSV,0
+ PRODUCTVERSION UNI_VERSION_STRING_CSV,0
+ FILEFLAGSMASK 0x3fL
+#if defined(_DEBUG)
+ FILEFLAGS 0x01L
+#else
+ FILEFLAGS 0x00L
+#endif
+#if defined(WINNT) || defined(WIN64)
+ FILEOS 0x40004L
+#else
+ FILEOS 0x4L
+#endif
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "Comments", UNI_LICENSE "\0"
+ VALUE "CompanyName", "UniMRCP\0"
+ VALUE "FileDescription", "UniMRCP Service Manager\0"
+ VALUE "FileVersion", UNI_VERSION_STRING "\0"
+ VALUE "InternalName", "unimrcpservice" "\0"
+ VALUE "LegalCopyright", UNI_COPYRIGHT "\0"
+ VALUE "OriginalFilename", "unimrcpservice.exe" "\0"
+ VALUE "ProductName", "UniMRCP Project\0"
+ VALUE "ProductVersion", UNI_VERSION_STRING "\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
>
</File>
</Filter>
+ <File
+ RelativePath=".\unimrcpservice.rc"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="..\..\build"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="..\..\build"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="..\..\build"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ AdditionalIncludeDirectories="..\..\build"
+ />
+ </FileConfiguration>
+ </File>
</Files>
<Globals>
</Globals>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{4714EF49-BFD5-4B22-95F7-95A07F1EAC25}</ProjectGuid>
+ <RootNamespace>unimrcpservice</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\apt.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\apt.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\apt.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\apt.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Link>
+ <AdditionalDependencies>aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Link>
+ <AdditionalDependencies>aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <Link>
+ <AdditionalDependencies>aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="unimrcp_service.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\libs\apr-toolkit\aprtoolkit.vcxproj">
+ <Project>{13deeca0-bdd4-4744-a1a2-8eb0a44df3d2}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="unimrcpservice.rc">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="src">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="unimrcp_service.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="unimrcpservice.rc" />
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright 2008-2014 Arsen Chaloyan
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef UNI_REVISION_H
+#define UNI_REVISION_H
+
+/**
+ * @file uni_revision.h
+ * @brief UniMRCP Revision
+ *
+ * This file contains the revision base number and other relevant information.
+ */
+
+/** Revision base number. */
+#define UNI_REVISION 2208
+
+/** Revision base string. */
+#define UNI_REVISION_STRING "2208"
+
+/** Revision base date. */
+#define UNI_REVISION_DATE "2014-10-31"
+
+/** Revision base stamp. */
+#define UNI_REVISION_STAMP 20141031L
+
+
+/** Check at compile time if the revision base number is at least a certain level. */
+#define UNI_REVISION_AT_LEAST(rev) ((rev) < UNI_REVISION)
+
+#endif /* UNI_REVISION_H */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: uni_version.h 1724 2010-06-02 18:42:20Z achaloyan $
+ * $Id: uni_version.h 2139 2014-07-07 05:06:19Z achaloyan@gmail.com $
*/
#ifndef UNI_VERSION_H
/**
* @file uni_version.h
- * @brief UniMRCP Version Numbering
+ * @brief UniMRCP Version
*
- * UniMRCP version numbering is derived from APR project specified in:
+ * UniMRCP uses a version numbering scheme derived from the APR project.
*
- * http://apr.apache.org/versioning.html
+ * <a href="http://apr.apache.org/versioning.html"> APR's Version Numbering </a>
*/
/** major version
/** minor version
* Minor API changes that do not cause binary compatibility problems.
- * Reset to 0 when upgrading UNI_MAJOR_VERSION
+ * Reset to 0 when upgrading UNI_MAJOR_VERSION.
*/
-#define UNI_MINOR_VERSION 0
+#define UNI_MINOR_VERSION 2
/** patch level
* The Patch Level never includes API changes, simply bug fixes.
- * Reset to 0 when upgrading UNI_MINOR_VERSION
+ * Reset to 0 when upgrading UNI_MINOR_VERSION.
*/
#define UNI_PATCH_VERSION 0
-/**
- * Check at compile time if the UNI version is at least a certain
- * level.
- */
+/** Check at compile time if the version of UniMRCP is at least a certain level. */
#define UNI_VERSION_AT_LEAST(major,minor,patch) \
(((major) < UNI_MAJOR_VERSION) \
|| ((major) == UNI_MAJOR_VERSION && (minor) < UNI_MINOR_VERSION) \
|| ((major) == UNI_MAJOR_VERSION && (minor) == UNI_MINOR_VERSION && (patch) <= UNI_PATCH_VERSION))
-
-/** Properly quote a value as a string in the C preprocessor */
+/** Properly quote a value as a string in the C preprocessor. */
#define UNI_STRINGIFY(n) UNI_STRINGIFY_HELPER(n)
-/** Helper macro for UNI_STRINGIFY */
+/** Helper macro for UNI_STRINGIFY. */
#define UNI_STRINGIFY_HELPER(n) #n
-/** The formatted string of UniMRCP's version */
+/** The formatted string of UniMRCP's version. */
#define UNI_VERSION_STRING \
UNI_STRINGIFY(UNI_MAJOR_VERSION) "." \
UNI_STRINGIFY(UNI_MINOR_VERSION) "." \
UNI_STRINGIFY(UNI_PATCH_VERSION)
/** An alternative formatted string of UniMRCP's version
- macro for Win32 .rc files using numeric csv representation */
+ macro for Win32 .rc files using numeric CSV representation. */
#define UNI_VERSION_STRING_CSV UNI_MAJOR_VERSION ##, \
##UNI_MINOR_VERSION ##, \
##UNI_PATCH_VERSION
-/** The Copyright */
-#define UNI_COPYRIGHT "Copyright 2008-2010 Arsen Chaloyan"
+/** The Copyright. */
+#define UNI_COPYRIGHT "Copyright 2008-2014 Arsen Chaloyan"
-/** The License */
+/*
+ * Use the brief description of the license for Win32 .rc files;
+ * otherwise, use the full description.
+ */
+#if defined(APSTUDIO_INVOKED) || defined(RC_INVOKED)
+/** The License (brief description). */
+#define UNI_LICENSE "The Apache License, Version 2.0"
+#else
+/** The License (full description). */
#define UNI_LICENSE \
- "Licensed under the Apache License, Version 2.0 (the ""License"");" \
- "you may not use this file except in compliance with the License." \
- "You may obtain a copy of the License at" \
- "" \
- " http://www.apache.org/licenses/LICENSE-2.0" \
- "" \
- "Unless required by applicable law or agreed to in writing, software" \
- "distributed under the License is distributed on an ""AS IS"" BASIS," \
- "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied." \
- "See the License for the specific language governing permissions and" \
- "limitations under the License."
-
+ " * Licensed under the Apache License, Version 2.0 (the ""License"");\n" \
+ " * you may not use this file except in compliance with the License.\n" \
+ " * You may obtain a copy of the License at\n" \
+ " * \n" \
+ " * http://www.apache.org/licenses/LICENSE-2.0 \n" \
+ " * \n" \
+ " * Unless required by applicable law or agreed to in writing, software\n" \
+ " * distributed under the License is distributed on an ""AS IS"" BASIS,\n" \
+ " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" \
+ " * See the License for the specific language governing permissions and\n" \
+ " * limitations under the License.\n"
+#endif /* APSTUDIO_INVOKED || RC_INVOKED */
#endif /* UNI_VERSION_H */
+++ /dev/null
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="flite"
- InheritedPropertySheets=".\unibase.vsprops"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(FliteDir)\include""
- PreprocessorDefinitions="APT_LIB_EXPORT"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="flite.lib"
- AdditionalLibraryDirectories=""$(FliteDir)\$(ConfigurationName)""
- />
- <UserMacro
- Name="FliteDir"
- Value="$(LibRootDir)libs\flite"
- />
-</VisualStudioPropertySheet>
+++ /dev/null
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="pocketsphinx"
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unibase.vsprops"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(PocketSphinxDir)\include";"$(SphinxBaseDir)\include""
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="sphinxbase.lib pocketsphinx.lib"
- AdditionalLibraryDirectories=""$(PocketSphinxDir)\bin\$(ConfigurationName)";"$(SphinxBaseDir)\lib\$(ConfigurationName)""
- />
- <UserMacro
- Name="PocketSphinxDir"
- Value="$(LibRootDir)libs\pocketsphinx"
- />
- <UserMacro
- Name="SphinxBaseDir"
- Value="$(LibRootDir)libs\sphinxbase"
- />
-</VisualStudioPropertySheet>
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(SofiaDir)\win32";"$(SofiaDir)\libsofia-sip-ua\su";"$(SofiaDir)\libsofia-sip-ua\nua";"$(SofiaDir)\libsofia-sip-ua\url";"$(SofiaDir)\libsofia-sip-ua\sip";"$(SofiaDir)\libsofia-sip-ua\msg";"$(SofiaDir)\libsofia-sip-ua\sdp";"$(SofiaDir)\libsofia-sip-ua\nta";"$(SofiaDir)\libsofia-sip-ua\nea";"$(SofiaDir)\libsofia-sip-ua\soa";"$(SofiaDir)\libsofia-sip-ua\iptsec";"$(SofiaDir)\libsofia-sip-ua\bnf";"$(SofiaDir)\libsofia-sip-ua\features""
+ AdditionalIncludeDirectories=""$(SofiaDir)\win32";"$(SofiaDir)\libsofia-sip-ua\su";"$(SofiaDir)\libsofia-sip-ua\nua";"$(SofiaDir)\libsofia-sip-ua\url";"$(SofiaDir)\libsofia-sip-ua\sip";"$(SofiaDir)\libsofia-sip-ua\msg";"$(SofiaDir)\libsofia-sip-ua\sdp";"$(SofiaDir)\libsofia-sip-ua\nta";"$(SofiaDir)\libsofia-sip-ua\nea";"$(SofiaDir)\libsofia-sip-ua\soa";"$(SofiaDir)\libsofia-sip-ua\iptsec";"$(SofiaDir)\libsofia-sip-ua\bnf";"$(SofiaDir)\libsofia-sip-ua\features";"$(SofiaDir)\libsofia-sip-ua\tport""
/>
<UserMacro
Name="SofiaDir"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
InheritedPropertySheets="apr.vsprops;sofiasip.vsprops"
>
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="_WIN64"
+ />
<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"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
>
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="_WIN64"
+ />
<Tool
Name="VCLinkerTool"
TargetMachine="17"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
InheritedPropertySheets="apr.vsprops;mrcpengine.vsprops"
>
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="_WIN64"
+ />
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="$(AprDir)\$(PlatformName)\$(ConfigurationName);$(AprUtilDir)\$(PlatformName)\$(ConfigurationName);$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib"
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
+
+CONFFILES = logger.xml dirlayout.xml
+
+if UNIMRCP_CLIENT_LIB
+CONFFILES += unimrcpclient.xml unimrcpclient.xsd
+endif
+
+if UNIMRCP_SERVER_LIB
+CONFFILES += unimrcpserver.xml unimrcpserver.xsd
+endif
+
+if UMC
+CONFFILES += umcscenarios.xml
+endif
def-conf:
- test -d $(confdir) || $(mkinstalldirs) $(confdir)
- for conffile in `find ./ -maxdepth 1 -name \*.xml -o -name \*.xsd` ; do \
- filename=`echo $$conffile | sed -e 's|^.*/||'`; \
- $(INSTALL) -m 644 $$filename $(confdir); \
+ test -d $(DESTDIR)$(sysconfdir) || $(mkinstalldirs) $(DESTDIR)$(sysconfdir)
+ for conffile in $(CONFFILES) ; do \
+ $(INSTALL) -m 644 $(top_srcdir)/conf/$$conffile $(DESTDIR)$(sysconfdir); \
done
-
- test -d $(confdir)/client-profiles || $(mkinstalldirs) $(confdir)/client-profiles
- for conffile in `find ./client-profiles/ -maxdepth 1 -name \*.xml -o -name \*.xsd` ; do \
- filename=`echo $$conffile | sed -e 's|^.*/||'`; \
- $(INSTALL) -m 644 client-profiles/$$filename $(confdir)/client-profiles; \
+if UNIMRCP_CLIENT_LIB
+ test -d $(DESTDIR)$(sysconfdir)/client-profiles || $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/client-profiles
+ for conffile in `find $(top_srcdir)/conf/client-profiles/ -maxdepth 1 -name \*.xml -o -name \*.xsd` ; do \
+ filename=`echo $$conffile | sed -e 's|^.*/||'`; \
+ $(INSTALL) -m 644 $(top_srcdir)/conf/client-profiles/$$filename $(DESTDIR)$(sysconfdir)/client-profiles; \
done
-
+endif
install-data-local:
- test -d $(confdir) || $(MAKE) def-conf
+ test -d $(DESTDIR)$(sysconfdir) || $(MAKE) def-conf
<!-- RTP/RTCP settings -->
<rtp-settings id="Nuance-RTP-Settings">
<jitter-buffer>
+ <adaptive>1</adaptive>
<playout-delay>50</playout-delay>
- <max-playout-delay>200</max-playout-delay>
+ <max-playout-delay>600</max-playout-delay>
+ <time-skew-detection>1</time-skew-detection>
</jitter-buffer>
<ptime>20</ptime>
<codecs>PCMU PCMA L16/96/8000 telephone-event/101/8000</codecs>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Directories Layout
+
+The root element of the document is <dirlayout>, which accepts an optional
+attribute rootdir. The rootdir attribute defaults to "../" and can be specified
+as an absolute or relative path. For instance,
+
+ <dirlayout rootdir="../">
+ <dirlayout rootdir="C:\unimrcp">
+ <dirlayout rootdir="/usr/local/unimrcp">
+
+Each subdirectory can be specified as an absolute path or a name relative to
+the rootdir path. For instance,
+
+ <confdir>conf</confdir>
+ <confdir>C:\unimrcp\conf</confdir>
+ <confdir>/etc/conf</confdir>
+-->
+
+<dirlayout>
+ <confdir>conf</confdir>
+ <plugindir>plugin</plugindir>
+ <logdir>log</logdir>
+ <datadir>data</datadir>
+ <vardir>var</vardir>
+</dirlayout>
version="1.0"
subfolder="client-profiles">
<properties>
- <!-- By default, network interface (IP address) to bind to will be implicitly identified.
- Alternatively, it can be explicitly set.
- -->
+ <!-- If the attribute "type" is set to "auto", IP address is
+ determined implicitly by the hostname. This is the default setting. -->
<ip type="auto"/>
+
+ <!-- If the attribute "type" is set to "iface", IP address is
+ determined by the specified name of network interface/adapter. -->
+ <!-- <ip type="iface">eth0</ip>-->
+
+ <!-- IP address can also be specified explicitly. -->
<!-- <ip>10.10.0.1</ip> -->
+
<!-- <ext-ip>a.b.c.d</ext-ip> -->
<!-- <server-ip>a.b.c.d</server-ip> -->
</properties>
<!-- <sip-t2>4000</sip-t2> -->
<!-- <sip-t4>4000</sip-t4> -->
<!-- <sip-t1x64>32000</sip-t1x64> -->
+ <!-- <sip-message-output>true</sip-message-output> -->
+ <!-- <sip-message-dump>sofia-sip-uac.log</sip-message-dump> -->
</sip-uac>
<!-- UniRTSP MRCPv1 signaling agent -->
<!-- common (default) RTP/RTCP settings -->
<rtp-settings id="RTP-Settings-1">
<jitter-buffer>
+ <adaptive>1</adaptive>
<playout-delay>50</playout-delay>
- <max-playout-delay>200</max-playout-delay>
+ <max-playout-delay>600</max-playout-delay>
+ <time-skew-detection>1</time-skew-detection>
</jitter-buffer>
<ptime>20</ptime>
<codecs>PCMU PCMA L16/96/8000 telephone-event/101/8000</codecs>
<xsd:element name="sip-t2" type="xsd:long" minOccurs="0" />
<xsd:element name="sip-t4" type="xsd:long" minOccurs="0" />
<xsd:element name="sip-t1x64" type="xsd:long" minOccurs="0" />
+ <xsd:element name="sip-message-output" type="xsd:boolean" />
+ <xsd:element name="sip-message-dump" type="xsd:string" />
</xsd:sequence>
<xsd:attribute name="id" type="xsd:string" use="required" />
<xsd:attribute name="type" type="xsd:string" use="required" />
<xsd:element name="jitter-buffer" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
+ <xsd:element name="adaptive" type="xsd:byte" />
<xsd:element name="playout-delay" type="xsd:long" />
<xsd:element name="max-playout-delay" type="xsd:long" />
+ <xsd:element name="time-skew-detection" type="xsd:byte" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
+ <xsd:element name="misc" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="sofiasip-logger" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
</xsd:sequence>
<xsd:attribute name="version" type="xsd:string" use="required" />
<xsd:attribute name="subfolder" type="xsd:string" use="optional" />
<!-- UniMRCP server document -->
<unimrcpserver xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="unimrcpserver.xsd" version="1.0">
<properties>
- <!-- By default, network interface (IP address) to bind to will be implicitly identified.
- Alternatively, it can be explicitly set.
- -->
+ <!-- If the attribute "type" is set to "auto", IP address is
+ determined implicitly by the hostname. This is the default setting. -->
<ip type="auto"/>
+
+ <!-- If the attribute "type" is set to "iface", IP address is
+ determined by the specified name of network interface/adapter. -->
+ <!-- <ip type="iface">eth0</ip>-->
+
+ <!-- IP address can also be specified explicitly. -->
<!-- <ip>10.10.0.1</ip> -->
+
<!-- <ext-ip>a.b.c.d</ext-ip> -->
</properties>
<!-- <sip-t2>4000</sip-t2> -->
<!-- <sip-t4>4000</sip-t4> -->
<!-- <sip-t1x64>32000</sip-t1x64> -->
+ <!-- <sip-message-output>true</sip-message-output> -->
+ <!-- <sip-message-dump>sofia-sip-uas.log</sip-message-dump> -->
</sip-uas>
<!-- UniRTSP MRCPv1 signaling agent -->
<!-- Factory of plugins (MRCP engines) -->
<plugin-factory>
- <engine id="PocketSphinx-1" name="mrcppocketsphinx" enable="false"/>
- <engine id="Flite-1" name="mrcpflite" enable="false"/>
<engine id="Demo-Synth-1" name="demosynth" enable="true"/>
<engine id="Demo-Recog-1" name="demorecog" enable="true"/>
<engine id="Demo-Verifier-1" name="demoverifier" enable="true"/>
<!-- RTP/RTCP settings -->
<rtp-settings id="RTP-Settings-1">
<jitter-buffer>
+ <adaptive>1</adaptive>
<playout-delay>50</playout-delay>
- <max-playout-delay>200</max-playout-delay>
+ <max-playout-delay>600</max-playout-delay>
+ <time-skew-detection>1</time-skew-detection>
</jitter-buffer>
<ptime>20</ptime>
<codecs own-preference="false">PCMU PCMA L16/96/8000 telephone-event/101/8000</codecs>
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
- <xsd:element name="unimrcpserver">
- <xsd:annotation>
- <xsd:documentation>UniMRCP server document</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="properties" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>Generic properties</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="ip" minOccurs="0">
- <xsd:complexType>
- <xsd:attribute name="type" type="xsd:string"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="ext-ip" minOccurs="0">
- <xsd:complexType>
- <xsd:attribute name="type" type="xsd:string"/>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="components" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>Common components</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="resource-factory" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>Factory of MRCP resources</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence maxOccurs="unbounded">
- <xsd:element name="resource">
- <xsd:complexType>
- <xsd:attribute name="id" type="xsd:string" use="required"/>
- <xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="sip-uas" minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>SIP signaling agent</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="sip-ip" type="xsd:string" minOccurs="0"/>
- <xsd:element name="sip-ext-ip" type="xsd:string" minOccurs="0"/>
- <xsd:element name="sip-port" type="xsd:short"/>
- <xsd:element name="sip-transport" type="xsd:string"/>
- <xsd:element name="force-destination" type="xsd:boolean" default="false" minOccurs="0"/>
- <xsd:element name="ua-name" type="xsd:string" minOccurs="0"/>
- <xsd:element name="sdp-origin" type="xsd:string" minOccurs="0"/>
- <xsd:element name="sip-t1" type="xsd:long" minOccurs="0" />
- <xsd:element name="sip-t2" type="xsd:long" minOccurs="0" />
- <xsd:element name="sip-t4" type="xsd:long" minOccurs="0" />
- <xsd:element name="sip-t1x64" type="xsd:long" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:string" use="required"/>
- <xsd:attribute name="type" type="xsd:string" use="required"/>
- <xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="rtsp-uas" minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>RTSP signaling agent</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="rtsp-ip" type="xsd:string" minOccurs="0"/>
- <xsd:element name="rtsp-ext-ip" type="xsd:string" minOccurs="0"/>
- <xsd:element name="rtsp-port" type="xsd:string"/>
- <xsd:element name="resource-map">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="param" maxOccurs="unbounded">
- <xsd:complexType>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- <xsd:attribute name="value" type="xsd:string" use="required"/>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="max-connection-count" type="xsd:short" minOccurs="0"/>
- <xsd:element name="sdp-origin" type="xsd:string" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:string" use="required"/>
- <xsd:attribute name="type" type="xsd:string" use="required"/>
- <xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="mrcpv2-uas" minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>MRCPv2 connection agent</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="mrcp-ip" type="xsd:string" minOccurs="0"/>
- <xsd:element name="mrcp-port" type="xsd:string"/>
- <xsd:element name="max-connection-count" type="xsd:short" minOccurs="0"/>
- <xsd:element name="force-new-connection" type="xsd:boolean" minOccurs="0"/>
- <xsd:element name="rx-buffer-size" type="xsd:long" minOccurs="0"/>
- <xsd:element name="tx-buffer-size" type="xsd:long" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:string" use="required"/>
- <xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="media-engine" minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>Media processing engine</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="realtime-rate" type="xsd:short" minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:string" use="required"/>
- <xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="rtp-factory" minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>Factory of RTP terminations</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="rtp-ip" type="xsd:string" minOccurs="0"/>
- <xsd:element name="rtp-ext-ip" type="xsd:string" minOccurs="0"/>
- <xsd:element name="rtp-port-min" type="xsd:short"/>
- <xsd:element name="rtp-port-max" type="xsd:short"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:string" use="required"/>
- <xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="plugin-factory" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>Factory of plugins (MRCP engines)</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence maxOccurs="unbounded">
- <xsd:element name="engine">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="max-channel-count" minOccurs="0"/>
- <xsd:element name="param" minOccurs="0" maxOccurs="unbounded">
- <xsd:complexType>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- <xsd:attribute name="value" type="xsd:string" use="required"/>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:string" use="required"/>
- <xsd:attribute name="name" type="xsd:string" use="required"/>
- <xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="settings" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>Settings</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="rtp-settings" minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>RTP settings</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="jitter-buffer" minOccurs="0">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="playout-delay" type="xsd:long"/>
- <xsd:element name="max-playout-delay" type="xsd:long"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="ptime" type="xsd:long" minOccurs="0"/>
- <xsd:element name="codecs">
- <xsd:complexType>
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="own-preference" type="xsd:boolean" use="optional"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="rtcp" minOccurs="0">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="rtcp-bye" type="xsd:int"/>
- <xsd:element name="tx-interval" type="xsd:long"/>
- <xsd:element name="rx-resolution" type="xsd:long"/>
- </xsd:sequence>
- <xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:string" use="required"/>
- <xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="profiles" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>Profiles</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="mrcpv2-profile" minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>MRCPv2 profile</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="sip-uas" type="xsd:string"/>
- <xsd:element name="mrcpv2-uas" type="xsd:string"/>
- <xsd:element name="media-engine" type="xsd:string"/>
- <xsd:element name="rtp-factory" type="xsd:string"/>
- <xsd:element name="rtp-settings" type="xsd:string"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:string" use="required"/>
- <xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="mrcpv1-profile" minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>MRCPv1 profile</xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="rtsp-uas" type="xsd:string"/>
- <xsd:element name="media-engine" type="xsd:string"/>
- <xsd:element name="rtp-factory" type="xsd:string"/>
- <xsd:element name="rtp-settings" type="xsd:string"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:string" use="required"/>
- <xsd:attribute name="enable" type="xsd:boolean" use="optional"/>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="version" type="xsd:string" use="required"/>
- <xsd:attribute name="subfolder" type="xsd:string" use="optional"/>
- </xsd:complexType>
- </xsd:element>
-</xsd:schema>
+ <xsd:element name="unimrcpserver">
+ <xsd:annotation>
+ <xsd:documentation>UniMRCP server document</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="properties" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Generic properties</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ip" minOccurs="0">
+ <xsd:complexType>
+ <xsd:attribute name="type" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ext-ip" minOccurs="0">
+ <xsd:complexType>
+ <xsd:attribute name="type" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="components" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Common components</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="resource-factory" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Factory of MRCP resources</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence maxOccurs="unbounded">
+ <xsd:element name="resource">
+ <xsd:complexType>
+ <xsd:attribute name="id" type="xsd:string" use="required" />
+ <xsd:attribute name="enable" type="xsd:boolean" use="optional" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="sip-uas" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>SIP signaling agent</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="sip-ip" type="xsd:string" minOccurs="0" />
+ <xsd:element name="sip-ext-ip" type="xsd:string" minOccurs="0" />
+ <xsd:element name="sip-port" type="xsd:short" />
+ <xsd:element name="sip-transport" type="xsd:string" />
+ <xsd:element name="force-destination" type="xsd:boolean" default="false" minOccurs="0" />
+ <xsd:element name="ua-name" type="xsd:string" minOccurs="0" />
+ <xsd:element name="sdp-origin" type="xsd:string" minOccurs="0" />
+ <xsd:element name="sip-t1" type="xsd:long" minOccurs="0" />
+ <xsd:element name="sip-t2" type="xsd:long" minOccurs="0" />
+ <xsd:element name="sip-t4" type="xsd:long" minOccurs="0" />
+ <xsd:element name="sip-t1x64" type="xsd:long" minOccurs="0" />
+ <xsd:element name="sip-message-output" type="xsd:boolean" />
+ <xsd:element name="sip-message-dump" type="xsd:string" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:string" use="required" />
+ <xsd:attribute name="type" type="xsd:string" use="required" />
+ <xsd:attribute name="enable" type="xsd:boolean" use="optional" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="rtsp-uas" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>RTSP signaling agent</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="rtsp-ip" type="xsd:string" minOccurs="0" />
+ <xsd:element name="rtsp-ext-ip" type="xsd:string" minOccurs="0" />
+ <xsd:element name="rtsp-port" type="xsd:string" />
+ <xsd:element name="resource-map">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="param" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ <xsd:attribute name="value" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="max-connection-count" type="xsd:short" minOccurs="0" />
+ <xsd:element name="sdp-origin" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:string" use="required" />
+ <xsd:attribute name="type" type="xsd:string" use="required" />
+ <xsd:attribute name="enable" type="xsd:boolean" use="optional" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="mrcpv2-uas" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>MRCPv2 connection agent</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="mrcp-ip" type="xsd:string" minOccurs="0" />
+ <xsd:element name="mrcp-port" type="xsd:string" />
+ <xsd:element name="max-connection-count" type="xsd:short" minOccurs="0" />
+ <xsd:element name="force-new-connection" type="xsd:boolean" minOccurs="0" />
+ <xsd:element name="rx-buffer-size" type="xsd:long" minOccurs="0" />
+ <xsd:element name="tx-buffer-size" type="xsd:long" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:string" use="required" />
+ <xsd:attribute name="enable" type="xsd:boolean" use="optional" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="media-engine" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Media processing engine</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="realtime-rate" type="xsd:short" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:string" use="required" />
+ <xsd:attribute name="enable" type="xsd:boolean" use="optional" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="rtp-factory" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Factory of RTP terminations</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="rtp-ip" type="xsd:string" minOccurs="0" />
+ <xsd:element name="rtp-ext-ip" type="xsd:string" minOccurs="0" />
+ <xsd:element name="rtp-port-min" type="xsd:short" />
+ <xsd:element name="rtp-port-max" type="xsd:short" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:string" use="required" />
+ <xsd:attribute name="enable" type="xsd:boolean" use="optional" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="plugin-factory" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Factory of plugins (MRCP engines)</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence maxOccurs="unbounded">
+ <xsd:element name="engine">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="max-channel-count" minOccurs="0" />
+ <xsd:element name="param" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ <xsd:attribute name="value" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:string" use="required" />
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ <xsd:attribute name="enable" type="xsd:boolean" use="optional" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="settings" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Settings</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="rtp-settings" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>RTP settings</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="jitter-buffer" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="adaptive" type="xsd:byte" />
+ <xsd:element name="playout-delay" type="xsd:long" />
+ <xsd:element name="max-playout-delay" type="xsd:long" />
+ <xsd:element name="time-skew-detection" type="xsd:byte" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ptime" type="xsd:long" minOccurs="0" />
+ <xsd:element name="codecs">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="own-preference" type="xsd:boolean" use="optional" />
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="rtcp" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="rtcp-bye" type="xsd:int" />
+ <xsd:element name="tx-interval" type="xsd:long" />
+ <xsd:element name="rx-resolution" type="xsd:long" />
+ </xsd:sequence>
+ <xsd:attribute name="enable" type="xsd:boolean" use="optional" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:string" use="required" />
+ <xsd:attribute name="enable" type="xsd:boolean" use="optional" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="profiles" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Profiles</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="mrcpv2-profile" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>MRCPv2 profile</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="sip-uas" type="xsd:string" />
+ <xsd:element name="mrcpv2-uas" type="xsd:string" />
+ <xsd:element name="media-engine" type="xsd:string" />
+ <xsd:element name="rtp-factory" type="xsd:string" />
+ <xsd:element name="rtp-settings" type="xsd:string" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:string" use="required" />
+ <xsd:attribute name="enable" type="xsd:boolean" use="optional" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="mrcpv1-profile" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>MRCPv1 profile</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="rtsp-uas" type="xsd:string" />
+ <xsd:element name="media-engine" type="xsd:string" />
+ <xsd:element name="rtp-factory" type="xsd:string" />
+ <xsd:element name="rtp-settings" type="xsd:string" />
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:string" use="required" />
+ <xsd:attribute name="enable" type="xsd:boolean" use="optional" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="misc" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="sofiasip-logger" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="version" type="xsd:string" use="required" />
+ <xsd:attribute name="subfolder" type="xsd:string" use="optional" />
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema>
\ No newline at end of file
--- /dev/null
+##
+## config.layout -- Pre-defined Installation Path Layouts
+##
+## Hints:
+## - layouts can be loaded with configure's --enable-layout=ID option
+## - when no --enable-layout option is given, the default layout is `classic'
+
+# Classical UniMRCP path layout.
+<Layout classic>
+ prefix: /usr/local/unimrcp
+ exec_prefix: ${prefix}
+ bindir: ${exec_prefix}/bin
+ sbindir: ${exec_prefix}/bin
+ libdir: ${exec_prefix}/lib
+ libexecdir: ${exec_prefix}/modules
+ mandir: ${prefix}/man
+ sysconfdir: ${prefix}/conf
+ confdir: ${prefix}/conf
+ datadir: ${prefix}/data
+ plugindir: ${exec_prefix}/plugin
+ logdir: ${exec_prefix}/log
+ vardir: ${exec_prefix}/var
+ installbuilddir: ${exec_prefix}/build
+ includedir: ${prefix}/include
+ localstatedir: ${prefix}
+</Layout>
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
+dnl
+dnl Autoconf configuration file for UniMRCP.
+dnl
+dnl Use ./bootstrap to produce a configure script.
+dnl
-AC_PREREQ(2.57)
+AC_PREREQ(2.59)
-AC_INIT([unimrcp],[1.0.0])
+AC_INIT([unimrcp],[1.2.0])
AC_CONFIG_AUX_DIR([build])
AC_CONFIG_MACRO_DIR([build/acmacros])
+
+dnl Set ac_macro_dir variable manually for autoconf 2.61 and above.
+ac_macro_dir="build/acmacros"
+
+AC_SUBST(ac_aux_dir)
+AC_SUBST(ac_macro_dir)
+
+dnl Include m4 macros for libtool 2.
+sinclude(build/acmacros/libtool.m4)
+sinclude(build/acmacros/ltoptions.m4)
+sinclude(build/acmacros/ltsugar.m4)
+sinclude(build/acmacros/ltversion.m4)
+sinclude(build/acmacros/lt~obsolete.m4)
+
AC_PREFIX_DEFAULT(/usr/local/unimrcp)
-plugindir='${prefix}/plugin'
-confdir='${prefix}/conf'
-logdir='${prefix}/log'
-datadir='${prefix}/data'
+dnl Define the directory layout.
+APR_ENABLE_LAYOUT(classic, [plugindir logdir vardir])
+AC_SUBST(plugindir)
+AC_SUBST(logdir)
+AC_SUBST(vardir)
+
+dnl Reparse the configure arguments.
+APR_PARSE_ARGUMENTS
+
+dnl Generate ./config.nice to reuse ./configure command-line.
+APR_CONFIG_NICE(config.nice)
-AM_INIT_AUTOMAKE(foreign)
+AM_INIT_AUTOMAKE([no-define nostdinc foreign subdir-objects])
-# Set default language
+dnl Enable silent build rules available since automake 1.11.
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+dnl Set default language.
AC_LANG_C
AC_PROG_CC
AC_PROG_CXX
+AM_PROG_CC_C_O
AC_PROG_INSTALL
-# Skip detection of Fortran
+dnl Skip detection of Fortran.
m4_undefine([AC_PROG_F77])
m4_defun([AC_PROG_F77],[])
AC_PROG_LIBTOOL
-# Get version information
+dnl Do not use autoconf generated compiler DEFS.
+rm confdefs.h
+touch confdefs.h
+
+dnl Check for C compiler vendor.
+AX_COMPILER_VENDOR
+
+dnl Search for pkg-config.
+AC_PATH_PROG(PKG_CONFIG, pkg-config)
+
+dnl Get version information.
get_version="$srcdir/build/get-version.sh"
version_hdr="$srcdir/build/uni_version.h"
plugin_version_hdr="$srcdir/libs/mrcp-engine/include/mrcp_engine_plugin.h"
echo "UniMRCP Version: ${UNI_DOTTED_VERSION}"
-# Absolute source/build directory
-unimrcp_srcdir=`(cd $srcdir && pwd)`
-unimrcp_builddir=`pwd`
-AC_SUBST(unimrcp_srcdir)
-AC_SUBST(unimrcp_builddir)
-
-# Check APR
+dnl Check for the APR and APR-util libraries.
UNIMRCP_CHECK_APR
-UNIMRCP_CHECK_APU
-
-# Check SOFIA
+dnl Check for the Sofia-SIP library.
UNIMRCP_CHECK_SOFIA
+dnl Enable inter-library dependencies.
+AC_ARG_ENABLE(interlib-deps,
+ [AC_HELP_STRING([--disable-interlib-deps ],[disable inter-library dependencies (might break builds)])],
+ [enable_interlib_deps="$enableval"],
+ [enable_interlib_deps="yes"])
+
+AC_MSG_NOTICE([enable inter-library dependencies: $enable_interlib_deps])
+if test "${enable_interlib_deps}" == "yes"; then
+ link_all_deplibs=yes
+ link_all_deplibs_CXX=yes
+else
+ link_all_deplibs=no
+ link_all_deplibs_CXX=no
+fi
-
-AC_SUBST(ac_aux_dir)
-AC_SUBST(ac_macro_dir)
-AC_SUBST(plugindir)
-AC_SUBST(confdir)
-AC_SUBST(logdir)
-
-AC_DEFUN([AX_COMPILER_VENDOR],
-[
-AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
- [ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
- # note: don't check for gcc first since some other compilers define __GNUC__
- for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
- vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
-#if !($vencpp)
- thisisanerror;
-#endif
-])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
- done
- ])
-])
-
-AX_COMPILER_VENDOR
-
-#Enable maintainer mode
+dnl Enable maintainer mode.
AC_ARG_ENABLE(maintainer-mode,
[AC_HELP_STRING([--enable-maintainer-mode ],[turn on debugging and compile time warnings])],
[enable_maintainer_mode="$enableval"],
[enable_maintainer_mode="no"])
+AC_MSG_NOTICE([enable maintainer mode: $enable_maintainer_mode])
if test "${enable_maintainer_mode}" != "no"; then
- CFLAGS="$CFLAGS -g"
+ APR_ADDTO(CFLAGS,-g)
if test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
- CFLAGS="$CFLAGS -Wall -Werror"
+ APR_ADDTO(CFLAGS,-Wall -Werror)
fi
fi
-#Enable test suites
-AC_ARG_ENABLE(test-suites,
- [AC_HELP_STRING([--enable-test-suites ],[build test suites])],
- [enable_test_suites="$enableval"],
- [enable_test_suites="no"])
-
-AM_CONDITIONAL([TEST_SUITES],[test "${enable_test_suites}" != "no"])
+dnl UniMRCP client library.
+AC_ARG_ENABLE(client-lib,
+ [AC_HELP_STRING([--disable-client-lib ],[exclude unimrcpclient lib from build])],
+ [enable_client_lib="$enableval"],
+ [enable_client_lib="yes"])
+AM_CONDITIONAL([UNIMRCP_CLIENT_LIB],[test "${enable_client_lib}" = "yes"])
-### Plugins ###
+dnl Sample UniMRCP client application in C.
+AC_ARG_ENABLE(client-app,
+ [AC_HELP_STRING([--disable-client-app ],[exclude sample unimrcpclient app from build])],
+ [enable_client_app="$enableval"],
+ [enable_client_app="yes"])
-#Enable demo synthesizer plugin
-AC_ARG_ENABLE(demosynth-plugin,
- [AC_HELP_STRING([--disable-demosynth-plugin ],[exclude demo synthesizer plugin from build])],
- [enable_demosynth_plugin="$enableval"],
- [enable_demosynth_plugin="yes"])
+AM_CONDITIONAL([UNIMRCP_CLIENT_APP],[test "${enable_client_lib}" = "yes" && test "${enable_client_app}" = "yes"])
-AM_CONDITIONAL([DEMOSYNTH_PLUGIN],[test "${enable_demosynth_plugin}" = "yes"])
+dnl Sample UniMRCP client application in C++.
+AC_ARG_ENABLE(umc,
+ [AC_HELP_STRING([--disable-umc ],[exclude sample unimrcpclient C++ app from build])],
+ [enable_umc="$enableval"],
+ [enable_umc="yes"])
+AM_CONDITIONAL([UMC],[test "${enable_client_lib}" = "yes" && test "${enable_umc}" = "yes"])
-#Enable demo recognizer plugin
-AC_ARG_ENABLE(demorecog-plugin,
- [AC_HELP_STRING([--disable-demorecog-plugin ],[exclude demo recognizer plugin from build])],
- [enable_demorecog_plugin="$enableval"],
- [enable_demorecog_plugin="yes"])
+dnl Miscellaneous ASR client library and application.
+AC_ARG_ENABLE(asr-client,
+ [AC_HELP_STRING([--disable-asr-client ],[exclude misc ASR client lib and app from build])],
+ [enable_asr_client="$enableval"],
+ [enable_asr_client="yes"])
-AM_CONDITIONAL([DEMORECOG_PLUGIN],[test "${enable_demorecog_plugin}" = "yes"])
+AM_CONDITIONAL([ASR_CLIENT],[test "${enable_client_lib}" = "yes" && test "${enable_asr_client}" = "yes"])
+AM_CONDITIONAL([COMMON_CLIENT_DATA],[test "${enable_client_app}" = "yes" || test "${enable_umc}" = "yes" ||test "${enable_asr_client}" = "yes"])
-#Enable demo verifier plugin
-AC_ARG_ENABLE(demoverifier-plugin,
- [AC_HELP_STRING([--disable-demoverifier-plugin ],[exclude demo verifier plugin from build])],
- [enable_demoverifier_plugin="$enableval"],
- [enable_demoverifier_plugin="yes"])
+dnl UniMRCP server library.
+AC_ARG_ENABLE(server-lib,
+ [AC_HELP_STRING([--disable-server-lib ],[exclude unimrcpserver lib from build])],
+ [enable_server_lib="$enableval"],
+ [enable_server_lib="yes"])
-AM_CONDITIONAL([DEMOVERIFIER_PLUGIN],[test "${enable_demoverifier_plugin}" = "yes"])
+AM_CONDITIONAL([UNIMRCP_SERVER_LIB],[test "${enable_server_lib}" = "yes"])
+dnl UniMRCP server application.
+AC_ARG_ENABLE(server-app,
+ [AC_HELP_STRING([--disable-server-app ],[exclude unimrcpserver app from build])],
+ [enable_server_app="$enableval"],
+ [enable_server_app="yes"])
-#Enable recorder plugin
-AC_ARG_ENABLE(recorder-plugin,
- [AC_HELP_STRING([--disable-recorder-plugin ],[exclude recorder plugin from build])],
- [enable_recorder_plugin="$enableval"],
- [enable_recorder_plugin="yes"])
+AM_CONDITIONAL([UNIMRCP_SERVER_APP],[test "${enable_server_lib}" = "yes" && test "${enable_server_app}" = "yes"])
-AM_CONDITIONAL([RECORDER_PLUGIN],[test "${enable_recorder_plugin}" = "yes"])
+dnl Demo synthesizer plugin.
+UNI_PLUGIN_ENABLED(demosynth)
+AM_CONDITIONAL([DEMOSYNTH_PLUGIN],[test "${enable_demosynth_plugin}" = "yes"])
-#Enable PocketSphinx plugin
-AC_ARG_ENABLE(pocketsphinx-plugin,
- [AC_HELP_STRING([--enable-pocketsphinx-plugin ],[enable pocketsphinx plugin])],
- [enable_pocketsphinx_plugin="$enableval"],
- [enable_pocketsphinx_plugin="no"])
+dnl Demo recognizer plugin.
+UNI_PLUGIN_ENABLED(demorecog)
-if test "${enable_pocketsphinx_plugin}" != "no"; then
- UNIMRCP_CHECK_SPHINXBASE
- UNIMRCP_CHECK_POCKETSPHINX
-fi
+AM_CONDITIONAL([DEMORECOG_PLUGIN],[test "${enable_demorecog_plugin}" = "yes"])
-AM_CONDITIONAL([POCKETSPHINX_PLUGIN],[test "${enable_pocketsphinx_plugin}" = "yes" &&\
- test "${found_pocketsphinx}" = "yes" &&\
- test "${found_sphinxbase}" = "yes"])
+dnl Demo verifier plugin.
+UNI_PLUGIN_ENABLED(demoverifier)
+AM_CONDITIONAL([DEMOVERIFIER_PLUGIN],[test "${enable_demoverifier_plugin}" = "yes"])
-#Enable Flite plugin
-AC_ARG_ENABLE(flite-plugin,
- [AC_HELP_STRING([--enable-flite-plugin ],[enable flite plugin])],
- [enable_flite_plugin="$enableval"],
- [enable_flite_plugin="no"])
+dnl Recorder plugin.
+UNI_PLUGIN_ENABLED(recorder)
-if test "${enable_flite_plugin}" != "no"; then
- UNIMRCP_CHECK_FLITE
-fi
+AM_CONDITIONAL([RECORDER_PLUGIN],[test "${enable_recorder_plugin}" = "yes"])
-AM_CONDITIONAL([FLITE_PLUGIN],[test "${enable_flite_plugin}" = "yes" &&\
- test "${found_flite}" = "yes"])
+dnl Enable test suites.
+AC_ARG_ENABLE(test-suites,
+ [AC_HELP_STRING([--enable-test-suites ],[build test suites])],
+ [enable_test_suites="$enableval"],
+ [enable_test_suites="no"])
+AM_CONDITIONAL([TEST_SUITES],[test "${enable_test_suites}" != "no"])
AM_CONDITIONAL(ISMAC, [test `uname -s` = Darwin])
AC_CONFIG_FILES([
- Makefile
- libs/Makefile
- libs/apr-toolkit/Makefile
- libs/mpf/Makefile
- libs/mrcp/Makefile
- libs/mrcp-signaling/Makefile
- libs/mrcpv2-transport/Makefile
- libs/mrcp-engine/Makefile
- libs/mrcp-server/Makefile
- libs/mrcp-client/Makefile
- libs/uni-rtsp/Makefile
- modules/Makefile
- modules/mrcp-sofiasip/Makefile
- modules/mrcp-unirtsp/Makefile
- plugins/Makefile
- plugins/mrcp-pocketsphinx/Makefile
- plugins/mrcp-flite/Makefile
- plugins/mrcp-recorder/Makefile
- plugins/demo-synth/Makefile
- plugins/demo-recog/Makefile
- plugins/demo-verifier/Makefile
- platforms/Makefile
- platforms/libunimrcp-server/Makefile
- platforms/libunimrcp-client/Makefile
- platforms/unimrcp-server/Makefile
- platforms/unimrcp-client/Makefile
- platforms/libasr-client/Makefile
- platforms/asr-client/Makefile
- platforms/umc/Makefile
- tests/Makefile
- tests/apttest/Makefile
- tests/mpftest/Makefile
- tests/mrcptest/Makefile
- tests/rtsptest/Makefile
- tests/strtablegen/Makefile
- build/Makefile
- build/pkgconfig/Makefile
- build/pkgconfig/unimrcpclient.pc
- build/pkgconfig/unimrcpserver.pc
- build/pkgconfig/unimrcpplugin.pc
- build/svnrev/Makefile
- conf/Makefile
- data/Makefile
- docs/doxygen.conf
+ Makefile
+ libs/Makefile
+ libs/apr-toolkit/Makefile
+ libs/mpf/Makefile
+ libs/mrcp/Makefile
+ libs/mrcp-signaling/Makefile
+ libs/mrcpv2-transport/Makefile
+ libs/mrcp-engine/Makefile
+ libs/mrcp-server/Makefile
+ libs/mrcp-client/Makefile
+ libs/uni-rtsp/Makefile
+ modules/Makefile
+ modules/mrcp-sofiasip/Makefile
+ modules/mrcp-unirtsp/Makefile
+ plugins/Makefile
+ plugins/mrcp-recorder/Makefile
+ plugins/demo-synth/Makefile
+ plugins/demo-recog/Makefile
+ plugins/demo-verifier/Makefile
+ platforms/Makefile
+ platforms/libunimrcp-server/Makefile
+ platforms/libunimrcp-client/Makefile
+ platforms/unimrcp-server/Makefile
+ platforms/unimrcp-client/Makefile
+ platforms/libasr-client/Makefile
+ platforms/asr-client/Makefile
+ platforms/umc/Makefile
+ tests/Makefile
+ tests/apttest/Makefile
+ tests/mpftest/Makefile
+ tests/mrcptest/Makefile
+ tests/rtsptest/Makefile
+ tests/strtablegen/Makefile
+ build/Makefile
+ build/pkgconfig/Makefile
+ build/pkgconfig/unimrcpclient.pc
+ build/pkgconfig/unimrcpserver.pc
+ build/pkgconfig/unimrcpplugin.pc
+ conf/Makefile
+ data/Makefile
+ docs/doxygen.conf
])
AC_OUTPUT
-AC_MSG_NOTICE
-AC_MSG_NOTICE([Report:])
-AC_MSG_NOTICE([ UniMRCP: $UNI_DOTTED_VERSION])
-AC_MSG_NOTICE([ APR: $apr_version])
-AC_MSG_NOTICE([ APR-Util: $apu_version])
-AC_MSG_NOTICE([ Sofia-SIP: $sofia_version])
-AC_MSG_NOTICE([Plugins:])
-AC_MSG_NOTICE([ Demo Synthesizer: $enable_demosynth_plugin])
-AC_MSG_NOTICE([ Demo Recognizer: $enable_demorecog_plugin])
-AC_MSG_NOTICE([ Demo Verifier: $enable_demoverifier_plugin])
-AC_MSG_NOTICE([ Recorder: $enable_recorder_plugin])
-AC_MSG_NOTICE([ PocketSphinx: $enable_pocketsphinx_plugin])
-AC_MSG_NOTICE([ Flite: $enable_flite_plugin])
+echo
+echo '****************************** REPORT ******************************'
+echo
+echo UniMRCP version............... : $UNI_DOTTED_VERSION
+echo
+echo APR version................... : $apr_version
+echo APR-util version.............. : $apu_version
+echo Sofia-SIP version............. : $sofia_version
+echo
+echo Compiler...................... : $CC
+echo Compiler flags................ : $CFLAGS
+echo Preprocessor definitions...... : $CPPFLAGS
+echo Linker flags.................. : $LDFLAGS
+echo
+echo UniMRCP client lib............ : $enable_client_lib
+echo Sample UniMRCP client app..... : $enable_client_app
+echo Sample UMC C++ client app..... : $enable_umc
+echo Misc ASR client lib and app... : $enable_asr_client
+echo
+echo UniMRCP server lib............ : $enable_server_lib
+echo UniMRCP server app............ : $enable_server_app
+echo
+echo Demo synthesizer plugin....... : $enable_demosynth_plugin
+echo Demo recognizer plugin........ : $enable_demorecog_plugin
+echo Demo verifier plugin.......... : $enable_demoverifier_plugin
+echo Recorder plugin............... : $enable_recorder_plugin
+echo
+echo Installation layout........... : $layout_name
+echo Installation directory........ : $prefix
+echo
+echo '********************************************************************'
#! /bin/sh
-srcpath=$(dirname $0 2>/dev/null ) || srcpath="."
-$srcpath/configure "$@" --with-apr=../apr --disable-shared --with-pic --with-apr-util=../apr-util --with-sofia-sip=../sofia-sip
+srcpath=$(pwd)
+$srcpath/configure "$@" --with-apr=$srcpath/../apr --disable-shared --with-pic --with-apr-util=$srcpath/../apr-util --with-sofia-sip=$srcpath/../sofia-sip
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
+
+DATAFILES =
+
+if COMMON_CLIENT_DATA
+DATAFILES += grammar.jsgf grammar.mixed grammar.srgs grammar.xml \
+ speak.txt speak.xml \
+ one-16kHz.pcm one-8kHz.pcm \
+ johnsmith-16kHz.pcm johnsmith-8kHz.pcm
+endif
+
+if DEMOSYNTH_PLUGIN
+DATAFILES += demo-16kHz.pcm demo-8kHz.pcm
+endif
+
+if DEMORECOG_PLUGIN
+DATAFILES += result.xml
+endif
+
+if DEMOVERIFIER_PLUGIN
+DATAFILES += result-verification.xml
+endif
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); \
+ test -d $(DESTDIR)$(datadir) || $(mkinstalldirs) $(DESTDIR)$(datadir)
+ for datafile in $(DATAFILES) ; do \
+ $(INSTALL) -m 644 $(top_srcdir)/data/$$datafile $(DESTDIR)$(datadir); \
done
-
+
install-data-local:
- test -d $(datadir) || $(MAKE) def-data
+ test -d $(DESTDIR)$(datadir) || $(MAKE) def-data
-#JSGF V1.0;\r
-grammar digits;\r
-public <numbers> = (one | two | three);\r
+#JSGF V1.0;
+grammar digits;
+public <numbers> = (one | two | three);
-\r
---break\r
-Content-Type:text/uri-list\r
-Content-Length: 22\r
-\r
-builtin:grammar/digits\r
-\r
---break\r
-Content-Type:application/srgs+xml\r
-Content-Length: 230\r
-\r
-<?xml version="1.0"?>\r
-<grammar root="digit" version="1.0" xml:lang="en-US" \r
- xmlns="http://www.w3.org/2001/06/grammar">\r
- <rule id="digit" scope="public">\r
- <item>one two three four five</item>\r
- </rule>\r
-</grammar>\r
+
+--break
+Content-Type:text/uri-list
+Content-Length: 22
+
+builtin:grammar/digits
+
+--break
+Content-Type:application/srgs+xml
+Content-Length: 230
+
+<?xml version="1.0"?>
+<grammar root="digit" version="1.0" xml:lang="en-US"
+ xmlns="http://www.w3.org/2001/06/grammar">
+ <rule id="digit" scope="public">
+ <item>one two three four five</item>
+ </rule>
+</grammar>
--break--
\ No newline at end of file
--- /dev/null
+#ABNF 1.0;
+language en-US;
+mode voice;
+public $digit = one | two | three;
\ No newline at end of file
-<?xml version="1.0"?>\r
-<grammar xmlns="http://www.w3.org/2001/06/grammar" xml:lang="en-US" version="1.0" mode="voice" root="digit">\r
- <rule id="digit">\r
- <one-of>\r
- <item>one</item>\r
- <item>two</item>\r
- <item>three</item>\r
- </one-of>\r
- </rule>\r
+<?xml version="1.0"?>
+<grammar xmlns="http://www.w3.org/2001/06/grammar" xml:lang="en-US" version="1.0" mode="voice" root="digit">
+ <rule id="digit">
+ <one-of>
+ <item>one</item>
+ <item>two</item>
+ <item>three</item>
+ </one-of>
+ </rule>
</grammar>
\ No newline at end of file
-<?xml version="1.0"?>\r
-<result>\r
- <verification-result>\r
- <voiceprint id="johnsmith">\r
- <incremental>\r
- <utterance-length> 500 </utterance-length>\r
- <device> cellular-phone </device>\r
- <gender> male </gender>\r
- <decision> accepted </decision>\r
- <verification-score> 0.85 </verification-score>\r
- </incremental>\r
- <cumulative>\r
- <utterance-length> 1500 </utterance-length>\r
- <device> cellular-phone </device>\r
- <gender> male </gender>\r
- <decision> accepted </decision>\r
- <verification-score> 0.75 </verification-score>\r
- </cumulative>\r
- </voiceprint>\r
- </verification-result>\r
+<?xml version="1.0"?>
+<result>
+ <verification-result>
+ <voiceprint id="johnsmith">
+ <incremental>
+ <utterance-length> 500 </utterance-length>
+ <device> cellular-phone </device>
+ <gender> male </gender>
+ <decision> accepted </decision>
+ <verification-score> 0.85 </verification-score>
+ </incremental>
+ <cumulative>
+ <utterance-length> 1500 </utterance-length>
+ <device> cellular-phone </device>
+ <gender> male </gender>
+ <decision> accepted </decision>
+ <verification-score> 0.75 </verification-score>
+ </cumulative>
+ </voiceprint>
+ </verification-result>
</result>
\ No newline at end of file
-<?xml version="1.0"?>\r
-<result> \r
- <interpretation grammar="session:request1@form-level.store" confidence="97">\r
- <instance>one</instance>\r
- <input mode="speech">one</input>\r
- </interpretation>\r
+<?xml version="1.0"?>
+<result>
+ <interpretation grammar="session:request1@form-level.store" confidence="0.97">
+ <instance>one</instance>
+ <input mode="speech">one</input>
+ </interpretation>
</result>
\ No newline at end of file
-<?xml version="1.0"?>\r
-<speak version="1.0" xml:lang="en-US" xmlns="http://www.w3.org/2001/10/synthesis">\r
- <p>\r
- <s>Welcome to Uni MRCP.</s>\r
- </p>\r
+<?xml version="1.0"?>
+<speak version="1.0" xml:lang="en-US" xmlns="http://www.w3.org/2001/10/synthesis">
+ <p>
+ <s>Welcome to Uni MRCP.</s>
+ </p>
</speak>
\ No newline at end of file
/**
-@mainpage UniMRCP
+@mainpage UniMRCP API Reference
<br>
@section Introduction
-UniMRCP is an open source cross-platform MRCP project, which provides everything required for MRCP client and server side deployment.
-<br>
-UniMRCP encapsulates SIP/MRCPv2, RTSP, SDP and RTP/RTCP stacks inside and provides MRCP version independent user level interface for the integration.
-<br>
-<br>
-@section Source Tree Structure
+UniMRCP is an open source project compliant with the IETF RFC6787 (MRCPv2) and RFC4463 (MRCPv1) specifications.
+The project encapsulates SIP, RTSP, SDP, MRCPv2, and RTP/RTCP stacks and provides integrators with a protocol version consistent interface.
+- Compliance: MRCPv1, MRCPv2 (client and server)
+- Resources: Synthesizer (TTS), Recognizer (ASR), Verifier (SVI), Recorder
+- License: Apache 2.0
+- OS: Cross-platform (Windows, Linux, ...)
+- Language: C, C++
<br>
-Libraries
-
-* apr-toolkit - set of utilities built on top of APR and APR-Util libraries (task abstraction, logging, etc)
-<br>
-* mpf - media processing framework
-<br>
-* mrcp - implementation of MRCP basics (message, parser, resources)
-<br>
-* mrcpv2-transport - implementation of MRCPv2 transport layer
<br>
-* mrcp-signaling - abstract MRCP signaling (session management) interface
-<br>
-* mrcp-engine - abstract resource engine interface
-<br>
-* mrcp-client - implementation of MRCP client stack based on abstract signaling interface
-<br>
-* mrcp-server - implementation of MRCP server stack based on abstract signaling and engine interfaces
-<br>
-* uni-rtsp - implementation of minimal RTSP stack required for MRCPv1
-
+@section _ Source Tree Structure
<br>
-Modules
+@subsection Libraries
+
+- apr-toolkit - Set of utilities built on top of the APR and APR-util libraries (task abstraction, logging, etc).
+- mpf - Media processing framework.
+- mrcp - Implementation of MRCP basics (message, parser, resources).
+- mrcpv2-transport - Implementation of the MRCPv2 transport layer.
+- mrcp-signaling - Abstract MRCP signaling (session management) interface.
+- mrcp-engine - Abstract resource engine interface.
+- mrcp-client - Implementation of an MRCP client stack based on the abstract signaling interface.
+- mrcp-server - Implementation of an MRCP server stack based on the abstract signaling and engine interfaces.
+- uni-rtsp - Implementation of a minimal RTSP stack required for MRCPv1.
-* mrcp-sofiasip - implementation of abstract signaling interface using SofiaSIP library
-<br>
-* mrcp-unirtsp - implementation of abstract signaling interface using UniRTSP library
<br>
+@subsection Modules
+- mrcp-sofiasip - Implementation of the abstract signaling interface using the SofiaSIP library.
+- mrcp-unirtsp - Implementation of the abstract signaling interface using the UniRTSP library.
<br>
-Plugins
+@subsection Plugins
-* demo-synth - simulation of actual synthesizer engine
-<br>
-* demo-recog - simulation of actual recognizer engine
-<br>
-* mrcp-recorder - implementation of recorder resource
-<br>
-* mrcp-flite - implementation of synthesizer resource using open source Flite engine
-<br>
-* mrcp-pocketsphinx - implementation of recognizer resource using open source PocketSphinx engine
+- demo-synth - Implementation of a TTS plugin which simulates synthesis.
+- demo-recog - Implementation of an ASR plugin which simulates recognition.
+- demo-verif - Implementation of an SVI plugin which simulates speaker verification.
+- mrcp-recorder - Implementation of a recorder plugin.
<br>
-Platforms
+@subsection Platforms
-* libunimrcpclient - unimrcp client stack based on libraries and modules above
-<br>
-* libunimrcpserver - unimrcp server stack based on libraries, modules and plugins above
-<br>
-* unimrcpclient - sample C application based on unimrcp client stack
-<br>
-* umc - sample C++ application based on unimrcp client stack
-<br>
-* unimrcpserver - final unimrcp server application
+- libunimrcpclient - The UniMRCP client stack built on top of the underlying mrcp-client library using the mrcp-sofiasip and mrcp-unirtsp modules.
+- libunimrcpserver - The UniMRCP server stack based on top of the underlying mrcp-server library using the mrcp-sofiasip and mrcp-unirtsp modules.
+- unimrcpclient - Sample C application based on the UniMRCP client stack.
+- umc - Sample C++ application based on the UniMRCP client stack.
+- unimrcpserver - The UniMRCP server application.
<br>
@section Dependencies
-<a href="http://apr.apache.org"> APR - Apache Portable Runtime </a>
-<br>
-<a href="http://sofia-sip.sourceforge.net"> Sofia-SIP - SIP User Agent Library </a>
+- <a href="http://apr.apache.org"> APR - Apache Portable Runtime Library </a>
+- <a href="http://sofia-sip.sourceforge.net"> Sofia-SIP - SIP User Agent Library </a>
<br>
@section Project Links
-<a href="http://www.unimrcp.org"> Website </a>
-<br>
-<a href="http://code.google.com/p/unimrcp/downloads/list"> Downloads </a>
-<br>
-<a href="http://code.google.com/p/unimrcp/w/list"> Wiki </a>
-<br>
-<a href="http://code.google.com/p/unimrcp/issues/list"> Issue Tracker </a>
-<br>
-<a href="http://groups.google.com/group/unimrcp"> Discussion Group </a>
+- <a href="http://www.unimrcp.org"> Website </a>
+- <a href="http://www.unimrcp.org/downloads"> Downloads </a>
+- <a href="http://www.unimrcp.org/documentation"> Documentation </a>
+- <a href="http://code.google.com/p/unimrcp/issues/list"> Issue Tracker </a>
+- <a href="http://groups.google.com/group/unimrcp"> Discussion Group </a>
<br>
*/
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = -I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+ $(UNIMRCP_APR_INCLUDES)
noinst_LTLIBRARIES = libaprtoolkit.la
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="aprtoolkit"\r
- ProjectGUID="{13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}"\r
- RootNamespace="aprtoolkit"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- <Platform\r
- Name="x64"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- PreprocessorDefinitions="APT_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- PreprocessorDefinitions="APT_STATIC_LIB"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- PreprocessorDefinitions="APT_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- PreprocessorDefinitions="APT_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\include\apt.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_consumer_task.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_cyclic_queue.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_dir_layout.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_header_field.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_log.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_multipart_content.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_net.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_nlsml_doc.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_obj_list.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_pair.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_poller_task.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_pollset.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_pool.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_string.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_string_table.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_task.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_task_msg.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_test_suite.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_text_message.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_text_stream.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\apt_timer_queue.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\src\apt_consumer_task.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_cyclic_queue.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_dir_layout.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_header_field.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_log.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_multipart_content.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_net.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_nlsml_doc.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_obj_list.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_pair.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_poller_task.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_pollset.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_pool.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_string_table.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_task.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_task_msg.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_test_suite.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_text_message.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_text_stream.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\apt_timer_queue.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>aprtoolkit</ProjectName>\r
- <ProjectGuid>{13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}</ProjectGuid>\r
- <RootNamespace>aprtoolkit</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\apt.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\apt.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\apt.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\apt.props" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\apt.h" />\r
- <ClInclude Include="include\apt_consumer_task.h" />\r
- <ClInclude Include="include\apt_cyclic_queue.h" />\r
- <ClInclude Include="include\apt_dir_layout.h" />\r
- <ClInclude Include="include\apt_header_field.h" />\r
- <ClInclude Include="include\apt_log.h" />\r
- <ClInclude Include="include\apt_multipart_content.h" />\r
- <ClInclude Include="include\apt_net.h" />\r
- <ClInclude Include="include\apt_nlsml_doc.h" />\r
- <ClInclude Include="include\apt_obj_list.h" />\r
- <ClInclude Include="include\apt_pair.h" />\r
- <ClInclude Include="include\apt_pollset.h" />\r
- <ClInclude Include="include\apt_poller_task.h" />\r
- <ClInclude Include="include\apt_pool.h" />\r
- <ClInclude Include="include\apt_string.h" />\r
- <ClInclude Include="include\apt_string_table.h" />\r
- <ClInclude Include="include\apt_task.h" />\r
- <ClInclude Include="include\apt_task_msg.h" />\r
- <ClInclude Include="include\apt_test_suite.h" />\r
- <ClInclude Include="include\apt_text_message.h" />\r
- <ClInclude Include="include\apt_text_stream.h" />\r
- <ClInclude Include="include\apt_time_queue.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\apt_consumer_task.c" />\r
- <ClCompile Include="src\apt_cyclic_queue.c" />\r
- <ClCompile Include="src\apt_dir_layout.c" />\r
- <ClCompile Include="src\apt_header_field.c" />\r
- <ClCompile Include="src\apt_log.c" />\r
- <ClCompile Include="src\apt_multipart_content.c" />\r
- <ClCompile Include="src\apt_net.c" />\r
- <ClCompile Include="src\apt_nlsml_doc.c" />\r
- <ClCompile Include="src\apt_obj_list.c" />\r
- <ClCompile Include="src\apt_pair.c" />\r
- <ClCompile Include="src\apt_poller_task.c" />\r
- <ClCompile Include="src\apt_pollset.c" />\r
- <ClCompile Include="src\apt_pool.c" />\r
- <ClCompile Include="src\apt_string_table.c" />\r
- <ClCompile Include="src\apt_task.c" />\r
- <ClCompile Include="src\apt_task_msg.c" />\r
- <ClCompile Include="src\apt_test_suite.c" />\r
- <ClCompile Include="src\apt_text_message.c" />\r
- <ClCompile Include="src\apt_text_stream.c" />\r
- <ClCompile Include="src\apt_timer_queue.c" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ProjectReference Include="..\..\..\win32\apr-util\libaprutil.2012.vcxproj">\r
- <Project>{f057da7f-79e5-4b00-845c-ef446ef055e3}</Project>\r
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
- </ProjectReference>\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
-</Project>\r
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>aprtoolkit</ProjectName>\r
- <ProjectGuid>{13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}</ProjectGuid>\r
- <RootNamespace>aprtoolkit</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\apt.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\apt.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\apt.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\apt.props" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\apt.h" />\r
- <ClInclude Include="include\apt_consumer_task.h" />\r
- <ClInclude Include="include\apt_cyclic_queue.h" />\r
- <ClInclude Include="include\apt_dir_layout.h" />\r
- <ClInclude Include="include\apt_header_field.h" />\r
- <ClInclude Include="include\apt_log.h" />\r
- <ClInclude Include="include\apt_multipart_content.h" />\r
- <ClInclude Include="include\apt_net.h" />\r
- <ClInclude Include="include\apt_nlsml_doc.h" />\r
- <ClInclude Include="include\apt_obj_list.h" />\r
- <ClInclude Include="include\apt_pair.h" />\r
- <ClInclude Include="include\apt_pollset.h" />\r
- <ClInclude Include="include\apt_poller_task.h" />\r
- <ClInclude Include="include\apt_pool.h" />\r
- <ClInclude Include="include\apt_string.h" />\r
- <ClInclude Include="include\apt_string_table.h" />\r
- <ClInclude Include="include\apt_task.h" />\r
- <ClInclude Include="include\apt_task_msg.h" />\r
- <ClInclude Include="include\apt_test_suite.h" />\r
- <ClInclude Include="include\apt_text_message.h" />\r
- <ClInclude Include="include\apt_text_stream.h" />\r
- <ClInclude Include="include\apt_time_queue.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\apt_consumer_task.c" />\r
- <ClCompile Include="src\apt_cyclic_queue.c" />\r
- <ClCompile Include="src\apt_dir_layout.c" />\r
- <ClCompile Include="src\apt_header_field.c" />\r
- <ClCompile Include="src\apt_log.c" />\r
- <ClCompile Include="src\apt_multipart_content.c" />\r
- <ClCompile Include="src\apt_net.c" />\r
- <ClCompile Include="src\apt_nlsml_doc.c" />\r
- <ClCompile Include="src\apt_obj_list.c" />\r
- <ClCompile Include="src\apt_pair.c" />\r
- <ClCompile Include="src\apt_poller_task.c" />\r
- <ClCompile Include="src\apt_pollset.c" />\r
- <ClCompile Include="src\apt_pool.c" />\r
- <ClCompile Include="src\apt_string_table.c" />\r
- <ClCompile Include="src\apt_task.c" />\r
- <ClCompile Include="src\apt_task_msg.c" />\r
- <ClCompile Include="src\apt_test_suite.c" />\r
- <ClCompile Include="src\apt_text_message.c" />\r
- <ClCompile Include="src\apt_text_stream.c" />\r
- <ClCompile Include="src\apt_timer_queue.c" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ProjectReference Include="..\..\..\win32\apr-util\libaprutil.2010.vcxproj">\r
- <Project>{f057da7f-79e5-4b00-845c-ef446ef055e3}</Project>\r
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\r
- </ProjectReference>\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}</ProjectGuid>
+ <RootNamespace>aprtoolkit</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\apt.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\apt.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\apt.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\apt.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="include\apt.h" />
+ <ClInclude Include="include\apt_consumer_task.h" />
+ <ClInclude Include="include\apt_cyclic_queue.h" />
+ <ClInclude Include="include\apt_dir_layout.h" />
+ <ClInclude Include="include\apt_header_field.h" />
+ <ClInclude Include="include\apt_log.h" />
+ <ClInclude Include="include\apt_multipart_content.h" />
+ <ClInclude Include="include\apt_net.h" />
+ <ClInclude Include="include\apt_nlsml_doc.h" />
+ <ClInclude Include="include\apt_obj_list.h" />
+ <ClInclude Include="include\apt_pair.h" />
+ <ClInclude Include="include\apt_poller_task.h" />
+ <ClInclude Include="include\apt_pollset.h" />
+ <ClInclude Include="include\apt_pool.h" />
+ <ClInclude Include="include\apt_string.h" />
+ <ClInclude Include="include\apt_string_table.h" />
+ <ClInclude Include="include\apt_task.h" />
+ <ClInclude Include="include\apt_task_msg.h" />
+ <ClInclude Include="include\apt_test_suite.h" />
+ <ClInclude Include="include\apt_text_message.h" />
+ <ClInclude Include="include\apt_text_stream.h" />
+ <ClInclude Include="include\apt_timer_queue.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\apt_consumer_task.c" />
+ <ClCompile Include="src\apt_cyclic_queue.c" />
+ <ClCompile Include="src\apt_dir_layout.c" />
+ <ClCompile Include="src\apt_header_field.c" />
+ <ClCompile Include="src\apt_log.c" />
+ <ClCompile Include="src\apt_multipart_content.c" />
+ <ClCompile Include="src\apt_net.c" />
+ <ClCompile Include="src\apt_nlsml_doc.c" />
+ <ClCompile Include="src\apt_obj_list.c" />
+ <ClCompile Include="src\apt_pair.c" />
+ <ClCompile Include="src\apt_poller_task.c" />
+ <ClCompile Include="src\apt_pollset.c" />
+ <ClCompile Include="src\apt_pool.c" />
+ <ClCompile Include="src\apt_string_table.c" />
+ <ClCompile Include="src\apt_task.c" />
+ <ClCompile Include="src\apt_task_msg.c" />
+ <ClCompile Include="src\apt_test_suite.c" />
+ <ClCompile Include="src\apt_text_message.c" />
+ <ClCompile Include="src\apt_text_stream.c" />
+ <ClCompile Include="src\apt_timer_queue.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{4e9335ac-20e8-4284-ad77-20ad9190c94d}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="include\apt.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_consumer_task.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_cyclic_queue.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_dir_layout.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_header_field.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_log.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_multipart_content.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_net.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_nlsml_doc.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_obj_list.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_pair.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_poller_task.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_pollset.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_pool.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_string.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_string_table.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_task.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_task_msg.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_test_suite.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_text_message.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_text_stream.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\apt_timer_queue.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\apt_consumer_task.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_cyclic_queue.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_dir_layout.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_header_field.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_log.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_multipart_content.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_net.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_nlsml_doc.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_obj_list.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_pair.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_poller_task.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_pollset.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_pool.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_string_table.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_task.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_task_msg.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_test_suite.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_text_message.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_text_stream.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\apt_timer_queue.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: apt.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef APT_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_consumer_task.h 1708 2010-05-24 17:03:25Z achaloyan $
+ * $Id: apt_consumer_task.h 2175 2014-09-12 04:56:09Z achaloyan@gmail.com $
*/
#ifndef APT_CONSUMER_TASK_H
*/
#include "apt_task.h"
+#include "apt_timer_queue.h"
APT_BEGIN_EXTERN_C
* Get task vtable.
* @param task the consumer task to get vtable for
*/
-APT_DECLARE(apt_task_vtable_t*) apt_consumer_task_vtable_get(apt_consumer_task_t *task);
+APT_DECLARE(apt_task_vtable_t*) apt_consumer_task_vtable_get(const apt_consumer_task_t *task);
/**
* Get consumer task object.
*/
APT_DECLARE(void*) apt_consumer_task_object_get(const apt_consumer_task_t *task);
+/**
+ * Create timer.
+ * @param task the consumer task to create timer for
+ * @param proc the timer callback
+ * @param obj the object to pass to callback
+ * @param pool the pool to allocate memory from
+ */
+APT_DECLARE(apt_timer_t*) apt_consumer_task_timer_create(
+ apt_consumer_task_t *task,
+ apt_timer_proc_f proc,
+ void *obj,
+ apr_pool_t *pool);
+
APT_END_EXTERN_C
#endif /* APT_CONSUMER_TASK_H */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_cyclic_queue.h 1708 2010-05-24 17:03:25Z achaloyan $
+ * $Id: apt_cyclic_queue.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef APT_CYCLIC_QUEUE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_dir_layout.h 1524 2010-02-15 20:44:16Z achaloyan $
+ * $Id: apt_dir_layout.h 2204 2014-10-31 01:01:42Z achaloyan@gmail.com $
*/
#ifndef APT_DIR_LAYOUT_H
/**
* @file apt_dir_layout.h
- * @brief Directory Layout
- */
+ * @brief Directories Layout
+ */
#include "apt.h"
APT_BEGIN_EXTERN_C
-/** Directory layout declaration */
+/*
+ * This define allows user applications to support both the old interface,
+ * where members of apt_dir_layout_t structure were accessable to the
+ * application, and the new opaque interface, where OPAQUE_DIR_LAYOUT
+ * is defined.
+ */
+#define OPAQUE_DIR_LAYOUT
+
+/** Directories layout declaration */
typedef struct apt_dir_layout_t apt_dir_layout_t;
-/** Directory layout */
-struct apt_dir_layout_t {
- /** Path to config dir */
- char *conf_dir_path;
- /** Path to plugin dir */
- char *plugin_dir_path;
- /** Path to log dir */
- char *log_dir_path;
- /** Path to data dir */
- char *data_dir_path;
-};
+/** Enumeration of directories the layout is composed of */
+typedef enum {
+ APT_LAYOUT_CONF_DIR, /**< configuration directory */
+ APT_LAYOUT_PLUGIN_DIR, /**< plugin directory */
+ APT_LAYOUT_LOG_DIR, /**< log directory */
+ APT_LAYOUT_DATA_DIR, /**< data directory */
+ APT_LAYOUT_VAR_DIR, /**< var directory */
+
+ APT_LAYOUT_DIR_COUNT, /**< number of directories in the default layout */
+
+ APT_LAYOUT_EXT_DIR = APT_LAYOUT_DIR_COUNT
+} apt_dir_entry_id;
/**
- * Create (allocate) the structure of default directories layout.
+ * Create the default directories layout based on the specified root directory.
+ * @param root_dir_path the path to the root directory
+ * @param pool the memory pool to use
*/
APT_DECLARE(apt_dir_layout_t*) apt_default_dir_layout_create(const char *root_dir_path, apr_pool_t *pool);
/**
- * Create (allocate) the structure of custom directories layout.
+ * Create a custom directories layout based on the specified individual directories.
+ * @param conf_dir_path the path to the config dir
+ * @param plugin_dir_path the path to the plugin dir
+ * @param log_dir_path the path to the log dir
+ * @param var_dir_path the path to the var dir
+ * @param pool the memory pool to use
*/
APT_DECLARE(apt_dir_layout_t*) apt_custom_dir_layout_create(
const char *conf_dir_path,
const char *plugin_dir_path,
const char *log_dir_path,
const char *data_dir_path,
+ const char *var_dir_path,
apr_pool_t *pool);
-/** Construct file path relative to data dir using the file name specified. */
-APT_DECLARE(char*) apt_datadir_filepath_get(const apt_dir_layout_t *dir_layout, const char *file_name, apr_pool_t *pool);
+/**
+ * Create a bare directories layout.
+ * @param pool the memory pool to use
+ */
+APT_DECLARE(apt_dir_layout_t*) apt_dir_layout_create(apr_pool_t *pool);
-/** Construct file path relative to conf dir using the file name specified. */
+/**
+ * Create am extended bare directories layout.
+ * @param count the number of directories in the layout
+ * @param pool the memory pool to use
+ */
+APT_DECLARE(apt_dir_layout_t*) apt_dir_layout_create_ext(apr_size_t count, apr_pool_t *pool);
+
+/**
+ * Load directories layout from the specified configuration file.
+ * @param dir_layout the directory layout
+ * @param config_file the path to the configuration file
+ * @param pool the memory pool to use
+ */
+APT_DECLARE(apt_bool_t) apt_dir_layout_load(apt_dir_layout_t *dir_layout, const char *config_file, apr_pool_t *pool);
+
+/**
+ * Load directories layout from the specified configuration file using the provided labels.
+ * @param dir_layout the directory layout
+ * @param config_file the path to the configuration file
+ * @param labels the array of directory labels (configuration entries)
+ * @param count the number of labels (normally equals the number of directories in the layout)
+ * @param pool the memory pool to use
+ */
+APT_DECLARE(apt_bool_t) apt_dir_layout_load_ext(apt_dir_layout_t *dir_layout, const char *config_file, const char **labels, apr_size_t count, apr_pool_t *pool);
+
+/**
+ * Set the path to the individual directory in the layout.
+ * @param dir_layout the directory layout
+ * @param dir_entry_id the directory id (apt_dir_entry_id)
+ * @param path the directory path
+ * @param pool the memory pool to use
+ */
+APT_DECLARE(apt_bool_t) apt_dir_layout_path_set(apt_dir_layout_t *dir_layout, apr_size_t dir_entry_id, const char *path, apr_pool_t *pool);
+
+/**
+ * Get the path to the individual directory in the layout.
+ * @param dir_layout the directory layout
+ * @param dir_entry_id the directory id (apt_dir_entry_id)
+ */
+APT_DECLARE(const char*) apt_dir_layout_path_get(const apt_dir_layout_t *dir_layout, apr_size_t dir_entry_id);
+
+/**
+ * Compose a file path relative to the specified directory in the layout.
+ * @param dir_layout the directory layout
+ * @param dir_entry_id the directory id (apt_dir_entry_id)
+ * @param file_name the file name to append to the directory path
+ * @param pool the memory pool to use
+ */
+APT_DECLARE(char*) apt_dir_layout_path_compose(const apt_dir_layout_t *dir_layout, apr_size_t dir_entry_id, const char *file_name, apr_pool_t *pool);
+
+
+/**
+ * Compose a file path relative to config dir.
+ * @param dir_layout the directory layout
+ * @param file_name the file name
+ * @param pool the memory pool to use
+ */
APT_DECLARE(char*) apt_confdir_filepath_get(const apt_dir_layout_t *dir_layout, const char *file_name, apr_pool_t *pool);
+/**
+ * Compose a file path relative to data dir.
+ * @param dir_layout the directory layout
+ * @param file_name the file name
+ * @param pool the memory pool to use
+ */
+APT_DECLARE(char*) apt_datadir_filepath_get(const apt_dir_layout_t *dir_layout, const char *file_name, apr_pool_t *pool);
+
+/**
+ * Compose a file path relative to var dir.
+ * @param dir_layout the directory layout
+ * @param file_name the file name
+ * @param pool the memory pool to use
+ */
+APT_DECLARE(char*) apt_vardir_filepath_get(const apt_dir_layout_t *dir_layout, const char *file_name, apr_pool_t *pool);
+
APT_END_EXTERN_C
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_header_field.h 1719 2010-05-31 21:09:51Z achaloyan $
+ * $Id: apt_header_field.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef APT_HEADER_FIELD_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_log.h 1792 2011-01-10 21:08:52Z achaloyan $
+ * $Id: apt_log.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef APT_LOG_H
/** Default max size of the log file (8Mb) */
#define MAX_LOG_FILE_SIZE (8 * 1024 * 1024)
-/** Default max number of rotated log files */
-#define MAX_LOG_FILE_COUNT 10
+/** Default max number of log files used in rotation */
+#define MAX_LOG_FILE_COUNT 100
/** File:line mark */
-#define APT_LOG_MARK __FILE__,__LINE__
+#define APT_LOG_MARK __FILE__,__LINE__
+/*
+ * Definition of common formats used with apt_log().
+ *
+ * Note that the generic %p format can not be used for pointers
+ * since apr_vformatter doesn't accept it. The format %pp introduced
+ * by apr_vformatter can not be used either since it breaks compatibility
+ * with generic printf style loggers.
+ */
+#if defined(WIN32) && APR_SIZEOF_VOIDP == 8
+/** Format to log pointer values on Win x64 */
+#define APT_PTR_FMT "0x%I64x"
+#else
/** Format to log pointer values */
-#define APT_PTR_FMT "0x%x"
+#define APT_PTR_FMT "0x%lx"
+#endif
/** Format to log string identifiers */
#define APT_SID_FMT "<%s>"
/** Format to log string identifiers and resources */
/** Format to log names, identifiers and resources */
#define APT_NAMESIDRES_FMT "%s "APT_SIDRES_FMT
-
/** Priority of log messages ordered from highest priority to lowest (rfc3164) */
typedef enum {
APT_PRIO_EMERGENCY, /**< system is unusable */
typedef struct apt_logger_t apt_logger_t;
/** Prototype of extended log handler function */
-typedef apt_bool_t (*apt_log_ext_handler_f)(const char *file, int line, const char *obj,
- apt_log_priority_e priority, const char *format, va_list arg_ptr);
+typedef apt_bool_t (*apt_log_ext_handler_f)(const char *file, int line,
+ const char *obj, apt_log_priority_e priority,
+ const char *format, va_list arg_ptr);
/**
* Create the singleton instance of the logger.
/**
* Get the current masking mode of private data.
*/
-APT_DECLARE(apt_log_masking_e) apt_log_masking_get();
+APT_DECLARE(apt_log_masking_e) apt_log_masking_get(void);
/**
* Translate the masking mode string to enum.
APT_DECLARE(apt_bool_t) apt_log(const char *file, int line, apt_log_priority_e priority, const char *format, ...);
/**
- * Do logging.
+ * Do logging (this version uses an object externally associated with the logger).
* @param file the file name log entry is generated from
* @param line the line number log entry is generated from
* @param priority the priority of the entire log entry
*/
APT_DECLARE(apt_bool_t) apt_obj_log(const char *file, int line, apt_log_priority_e priority, void *obj, const char *format, ...);
+/**
+ * Do logging (this version accepts va_list argument).
+ * @param file the file name log entry is generated from
+ * @param line the line number log entry is generated from
+ * @param priority the priority of the entire log entry
+ * @param format the format of the entire log entry
+ * @param arg_ptr the arguments
+ */
+APT_DECLARE(apt_bool_t) apt_va_log(const char *file, int line, apt_log_priority_e priority, const char *format, va_list arg_ptr);
+
APT_END_EXTERN_C
#endif /* APT_LOG_H */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_multipart_content.h 1722 2010-06-01 08:40:35Z achaloyan $
+ * $Id: apt_multipart_content.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef APT_MULTIPART_CONTENT_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_net.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: apt_net.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef APT_NET_H
/**
* Get the IP address (in numeric address string format) by hostname.
- * @param addr the IP address
+ * @param addr the IP address to return
* @param pool the pool to allocate memory from
*/
apt_bool_t apt_ip_get(char **addr, apr_pool_t *pool);
+/**
+ * Get the IP address (in numeric address string format) by network interface name.
+ * @param iface_name the network interface name (eth0, Local Area Connection, etc)
+ * @param addr the IP address to return
+ * @param pool the pool to allocate memory from
+ */
+apt_bool_t apt_ip_get_by_iface(const char *iface_name, char **addr, apr_pool_t *pool);
/**
* Get current NTP time
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_nlsml_doc.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: apt_nlsml_doc.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef APT_NLSML_DOC_H
/**
* @file apt_nlsml_doc.h
- * @brief Basic NLSML Routine
- */
+ * @brief NLSML Result Handling
+ * @remark This is an MRCP version independent and vendor consistent implementation
+ * of the NSLML parser. The interface reflects the NLSML schema defined in
+ * http://tools.ietf.org/html/rfc6787#section-16.1.
+ */
-#include "apr_xml.h"
-#include "apt_string.h"
+#include <apr_xml.h>
+#include "apt.h"
APT_BEGIN_EXTERN_C
-/** Load NLSML document */
-APT_DECLARE(apr_xml_doc*) nlsml_doc_load(const apt_str_t *data, apr_pool_t *pool);
+/* Forward declarations */
+typedef struct nlsml_result_t nlsml_result_t;
+typedef struct nlsml_interpretation_t nlsml_interpretation_t;
+typedef struct nlsml_enrollment_result_t nlsml_enrollment_result_t;
+typedef struct nlsml_verification_result_t nlsml_verification_result_t;
+typedef struct nlsml_instance_t nlsml_instance_t;
+typedef struct nlsml_input_t nlsml_input_t;
+
+/**
+ * Parse NLSML result
+ * @param data the data to parse
+ * @param length the length of the data
+ * @param pool the memory pool to use
+ * @return the parsed NLSML result.
+ */
+APT_DECLARE(nlsml_result_t*) nlsml_result_parse(const char *data, apr_size_t length, apr_pool_t *pool);
+
+/**
+ * Trace parsed NLSML result (for debug purposes only)
+ * @param result the parsed result to output
+ * @param pool the memory pool to use
+ */
+APT_DECLARE(void) nlsml_result_trace(const nlsml_result_t *result, apr_pool_t *pool);
+
+/*
+ * Accessors of the NLSML <result> element.
+ * Each <result> element may contain one or more <interpretation>, <enrollment-result>,
+ * <verification-result> elements, and an optional <grammar> attribute.
+ */
+
+/**
+ * Get first interpretation
+ * @param result the parsed NLSML result which holds the list of interpretation elements
+ */
+APT_DECLARE(nlsml_interpretation_t*) nlsml_first_interpretation_get(const nlsml_result_t *result);
+
+/**
+ * Get next interpretation
+ * @param result the parsed NLSML result which holds the list of interpretation elements
+ * @param interpretation the current interpretation element
+ */
+APT_DECLARE(nlsml_interpretation_t*) nlsml_next_interpretation_get(const nlsml_result_t *result, const nlsml_interpretation_t *interpretation);
+
+/**
+ * Get first enrollment result
+ * @param result the parsed NLSML result which holds the list of enrollment-result elements
+ */
+APT_DECLARE(nlsml_enrollment_result_t*) nlsml_first_enrollment_result_get(const nlsml_result_t *result);
+
+/**
+ * Get next enrollment result
+ * @param result the parsed NLSML result which holds the list of enrollment-result elements
+ * @param enrollment_result the current enrollment-result element
+ */
+APT_DECLARE(nlsml_enrollment_result_t*) nlsml_next_enrollment_result_get(const nlsml_result_t *result, const nlsml_enrollment_result_t *enrollment_result);
+
+/**
+ * Get first verification result
+ * @param result the parsed NLSML result which holds the list of verification-result elements
+ */
+APT_DECLARE(nlsml_verification_result_t*) nlsml_first_verification_result_get(const nlsml_result_t *result);
+
+/**
+ * Get next verification result
+ * @param result the parsed NLSML result which holds the list of verification-result elements
+ * @param verification_result the current verification-result element
+ */
+APT_DECLARE(nlsml_verification_result_t*) nlsml_next_verification_result_get(const nlsml_result_t *result, const nlsml_verification_result_t *verification_result);
+
+/**
+ * Get the grammar attribute of the NLSML result
+ * @param result the parsed result
+ */
+APT_DECLARE(const char*) nlsml_result_grammar_get(const nlsml_result_t *result);
+
+/*
+ * Accessors of the <interpretation> element.
+ */
+
+/**
+ * Get first instance
+ * @param interpretation the parsed interpretation element which holds the list of instance elements
+ */
+APT_DECLARE(nlsml_instance_t*) nlsml_interpretation_first_instance_get(const nlsml_interpretation_t *interpretation);
+
+/**
+ * Get next instance
+ * @param interpretation the parsed interpretation element which holds the list of instance elements
+ * @param instance the current instance element
+ */
+APT_DECLARE(nlsml_instance_t*) nlsml_interpretation_next_instance_get(const nlsml_interpretation_t *interpretation, const nlsml_instance_t *instance);
-/** Get the first interpretation element */
-APT_DECLARE(apr_xml_elem*) nlsml_first_interpret_get(const apr_xml_doc *doc);
+/**
+ * Get input
+ * @param interpretation the parsed interpretation element which may have 0 or 1 input elements
+ */
+APT_DECLARE(nlsml_input_t*) nlsml_interpretation_input_get(const nlsml_interpretation_t *interpretation);
-/** Get the next interpretation element */
-APT_DECLARE(apr_xml_elem*) nlsml_next_interpret_get(const apr_xml_elem *interpret);
+/**
+ * Get interpretation confidence
+ * @param interpretation the parsed interpretation element
+ * @remark the confidence is stored and returned as a float value for both MRCPv2 and MRCPv1
+ */
+APT_DECLARE(float) nlsml_interpretation_confidence_get(const nlsml_interpretation_t *interpretation);
-/** Get instance and input elements of interpretation element */
-APT_DECLARE(apt_bool_t) nlsml_interpret_results_get(const apr_xml_elem *interpret, apr_xml_elem **instance, apr_xml_elem **input);
+/**
+ * Get interpretation grammar
+ * @param interpretation the parsed interpretation element
+ */
+APT_DECLARE(const char*) nlsml_interpretation_grammar_get(const nlsml_interpretation_t *interpretation);
-/** Get specified atrribute of input element */
-APT_DECLARE(const char *) nlsml_input_attrib_get(const apr_xml_elem *input, const char *attrib, apt_bool_t recursive);
+/*
+ * Accessors of the <instance> and <input> elements.
+ */
+/**
+ * Get an XML representation of the instance element
+ * @param instance the parsed instance element
+ */
+APT_DECLARE(const apr_xml_elem*) nlsml_instance_elem_get(const nlsml_instance_t *instance);
+
+/**
+ * Suppress SWI elements (normalize instance)
+ * @param instance the parsed instance to suppress SWI sub-elements from
+ */
+APT_DECLARE(apt_bool_t) nlsml_instance_swi_suppress(nlsml_instance_t *instance);
+
+/**
+ * Generate a plain text content of the instance element
+ * @param instance the parsed instance to generate content of
+ * @param pool the memory pool to use
+ */
+APT_DECLARE(const char*) nlsml_instance_content_generate(const nlsml_instance_t *instance, apr_pool_t *pool);
+
+/**
+ * Get an XML representation of the input element
+ * @param input the parsed input element
+ */
+APT_DECLARE(const apr_xml_elem*) nlsml_input_elem_get(const nlsml_input_t *input);
+
+/**
+ * Generate a plain text content of the input element
+ * @param input the parsed input to generate content of
+ * @param pool the memory pool to use
+ */
+APT_DECLARE(const char*) nlsml_input_content_generate(const nlsml_input_t *input, apr_pool_t *pool);
+
+/**
+ * Get input mode
+ * @param input the parsed input element
+ * @remark the input mode is either "speech" or "dtmf"
+ */
+APT_DECLARE(const char*) nlsml_input_mode_get(const nlsml_input_t *input);
+
+/**
+ * Get input confidence
+ * @param input the parsed input element
+ * @remark the confidence is stored and returned as a float value for both MRCPv2 and MRCPv1
+ */
+APT_DECLARE(float) nlsml_input_confidence_get(const nlsml_input_t *input);
+
+/**
+ * Get start of input timestamp
+ * @param input the parsed input element
+ */
+APT_DECLARE(const char*) nlsml_input_timestamp_start_get(const nlsml_input_t *input);
+
+/**
+ * Get end of input timestamp
+ * @param input the parsed input element
+ */
+APT_DECLARE(const char*) nlsml_input_timestamp_end_get(const nlsml_input_t *input);
APT_END_EXTERN_C
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_obj_list.h 1708 2010-05-24 17:03:25Z achaloyan $
+ * $Id: apt_obj_list.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef APT_OBJ_LIST_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_pair.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: apt_pair.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef APT_PAIR_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_poller_task.h 1708 2010-05-24 17:03:25Z achaloyan $
+ * $Id: apt_poller_task.h 2176 2014-09-12 05:00:23Z achaloyan@gmail.com $
*/
#ifndef APT_POLLER_TASK_H
* Get task vtable.
* @param task the poller task to get vtable from
*/
-APT_DECLARE(apt_task_vtable_t*) apt_poller_task_vtable_get(apt_poller_task_t *task);
+APT_DECLARE(apt_task_vtable_t*) apt_poller_task_vtable_get(const apt_poller_task_t *task);
/**
* Get external object.
APT_DECLARE(void*) apt_poller_task_object_get(const apt_poller_task_t *task);
/**
- * Get pollset.
- * @param task the poller task to get pollset from
+ * Add descriptor to pollset.
+ * @param task the task which holds the pollset
+ * @param descriptor the descriptor to add
*/
-APT_DECLARE(apt_pollset_t*) apt_poller_task_pollset_get(const apt_poller_task_t *task);
+APT_DECLARE(apt_bool_t) apt_poller_task_descriptor_add(const apt_poller_task_t *task, const apr_pollfd_t *descriptor);
+
+/**
+ * Remove descriptor from pollset.
+ * @param task the task which holds the pollset
+ * @param descriptor the descriptor to remove
+ */
+APT_DECLARE(apt_bool_t) apt_poller_task_descriptor_remove(const apt_poller_task_t *task, const apr_pollfd_t *descriptor);
/**
* Create timer.
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_pollset.h 1565 2010-03-06 07:13:04Z achaloyan $
+ * $Id: apt_pollset.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef APT_POLLSET_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_pool.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: apt_pool.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef APT_POOL_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_string.h 1531 2010-02-20 14:19:53Z achaloyan $
+ * $Id: apt_string.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef APT_STRING_H
return (strncasecmp(str1->buf,str2->buf,str1->length) == 0) ? TRUE : FALSE;
}
+/**
+ * Represent string as iovec.
+ * @param str the string to represent
+ * @param vec the iovec to set
+ */
+static APR_INLINE void apt_string_to_iovec(const apt_str_t *str, struct iovec *vec)
+{
+ vec->iov_base = str->buf;
+ vec->iov_len = str->length;
+}
+
APT_END_EXTERN_C
#endif /* APT_STRING_H */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_string_table.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: apt_string_table.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef APT_STRING_TABLE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_task.h 1696 2010-05-20 15:44:16Z achaloyan $
+ * $Id: apt_task.h 2180 2014-09-13 21:17:24Z achaloyan@gmail.com $
*/
#ifndef APT_TASK_H
APT_DECLARE(apt_bool_t) apt_task_start(apt_task_t *task);
/**
- * Terminate task.
- * @param task the task to terminate
- * @param wait_till_complete whether to wait for task to complete or
- * process termination asynchronously
+ * Take task offline.
+ * @param task the task to take offline
*/
-APT_DECLARE(apt_bool_t) apt_task_terminate(apt_task_t *task, apt_bool_t wait_till_complete);
+APT_DECLARE(apt_bool_t) apt_task_offline(apt_task_t *task);
/**
- * Start child tasks.
- * @param task the parent task
+ * Bring task online.
+ * @param task the task to bring online
*/
-APT_DECLARE(apt_bool_t) apt_task_child_start(apt_task_t *task);
+APT_DECLARE(apt_bool_t) apt_task_online(apt_task_t *task);
/**
- * Terminate child tasks.
- * @param task the parent task
+ * Terminate task.
+ * @param task the task to terminate
+ * @param wait_till_complete whether to wait for task to complete or
+ * process termination asynchronously
*/
-APT_DECLARE(apt_bool_t) apt_task_child_terminate(apt_task_t *task);
+APT_DECLARE(apt_bool_t) apt_task_terminate(apt_task_t *task, apt_bool_t wait_till_complete);
/**
* Wait for task till complete.
*/
APT_DECLARE(apt_bool_t) apt_task_msg_process(apt_task_t *task, apt_task_msg_t *msg);
+/**
+ * Process task start request.
+ * @param task the task being started
+ */
+APT_DECLARE(apt_bool_t) apt_task_start_request_process(apt_task_t *task);
+
+/**
+ * Process task termination request.
+ * @param task the task being terminated
+ */
+APT_DECLARE(apt_bool_t) apt_task_terminate_request_process(apt_task_t *task);
+
+
/**
* Get parent (master) task.
* @param task the task to get parent from
/** Virtual run method*/
apt_task_method_f run;
- /** Virtual signal method */
+ /** Virtual signal_msg method */
apt_bool_t (*signal_msg)(apt_task_t *task, apt_task_msg_t *msg);
- /** Virtual process method */
+ /** Virtual process_msg method */
apt_bool_t (*process_msg)(apt_task_t *task, apt_task_msg_t *msg);
+ /** Virtual process_start method */
+ apt_bool_t (*process_start)(apt_task_t *task);
+ /** Virtual process_terminate method */
+ apt_bool_t (*process_terminate)(apt_task_t *task);
+
/** Virtual pre-run event handler */
apt_task_event_f on_pre_run;
/** Virtual post-run event handler */
apt_task_event_f on_post_run;
- /** Virtual start-request event handler */
- apt_task_event_f on_start_request;
/** Virtual start-complete event handler */
apt_task_event_f on_start_complete;
- /** Virtual terminate-request event handler */
- apt_task_event_f on_terminate_request;
/** Virtual terminate-complete event handler */
apt_task_event_f on_terminate_complete;
+ /** Virtual take-offline-complete event handler */
+ apt_task_event_f on_offline_complete;
+ /** Virtual bring-online-complete event handler */
+ apt_task_event_f on_online_complete;
};
APT_END_EXTERN_C
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_task_msg.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: apt_task_msg.h 2180 2014-09-13 21:17:24Z achaloyan@gmail.com $
*/
#ifndef APT_TASK_MSG_H
/** Enumeration of task message types */
typedef enum {
- TASK_MSG_CORE, /**< core task message type */
- TASK_MSG_USER /**< user defined task messages start from here */
+ TASK_MSG_CORE, /**< core task message type */
+ TASK_MSG_USER /**< user defined task messages start from here */
} apt_task_msg_type_e;
/** Enumeration of core task messages */
typedef enum {
- CORE_TASK_MSG_NONE, /**< indefinite message */
- CORE_TASK_MSG_START_COMPLETE, /**< start-complete message */
- CORE_TASK_MSG_TERMINATE_REQUEST, /**< terminate-request message */
- CORE_TASK_MSG_TERMINATE_COMPLETE /**< terminate-complete message */
+ CORE_TASK_MSG_NONE, /**< indefinite message */
+ CORE_TASK_MSG_START_COMPLETE, /**< start-complete message */
+ CORE_TASK_MSG_TERMINATE_REQUEST, /**< terminate-request message */
+ CORE_TASK_MSG_TERMINATE_COMPLETE, /**< terminate-complete message */
+ CORE_TASK_MSG_TAKEOFFLINE_REQUEST, /**< take-offline-request message */
+ CORE_TASK_MSG_TAKEOFFLINE_COMPLETE, /**< take-offline-complete message */
+ CORE_TASK_MSG_BRINGONLINE_REQUEST, /**< bring-online-request message */
+ CORE_TASK_MSG_BRINGONLINE_COMPLETE, /**< bring-online-complete message */
} apt_core_task_msg_type_e;
/** Opaque task message declaration */
/** Message pool the task message is allocated from */
apt_task_msg_pool_t *msg_pool;
/** Task msg type */
- apt_task_msg_type_e type;
+ int type;
/** Task msg sub type */
int sub_type;
/** Context specific data */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_test_suite.h 1708 2010-05-24 17:03:25Z achaloyan $
+ * $Id: apt_test_suite.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef APT_TEST_SUITE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_text_message.h 1722 2010-06-01 08:40:35Z achaloyan $
+ * $Id: apt_text_message.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef APT_TEXT_MESSAGE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_text_stream.h 1672 2010-04-28 20:37:22Z achaloyan $
+ * $Id: apt_text_stream.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef APT_TEXT_STREAM_H
/** Generate array of name-value pairs */
APT_DECLARE(apt_bool_t) apt_pair_array_generate(const apt_pair_arr_t *arr, apt_str_t *str, apr_pool_t *pool);
-/** Insert array of name-value pairs */
-APT_DECLARE(apt_bool_t) apt_text_pair_array_insert(apt_text_stream_t *stream, const apt_pair_arr_t *arr);
-
/** Parse boolean-value */
APT_DECLARE(apt_bool_t) apt_boolean_value_parse(const apt_str_t *str, apt_bool_t *value);
/** Generate apr_size_t value from pool (buffer is allocated from pool) */
APT_DECLARE(apt_bool_t) apt_boolean_value_generate(apt_bool_t value, apt_str_t *str, apr_pool_t *pool);
-/** Insert boolean-value */
-APT_DECLARE(apt_bool_t) apt_text_boolean_value_insert(apt_text_stream_t *stream, apt_bool_t value);
-
/** Parse apr_size_t value */
APT_DECLARE(apr_size_t) apt_size_value_parse(const apt_str_t *str);
/** Generate apr_size_t value from pool (buffer is allocated from pool) */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_timer_queue.h 1642 2010-04-08 13:37:57Z achaloyan $
+ * $Id: apt_timer_queue.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef APT_TIMER_QUEUE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_consumer_task.c 1708 2010-05-24 17:03:25Z achaloyan $
+ * $Id: apt_consumer_task.c 2224 2014-11-12 00:41:45Z achaloyan@gmail.com $
*/
#include <apr_time.h>
#include "apt_log.h"
struct apt_consumer_task_t {
- void *obj;
- apt_task_t *base;
- apr_queue_t *msg_queue;
+ void *obj;
+ apt_task_t *base;
+ apr_queue_t *msg_queue;
+#if APR_HAS_QUEUE_TIMEOUT
+ apt_timer_queue_t *timer_queue;
+#endif
};
static apt_bool_t apt_consumer_task_msg_signal(apt_task_t *task, apt_task_msg_t *msg);
vtable->run = apt_consumer_task_run;
vtable->signal_msg = apt_consumer_task_msg_signal;
}
+
+#if APR_HAS_QUEUE_TIMEOUT
+ consumer_task->timer_queue = apt_timer_queue_create(pool);
+#endif
+
return consumer_task;
}
return task->base;
}
-APT_DECLARE(apt_task_vtable_t*) apt_consumer_task_vtable_get(apt_consumer_task_t *task)
+APT_DECLARE(apt_task_vtable_t*) apt_consumer_task_vtable_get(const apt_consumer_task_t *task)
{
return apt_task_vtable_get(task->base);
}
return task->obj;
}
+APT_DECLARE(apt_timer_t*) apt_consumer_task_timer_create(
+ apt_consumer_task_t *task,
+ apt_timer_proc_f proc,
+ void *obj,
+ apr_pool_t *pool)
+{
+#if APR_HAS_QUEUE_TIMEOUT
+ return apt_timer_create(task->timer_queue,proc,obj,pool);
+#else
+ return NULL;
+#endif
+}
+
static apt_bool_t apt_consumer_task_msg_signal(apt_task_t *task, apt_task_msg_t *msg)
{
apt_consumer_task_t *consumer_task = apt_task_object_get(task);
void *msg;
apt_bool_t *running;
apt_consumer_task_t *consumer_task;
+#if APR_HAS_QUEUE_TIMEOUT
+ apr_interval_time_t timeout;
+ apr_uint32_t queue_timeout;
+ apr_time_t time_now, time_last = 0;
+#endif
+ const char *task_name;
+
consumer_task = apt_task_object_get(task);
if(!consumer_task) {
return FALSE;
}
+ task_name = apt_task_name_get(consumer_task->base),
running = apt_task_running_flag_get(task);
if(!running) {
}
while(*running) {
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Wait for Messages [%s]",apt_task_name_get(task));
+#if APR_HAS_QUEUE_TIMEOUT
+ if(apt_timer_queue_timeout_get(consumer_task->timer_queue,&queue_timeout) == TRUE) {
+ timeout = (apr_interval_time_t)queue_timeout * 1000;
+ time_last = apr_time_now();
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Wait for Messages [%s] timeout [%u]",
+ task_name, queue_timeout);
+ rv = apr_queue_timedpop(consumer_task->msg_queue,timeout,&msg);
+ }
+ else
+ {
+ timeout = -1;
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Wait for Messages [%s]",task_name);
+ rv = apr_queue_pop(consumer_task->msg_queue,&msg);
+ }
+#else
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Wait for Messages [%s]",task_name);
rv = apr_queue_pop(consumer_task->msg_queue,&msg);
+#endif
if(rv == APR_SUCCESS) {
if(msg) {
apt_task_msg_t *task_msg = msg;
apt_task_msg_process(consumer_task->base,task_msg);
}
}
+ else if(rv != APR_TIMEUP) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Pop Message [%s] status: %d",task_name,rv);
+ }
+
+#if APR_HAS_QUEUE_TIMEOUT
+ if(timeout != -1) {
+ time_now = apr_time_now();
+ if(time_now > time_last) {
+ apt_timer_queue_advance(consumer_task->timer_queue,(apr_uint32_t)((time_now - time_last)/1000));
+ }
+ }
+#endif
}
return TRUE;
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_cyclic_queue.c 1708 2010-05-24 17:03:25Z achaloyan $
+ * $Id: apt_cyclic_queue.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <stdlib.h>
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_dir_layout.c 1524 2010-02-15 20:44:16Z achaloyan $
+ * $Id: apt_dir_layout.c 2204 2014-10-31 01:01:42Z achaloyan@gmail.com $
*/
#include <apr_file_info.h>
+#include <apr_xml.h>
#include "apt_dir_layout.h"
-static apt_dir_layout_t* apt_dir_layout_alloc(apr_pool_t *pool)
+/** Directories layout */
+struct apt_dir_layout_t {
+ /** Array of the directory paths the layout is composed of */
+ const char **paths;
+ /** Number of directories in the layout */
+ apr_size_t count;
+};
+
+/** Default labels matching the entries in configuration */
+static const char *default_labels[APT_LAYOUT_DIR_COUNT] = {
+ "confdir", /* APT_LAYOUT_CONF_DIR */
+ "plugindir", /* APT_LAYOUT_PLUGIN_DIR */
+ "logdir", /* APT_LAYOUT_LOG_DIR */
+ "datadir", /* APT_LAYOUT_DATA_DIR */
+ "vardir", /* APT_LAYOUT_VAR_DIR */
+};
+
+static const char* apt_default_root_dir_path_get(apr_pool_t *pool)
+{
+ char *root_dir_path;
+ char *cur_dir_path;
+ /* Get the current directory */
+ if(apr_filepath_get(&cur_dir_path,APR_FILEPATH_NATIVE,pool) != APR_SUCCESS)
+ return NULL;
+
+ /* Root directory is supposed to be one level up by default */
+ if(apr_filepath_merge(&root_dir_path,cur_dir_path,"../",APR_FILEPATH_NATIVE,pool) != APR_SUCCESS)
+ return FALSE;
+
+ return root_dir_path;
+}
+
+static apt_bool_t apt_dir_layout_path_set_internal(apt_dir_layout_t *dir_layout, apr_size_t dir_entry_id, const char *path)
+{
+ if(dir_entry_id >= dir_layout->count)
+ return FALSE;
+
+ dir_layout->paths[dir_entry_id] = path;
+ return TRUE;
+}
+
+APT_DECLARE(apt_dir_layout_t*) apt_dir_layout_create(apr_pool_t *pool)
+{
+ return apt_dir_layout_create_ext(APT_LAYOUT_DIR_COUNT,pool);
+}
+
+APT_DECLARE(apt_dir_layout_t*) apt_dir_layout_create_ext(apr_size_t count, apr_pool_t *pool)
{
apt_dir_layout_t *dir_layout = (apt_dir_layout_t*) apr_palloc(pool,sizeof(apt_dir_layout_t));
- dir_layout->conf_dir_path = NULL;
- dir_layout->plugin_dir_path = NULL;
- dir_layout->log_dir_path = NULL;
- dir_layout->data_dir_path = NULL;
+ dir_layout->count = count;
+ dir_layout->paths = apr_pcalloc(pool,count*sizeof(char*));
return dir_layout;
}
APT_DECLARE(apt_dir_layout_t*) apt_default_dir_layout_create(const char *root_dir_path, apr_pool_t *pool)
{
- apt_dir_layout_t *dir_layout = apt_dir_layout_alloc(pool);
+ apt_dir_layout_t *dir_layout = apt_dir_layout_create_ext(APT_LAYOUT_DIR_COUNT,pool);
+
+ if(!root_dir_path) {
+ /* If root dir path is not specified, get the default one */
+ root_dir_path = apt_default_root_dir_path_get(pool);
+ }
+
if(root_dir_path) {
- apr_filepath_merge(&dir_layout->conf_dir_path,root_dir_path,"conf",0,pool);
- apr_filepath_merge(&dir_layout->plugin_dir_path,root_dir_path,"plugin",0,pool);
- apr_filepath_merge(&dir_layout->log_dir_path,root_dir_path,"log",0,pool);
- apr_filepath_merge(&dir_layout->data_dir_path,root_dir_path,"data",0,pool);
+ char *path;
+
+ apr_filepath_merge(&path,root_dir_path,"conf",APR_FILEPATH_NATIVE,pool);
+ apt_dir_layout_path_set_internal(dir_layout,APT_LAYOUT_CONF_DIR,path);
+
+ apr_filepath_merge(&path,root_dir_path,"plugin",APR_FILEPATH_NATIVE,pool);
+ apt_dir_layout_path_set_internal(dir_layout,APT_LAYOUT_PLUGIN_DIR,path);
+
+ apr_filepath_merge(&path,root_dir_path,"log",APR_FILEPATH_NATIVE,pool);
+ apt_dir_layout_path_set_internal(dir_layout,APT_LAYOUT_LOG_DIR,path);
+
+ apr_filepath_merge(&path,root_dir_path,"data",APR_FILEPATH_NATIVE,pool);
+ apt_dir_layout_path_set_internal(dir_layout,APT_LAYOUT_DATA_DIR,path);
+
+ apr_filepath_merge(&path,root_dir_path,"var",APR_FILEPATH_NATIVE,pool);
+ apt_dir_layout_path_set_internal(dir_layout,APT_LAYOUT_VAR_DIR,path);
}
return dir_layout;
}
const char *plugin_dir_path,
const char *log_dir_path,
const char *data_dir_path,
+ const char *var_dir_path,
apr_pool_t *pool)
{
- apt_dir_layout_t *dir_layout = apt_dir_layout_alloc(pool);
- if(conf_dir_path) {
- dir_layout->conf_dir_path = apr_pstrdup(pool,conf_dir_path);
- }
- if(plugin_dir_path) {
- dir_layout->plugin_dir_path = apr_pstrdup(pool,plugin_dir_path);
+ apt_dir_layout_t *dir_layout = apt_dir_layout_create_ext(APT_LAYOUT_DIR_COUNT,pool);
+
+ apt_dir_layout_path_set(dir_layout,APT_LAYOUT_CONF_DIR,conf_dir_path,pool);
+ apt_dir_layout_path_set(dir_layout,APT_LAYOUT_PLUGIN_DIR,plugin_dir_path,pool);
+ apt_dir_layout_path_set(dir_layout,APT_LAYOUT_LOG_DIR,log_dir_path,pool);
+ apt_dir_layout_path_set(dir_layout,APT_LAYOUT_DATA_DIR,data_dir_path,pool);
+ apt_dir_layout_path_set(dir_layout,APT_LAYOUT_VAR_DIR,log_dir_path,pool);
+
+ return dir_layout;
+}
+
+static apt_bool_t apt_dir_entry_id_by_label(const char **labels, apr_size_t count, const char *name, apr_size_t *id)
+{
+ apr_size_t i;
+ for(i=0; i<count; i++) {
+ if(strcasecmp(labels[i],name) == 0) {
+ if(id)
+ *id = i;
+ return TRUE;
+ }
}
- if(log_dir_path) {
- dir_layout->log_dir_path = apr_pstrdup(pool,log_dir_path);
+ return FALSE;
+}
+
+static apr_xml_doc* apt_dir_layout_doc_parse(const char *file_path, apr_pool_t *pool)
+{
+ apr_xml_parser *parser = NULL;
+ apr_xml_doc *xml_doc = NULL;
+ apr_file_t *fd = NULL;
+ apr_status_t rv;
+
+ rv = apr_file_open(&fd,file_path,APR_READ|APR_BINARY,0,pool);
+ if(rv != APR_SUCCESS) {
+ return NULL;
}
- if(data_dir_path) {
- dir_layout->data_dir_path = apr_pstrdup(pool,data_dir_path);
+
+ rv = apr_xml_parse_file(pool,&parser,&xml_doc,fd,2000);
+ if(rv != APR_SUCCESS) {
+ xml_doc = NULL;
}
- return dir_layout;
+
+ apr_file_close(fd);
+ return xml_doc;
}
-APT_DECLARE(char*) apt_datadir_filepath_get(const apt_dir_layout_t *dir_layout, const char *file_name, apr_pool_t *pool)
+static APR_INLINE apr_status_t apt_dir_is_path_absolute(const char *path, apr_pool_t *pool)
+{
+ const char *root_path;
+ const char *file_path = path;
+ return apr_filepath_root(&root_path,&file_path,0,pool);
+}
+
+static char* apt_dir_layout_subdir_parse(const char *root_dir_path, const apr_xml_elem *elem, apr_pool_t *pool)
{
- if(dir_layout && dir_layout->data_dir_path && file_name) {
- char *file_path = NULL;
- if(apr_filepath_merge(&file_path,dir_layout->data_dir_path,file_name,0,pool) == APR_SUCCESS) {
- return file_path;
+ char *path;
+ char *full_path = NULL;
+ apr_status_t status;
+
+ if(!elem || !elem->first_cdata.first || !elem->first_cdata.first->text) {
+ return NULL;
+ }
+
+ path = apr_pstrdup(pool,elem->first_cdata.first->text);
+ apr_collapse_spaces(path,path);
+
+ /* Check if path is absolute or relative */
+ status = apt_dir_is_path_absolute(path,pool);
+ if(status == APR_SUCCESS) {
+ /* Absolute path specified */
+ return path;
+ }
+ else if (status == APR_ERELATIVE) {
+ /* Relative path specified -> merge it with the root path */
+ if(apr_filepath_merge(&full_path,root_dir_path,path,APR_FILEPATH_NATIVE,pool) == APR_SUCCESS) {
+ return full_path;
}
}
+
+ /* WARNING: invalid path specified */
return NULL;
}
-APT_DECLARE(char*) apt_confdir_filepath_get(const apt_dir_layout_t *dir_layout, const char *file_name, apr_pool_t *pool)
+APT_DECLARE(apt_bool_t) apt_dir_layout_load(apt_dir_layout_t *dir_layout, const char *config_file, apr_pool_t *pool)
+{
+ return apt_dir_layout_load_ext(dir_layout,config_file,default_labels,APT_LAYOUT_DIR_COUNT,pool);
+}
+
+APT_DECLARE(apt_bool_t) apt_dir_layout_load_ext(apt_dir_layout_t *dir_layout, const char *config_file, const char **labels, apr_size_t count, apr_pool_t *pool)
{
- if(dir_layout && dir_layout->conf_dir_path && file_name) {
- char *file_path = NULL;
- if(apr_filepath_merge(&file_path,dir_layout->conf_dir_path,file_name,0,pool) == APR_SUCCESS) {
- return file_path;
+ apr_xml_doc *doc;
+ const apr_xml_elem *elem;
+ const apr_xml_elem *root;
+ const apr_xml_attr *xml_attr;
+ char *path;
+ const char *root_dir_path = NULL;
+ apr_size_t id;
+
+ if(!dir_layout || !config_file || !labels || !count) {
+ return FALSE;
+ }
+
+ /* Parse XML document */
+ doc = apt_dir_layout_doc_parse(config_file,pool);
+ if(!doc) {
+ return FALSE;
+ }
+
+ root = doc->root;
+
+ /* Match document name */
+ if(!root || strcasecmp(root->name,"dirlayout") != 0) {
+ /* Unknown document */
+ return FALSE;
+ }
+
+ /* Find rootdir attribute */
+ for(xml_attr = root->attr; xml_attr; xml_attr = xml_attr->next) {
+ if(strcasecmp(xml_attr->name, "rootdir") == 0) {
+ root_dir_path = xml_attr->value;
+ break;
}
}
+
+ if(root_dir_path) {
+ /* If root dir path is specified, check if it is absolute or relative */
+ apr_status_t status = apt_dir_is_path_absolute(root_dir_path,pool);
+ if(status == APR_ERELATIVE) {
+ /* Relative path specified -> make it absolute */
+ char *full_path;
+ char *cur_dir_path;
+ /* Get the current directory */
+ if(apr_filepath_get(&cur_dir_path,APR_FILEPATH_NATIVE,pool) != APR_SUCCESS)
+ return FALSE;
+
+ /* Merge it with path specified */
+ if(apr_filepath_merge(&full_path,cur_dir_path,root_dir_path,APR_FILEPATH_NATIVE,pool) != APR_SUCCESS)
+ return FALSE;
+ root_dir_path = full_path;
+ }
+ }
+ else {
+ /* If root dir path is not specified, get the default one */
+ root_dir_path = apt_default_root_dir_path_get(pool);
+ }
+
+ /* Navigate through document */
+ for(elem = root->first_child; elem; elem = elem->next) {
+ if(apt_dir_entry_id_by_label(labels,dir_layout->count,elem->name,&id) == TRUE) {
+ path = apt_dir_layout_subdir_parse(root_dir_path,elem,pool);
+ if(path) {
+ apt_dir_layout_path_set_internal(dir_layout,id,path);
+ }
+ }
+ else {
+ /* Unknown element */
+ }
+ }
+ return TRUE;
+}
+
+APT_DECLARE(apt_bool_t) apt_dir_layout_path_set(apt_dir_layout_t *dir_layout, apr_size_t dir_entry_id, const char *path, apr_pool_t *pool)
+{
+ if(!dir_layout || dir_entry_id >= dir_layout->count || !path)
+ return FALSE;
+
+ dir_layout->paths[dir_entry_id] = apr_pstrdup(pool,path);
+ return TRUE;
+}
+
+APT_DECLARE(const char*) apt_dir_layout_path_get(const apt_dir_layout_t *dir_layout, apr_size_t dir_entry_id)
+{
+ if(!dir_layout || dir_entry_id >= dir_layout->count)
+ return NULL;
+
+ return dir_layout->paths[dir_entry_id];
+}
+
+APT_DECLARE(char*) apt_dir_layout_path_compose(const apt_dir_layout_t *dir_layout, apr_size_t dir_entry_id, const char *file_name, apr_pool_t *pool)
+{
+ char *file_path;
+ if(!dir_layout || dir_entry_id >= dir_layout->count)
+ return NULL;
+
+ if(apr_filepath_merge(&file_path,dir_layout->paths[dir_entry_id],file_name,APR_FILEPATH_NATIVE,pool) == APR_SUCCESS) {
+ return file_path;
+ }
return NULL;
}
+
+APT_DECLARE(char*) apt_confdir_filepath_get(const apt_dir_layout_t *dir_layout, const char *file_name, apr_pool_t *pool)
+{
+ return apt_dir_layout_path_compose(dir_layout,APT_LAYOUT_CONF_DIR,file_name,pool);
+}
+
+APT_DECLARE(char*) apt_datadir_filepath_get(const apt_dir_layout_t *dir_layout, const char *file_name, apr_pool_t *pool)
+{
+ return apt_dir_layout_path_compose(dir_layout,APT_LAYOUT_DATA_DIR,file_name,pool);
+}
+
+APT_DECLARE(char*) apt_vardir_filepath_get(const apt_dir_layout_t *dir_layout, const char *file_name, apr_pool_t *pool)
+{
+ return apt_dir_layout_path_compose(dir_layout,APT_LAYOUT_VAR_DIR,file_name,pool);
+}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_header_field.c 1685 2010-05-06 05:34:54Z achaloyan $
+ * $Id: apt_header_field.c 2223 2014-11-12 00:37:40Z achaloyan@gmail.com $
*/
#include "apt_header_field.h"
apt_string_copy(&header_field->name,&item,pool);
/* read value */
- apt_text_field_read(&stream,0,TRUE,&item);
- apt_string_copy(&header_field->value,&item,pool);
-
+ if(apt_text_field_read(&stream,0,TRUE,&item) == TRUE) {
+ apt_string_copy(&header_field->value,&item,pool);
+ }
+ else {
+ apt_string_reset(&header_field->value);
+ }
+
header_field->id = UNKNOWN_HEADER_FIELD_ID;
APR_RING_ELEM_INIT(header_field,link);
return header_field;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_log.c 1792 2011-01-10 21:08:52Z achaloyan $
+ * $Id: apt_log.c 2198 2014-10-16 01:41:19Z achaloyan@gmail.com $
*/
#include <apr_time.h>
if(!apt_logger) {
return FALSE;
}
- return (apt_logger->mode | mode) ? TRUE : FALSE;
+ return (apt_logger->mode & mode) ? TRUE : FALSE;
}
APT_DECLARE(int) apt_log_output_mode_translate(char *str)
return TRUE;
}
-APT_DECLARE(apt_log_masking_e) apt_log_masking_get()
+APT_DECLARE(apt_log_masking_e) apt_log_masking_get(void)
{
if(!apt_logger) {
return APT_LOG_MASKING_NONE;
return status;
}
-static APR_INLINE unsigned long apt_thread_id_get()
+APT_DECLARE(apt_bool_t) apt_va_log(const char *file, int line, apt_log_priority_e priority, const char *format, va_list arg_ptr)
+{
+ apt_bool_t status = TRUE;
+ if(!apt_logger) {
+ return FALSE;
+ }
+ if(priority <= apt_logger->priority) {
+ if(apt_logger->ext_handler) {
+ status = apt_logger->ext_handler(file,line,NULL,priority,format,arg_ptr);
+ }
+ else {
+ status = apt_do_log(file,line,priority,format,arg_ptr);
+ }
+ }
+ return status;
+}
+
+static APR_INLINE unsigned long apt_thread_id_get(void)
{
#ifdef WIN32
return (unsigned long) GetCurrentThreadId();
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-%"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);
+ const char *log_file_name = apr_psprintf(file_data->pool,"%s-%.2"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,
+ APR_FILEPATH_NATIVE,
+ file_data->pool);
return log_file_path;
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_multipart_content.c 1673 2010-04-28 20:45:47Z achaloyan $
+ * $Id: apt_multipart_content.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <stdlib.h>
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_net.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: apt_net.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <apr_network_io.h>
#include "apt_net.h"
+#include "apt_log.h"
/** Get the IP address (in numeric address string format) by hostname */
apt_bool_t apt_ip_get(char **addr, apr_pool_t *pool)
{
apr_sockaddr_t *sockaddr = NULL;
- char *hostname = apr_palloc(pool,APRMAXHOSTLEN+1);
- if(apr_gethostname(hostname,APRMAXHOSTLEN,pool) != APR_SUCCESS) {
+ char hostname[APRMAXHOSTLEN+1];
+ if(apr_gethostname(hostname,sizeof(hostname),pool) != APR_SUCCESS) {
return FALSE;
}
if(apr_sockaddr_info_get(&sockaddr,hostname,APR_INET,0,0,pool) != APR_SUCCESS) {
return TRUE;
}
+#ifdef WIN32
+#include <iphlpapi.h>
+#pragma comment(lib, "IPHLPAPI.lib")
+#else
+#include <netdb.h>
+#include <ifaddrs.h>
+#endif
+
+/** Get the IP address (in numeric address string format) by network interface name */
+apt_bool_t apt_ip_get_by_iface(const char *iface_name, char **addr, apr_pool_t *pool)
+{
+ apt_bool_t status = FALSE;
+#ifdef WIN32
+ /* See the usage of GetAdaptersInfo().
+ * http://msdn.microsoft.com/en-us/library/windows/desktop/aa366314%28v=vs.85%29.aspx
+ */
+ IP_ADAPTER_INFO *pAdapterInfo;
+ PIP_ADAPTER_INFO pAdapter;
+ ULONG ulOutBufLen;
+ DWORD dwRetVal;
+
+ pAdapterInfo = (IP_ADAPTER_INFO *) malloc(sizeof(IP_ADAPTER_INFO));
+ ulOutBufLen = sizeof(IP_ADAPTER_INFO);
+
+ /* Make an initial call to GetAdaptersInfo to get the size needed into the ulOutBufLen variable. */
+ if(GetAdaptersInfo(pAdapterInfo, &ulOutBufLen) != ERROR_SUCCESS) {
+ free(pAdapterInfo);
+ pAdapterInfo = (IP_ADAPTER_INFO *) malloc(ulOutBufLen);
+ }
+
+ /* Make a second call to GetAdaptersInfo, passing pAdapterInfo and ulOutBufLen as parameters. */
+ if((dwRetVal = GetAdaptersInfo(pAdapterInfo, &ulOutBufLen)) != ERROR_SUCCESS) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Adapters Info %d", dwRetVal);
+ return FALSE;
+ }
+
+ /* Walk through linked list, maintaining head pointer. */
+ pAdapter = pAdapterInfo;
+ while(pAdapter) {
+ /* Match human readable description with specified name. */
+ if(strcasecmp(pAdapter->Description,iface_name) == 0) {
+ *addr = apr_pstrdup(pool,pAdapter->IpAddressList.IpAddress.String);
+ status = TRUE;
+ break;
+ }
+
+ pAdapter = pAdapter->Next;
+ }
+
+ if (pAdapterInfo)
+ free(pAdapterInfo);
+
+#else
+
+ struct ifaddrs *ifaddr, *ifa;
+ int family, n;
+ char host[NI_MAXHOST];
+
+ if(getifaddrs(&ifaddr) == -1) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Interfaces");
+ return FALSE;
+ }
+
+ /* Walk through linked list, maintaining head pointer. */
+ for(ifa = ifaddr, n = 0; ifa != NULL; ifa = ifa->ifa_next, n++) {
+ if(ifa->ifa_addr == NULL) continue;
+
+ family = ifa->ifa_addr->sa_family;
+ if(family == AF_INET || family == AF_INET6) {
+ if(strcasecmp(ifa->ifa_name,iface_name) == 0) {
+ if(getnameinfo(ifa->ifa_addr,
+ (family == AF_INET) ? sizeof(struct sockaddr_in) :
+ sizeof(struct sockaddr_in6),
+ host, NI_MAXHOST,
+ NULL, 0, NI_NUMERICHOST) == 0) {
+ *addr = apr_pstrdup(pool,host);
+ status = TRUE;
+ }
+ else {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Name Info");
+ }
+ break;
+ }
+ }
+ }
+
+ freeifaddrs(ifaddr);
+#endif
+
+ if(status == TRUE) {
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Found Address %s by Interface [%s]", *addr, iface_name);
+ }
+ else {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"No Such Interface Found [%s]", iface_name);
+ }
+ return status;
+}
+
/** Seconds from Jan 1 1900 to Jan 1 1970 */
#define NTP_TIME_OFFSET 2208988800UL
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_nlsml_doc.c 1655 2010-04-16 18:36:27Z achaloyan $
+ * $Id: apt_nlsml_doc.c 2177 2014-09-12 05:36:20Z achaloyan@gmail.com $
*/
+#include <stdlib.h>
+#ifdef WIN32
+#pragma warning(disable: 4127)
+#endif
+#include <apr_ring.h>
+
#include "apt_nlsml_doc.h"
#include "apt_log.h"
+/** NLSML result */
+struct nlsml_result_t
+{
+ /** List of interpretations */
+ APR_RING_HEAD(apt_ir_head_t, nlsml_interpretation_t) interpretations;
+ /** List of enrollment results */
+ APR_RING_HEAD(apt_er_head_t, nlsml_enrollment_result_t) enrollment_results;
+ /** List of verification results */
+ APR_RING_HEAD(apt_vr_head_t, nlsml_verification_result_t) verification_results;
+
+ /** Optional grammar attribute */
+ const char *grammar;
+};
+
+/** NLSML instance */
+struct nlsml_instance_t
+{
+ /** Ring entry */
+ APR_RING_ENTRY(nlsml_instance_t) link;
+
+ /** Instance element */
+ apr_xml_elem *elem;
+};
+
+/** NLSML input */
+struct nlsml_input_t
+{
+ /** Input element */
+ apr_xml_elem *elem;
+ /** Input mode attribute [default: "speech"] */
+ const char *mode;
+ /** Confidence attribute [default: 1.0] */
+ float confidence;
+ /** Timestamp-start attribute */
+ const char *timestamp_start;
+ /** Timestamp-end attribute */
+ const char *timestamp_end;
+};
+
+/** NLSML interpretation */
+struct nlsml_interpretation_t
+{
+ /** Ring entry */
+ APR_RING_ENTRY(nlsml_interpretation_t) link;
+
+ /** List of instances */
+ APR_RING_HEAD(apt_head_t, nlsml_instance_t) instances;
+ /** Input [0..1] */
+ nlsml_input_t *input;
+
+ /** Confidence attribute [default: 1.0] */
+ float confidence;
+ /** Optional grammar attribute */
+ const char *grammar;
+};
+
+struct nlsml_enrollment_result_t
+{
+ /** Ring entry */
+ APR_RING_ENTRY(nlsml_enrollment_result_t) link;
+};
+
+struct nlsml_verification_result_t
+{
+ /** Ring entry */
+ APR_RING_ENTRY(nlsml_verification_result_t) link;
+};
+
/** Load NLSML document */
-APT_DECLARE(apr_xml_doc*) nlsml_doc_load(const apt_str_t *data, apr_pool_t *pool)
+static apr_xml_doc* nlsml_doc_load(const char *data, apr_size_t length, apr_pool_t *pool)
{
apr_xml_parser *parser;
apr_xml_doc *doc = NULL;
const apr_xml_elem *root;
+ if(!data || !length) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"No NLSML data available");
+ return NULL;
+ }
+
/* create XML parser */
parser = apr_xml_parser_create(pool);
- if(apr_xml_parser_feed(parser,data->buf,data->length) != APR_SUCCESS) {
+ if(apr_xml_parser_feed(parser,data,length) != APR_SUCCESS) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to feed NLSML input to the parser");
return NULL;
}
return doc;
}
-/** Get the first <interpretation> element */
-APT_DECLARE(apr_xml_elem*) nlsml_first_interpret_get(const apr_xml_doc *doc)
+/** Parse confidence value */
+static float nlsml_confidence_parse(const char *str)
+{
+ float confidence = (float) atof(str);
+ if(confidence > 1.0)
+ confidence /= 100;
+
+ return confidence;
+}
+
+/** Parse <instance> element */
+static nlsml_instance_t* nlsml_instance_parse(apr_xml_elem *elem, apr_pool_t *pool)
+{
+ /* Initialize instance */
+ nlsml_instance_t *instance = apr_palloc(pool, sizeof(*instance));
+ APR_RING_ELEM_INIT(instance,link);
+ instance->elem = elem;
+
+ return instance;
+}
+
+/** Parse <input> element */
+static nlsml_input_t* nlsml_input_parse(apr_xml_elem *elem, apr_pool_t *pool)
+{
+ const apr_xml_attr *xml_attr;
+ /* Initialize input */
+ nlsml_input_t *input = apr_palloc(pool, sizeof(*input));
+ input->elem = elem;
+ input->mode = "speech";
+ input->confidence = 1.0;
+ input->timestamp_start = NULL;
+ input->timestamp_end = NULL;
+
+ /* Find input attributes */
+ for(xml_attr = elem->attr; xml_attr; xml_attr = xml_attr->next) {
+ if(strcasecmp(xml_attr->name, "mode") == 0) {
+ input->mode = xml_attr->value;
+ }
+ else if(strcasecmp(xml_attr->name, "confidence") == 0) {
+ input->confidence = nlsml_confidence_parse(xml_attr->value);
+ }
+ else if(strcasecmp(xml_attr->name, "timestamp-start") == 0) {
+ input->timestamp_start = xml_attr->value;
+ }
+ else if(strcasecmp(xml_attr->name, "timestamp-end") == 0) {
+ input->timestamp_end = xml_attr->value;
+ }
+ else {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown attribute '%s' for <%s>", xml_attr->name, elem->name);
+ }
+ }
+
+ return input;
+}
+
+/** Parse <interpretation> element */
+static nlsml_interpretation_t* nlsml_interpretation_parse(apr_xml_elem *elem, apr_pool_t *pool)
{
apr_xml_elem *child_elem;
- for(child_elem = doc->root->first_child; child_elem; child_elem = child_elem->next) {
- if(strcmp(child_elem->name,"interpretation") == 0) {
- return child_elem;
+ const apr_xml_attr *xml_attr;
+ nlsml_instance_t *instance;
+ nlsml_input_t *input;
+
+ /* Initialize interpretation */
+ nlsml_interpretation_t *interpretation = apr_palloc(pool, sizeof(*interpretation));
+ APR_RING_ELEM_INIT(interpretation,link);
+ interpretation->grammar = NULL;
+ interpretation->confidence = 1.0;
+ interpretation->input = NULL;
+ APR_RING_INIT(&interpretation->instances, nlsml_instance_t, link);
+
+ /* Find optional grammar and confidence attributes */
+ for(xml_attr = elem->attr; xml_attr; xml_attr = xml_attr->next) {
+ if(strcasecmp(xml_attr->name, "grammar") == 0) {
+ interpretation->grammar = xml_attr->value;
+ }
+ else if(strcasecmp(xml_attr->name, "confidence") == 0) {
+ interpretation->confidence = nlsml_confidence_parse(xml_attr->value);
+ }
+ else {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown attribute '%s' for <%s>", xml_attr->name, elem->name);
+ }
+ }
+
+ /* Find input and instance elements */
+ for(child_elem = elem->first_child; child_elem; child_elem = child_elem->next) {
+ if(strcasecmp(child_elem->name, "input") == 0) {
+ input = nlsml_input_parse(child_elem, pool);
+ if(input) {
+ interpretation->input = input;
+ }
+ }
+ else if(strcasecmp(child_elem->name, "instance") == 0) {
+ instance = nlsml_instance_parse(child_elem, pool);
+ if(instance) {
+ APR_RING_INSERT_TAIL(&interpretation->instances, instance, nlsml_instance_t, link);
+ }
+ }
+ else {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown child element <%s> for <%s>", child_elem->name, elem->name);
}
}
+ return interpretation;
+}
+
+/** Parse <enrollment-result> element */
+static nlsml_enrollment_result_t* nlsml_enrollment_result_parse(const apr_xml_elem *elem, apr_pool_t *pool)
+{
+ /* To be done */
+ return NULL;
+}
+
+/** Parse <verification-result> element */
+static nlsml_verification_result_t* nlsml_verification_result_parse(const apr_xml_elem *elem, apr_pool_t *pool)
+{
+ /* To be done */
return NULL;
}
-/** Get the next <interpretation> element */
-APT_DECLARE(apr_xml_elem*) nlsml_next_interpret_get(const apr_xml_elem *elem)
+/** Parse NLSML result */
+APT_DECLARE(nlsml_result_t*) nlsml_result_parse(const char *data, apr_size_t length, apr_pool_t *pool)
{
+ nlsml_result_t *result;
+ apr_xml_elem *root;
apr_xml_elem *child_elem;
- for(child_elem = elem->next; child_elem; child_elem = child_elem->next) {
- if(strcmp(child_elem->name,"interpretation") == 0) {
- return child_elem;
+ const apr_xml_attr *xml_attr;
+ nlsml_interpretation_t *interpretation;
+ nlsml_enrollment_result_t *enrollment_result;
+ nlsml_verification_result_t *verification_result;
+ apr_xml_doc *doc;
+ /* Load XML document */
+ doc = nlsml_doc_load(data, length, pool);
+ if(!doc)
+ return NULL;
+
+ root = doc->root;
+
+ /* Initialize result */
+ result = apr_palloc(pool, sizeof(*result));
+ APR_RING_INIT(&result->interpretations, nlsml_interpretation_t, link);
+ APR_RING_INIT(&result->enrollment_results, nlsml_enrollment_result_t, link);
+ APR_RING_INIT(&result->verification_results, nlsml_verification_result_t, link);
+ result->grammar = NULL;
+
+ /* Find optional grammar attribute */
+ for(xml_attr = root->attr; xml_attr; xml_attr = xml_attr->next) {
+ if(strcasecmp(xml_attr->name, "grammar") == 0) {
+ result->grammar = xml_attr->value;
+ }
+ else {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown attribute '%s' for <%s>", xml_attr->name, root->name);
}
}
- return NULL;
+ /* Find interpretation, enrollment-result, or verification-result elements */
+ for(child_elem = root->first_child; child_elem; child_elem = child_elem->next) {
+ if(strcasecmp(child_elem->name, "interpretation") == 0) {
+ interpretation = nlsml_interpretation_parse(child_elem, pool);
+ if(interpretation) {
+ APR_RING_INSERT_TAIL(&result->interpretations, interpretation, nlsml_interpretation_t, link);
+ }
+ }
+ else if(strcasecmp(child_elem->name, "enrollment-result") == 0) {
+ enrollment_result = nlsml_enrollment_result_parse(child_elem, pool);
+ if(enrollment_result) {
+ APR_RING_INSERT_TAIL(&result->enrollment_results, enrollment_result, nlsml_enrollment_result_t, link);
+ }
+ }
+ else if(strcasecmp(child_elem->name, "verification-result") == 0) {
+ verification_result = nlsml_verification_result_parse(child_elem, pool);
+ if(verification_result) {
+ APR_RING_INSERT_TAIL(&result->verification_results, verification_result, nlsml_verification_result_t, link);
+ }
+ }
+ else {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown child element <%s> for <%s>", child_elem->name, root->name);
+ }
+ }
+
+ if(APR_RING_EMPTY(&result->interpretations, nlsml_interpretation_t, link) &&
+ APR_RING_EMPTY(&result->enrollment_results, nlsml_enrollment_result_t, link) &&
+ APR_RING_EMPTY(&result->verification_results, nlsml_verification_result_t, link)) {
+ /* at least one of <interpretation>, <enrollment-result>, <verification-result> MUST be specified */
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Invalid NLSML document: at least one child element MUST be specified for <%s>", root->name);
+ }
+
+ return result;
+}
+
+/** Trace NLSML result (for debug purposes only) */
+APT_DECLARE(void) nlsml_result_trace(const nlsml_result_t *result, apr_pool_t *pool)
+{
+ int interpretation_count;
+ nlsml_interpretation_t *interpretation;
+ int instance_count;
+ nlsml_instance_t *instance;
+ nlsml_input_t *input;
+ const char *instance_data;
+ const char *input_data;
+ const char *timestamp_start;
+ const char *timestamp_end;
+
+ if(result->grammar)
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Result.grammar: %s", result->grammar);
+
+ interpretation_count = 0;
+ interpretation = nlsml_first_interpretation_get(result);
+ while(interpretation) {
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Interpretation[%d].confidence: %.2f", interpretation_count, nlsml_interpretation_confidence_get(interpretation));
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Interpretation[%d].grammar: %s", interpretation_count, nlsml_interpretation_grammar_get(interpretation));
+
+ instance_count = 0;
+ instance = nlsml_interpretation_first_instance_get(interpretation);
+ while(instance) {
+ nlsml_instance_swi_suppress(instance);
+ instance_data = nlsml_instance_content_generate(instance,pool);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Interpretation[%d].instance[%d]: %s", interpretation_count, instance_count, instance_data);
+
+ instance_count++;
+ instance = nlsml_interpretation_next_instance_get(interpretation, instance);
+ }
+
+ input = nlsml_interpretation_input_get(interpretation);
+ if(input) {
+ input_data = nlsml_input_content_generate(input,pool);
+ timestamp_start = nlsml_input_timestamp_start_get(input);
+ timestamp_end = nlsml_input_timestamp_end_get(input);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Interpretation[%d].input: %s", interpretation_count, input_data);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Interpretation[%d].input.mode: %s", interpretation_count, nlsml_input_mode_get(input));
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Interpretation[%d].input.confidence: %.2f", interpretation_count, nlsml_input_confidence_get(input));
+ if(timestamp_start)
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Interpretation[%d].input.timestamp-start: %s", interpretation_count, timestamp_start);
+ if(timestamp_end)
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Interpretation[%d].input.timestamp-end: %s", interpretation_count, timestamp_end);
+ }
+
+ interpretation_count++;
+ interpretation = nlsml_next_interpretation_get(result, interpretation);
+ }
+}
+
+/** Get first interpretation */
+APT_DECLARE(nlsml_interpretation_t*) nlsml_first_interpretation_get(const nlsml_result_t *result)
+{
+ nlsml_interpretation_t *first_interpretation = APR_RING_FIRST(&result->interpretations);
+ if(first_interpretation == APR_RING_SENTINEL(&result->interpretations, nlsml_interpretation_t, link))
+ return NULL;
+ return first_interpretation;
+}
+
+/** Get next interpretation */
+APT_DECLARE(nlsml_interpretation_t*) nlsml_next_interpretation_get(const nlsml_result_t *result, const nlsml_interpretation_t *interpretation)
+{
+ nlsml_interpretation_t *next_interpretation = APR_RING_NEXT(interpretation, link);
+ if(next_interpretation == APR_RING_SENTINEL(&result->interpretations, nlsml_interpretation_t, link))
+ return NULL;
+ return next_interpretation;
+}
+
+/** Get first enrollment result */
+APT_DECLARE(nlsml_enrollment_result_t*) nlsml_first_enrollment_result_get(const nlsml_result_t *result)
+{
+ nlsml_enrollment_result_t *first_enrollment_result = APR_RING_FIRST(&result->enrollment_results);
+ if(first_enrollment_result == APR_RING_SENTINEL(&result->enrollment_results, nlsml_enrollment_result_t, link))
+ return NULL;
+ return first_enrollment_result;
+}
+
+/** Get next enrollment result */
+APT_DECLARE(nlsml_enrollment_result_t*) nlsml_next_enrollment_result_get(const nlsml_result_t *result, const nlsml_enrollment_result_t *enrollment_result)
+{
+ nlsml_enrollment_result_t *next_enrollment_result = APR_RING_NEXT(enrollment_result, link);
+ if(next_enrollment_result == APR_RING_SENTINEL(&result->enrollment_results, nlsml_enrollment_result_t, link))
+ return NULL;
+ return next_enrollment_result;
+}
+
+/** Get first verification result */
+APT_DECLARE(nlsml_verification_result_t*) nlsml_first_verification_result_get(const nlsml_result_t *result)
+{
+ nlsml_verification_result_t *first_verification_result = APR_RING_FIRST(&result->verification_results);
+ if(first_verification_result == APR_RING_SENTINEL(&result->verification_results, nlsml_verification_result_t, link))
+ return NULL;
+ return first_verification_result;
+}
+
+/** Get next verification result */
+APT_DECLARE(nlsml_verification_result_t*) nlsml_next_verification_result_get(const nlsml_result_t *result, const nlsml_verification_result_t *verification_result)
+{
+ nlsml_verification_result_t *next_verification_result = APR_RING_NEXT(verification_result, link);
+ if(next_verification_result == APR_RING_SENTINEL(&result->verification_results, nlsml_verification_result_t, link))
+ return NULL;
+ return next_verification_result;
}
-/** Get <instance> and <input> elements of <interpretation> element */
-APT_DECLARE(apt_bool_t) nlsml_interpret_results_get(const apr_xml_elem *interpret, apr_xml_elem **instance, apr_xml_elem **input)
+/** Get grammar attribute of NLSML result */
+APT_DECLARE(const char*) nlsml_result_grammar_get(const nlsml_result_t *result)
+{
+ return result->grammar;
+}
+
+/** Get first instance */
+APT_DECLARE(nlsml_instance_t*) nlsml_interpretation_first_instance_get(const nlsml_interpretation_t *interpretation)
+{
+ nlsml_instance_t *first_instance = APR_RING_FIRST(&interpretation->instances);
+ if(first_instance == APR_RING_SENTINEL(&interpretation->instances, nlsml_instance_t, link))
+ return NULL;
+ return first_instance;
+}
+
+/** Get next instance */
+APT_DECLARE(nlsml_instance_t*) nlsml_interpretation_next_instance_get(const nlsml_interpretation_t *interpretation, const nlsml_instance_t *instance)
+{
+ nlsml_instance_t *next_instance = APR_RING_NEXT(instance, link);
+ if(next_instance == APR_RING_SENTINEL(&interpretation->instances, nlsml_instance_t, link))
+ return NULL;
+ return next_instance;
+}
+
+/** Get input */
+APT_DECLARE(nlsml_input_t*) nlsml_interpretation_input_get(const nlsml_interpretation_t *interpretation)
+{
+ return interpretation->input;
+}
+
+/** Get interpretation confidence */
+APT_DECLARE(float) nlsml_interpretation_confidence_get(const nlsml_interpretation_t *interpretation)
+{
+ return interpretation->confidence;
+}
+
+/** Get interpretation grammar */
+APT_DECLARE(const char*) nlsml_interpretation_grammar_get(const nlsml_interpretation_t *interpretation)
+{
+ return interpretation->grammar;
+}
+
+/** Get instance element */
+APT_DECLARE(const apr_xml_elem*) nlsml_instance_elem_get(const nlsml_instance_t *instance)
+{
+ return instance->elem;
+}
+
+/** Suppress SWI elements (normalize instance) */
+APT_DECLARE(apt_bool_t) nlsml_instance_swi_suppress(nlsml_instance_t *instance)
{
apr_xml_elem *child_elem;
- *input = NULL;
- *instance = NULL;
- for(child_elem = interpret->first_child; child_elem; child_elem = child_elem->next) {
- if(strcmp(child_elem->name,"input") == 0) {
- *input = child_elem;
+ apr_xml_elem *prev_elem = NULL;
+ apr_xml_elem *swi_literal = NULL;
+ apt_bool_t remove;
+ if(!instance->elem)
+ return FALSE;
+
+ for(child_elem = instance->elem->first_child; child_elem; child_elem = child_elem->next) {
+ remove = FALSE;
+ if(strcasecmp(child_elem->name,"SWI_literal") == 0) {
+ swi_literal = child_elem;
+ remove = TRUE;
+ }
+ else if(strcasecmp(child_elem->name,"SWI_meaning") == 0) {
+ remove = TRUE;
}
- else if(strcmp(child_elem->name,"instance") == 0) {
- *instance = child_elem;
+
+ if(remove == TRUE) {
+ if(child_elem == instance->elem->first_child) {
+ instance->elem->first_child = child_elem->next;
+ }
+ else if(prev_elem) {
+ prev_elem->next = child_elem->next;
+ }
}
+
+ prev_elem = child_elem;
}
+
+ if(APR_XML_ELEM_IS_EMPTY(instance->elem) && swi_literal) {
+ instance->elem->first_cdata = swi_literal->first_cdata;
+ }
+
return TRUE;
}
-/** Get specified atrribute of <input> */
-APT_DECLARE(const char *) nlsml_input_attrib_get(const apr_xml_elem *input, const char *attrib, apt_bool_t recursive)
+/** Generate a plain text content of the instance element */
+APT_DECLARE(const char*) nlsml_instance_content_generate(const nlsml_instance_t *instance, apr_pool_t *pool)
{
- const apr_xml_attr *xml_attr;
- for(xml_attr = input->attr; xml_attr; xml_attr = xml_attr->next) {
- if(strcasecmp(xml_attr->name,attrib) == 0) {
- return xml_attr->value;
- }
+ const char *buf = NULL;
+ if(instance->elem) {
+ apr_size_t size;
+ apr_xml_to_text(pool, instance->elem, APR_XML_X2T_INNER, NULL, NULL, &buf, &size);
}
+ return buf;
+}
+
+/** Get input element */
+APT_DECLARE(const apr_xml_elem*) nlsml_input_elem_get(const nlsml_input_t *input)
+{
+ return input->elem;
+}
- if(recursive && input->parent) {
- return nlsml_input_attrib_get(input->parent,attrib,recursive);
+/** Generate a plain text content of the input element */
+APT_DECLARE(const char*) nlsml_input_content_generate(const nlsml_input_t *input, apr_pool_t *pool)
+{
+ const char *buf = NULL;
+ if(input->elem) {
+ apr_size_t size;
+ apr_xml_to_text(pool, input->elem, APR_XML_X2T_INNER, NULL, NULL, &buf, &size);
}
+ return buf;
+}
- return NULL;
+/** Get input mode */
+APT_DECLARE(const char*) nlsml_input_mode_get(const nlsml_input_t *input)
+{
+ return input->mode;
+}
+
+/** Get input confidence */
+APT_DECLARE(float) nlsml_input_confidence_get(const nlsml_input_t *input)
+{
+ return input->confidence;
+}
+
+/** Get start of input timestamp */
+APT_DECLARE(const char*) nlsml_input_timestamp_start_get(const nlsml_input_t *input)
+{
+ return input->timestamp_start;
+}
+
+/** Get end of input timestamp */
+APT_DECLARE(const char*) nlsml_input_timestamp_end_get(const nlsml_input_t *input)
+{
+ return input->timestamp_end;
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_obj_list.c 1708 2010-05-24 17:03:25Z achaloyan $
+ * $Id: apt_obj_list.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifdef WIN32
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_pair.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: apt_pair.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "apt_pair.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_poller_task.c 1708 2010-05-24 17:03:25Z achaloyan $
+ * $Id: apt_poller_task.c 2224 2014-11-12 00:41:45Z achaloyan@gmail.com $
*/
#include "apt_poller_task.h"
apt_cyclic_queue_t *msg_queue;
apt_pollset_t *pollset;
apt_timer_queue_t *timer_queue;
+
+ apr_pollfd_t *desc_arr;
+ apr_int32_t desc_count;
+ apr_int32_t desc_index;
+
};
static apt_bool_t apt_poller_task_msg_signal(apt_task_t *task, apt_task_msg_t *msg);
apr_thread_mutex_create(&task->guard,APR_THREAD_MUTEX_UNNESTED,pool);
task->timer_queue = apt_timer_queue_create(pool);
+ task->desc_arr = NULL;
+ task->desc_count = 0;
+ task->desc_index = 0;
return task;
}
}
/** Get task vtable */
-APT_DECLARE(apt_task_vtable_t*) apt_poller_task_vtable_get(apt_poller_task_t *task)
+APT_DECLARE(apt_task_vtable_t*) apt_poller_task_vtable_get(const apt_poller_task_t *task)
{
return apt_task_vtable_get(task->base);
}
return task->obj;
}
-/** Get pollset */
-APT_DECLARE(apt_pollset_t*) apt_poller_task_pollset_get(const apt_poller_task_t *task)
+/** Add descriptor to pollset */
+APT_DECLARE(apt_bool_t) apt_poller_task_descriptor_add(const apt_poller_task_t *task, const apr_pollfd_t *descriptor)
{
- return task->pollset;
+ if(task->pollset) {
+ return apt_pollset_add(task->pollset,descriptor);
+ }
+ return FALSE;
+}
+
+/** Remove descriptor from pollset */
+APT_DECLARE(apt_bool_t) apt_poller_task_descriptor_remove(const apt_poller_task_t *task, const apr_pollfd_t *descriptor)
+{
+ if(task->pollset) {
+ apr_int32_t i = task->desc_index + 1;
+ for(; i < task->desc_count; i++) {
+ apr_pollfd_t *cur_descriptor = &task->desc_arr[i];
+ if(cur_descriptor->client_data == descriptor->client_data) {
+ cur_descriptor->client_data = NULL;
+ }
+ }
+ return apt_pollset_remove(task->pollset,descriptor);
+ }
+ return FALSE;
}
/** Create timer */
apt_poller_task_t *task = apt_task_object_get(base);
apt_bool_t *running;
apr_status_t status;
- apr_int32_t num;
- const apr_pollfd_t *ret_pfd;
apr_interval_time_t timeout;
apr_uint32_t queue_timeout;
apr_time_t time_now, time_last = 0;
- int i;
const char *task_name;
if(!task) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Start Poller Task");
return FALSE;
}
- task_name = apt_task_name_get(task->base),
+ task_name = apt_task_name_get(task->base);
running = apt_task_running_flag_get(task->base);
if(!running) {
while(*running) {
if(apt_timer_queue_timeout_get(task->timer_queue,&queue_timeout) == TRUE) {
- timeout = queue_timeout * 1000;
+ timeout = (apr_interval_time_t)queue_timeout * 1000;
time_last = apr_time_now();
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Wait for Messages [%s] timeout [%u]",
task_name, queue_timeout);
timeout = -1;
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Wait for Messages [%s]",task_name);
}
- status = apt_pollset_poll(task->pollset, timeout, &num, &ret_pfd);
+ status = apt_pollset_poll(task->pollset, timeout, &task->desc_count, (const apr_pollfd_t **) &task->desc_arr);
if(status != APR_SUCCESS && status != APR_TIMEUP) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Poll [%s] status: %d",task_name,status);
continue;
}
- for(i = 0; i < num; i++) {
- if(apt_pollset_is_wakeup(task->pollset,&ret_pfd[i])) {
+ for(task->desc_index = 0; task->desc_index < task->desc_count; task->desc_index++) {
+ const apr_pollfd_t *descriptor = &task->desc_arr[task->desc_index];
+ if(apt_pollset_is_wakeup(task->pollset,descriptor)) {
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Process Poller Wakeup [%s]",task_name);
apt_poller_task_wakeup_process(task);
if(*running == FALSE) {
}
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Process Signalled Descriptor [%s]",task_name);
- task->signal_handler(task->obj,&ret_pfd[i]);
+ task->signal_handler(task->obj,descriptor);
}
if(timeout != -1) {
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_pollset.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: apt_pollset.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <apr_poll.h>
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_pool.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: apt_pool.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "apt_pool.h"
+#include "apt_log.h"
#define OWN_ALLOCATOR_PER_POOL
+static int apt_abort_fn(int retcode)
+{
+ apt_log(APT_LOG_MARK,APT_PRIO_CRITICAL,"APR Abort Called [%d]", retcode);
+ return 0;
+}
+
APT_DECLARE(apr_pool_t*) apt_pool_create()
{
apr_pool_t *pool = NULL;
apr_thread_mutex_t *mutex = NULL;
if(apr_allocator_create(&allocator) == APR_SUCCESS) {
- if(apr_pool_create_ex(&pool,NULL,NULL,allocator) == APR_SUCCESS) {
+ if(apr_pool_create_ex(&pool,NULL,apt_abort_fn,allocator) == APR_SUCCESS) {
apr_allocator_owner_set(allocator,pool);
apr_thread_mutex_create(&mutex,APR_THREAD_MUTEX_NESTED,pool);
apr_allocator_mutex_set(allocator,mutex);
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_string_table.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: apt_string_table.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <ctype.h>
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_task.c 1696 2010-05-20 15:44:16Z achaloyan $
+ * $Id: apt_task.c 2219 2014-11-11 02:35:14Z achaloyan@gmail.com $
*/
+#ifdef WIN32
+#pragma warning(disable: 4127)
+#endif
+#include <apr_ring.h>
#include <apr_thread_proc.h>
#include <apr_thread_cond.h>
+#include <apr_portable.h>
#include "apt_task.h"
-#include "apt_obj_list.h"
#include "apt_log.h"
/** Internal states of the task */
} apt_task_state_e;
struct apt_task_t {
+ APR_RING_ENTRY(apt_task_t) link; /* entry to parent task ring */
+ APR_RING_HEAD(apt_task_head_t, apt_task_t) head; /* head of child tasks ring */
+
+ const char *name; /* name of the task */
void *obj; /* external object associated with the task */
apr_pool_t *pool; /* memory pool to allocate task data from */
apt_task_msg_pool_t *msg_pool; /* message pool to allocate task messages from */
apt_task_state_e state; /* current task state */
apt_task_vtable_t vtable; /* table of virtual methods */
apt_task_t *parent_task; /* parent (master) task */
- apt_obj_list_t *child_tasks; /* list of the child (slave) tasks */
apr_size_t pending_start; /* number of pending start requests */
apr_size_t pending_term; /* number of pending terminate requests */
+ apr_size_t pending_off; /* number of pending taking-offline requests */
+ apr_size_t pending_on; /* number of pending bringing-online requests */
apt_bool_t running; /* task is running (TRUE if even terminate has already been requested) */
apt_bool_t auto_ready; /* if TRUE, task is implicitly ready to process messages */
- const char *name; /* name of the task */
};
static void* APR_THREAD_FUNC apt_task_run(apr_thread_t *thread_handle, void *data);
static APR_INLINE void apt_task_vtable_reset(apt_task_vtable_t *vtable);
+
+static apt_bool_t apt_task_core_msg_signal(apt_task_t *task, apt_task_msg_pool_t *msg_pool, apt_core_task_msg_type_e type);
+
static apt_bool_t apt_task_terminate_request(apt_task_t *task);
+
+static apt_bool_t apt_task_start_process_internal(apt_task_t *task);
+static apt_bool_t apt_task_terminate_process_internal(apt_task_t *task);
+static apt_bool_t apt_task_offline_request_process(apt_task_t *task);
+static apt_bool_t apt_task_online_request_process(apt_task_t *task);
+
+static apt_bool_t apt_task_offline_request_complete(apt_task_t *task);
+static apt_bool_t apt_task_online_request_complete(apt_task_t *task);
+
static void apt_task_start_complete_raise(apt_task_t *task);
static void apt_task_terminate_complete_raise(apt_task_t *task);
+static void apt_task_offline_complete_raise(apt_task_t *task);
+static void apt_task_online_complete_raise(apt_task_t *task);
APT_DECLARE(apt_task_t*) apt_task_create(
return NULL;
}
- /* reset and copy vtable */
+ /* reset vtable */
apt_task_vtable_reset(&task->vtable);
task->vtable.terminate = apt_task_terminate_request;
+ task->vtable.process_start = apt_task_start_process_internal;
+ task->vtable.process_terminate = apt_task_terminate_process_internal;
+ APR_RING_ELEM_INIT(task, link);
+ APR_RING_INIT(&task->head, apt_task_t, link);
+
task->parent_task = NULL;
- task->child_tasks = apt_list_create(pool);
task->pending_start = 0;
task->pending_term = 0;
+ task->pending_off = 0;
+ task->pending_on = 0;
task->auto_ready = TRUE;
task->name = "Task";
return task;
APT_DECLARE(apt_bool_t) apt_task_destroy(apt_task_t *task)
{
- apt_task_t *child_task = NULL;
- apt_list_elem_t *elem = apt_list_first_elem_get(task->child_tasks);
- /* walk through the list of the child tasks and destroy them */
- while(elem) {
- child_task = apt_list_elem_object_get(elem);
- if(child_task) {
- apt_task_destroy(child_task);
- }
- elem = apt_list_next_elem_get(task->child_tasks,elem);
+ apt_task_t *child_task;
+ APR_RING_FOREACH(child_task, &task->head, apt_task_t, link) {
+ apt_task_destroy(child_task);
}
if(task->state != TASK_STATE_IDLE) {
APT_DECLARE(apt_bool_t) apt_task_add(apt_task_t *task, apt_task_t *child_task)
{
+ if(!child_task)
+ return FALSE;
+
child_task->parent_task = task;
- return (apt_list_push_back(task->child_tasks,child_task, child_task->pool) ? TRUE : FALSE);
+ APR_RING_INSERT_TAIL(&task->head,child_task,apt_task_t,link);
+ return TRUE;
}
APT_DECLARE(apt_bool_t) apt_task_start(apt_task_t *task)
task->state = TASK_STATE_START_REQUESTED;
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Start Task [%s]",task->name);
if(task->vtable.start) {
- /* raise virtual start method */
+ /* invoke virtual start method */
task->vtable.start(task);
}
else {
return status;
}
+APT_DECLARE(apt_bool_t) apt_task_offline(apt_task_t *task)
+{
+ return apt_task_core_msg_signal(task,task->msg_pool,CORE_TASK_MSG_TAKEOFFLINE_REQUEST);
+}
+
+APT_DECLARE(apt_bool_t) apt_task_online(apt_task_t *task)
+{
+ return apt_task_core_msg_signal(task,task->msg_pool,CORE_TASK_MSG_BRINGONLINE_REQUEST);
+}
+
APT_DECLARE(apt_bool_t) apt_task_terminate(apt_task_t *task, apt_bool_t wait_till_complete)
{
apt_bool_t status = FALSE;
apr_thread_mutex_unlock(task->data_guard);
if(task->state == TASK_STATE_TERMINATE_REQUESTED) {
- /* raise virtual terminate method */
+ /* invoke virtual terminate method */
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Terminate Task [%s]",task->name);
if(task->vtable.terminate) {
status = task->vtable.terminate(task);
APT_DECLARE(apt_bool_t) apt_task_msg_signal(apt_task_t *task, apt_task_msg_t *msg)
{
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Signal Message to [%s] [%d;%d]",
- task->name, msg->type, msg->sub_type);
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Signal Message to [%s] ["APT_PTR_FMT";%d;%d]",
+ task->name, msg, msg->type, msg->sub_type);
if(task->vtable.signal_msg) {
- return task->vtable.signal_msg(task,msg);
+ if(task->vtable.signal_msg(task,msg) == TRUE) {
+ return TRUE;
+ }
}
+
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Signal Task Message [%s] [0x%x;%d;%d]",
+ task->name, msg, msg->type, msg->sub_type);
+ apt_task_msg_release(msg);
return FALSE;
}
{
apt_task_t *parent_task = task->parent_task;
if(parent_task) {
- if(parent_task->vtable.signal_msg) {
- return parent_task->vtable.signal_msg(parent_task,msg);
- }
+ return apt_task_msg_signal(parent_task,msg);
}
+
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Null Parent Task [%s]",task->name);
+ apt_task_msg_release(msg);
return FALSE;
}
+static apt_bool_t apt_task_core_msg_signal(apt_task_t *task, apt_task_msg_pool_t *msg_pool, apt_core_task_msg_type_e type)
+{
+ if(task && msg_pool) {
+ apt_task_msg_t *msg = apt_task_msg_acquire(msg_pool);
+ /* signal core task message */
+ msg->type = TASK_MSG_CORE;
+ msg->sub_type = type;
+ return apt_task_msg_signal(task,msg);
+ }
+ return FALSE;
+}
static apt_bool_t apt_core_task_msg_process(apt_task_t *task, apt_task_msg_t *msg)
{
switch(msg->sub_type) {
case CORE_TASK_MSG_START_COMPLETE:
- {
apt_task_start_request_remove(task);
break;
- }
case CORE_TASK_MSG_TERMINATE_REQUEST:
- {
- apt_task_child_terminate(task);
- if(!task->pending_term) {
- task->running = FALSE;
+ if(task->vtable.process_terminate) {
+ task->vtable.process_terminate(task);
}
break;
- }
case CORE_TASK_MSG_TERMINATE_COMPLETE:
- {
apt_task_terminate_request_remove(task);
break;
- }
+ case CORE_TASK_MSG_TAKEOFFLINE_REQUEST:
+ apt_task_offline_request_process(task);
+ break;
+ case CORE_TASK_MSG_TAKEOFFLINE_COMPLETE:
+ apt_task_offline_request_complete(task);
+ break;
+ case CORE_TASK_MSG_BRINGONLINE_REQUEST:
+ apt_task_online_request_process(task);
+ break;
+ case CORE_TASK_MSG_BRINGONLINE_COMPLETE:
+ apt_task_online_request_complete(task);
+ break;
default: break;
}
return TRUE;
APT_DECLARE(apt_bool_t) apt_task_msg_process(apt_task_t *task, apt_task_msg_t *msg)
{
apt_bool_t status = FALSE;
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Process Message [%s] [%d;%d]",
- task->name, msg->type, msg->sub_type);
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Process Message [%s] ["APT_PTR_FMT";%d;%d]",
+ task->name, msg, msg->type, msg->sub_type);
if(msg->type == TASK_MSG_CORE) {
status = apt_core_task_msg_process(task,msg);
}
static apt_bool_t apt_task_terminate_request(apt_task_t *task)
{
- if(task->msg_pool) {
- apt_task_msg_t *msg = apt_task_msg_acquire(task->msg_pool);
- /* signal terminate-request message */
- msg->type = TASK_MSG_CORE;
- msg->sub_type = CORE_TASK_MSG_TERMINATE_REQUEST;
- return apt_task_msg_signal(task,msg);
- }
- return FALSE;
+ return apt_task_core_msg_signal(task,task->msg_pool,CORE_TASK_MSG_TERMINATE_REQUEST);
}
-APT_DECLARE(apt_bool_t) apt_task_child_start(apt_task_t *task)
+APT_DECLARE(apt_bool_t) apt_task_start_request_process(apt_task_t *task)
{
- apt_task_t *child_task = NULL;
- apt_list_elem_t *elem = apt_list_first_elem_get(task->child_tasks);
- task->pending_start = 0;
- if(task->vtable.on_start_request) {
- task->vtable.on_start_request(task);
- }
- /* walk through the list of the child tasks and start them */
- while(elem) {
- child_task = apt_list_elem_object_get(elem);
- if(child_task) {
- if(apt_task_start(child_task) == TRUE) {
- task->pending_start++;
- }
+ return apt_task_start_process_internal(task);
+}
+
+static apt_bool_t apt_task_start_process_internal(apt_task_t *task)
+{
+ apt_task_t *child_task;
+ APR_RING_FOREACH(child_task, &task->head, apt_task_t, link) {
+ if(apt_task_start(child_task) == TRUE) {
+ task->pending_start++;
}
- elem = apt_list_next_elem_get(task->child_tasks,elem);
}
if(!task->pending_start) {
return TRUE;
}
-APT_DECLARE(apt_bool_t) apt_task_child_terminate(apt_task_t *task)
+APT_DECLARE(apt_bool_t) apt_task_terminate_request_process(apt_task_t *task)
{
- apt_task_t *child_task = NULL;
- apt_list_elem_t *elem = apt_list_first_elem_get(task->child_tasks);
- task->pending_term = 0;
- if(task->vtable.on_terminate_request) {
- task->vtable.on_terminate_request(task);
- }
- /* walk through the list of the child tasks and terminate them */
- while(elem) {
- child_task = apt_list_elem_object_get(elem);
- if(child_task) {
+ return apt_task_terminate_process_internal(task);
+}
+
+static apt_bool_t apt_task_terminate_process_internal(apt_task_t *task)
+{
+ apt_task_t *child_task;
+ APR_RING_FOREACH(child_task, &task->head, apt_task_t, link) {
#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++;
- }
+ 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);
+ apt_task_terminate(child_task,TRUE);
#endif
- }
- elem = apt_list_next_elem_get(task->child_tasks,elem);
}
if(!task->pending_term) {
/* no child task to terminate, just raise terminate-complete event */
apt_task_terminate_complete_raise(task);
+ task->running = FALSE;
+ }
+ return TRUE;
+}
+
+static apt_bool_t apt_task_offline_request_process(apt_task_t *task)
+{
+ apt_task_t *child_task;
+ APR_RING_FOREACH(child_task, &task->head, apt_task_t, link) {
+ if(apt_task_offline(child_task) == TRUE) {
+ task->pending_off++;
+ }
+ }
+
+ if(!task->pending_off) {
+ /* no child task, just raise offline-complete event */
+ apt_task_offline_complete_raise(task);
+ }
+ return TRUE;
+}
+
+static apt_bool_t apt_task_online_request_process(apt_task_t *task)
+{
+ apt_task_t *child_task;
+ APR_RING_FOREACH(child_task, &task->head, apt_task_t, link) {
+ if(apt_task_online(child_task) == TRUE) {
+ task->pending_on++;
+ }
+ }
+
+ if(!task->pending_on) {
+ /* no child task, just raise online-complete event */
+ apt_task_online_complete_raise(task);
}
return TRUE;
}
}
/* start child tasks (if any) */
- apt_task_child_start(task);
+ if(task->vtable.process_start) {
+ task->vtable.process_start(task);
+ }
return TRUE;
}
return TRUE;
}
+static apt_bool_t apt_task_offline_request_complete(apt_task_t *task)
+{
+ if(!task->pending_off) {
+ /* error case, no pending request */
+ return FALSE;
+ }
+ task->pending_off--;
+ if(!task->pending_off) {
+ apt_task_offline_complete_raise(task);
+ }
+ return TRUE;
+}
+
+static apt_bool_t apt_task_online_request_complete(apt_task_t *task)
+{
+ if(!task->pending_on) {
+ /* error case, no pending request */
+ return FALSE;
+ }
+ task->pending_on--;
+ if(!task->pending_on) {
+ apt_task_online_complete_raise(task);
+ }
+ return TRUE;
+}
+
static void apt_task_start_complete_raise(apt_task_t *task)
{
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Task Started [%s]",task->name);
if(task->vtable.on_start_complete) {
task->vtable.on_start_complete(task);
}
- if(task->parent_task) {
- if(task->msg_pool) {
- apt_task_msg_t *msg = apt_task_msg_acquire(task->msg_pool);
- /* signal start-complete message */
- msg->type = TASK_MSG_CORE;
- msg->sub_type = CORE_TASK_MSG_START_COMPLETE;
- apt_task_msg_signal(task->parent_task,msg);
- }
- }
+ apt_task_core_msg_signal(task->parent_task,task->msg_pool,CORE_TASK_MSG_START_COMPLETE);
}
static void apt_task_terminate_complete_raise(apt_task_t *task)
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);
- /* signal terminate-complete message */
- msg->type = TASK_MSG_CORE;
- msg->sub_type = CORE_TASK_MSG_TERMINATE_COMPLETE;
- apt_task_msg_signal(task->parent_task,msg);
- }
- }
+ apt_task_core_msg_signal(task->parent_task,task->msg_pool,CORE_TASK_MSG_TERMINATE_COMPLETE);
#endif
}
+static void apt_task_offline_complete_raise(apt_task_t *task)
+{
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Task Taken Offline [%s]",task->name);
+ if(task->vtable.on_offline_complete) {
+ task->vtable.on_offline_complete(task);
+ }
+ apt_task_core_msg_signal(task->parent_task,task->msg_pool,CORE_TASK_MSG_TAKEOFFLINE_COMPLETE);
+}
+
+static void apt_task_online_complete_raise(apt_task_t *task)
+{
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Task Brought Online [%s]",task->name);
+ if(task->vtable.on_online_complete) {
+ task->vtable.on_online_complete(task);
+ }
+ apt_task_core_msg_signal(task->parent_task,task->msg_pool,CORE_TASK_MSG_BRINGONLINE_COMPLETE);
+}
+
static void* APR_THREAD_FUNC apt_task_run(apr_thread_t *thread_handle, void *data)
{
apt_task_t *task = data;
+#if APR_HAS_SETTHREADNAME
+ apr_thread_name_set(task->name);
+#endif
/* raise pre-run event */
if(task->vtable.on_pre_run) {
task->vtable.on_pre_run(task);
if(task->auto_ready == TRUE) {
/* start child tasks (if any) */
- apt_task_child_start(task);
+ if(task->vtable.process_start) {
+ task->vtable.process_start(task);
+ }
}
/* run task */
vtable->run = NULL;
vtable->signal_msg = NULL;
vtable->process_msg = NULL;
+ vtable->process_start = NULL;
+ vtable->process_terminate = NULL;
vtable->on_pre_run = NULL;
vtable->on_post_run = NULL;
- vtable->on_start_request = NULL;
vtable->on_start_complete = NULL;
- vtable->on_terminate_request = NULL;
vtable->on_terminate_complete = NULL;
+ vtable->on_offline_complete = NULL;
+ vtable->on_online_complete = NULL;
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_task_msg.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: apt_task_msg.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <stdlib.h>
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_test_suite.c 1708 2010-05-24 17:03:25Z achaloyan $
+ * $Id: apt_test_suite.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "apt_pool.h"
APT_DECLARE(apt_bool_t) apt_test_framework_suite_add(apt_test_framework_t *framework, apt_test_suite_t *suite)
{
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Add Test Suite [%s]",suite->name);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Add Test Suite [%s]",suite->name.buf);
return (apt_list_push_back(framework->suites,suite,suite->pool) ? TRUE : FALSE);
}
int argc, const char * const *argv)
{
apt_bool_t status = FALSE;
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"----- Run Test Suite [%s] -----",suite->name);
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"----- Run Test Suite [%s] -----",suite->name.buf);
if(suite->tester) {
status = suite->tester(suite,argc,argv);
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_text_message.c 1671 2010-04-28 19:50:29Z achaloyan $
+ * $Id: apt_text_message.c 2218 2014-11-11 02:28:58Z achaloyan@gmail.com $
*/
#include "apt_text_message.h"
apr_size_t folding_length = 0;
apr_array_header_t *folded_lines = NULL;
apt_header_field_t *header_field;
+ apt_str_t temp_line;
apt_str_t *line;
apt_pair_t pair;
/* read name-value pair */
if(!folded_lines) {
folded_lines = apr_array_make(pool,1,sizeof(apt_str_t));
}
- line = apr_array_push(folded_lines);
- apt_text_line_read(stream,line);
- folding_length += line->length;
+ if(apt_text_line_read(stream,&temp_line) == TRUE) {
+ line = apr_array_push(folded_lines);
+ *line = temp_line;
+ folding_length += line->length;
+ }
};
header_field = apt_header_field_alloc(pool);
if(pair.value.length) {
memcpy(header_field->value.buf, pair.value.buf, pair.value.length);
}
-
+
if(folding_length) {
int i;
char *pos = header_field->value.buf + pair.value.length;
}
}
header_field->value.buf[header_field->value.length] = '\0';
-
+
return header_field;
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_text_stream.c 1793 2011-01-10 21:46:14Z achaloyan $
+ * $Id: apt_text_stream.c 2223 2014-11-12 00:37:40Z achaloyan@gmail.com $
*/
#include <stdlib.h>
apt_string_copy(&pair->name,&item,pool);
/* read value */
- apt_text_field_read(&stream,';',TRUE,&item);
- apt_string_copy(&pair->value,&item,pool);
+ if(apt_text_field_read(&stream,';',TRUE,&item) == TRUE) {
+ apt_string_copy(&pair->value,&item,pool);
+ }
+ else {
+ apt_string_reset(&pair->value);
+ }
return TRUE;
}
/** Generate array of name-value pairs */
APT_DECLARE(apt_bool_t) apt_pair_array_generate(const apt_pair_arr_t *arr, apt_str_t *str, apr_pool_t *pool)
-{
- char buf[512];
- apt_text_stream_t stream;
- apt_text_stream_init(&stream,buf,sizeof(buf));
- if(apt_text_pair_array_insert(&stream,arr) == FALSE) {
- return FALSE;
- }
- apt_string_assign_n(str, stream.text.buf, stream.pos - stream.text.buf, pool);
- return TRUE;
-}
-
-
-/** Insert array of name-value pairs */
-APT_DECLARE(apt_bool_t) apt_text_pair_array_insert(apt_text_stream_t *stream, const apt_pair_arr_t *arr)
{
int i;
+ char *pos;
apt_pair_t *pair;
- char *pos = stream->pos;
- if(!arr) {
+ if(!arr || !str) {
return FALSE;
}
+ /* Compute length of string being generated */
+ str->length = 0;
+ for(i=0; i<arr->nelts; i++) {
+ pair = (apt_pair_t*)arr->elts + i;
+ /* name */
+ str->length += pair->name.length;
+ if(pair->value.length) {
+ /* =value */
+ str->length += 1 + pair->value.length;
+ }
+ }
+ if(arr->nelts) {
+ /* ; */
+ str->length += arr->nelts - 1;
+ }
+
+ /* Allocate required string */
+ str->buf = apr_palloc(pool, str->length + 1);
+
+ /* Copy pairs into allocated string */
+ pos = str->buf;
for(i=0; i<arr->nelts; i++) {
pair = (apt_pair_t*)arr->elts + i;
if(i != 0) {
}
}
}
- stream->pos = pos;
+ *pos = '\0';
return TRUE;
}
return TRUE;
}
-/** Generate boolean-value */
-APT_DECLARE(apt_bool_t) apt_boolean_value_insert(apt_text_stream_t *stream, apt_bool_t value)
-{
- if(value == TRUE) {
- if(stream->pos + TOKEN_TRUE_LENGTH >= stream->end) {
- return FALSE;
- }
- memcpy(stream->pos,TOKEN_TRUE,TOKEN_TRUE_LENGTH);
- stream->pos += TOKEN_TRUE_LENGTH;
- }
- else {
- if(stream->pos + TOKEN_FALSE_LENGTH >= stream->end) {
- return FALSE;
- }
- memcpy(stream->pos,TOKEN_FALSE,TOKEN_FALSE_LENGTH);
- stream->pos += TOKEN_FALSE_LENGTH;
- }
- return TRUE;
-}
-
/** Parse size_t value */
APT_DECLARE(apr_size_t) apt_size_value_parse(const apt_str_t *str)
/** Generate completion-cause */
APT_DECLARE(apt_bool_t) apt_completion_cause_generate(const apt_str_table_item_t table[], apr_size_t size, apr_size_t cause, apt_str_t *str, apr_pool_t *pool)
{
- char buf[256];
- int length;
const apt_str_t *name = apt_string_table_str_get(table,size,cause);
if(!name) {
return FALSE;
}
- length = sprintf(buf,"%03"APR_SIZE_T_FMT" ",cause);
- if(length <= 0) {
+
+ /* 3 digits + 1 space + name->length */
+ str->length = 4 + name->length;
+ str->buf = apr_palloc(pool,str->length + 1);
+
+ if(sprintf(str->buf,"%03"APR_SIZE_T_FMT" ",cause) != 4) {
return FALSE;
}
- memcpy(buf+length,name->buf,name->length);
- apt_string_assign_n(str,buf,name->length + length,pool);
+ memcpy(str->buf+4,name->buf,name->length);
+ str->buf[str->length] = '\0';
return TRUE;
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: apt_timer_queue.c 1665 2010-04-25 05:03:26Z achaloyan $
+ * $Id: apt_timer_queue.c 2174 2014-09-12 03:33:16Z achaloyan@gmail.com $
*/
#ifdef WIN32
void *obj;
};
+static apt_bool_t apt_timer_insert(apt_timer_queue_t *timer_queue, apt_timer_t *timer);
+static apt_bool_t apt_timer_remove(apt_timer_queue_t *timer_queue, apt_timer_t *timer);
static void apt_timers_reschedule(apt_timer_queue_t *timer_queue);
/** Create timer queue */
/** Destroy timer queue */
APT_DECLARE(void) apt_timer_queue_destroy(apt_timer_queue_t *timer_queue)
{
+ /* nothing to destroy */
}
/** Advance scheduled timers */
/* increment elapsed time */
timer_queue->elapsed_time += elapsed_time;
if(timer_queue->elapsed_time >= 0xFFFF) {
+#ifdef APT_TIMER_DEBUG
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Reschedule Timers [%u]",timer_queue->elapsed_time);
+#endif
apt_timers_reschedule(timer_queue);
}
/* scheduled time is not elapsed yet */
break;
}
-
+
+#ifdef APT_TIMER_DEBUG
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Timer Elapsed 0x%x [%u]",timer,timer->scheduled_time);
+#endif
/* remove the elapsed timer from the list */
APR_RING_REMOVE(timer, link);
timer->scheduled_time = 0;
if(!timer) {
return FALSE;
}
-
+
*timeout = timer->scheduled_time - timer_queue->elapsed_time;
return TRUE;
}
-
/** Create timer */
APT_DECLARE(apt_timer_t*) apt_timer_create(apt_timer_queue_t *timer_queue, apt_timer_proc_f proc, void *obj, apr_pool_t *pool)
{
apt_timer_t *timer = apr_palloc(pool,sizeof(apt_timer_t));
+ APR_RING_ELEM_INIT(timer,link);
timer->queue = timer_queue;
timer->scheduled_time = 0;
timer->proc = proc;
return timer;
}
-static APR_INLINE apt_bool_t apt_timer_insert(apt_timer_queue_t *timer_queue, apt_timer_t *timer)
-{
- apt_timer_t *it;
- for(it = APR_RING_LAST(&timer_queue->head);
- it != APR_RING_SENTINEL(&timer_queue->head, apt_timer_t, link);
- it = APR_RING_PREV(it, link)) {
-
- if(it->scheduled_time <= timer->scheduled_time) {
- APR_RING_INSERT_AFTER(it,timer,link);
- return TRUE;
- }
- }
- APR_RING_INSERT_HEAD(&timer_queue->head,timer,apt_timer_t,link);
- return TRUE;
-}
-
/** Set one-shot timer */
APT_DECLARE(apt_bool_t) apt_timer_set(apt_timer_t *timer, apr_uint32_t timeout)
if(timeout <= 0 || !timer->proc) {
return FALSE;
}
-
+
+ if(timer->scheduled_time) {
+ /* remove timer first */
+ apt_timer_remove(queue,timer);
+ }
+
/* calculate time to elapse */
timer->scheduled_time = queue->elapsed_time + timeout;
+#ifdef APT_TIMER_DEBUG
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Set Timer 0x%x [%u]",timer,timer->scheduled_time);
-
+#endif
if(APR_RING_EMPTY(&queue->head, apt_timer_t, link)) {
APR_RING_INSERT_TAIL(&queue->head,timer,apt_timer_t,link);
return TRUE;
/** Kill timer */
APT_DECLARE(apt_bool_t) apt_timer_kill(apt_timer_t *timer)
{
- apt_timer_queue_t *queue = timer->queue;
-
if(!timer->scheduled_time) {
return FALSE;
}
+#ifdef APT_TIMER_DEBUG
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Kill Timer 0x%x [%u]",timer,timer->scheduled_time);
+#endif
+ return apt_timer_remove(timer->queue,timer);
+}
+
+static apt_bool_t apt_timer_insert(apt_timer_queue_t *timer_queue, apt_timer_t *timer)
+{
+ apt_timer_t *it;
+ for(it = APR_RING_LAST(&timer_queue->head);
+ it != APR_RING_SENTINEL(&timer_queue->head, apt_timer_t, link);
+ it = APR_RING_PREV(it, link)) {
+
+ if(it->scheduled_time <= timer->scheduled_time) {
+ APR_RING_INSERT_AFTER(it,timer,link);
+ return TRUE;
+ }
+ }
+ APR_RING_INSERT_HEAD(&timer_queue->head,timer,apt_timer_t,link);
+ return TRUE;
+}
+
+static apt_bool_t apt_timer_remove(apt_timer_queue_t *timer_queue, apt_timer_t *timer)
+{
/* remove node (timer) from the list */
APR_RING_REMOVE(timer,link);
timer->scheduled_time = 0;
- if(APR_RING_EMPTY(&queue->head, apt_timer_t, link)) {
+ if(APR_RING_EMPTY(&timer_queue->head, apt_timer_t, link)) {
/* reset elapsed time if no timers set */
- queue->elapsed_time = 0;
+ timer_queue->elapsed_time = 0;
}
return TRUE;
}
-static void apt_timers_reschedule(apt_timer_queue_t *queue)
+static void apt_timers_reschedule(apt_timer_queue_t *timer_queue)
{
apt_timer_t *it;
- for(it = APR_RING_LAST(&queue->head);
- it != APR_RING_SENTINEL(&queue->head, apt_timer_t, link);
+ for(it = APR_RING_LAST(&timer_queue->head);
+ it != APR_RING_SENTINEL(&timer_queue->head, apt_timer_t, link);
it = APR_RING_PREV(it, link)) {
-
- it->scheduled_time -= queue->elapsed_time;
+
+ it->scheduled_time -= timer_queue->elapsed_time;
}
- queue->elapsed_time = 0;
+ timer_queue->elapsed_time = 0;
}
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = -I$(top_srcdir)/libs/mpf/codecs \
-I$(top_srcdir)/libs/mpf/include \
-I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+ $(UNIMRCP_APR_INCLUDES)
noinst_LTLIBRARIES = libmpf.la
include/mpf_dtmf_detector.h \
include/mpf_dtmf_generator.h \
include/mpf_engine.h \
+ include/mpf_engine_factory.h \
include/mpf_frame.h \
include/mpf_frame_buffer.h \
include/mpf_message.h \
src/mpf_dtmf_detector.c \
src/mpf_dtmf_generator.c \
src/mpf_engine.c \
+ src/mpf_engine_factory.c \
src/mpf_mixer.c \
src/mpf_multiplier.c \
src/mpf_named_event.c \
*
*/
-/*! \file */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#ifndef _MSC_VER
-#include <inttypes.h>
-#ifdef HAVE_TGMATH_H
-#include <tgmath.h>
-#endif
-#endif
-
#include "g711.h"
/* Copied from the CCITT G.711 specification */
-static const uint8_t ulaw_to_alaw_table[256] =
+static const apr_byte_t ulaw_to_alaw_table[256] =
{
42, 43, 40, 41, 46, 47, 44, 45, 34, 35, 32, 33, 38, 39, 36, 37,
58, 59, 56, 57, 62, 63, 60, 61, 50, 51, 48, 49, 54, 55, 52, 53,
/* These transcoding tables are copied from the CCITT G.711 specification. To achieve
optimal results, do not change them. */
-
-static const uint8_t alaw_to_ulaw_table[256] =
+static const apr_byte_t alaw_to_ulaw_table[256] =
{
42, 43, 40, 41, 46, 47, 44, 45, 34, 35, 32, 33, 38, 39, 36, 37,
57, 58, 55, 56, 61, 62, 59, 60, 49, 50, 47, 48, 53, 54, 51, 52,
214, 215, 212, 213, 218, 219, 216, 217, 207, 207, 206, 206, 210, 211, 208, 209
};
-uint8_t alaw_to_ulaw(uint8_t alaw)
+apr_byte_t alaw_to_ulaw(apr_byte_t alaw)
{
return alaw_to_ulaw_table[alaw];
}
/*- End of function --------------------------------------------------------*/
-uint8_t ulaw_to_alaw(uint8_t ulaw)
+apr_byte_t ulaw_to_alaw(apr_byte_t ulaw)
{
return ulaw_to_alaw_table[ulaw];
}
*
*/
-/*! \file */
-
-/*! \page g711_page A-law and mu-law handling
+/* g711_page A-law and mu-law handling
Lookup tables for A-law and u-law look attractive, until you consider the impact
on the CPU cache. If it causes a substantial area of your processor cache to get
hit too often, cache sloshing will severely slow things down. The main reason
specification by other means.
*/
-#if !defined(_G711_H_)
-#define _G711_H_
+#ifndef MPF_G711_H
+#define MPF_G711_H
-#ifdef __cplusplus
-extern "C" {
-#endif
+/**
+ * @file g711.h
+ * @brief A-law and u-law conversion routines
+ */
-#ifdef _MSC_VER
-#ifndef __inline__
-#define __inline__ __inline
-#endif
-#if !defined(_STDINT) && !defined(uint32_t)
-typedef unsigned __int8 uint8_t;
-typedef __int16 int16_t;
-typedef __int32 int32_t;
-typedef unsigned __int16 uint16_t;
-#endif
-#endif
+#include "mpf.h"
+
+APT_BEGIN_EXTERN_C
#if defined(__i386__)
/*! \brief Find the bit position of the highest set bit in a word
\param bits The word to be searched
\return The bit number of the highest set bit, or -1 if the word is zero. */
-static __inline__ int top_bit(unsigned int bits)
+static APR_INLINE int top_bit(unsigned int bits)
{
int res;
/*! \brief Find the bit position of the lowest set bit in a word
\param bits The word to be searched
\return The bit number of the lowest set bit, or -1 if the word is zero. */
-static __inline__ int bottom_bit(unsigned int bits)
+static APR_INLINE int bottom_bit(unsigned int bits)
{
int res;
}
/*- End of function --------------------------------------------------------*/
#elif defined(__x86_64__)
-static __inline__ int top_bit(unsigned int bits)
+static APR_INLINE int top_bit(unsigned int bits)
{
int res;
}
/*- End of function --------------------------------------------------------*/
-static __inline__ int bottom_bit(unsigned int bits)
+static APR_INLINE int bottom_bit(unsigned int bits)
{
int res;
}
/*- End of function --------------------------------------------------------*/
#else
-static __inline__ int top_bit(unsigned int bits)
+static APR_INLINE int top_bit(unsigned int bits)
{
int i;
}
/*- End of function --------------------------------------------------------*/
-static __inline__ int bottom_bit(unsigned int bits)
+static APR_INLINE int bottom_bit(unsigned int bits)
{
int i;
\param linear The sample to encode.
\return The u-law value.
*/
-static __inline__ uint8_t linear_to_ulaw(int linear)
+static APR_INLINE apr_byte_t linear_to_ulaw(int linear)
{
- uint8_t u_val;
+ apr_byte_t u_val;
int mask;
int seg;
/* Get the sign and the magnitude of the value. */
if (linear < 0)
{
- linear = ULAW_BIAS - linear;
+ linear = ULAW_BIAS - linear - 1;
mask = 0x7F;
}
else
* and complement the code word.
*/
if (seg >= 8)
- u_val = (uint8_t) (0x7F ^ mask);
+ u_val = (apr_byte_t) (0x7F ^ mask);
else
- u_val = (uint8_t) (((seg << 4) | ((linear >> (seg + 3)) & 0xF)) ^ mask);
+ u_val = (apr_byte_t) (((seg << 4) | ((linear >> (seg + 3)) & 0xF)) ^ mask);
#ifdef ULAW_ZEROTRAP
/* Optional ITU trap */
if (u_val == 0)
\param ulaw The u-law sample to decode.
\return The linear value.
*/
-static __inline__ int16_t ulaw_to_linear(uint8_t ulaw)
+static APR_INLINE apr_int16_t ulaw_to_linear(apr_byte_t ulaw)
{
int t;
* shift up by the segment number and subtract out the bias.
*/
t = (((ulaw & 0x0F) << 3) + ULAW_BIAS) << (((int) ulaw & 0x70) >> 4);
- return (int16_t) ((ulaw & 0x80) ? (ULAW_BIAS - t) : (t - ULAW_BIAS));
+ return (apr_int16_t) ((ulaw & 0x80) ? (ULAW_BIAS - t) : (t - ULAW_BIAS));
}
/*- End of function --------------------------------------------------------*/
\param linear The sample to encode.
\return The A-law value.
*/
-static __inline__ uint8_t linear_to_alaw(int linear)
+static APR_INLINE apr_byte_t linear_to_alaw(int linear)
{
int mask;
int seg;
{
/* Sign (bit 7) bit = 0 */
mask = ALAW_AMI_MASK;
- linear = -linear - 8;
+ linear = -linear - 1;
}
/* Convert the scaled magnitude to segment number. */
if (linear >= 0)
{
/* Out of range. Return maximum value. */
- return (uint8_t) (0x7F ^ mask);
+ return (apr_byte_t) (0x7F ^ mask);
}
+#if 0 /* This code is no longer reachable, since linear must be at least 0. */
/* We must be just a tiny step below zero */
- return (uint8_t) (0x00 ^ mask);
+ return (apr_byte_t) (0x00 ^ mask);
+#endif
}
/* Combine the sign, segment, and quantization bits. */
- return (uint8_t) (((seg << 4) | ((linear >> ((seg) ? (seg + 3) : 4)) & 0x0F)) ^ mask);
+ return (apr_byte_t) (((seg << 4) | ((linear >> ((seg) ? (seg + 3) : 4)) & 0x0F)) ^ mask);
}
/*- End of function --------------------------------------------------------*/
\param alaw The A-law sample to decode.
\return The linear value.
*/
-static __inline__ int16_t alaw_to_linear(uint8_t alaw)
+static APR_INLINE apr_int16_t alaw_to_linear(apr_byte_t alaw)
{
int i;
int seg;
i = (i + 0x108) << (seg - 1);
else
i += 8;
- return (int16_t) ((alaw & 0x80) ? i : -i);
+ return (apr_int16_t) ((alaw & 0x80) ? i : -i);
}
/*- End of function --------------------------------------------------------*/
\param alaw The A-law sample to transcode.
\return The best matching u-law value.
*/
-uint8_t alaw_to_ulaw(uint8_t alaw);
+apr_byte_t alaw_to_ulaw(apr_byte_t alaw);
/*! \brief Transcode from u-law to A-law, using the procedure defined in G.711.
\param alaw The u-law sample to transcode.
\return The best matching A-law value.
*/
-uint8_t ulaw_to_alaw(uint8_t ulaw);
+apr_byte_t ulaw_to_alaw(apr_byte_t ulaw);
-#ifdef __cplusplus
-}
-#endif
+APT_END_EXTERN_C
-#endif
+#endif /* MPF_G711_H */
/*- End of file ------------------------------------------------------------*/
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_activity_detector.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_activity_detector.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_ACTIVITY_DETECTOR_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_audio_file_descriptor.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_audio_file_descriptor.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_AUDIO_FILE_DESCRIPTOR_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_audio_file_stream.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_audio_file_stream.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_AUDIO_FILE_STREAM_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_bridge.h 1693 2010-05-16 18:33:07Z achaloyan $
+ * $Id: mpf_bridge.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_BRIDGE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_buffer.h 1709 2010-05-24 17:12:11Z achaloyan $
+ * $Id: mpf_buffer.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_BUFFER_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_codec.h 1686 2010-05-08 18:46:08Z achaloyan $
+ * $Id: mpf_codec.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_CODEC_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_codec_descriptor.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_codec_descriptor.h 2239 2014-11-12 01:52:59Z achaloyan@gmail.com $
*/
#ifndef MPF_CODEC_DESCRIPTOR_H
/** Calculate encoded frame size in bytes */
static APR_INLINE apr_size_t mpf_codec_frame_size_calculate(const mpf_codec_descriptor_t *descriptor, const mpf_codec_attribs_t *attribs)
{
- return descriptor->channel_count * attribs->bits_per_sample * CODEC_FRAME_TIME_BASE *
+ return (size_t) descriptor->channel_count * attribs->bits_per_sample * CODEC_FRAME_TIME_BASE *
descriptor->sampling_rate / 1000 / 8; /* 1000 - msec per sec, 8 - bits per byte */
}
/** Calculate samples of the frame (ts) */
static APR_INLINE apr_size_t mpf_codec_frame_samples_calculate(const mpf_codec_descriptor_t *descriptor)
{
- return descriptor->channel_count * CODEC_FRAME_TIME_BASE * descriptor->sampling_rate / 1000;
+ return (size_t) descriptor->channel_count * CODEC_FRAME_TIME_BASE * descriptor->sampling_rate / 1000;
}
/** Calculate linear frame size in bytes */
static APR_INLINE apr_size_t mpf_codec_linear_frame_size_calculate(apr_uint16_t sampling_rate, apr_byte_t channel_count)
{
- return channel_count * BYTES_PER_SAMPLE * CODEC_FRAME_TIME_BASE * sampling_rate / 1000;
+ return (size_t) channel_count * BYTES_PER_SAMPLE * CODEC_FRAME_TIME_BASE * sampling_rate / 1000;
}
static APR_INLINE apt_bool_t mpf_codec_capabilities_add(mpf_codec_capabilities_t *capabilities, int sample_rates, const char *codec_name)
{
mpf_codec_attribs_t *attribs = (mpf_codec_attribs_t*)apr_array_push(capabilities->attrib_arr);
- apt_string_set(&attribs->name,codec_name);
+ apt_string_assign(&attribs->name,codec_name,capabilities->attrib_arr->pool);
attribs->sample_rates = sample_rates;
attribs->bits_per_sample = 0;
return TRUE;
}
-/** Add default (liear PCM) capabilities */
+/** Add default (linear PCM) capabilities */
MPF_DECLARE(apt_bool_t) mpf_codec_default_capabilities_add(mpf_codec_capabilities_t *capabilities);
/** Validate codec capabilities */
/** Find matched descriptor in codec list */
MPF_DECLARE(mpf_codec_descriptor_t*) mpf_codec_list_descriptor_find(const mpf_codec_list_t *codec_list, const mpf_codec_descriptor_t *descriptor);
-/** Modify codec list according to capabilities specified */
-MPF_DECLARE(apt_bool_t) mpf_codec_list_modify(mpf_codec_list_t *codec_list, const mpf_codec_capabilities_t *capabilities);
+/** Match codec list with specified capabilities */
+MPF_DECLARE(apt_bool_t) mpf_codec_list_match(mpf_codec_list_t *codec_list, const mpf_codec_capabilities_t *capabilities);
/** Intersect two codec lists */
MPF_DECLARE(apt_bool_t) mpf_codec_lists_intersect(mpf_codec_list_t *codec_list1, mpf_codec_list_t *codec_list2);
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_codec_manager.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_codec_manager.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_CODEC_MANAGER_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_context.h 1709 2010-05-24 17:12:11Z achaloyan $
+ * $Id: mpf_context.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_CONTEXT_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_decoder.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_decoder.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_DECODER_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_encoder.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_encoder.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_ENCODER_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_engine.h 1709 2010-05-24 17:12:11Z achaloyan $
+ * $Id: mpf_engine.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_ENGINE_H
--- /dev/null
+/*
+ * Copyright 2008-2014 Arsen Chaloyan
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Id: mpf_engine_factory.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
+ */
+
+#ifndef MPF_ENGINE_FACTORY_H
+#define MPF_ENGINE_FACTORY_H
+
+/**
+ * @file mpf_engine.h
+ * @brief Factory of Media Processing Engines
+ */
+
+#include "mpf_types.h"
+
+APT_BEGIN_EXTERN_C
+
+/** Create factory of media engines. */
+MPF_DECLARE(mpf_engine_factory_t*) mpf_engine_factory_create(apr_pool_t *pool);
+
+/** Add media engine to factory. */
+MPF_DECLARE(apt_bool_t) mpf_engine_factory_engine_add(mpf_engine_factory_t *mpf_factory, mpf_engine_t *media_engine);
+
+/** Determine whether factory is empty. */
+MPF_DECLARE(apt_bool_t) mpf_engine_factory_is_empty(const mpf_engine_factory_t *mpf_factory);
+
+/** Select next available media engine. */
+MPF_DECLARE(mpf_engine_t*) mpf_engine_factory_engine_select(mpf_engine_factory_t *mpf_factory);
+
+/** Associate media engines with RTP termination factory. */
+MPF_DECLARE(apt_bool_t) mpf_engine_factory_rtp_factory_assign(mpf_engine_factory_t *mpf_factory, mpf_termination_factory_t *rtp_factory);
+
+APT_END_EXTERN_C
+
+#endif /* MPF_ENGINE_FACTORY_H */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_file_termination_factory.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_file_termination_factory.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_FILE_TERMINATION_FACTORY_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_frame.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_frame.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_FRAME_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_frame_buffer.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_frame_buffer.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_FRAME_BUFFER_H
/** Read frame from buffer */
apt_bool_t mpf_frame_buffer_read(mpf_frame_buffer_t *buffer, mpf_frame_t *frame);
+#ifdef MPF_FRAME_BUFFER_DEBUG
+apt_bool_t mpf_frame_buffer_file_open(mpf_frame_buffer_t *buffer, const char *utt_file_in, const char *utt_file_out);
+#endif
+
APT_END_EXTERN_C
#endif /* MPF_FRAME_BUFFER_H */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_jitter_buffer.h 1802 2011-05-13 02:43:12Z achaloyan $
+ * $Id: mpf_jitter_buffer.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_JITTER_BUFFER_H
/** Read media frame from jitter buffer */
apt_bool_t mpf_jitter_buffer_read(mpf_jitter_buffer_t *jb, mpf_frame_t *media_frame);
+/** Get current playout delay */
+apr_uint32_t mpf_jitter_buffer_playout_delay_get(const mpf_jitter_buffer_t *jb);
+
APT_END_EXTERN_C
#endif /* MPF_JITTER_BUFFER_H */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_message.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_message.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_MESSAGE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_mixer.h 1693 2010-05-16 18:33:07Z achaloyan $
+ * $Id: mpf_mixer.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_MIXER_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_multiplier.h 1693 2010-05-16 18:33:07Z achaloyan $
+ * $Id: mpf_multiplier.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_MULTIPLIER_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_named_event.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_named_event.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_NAMED_EVENT_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_object.h 1693 2010-05-16 18:33:07Z achaloyan $
+ * $Id: mpf_object.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_OBJECT_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_resampler.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_resampler.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_RESAMPLER_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_rtcp_packet.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_rtcp_packet.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_RTCP_PACKET_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_rtp_attribs.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_rtp_attribs.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_RTP_ATTRIBS_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_rtp_defs.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_rtp_defs.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_RTP_DEFS_H
/** Used to calculate actual number of received packets (32bit) in
* case seq number (16bit) wrapped around */
#define RTP_SEQ_MOD (1 << 16)
-/** Number of max dropout packets (seq numbers) is used to trigger drift
- * in seq number or misorder packets */
+/** Number of max dropout packets (seq numbers) is used to trigger
+ * either a drift in the seq numbers or a misorder packet */
#define MAX_DROPOUT 3000
-/** Number of max misorder packets (seq numbers) to differentiate
- * seq drift from misorder packets */
+/** Number of max misorder packets (seq numbers) is used to
+ * differentiate a drift in the seq numbers from a misorder packet */
#define MAX_MISORDER 100
-/** Restart receiver if threshold is fired */
+/** Restart receiver if threshold is reached */
#define DISCARDED_TO_RECEIVED_RATIO_THRESHOLD 30 /* 30% */
-/** Deviation threshold is used to trigger drift in timestamps */
+/** Deviation threshold is used to trigger a drift in timestamps */
#define DEVIATION_THRESHOLD 4000
+/** This threshold is used to detect a new talkspurt */
+#define INTER_TALKSPURT_GAP 1000 /* msec */
/** RTP receiver history declaration */
typedef struct rtp_rx_history_t rtp_rx_history_t;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_rtp_descriptor.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_rtp_descriptor.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_RTP_DESCRIPTOR_H
/** Jitter buffer configuration */
struct mpf_jb_config_t {
- /** Min playout delay in msec (used in case of adaptive jitter buffer) */
- apr_size_t min_playout_delay;
+ /** Min playout delay in msec */
+ apr_uint32_t min_playout_delay;
/** Initial playout delay in msec */
- apr_size_t initial_playout_delay;
- /** Max playout delay in msec (used in case of adaptive jitter buffer) */
- apr_size_t max_playout_delay;
- /** Static - 0, adaptive - 1 jitter buffer */
+ apr_uint32_t initial_playout_delay;
+ /** Max playout delay in msec */
+ apr_uint32_t max_playout_delay;
+ /** Mode of operation of the jitter buffer: static - 0, adaptive - 1 */
apr_byte_t adaptive;
+ /** Enable/disable time skew detection */
+ apr_byte_t time_skew_detection;
};
/** RTCP BYE transmission policy */
descriptor->capabilities = NULL;
descriptor->local = NULL;
descriptor->remote = NULL;
+ descriptor->settings = NULL;
}
/** Initialize RTP termination descriptor */
jb_config->initial_playout_delay = 0;
jb_config->min_playout_delay = 0;
jb_config->max_playout_delay = 0;
+ jb_config->time_skew_detection = 1;
}
/** Allocate RTP config */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_rtp_header.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_rtp_header.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_RTP_HEADER_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_rtp_pt.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_rtp_pt.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_RTP_PT_H
/** RTP payload types */
typedef enum {
- RTP_PT_PCMU = 0, /**< PCMU Audio 8kHz 1 */
- RTP_PT_PCMA = 8, /**< PCMA Audio 8kHz 1 */
+ RTP_PT_PCMU = 0, /**< PCMU Audio 8kHz 1 */
+ RTP_PT_PCMA = 8, /**< PCMA Audio 8kHz 1 */
- RTP_PT_CN = 13, /**< Comfort Noise Audio 8kHz 1 */
+ RTP_PT_CN = 13, /**< Comfort Noise Audio 8kHz 1 */
+
+ RTP_PT_RESERVED = 19, /**< Not used for any particular codec */
RTP_PT_DYNAMIC = 96, /**< Start of dynamic payload types */
- RTP_PT_DYNAMIC_MAX = 127, /**< End of dynamic payload types */
+ RTP_PT_DYNAMIC_MAX = 127, /**< End of dynamic payload types */
RTP_PT_UNKNOWN = 128 /**< Unknown (invalid) payload type */
} mpf_rtp_pt_e;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_rtp_stat.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_rtp_stat.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_RTP_STAT_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_rtp_stream.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_rtp_stream.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_RTP_STREAM_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_rtp_termination_factory.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_rtp_termination_factory.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_RTP_TERMINATION_FACTORY_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_scheduler.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_scheduler.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_SCHEDULER_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_stream.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_stream.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_STREAM_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_stream_descriptor.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_stream_descriptor.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_STREAM_DESCRIPTOR_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_termination.h 1693 2010-05-16 18:33:07Z achaloyan $
+ * $Id: mpf_termination.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_TERMINATION_H
const char *name;
/** External object */
void *obj;
- /** Object to send events to */
- void *event_handler_obj;
+ /** Media engine to send events to */
+ void *media_engine;
/** Event handler */
mpf_termination_event_handler_f event_handler;
/** Codec manager */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_termination_factory.h 1693 2010-05-16 18:33:07Z achaloyan $
+ * $Id: mpf_termination_factory.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_TERMINATION_FACTORY_H
struct mpf_termination_factory_t {
/** Virtual create */
mpf_termination_t* (*create_termination)(mpf_termination_factory_t *factory, void *obj, apr_pool_t *pool);
+ /** Virtual assign engine */
+ apt_bool_t (*assign_engine)(mpf_termination_factory_t *factory, mpf_engine_t *media_engine);
};
-
+/**
+ * Assign media engine to termination factory.
+ * @param termination_factory the termination factory to assign media engine to
+ * @param media_engine the media engine to assign
+ */
+MPF_DECLARE(apt_bool_t) mpf_termination_factory_engine_assign(
+ mpf_termination_factory_t *termination_factory,
+ mpf_engine_t *media_engine);
/**
* Create MPF termination from termination factory.
--- /dev/null
+/*
+ * Copyright 2008-2014 Arsen Chaloyan
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Id: apt_log.h 1792 2011-01-10 21:08:52Z achaloyan $
+ */
+
+#ifndef MPF_TRACE_H
+#define MPF_TRACE_H
+
+/**
+ * @file mpf_trace.h
+ * @brief MPF Tracer
+ */
+
+#include <stdio.h>
+#include "mpf.h"
+
+APT_BEGIN_EXTERN_C
+
+#ifdef WIN32
+static void mpf_debug_output_trace(const char* format, ...)
+{
+ char buf[1024];
+ va_list arg;
+ va_start(arg, format);
+ apr_vsnprintf(buf, sizeof(buf), format, arg);
+ va_end(arg);
+
+ OutputDebugStringA(buf);
+}
+#else
+static APR_INLINE void mpf_debug_output_trace() {}
+#endif
+
+static APR_INLINE void mpf_null_trace() {}
+
+APT_END_EXTERN_C
+
+#endif /* MPF_TRACE_H */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_types.h 1543 2010-02-24 21:46:24Z achaloyan $
+ * $Id: mpf_types.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MPF_TYPES_H
/** Opaque MPF engine declaration */
typedef struct mpf_engine_t mpf_engine_t;
+/** Opaque MPF engine factory declaration */
+typedef struct mpf_engine_factory_t mpf_engine_factory_t;
+
/** Opaque MPF scheduler declaration */
typedef struct mpf_scheduler_t mpf_scheduler_t;
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="mpf"\r
- ProjectGUID="{B5A00BFA-6083-4FAE-A097-71642D6473B5}"\r
- RootNamespace="mpf"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- <Platform\r
- Name="x64"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mpf.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="codecs"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mpf.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="codecs"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB"\r
- WarnAsError="false"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mpf.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="codecs"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mpf.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="codecs"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB"\r
- WarnAsError="false"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="codecs"\r
- >\r
- <Filter\r
- Name="g711"\r
- >\r
- <File\r
- RelativePath=".\codecs\g711\g711.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\codecs\g711\g711.h"\r
- >\r
- </File>\r
- </Filter>\r
- </Filter>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\include\mpf.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_activity_detector.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_audio_file_descriptor.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_audio_file_stream.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_bridge.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_buffer.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_codec.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_codec_descriptor.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_codec_manager.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_context.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_decoder.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_dtmf_detector.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_dtmf_generator.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_encoder.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_engine.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_file_termination_factory.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_frame.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_frame_buffer.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_jitter_buffer.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_message.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_mixer.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_multiplier.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_named_event.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_object.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_resampler.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_rtcp_packet.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_rtp_attribs.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_rtp_defs.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_rtp_descriptor.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_rtp_header.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_rtp_pt.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_rtp_stat.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_rtp_stream.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_rtp_termination_factory.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_scheduler.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_stream.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_stream_descriptor.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_termination.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_termination_factory.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_types.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\src\mpf_activity_detector.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_audio_file_stream.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_bridge.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_buffer.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_codec_descriptor.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_codec_g711.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_codec_linear.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_codec_manager.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_context.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_decoder.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_dtmf_detector.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_dtmf_generator.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_encoder.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_engine.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_file_termination_factory.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_frame_buffer.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_jitter_buffer.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_mixer.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_multiplier.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_named_event.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_resampler.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_rtp_attribs.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_rtp_stream.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_rtp_termination_factory.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_scheduler.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_stream.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_termination.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_termination_factory.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup>\r
- <Filter Include="codecs">\r
- <UniqueIdentifier>{3d69fc35-a195-4376-9508-ef77d7b27e71}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="codecs\g711">\r
- <UniqueIdentifier>{81e2eace-c57a-4135-92cd-cc3575dfb088}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="include">\r
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="src">\r
- <UniqueIdentifier>{6fc3533a-b688-477d-914d-e0ffb15aa9a9}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="codecs\g711\g711.c">\r
- <Filter>codecs\g711</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_activity_detector.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_audio_file_stream.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_bridge.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_buffer.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_codec_descriptor.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_codec_g711.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_codec_linear.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_codec_manager.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_context.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_decoder.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_dtmf_detector.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_dtmf_generator.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_encoder.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_engine.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_file_termination_factory.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_frame_buffer.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_jitter_buffer.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_mixer.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_multiplier.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_named_event.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_resampler.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_rtp_attribs.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_rtp_stream.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_rtp_termination_factory.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_scheduler.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_stream.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_termination.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_termination_factory.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_timer_manager.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="codecs\g711\g711.h">\r
- <Filter>codecs\g711</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_activity_detector.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_audio_file_descriptor.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_audio_file_stream.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_bridge.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_buffer.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_codec.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_codec_descriptor.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_codec_manager.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_context.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_decoder.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_dtmf_detector.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_dtmf_generator.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_encoder.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_engine.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_file_termination_factory.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_frame.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_frame_buffer.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_jitter_buffer.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_message.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_mixer.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_multiplier.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_named_event.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_object.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_resampler.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_rtcp_packet.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_rtp_attribs.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_rtp_defs.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_rtp_descriptor.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_rtp_header.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_rtp_pt.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_rtp_stat.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_rtp_stream.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_rtp_termination_factory.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_scheduler.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_stream.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_stream_descriptor.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_termination.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_termination_factory.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_timer_manager.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_types.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
-</Project>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>mpf</ProjectName>\r
- <ProjectGuid>{B5A00BFA-6083-4FAE-A097-71642D6473B5}</ProjectGuid>\r
- <RootNamespace>mpf</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mpf.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mpf.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mpf.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mpf.props" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <TreatWarningAsError>false</TreatWarningAsError>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <TreatWarningAsError>false</TreatWarningAsError>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClCompile Include="codecs\g711\g711.c" />\r
- <ClCompile Include="src\mpf_activity_detector.c" />\r
- <ClCompile Include="src\mpf_audio_file_stream.c" />\r
- <ClCompile Include="src\mpf_bridge.c" />\r
- <ClCompile Include="src\mpf_buffer.c" />\r
- <ClCompile Include="src\mpf_codec_descriptor.c" />\r
- <ClCompile Include="src\mpf_codec_g711.c" />\r
- <ClCompile Include="src\mpf_codec_linear.c" />\r
- <ClCompile Include="src\mpf_codec_manager.c" />\r
- <ClCompile Include="src\mpf_context.c" />\r
- <ClCompile Include="src\mpf_decoder.c" />\r
- <ClCompile Include="src\mpf_dtmf_detector.c" />\r
- <ClCompile Include="src\mpf_dtmf_generator.c" />\r
- <ClCompile Include="src\mpf_encoder.c" />\r
- <ClCompile Include="src\mpf_engine.c" />\r
- <ClCompile Include="src\mpf_file_termination_factory.c" />\r
- <ClCompile Include="src\mpf_frame_buffer.c" />\r
- <ClCompile Include="src\mpf_jitter_buffer.c" />\r
- <ClCompile Include="src\mpf_mixer.c" />\r
- <ClCompile Include="src\mpf_multiplier.c" />\r
- <ClCompile Include="src\mpf_named_event.c" />\r
- <ClCompile Include="src\mpf_resampler.c" />\r
- <ClCompile Include="src\mpf_rtp_attribs.c" />\r
- <ClCompile Include="src\mpf_rtp_stream.c" />\r
- <ClCompile Include="src\mpf_rtp_termination_factory.c" />\r
- <ClCompile Include="src\mpf_scheduler.c" />\r
- <ClCompile Include="src\mpf_stream.c" />\r
- <ClCompile Include="src\mpf_termination.c" />\r
- <ClCompile Include="src\mpf_termination_factory.c" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="codecs\g711\g711.h" />\r
- <ClInclude Include="include\mpf.h" />\r
- <ClInclude Include="include\mpf_activity_detector.h" />\r
- <ClInclude Include="include\mpf_audio_file_descriptor.h" />\r
- <ClInclude Include="include\mpf_audio_file_stream.h" />\r
- <ClInclude Include="include\mpf_bridge.h" />\r
- <ClInclude Include="include\mpf_buffer.h" />\r
- <ClInclude Include="include\mpf_codec.h" />\r
- <ClInclude Include="include\mpf_codec_descriptor.h" />\r
- <ClInclude Include="include\mpf_codec_manager.h" />\r
- <ClInclude Include="include\mpf_context.h" />\r
- <ClInclude Include="include\mpf_decoder.h" />\r
- <ClInclude Include="include\mpf_dtmf_detector.h" />\r
- <ClInclude Include="include\mpf_dtmf_generator.h" />\r
- <ClInclude Include="include\mpf_encoder.h" />\r
- <ClInclude Include="include\mpf_engine.h" />\r
- <ClInclude Include="include\mpf_file_termination_factory.h" />\r
- <ClInclude Include="include\mpf_frame.h" />\r
- <ClInclude Include="include\mpf_frame_buffer.h" />\r
- <ClInclude Include="include\mpf_jitter_buffer.h" />\r
- <ClInclude Include="include\mpf_message.h" />\r
- <ClInclude Include="include\mpf_mixer.h" />\r
- <ClInclude Include="include\mpf_multiplier.h" />\r
- <ClInclude Include="include\mpf_named_event.h" />\r
- <ClInclude Include="include\mpf_object.h" />\r
- <ClInclude Include="include\mpf_resampler.h" />\r
- <ClInclude Include="include\mpf_rtcp_packet.h" />\r
- <ClInclude Include="include\mpf_rtp_attribs.h" />\r
- <ClInclude Include="include\mpf_rtp_defs.h" />\r
- <ClInclude Include="include\mpf_rtp_descriptor.h" />\r
- <ClInclude Include="include\mpf_rtp_header.h" />\r
- <ClInclude Include="include\mpf_rtp_pt.h" />\r
- <ClInclude Include="include\mpf_rtp_stat.h" />\r
- <ClInclude Include="include\mpf_rtp_stream.h" />\r
- <ClInclude Include="include\mpf_rtp_termination_factory.h" />\r
- <ClInclude Include="include\mpf_scheduler.h" />\r
- <ClInclude Include="include\mpf_stream.h" />\r
- <ClInclude Include="include\mpf_stream_descriptor.h" />\r
- <ClInclude Include="include\mpf_termination.h" />\r
- <ClInclude Include="include\mpf_termination_factory.h" />\r
- <ClInclude Include="include\mpf_types.h" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
-</Project>\r
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="mpf"\r
- ProjectGUID="{B5A00BFA-6083-4FAE-A097-71642D6473B5}"\r
- RootNamespace="mpf"\r
- Keyword="Win32Proj"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- <Platform\r
- Name="x64"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mpf.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="codecs"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mpf.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="codecs"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|x64"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\mpf.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="codecs"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|x64"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib-x64.vsprops;$(ProjectDir)..\..\build\vsprops\mpf.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="codecs"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="codecs"\r
- >\r
- <Filter\r
- Name="g711"\r
- >\r
- <File\r
- RelativePath=".\codecs\g711\g711.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\codecs\g711\g711.h"\r
- >\r
- </File>\r
- </Filter>\r
- </Filter>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\include\mpf.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_activity_detector.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_audio_file_descriptor.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_audio_file_stream.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_bridge.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_buffer.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_codec.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_codec_descriptor.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_codec_manager.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_context.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_decoder.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_dtmf_detector.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_dtmf_generator.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_encoder.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_engine.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_file_termination_factory.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_frame.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_frame_buffer.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_jitter_buffer.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_message.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_mixer.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_multiplier.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_named_event.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_object.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_resampler.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_rtcp_packet.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_rtp_attribs.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_rtp_defs.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_rtp_descriptor.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_rtp_header.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_rtp_pt.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_rtp_stat.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_rtp_stream.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_rtp_termination_factory.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_scheduler.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_stream.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_stream_descriptor.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_termination.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_termination_factory.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mpf_types.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\src\mpf_activity_detector.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_audio_file_stream.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_bridge.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_buffer.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_codec_descriptor.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_codec_g711.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_codec_linear.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_codec_manager.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_context.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_decoder.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_dtmf_detector.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_dtmf_generator.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_encoder.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_engine.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_file_termination_factory.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_frame_buffer.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_jitter_buffer.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_mixer.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_multiplier.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_named_event.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_resampler.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_rtp_attribs.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_rtp_stream.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_rtp_termination_factory.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_scheduler.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_stream.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_termination.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_termination_factory.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="mpf"
+ ProjectGUID="{B5A00BFA-6083-4FAE-A097-71642D6473B5}"
+ RootNamespace="mpf"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.vsprops;$(ProjectDir)..\..\build\vsprops\mpf.vsprops"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <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>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unilib.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"
+ />
+ <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>
+ <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>
+ <Files>
+ <Filter
+ Name="codecs"
+ >
+ <Filter
+ Name="g711"
+ >
+ <File
+ RelativePath=".\codecs\g711\g711.c"
+ >
+ </File>
+ <File
+ RelativePath=".\codecs\g711\g711.h"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="include"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\include\mpf.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_activity_detector.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_audio_file_descriptor.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_audio_file_stream.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_bridge.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_buffer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_codec.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_codec_descriptor.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_codec_manager.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_context.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_decoder.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_dtmf_detector.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_dtmf_generator.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_encoder.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_engine.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_engine_factory.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_file_termination_factory.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_frame.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_frame_buffer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_jitter_buffer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_message.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_mixer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_multiplier.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_named_event.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_object.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_resampler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_rtcp_packet.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_rtp_attribs.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_rtp_defs.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_rtp_descriptor.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_rtp_header.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_rtp_pt.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_rtp_stat.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_rtp_stream.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_rtp_termination_factory.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_scheduler.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_stream.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_stream_descriptor.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_termination.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_termination_factory.h"
+ >
+ </File>
+ <File
+ RelativePath=".\include\mpf_types.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="src"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ >
+ <File
+ RelativePath=".\src\mpf_activity_detector.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_audio_file_stream.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_bridge.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_buffer.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_codec_descriptor.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_codec_g711.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_codec_linear.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_codec_manager.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_context.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_decoder.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_dtmf_detector.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_dtmf_generator.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_encoder.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_engine.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_engine_factory.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_file_termination_factory.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_frame_buffer.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_jitter_buffer.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_mixer.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_multiplier.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_named_event.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_resampler.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_rtp_attribs.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_rtp_stream.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_rtp_termination_factory.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_scheduler.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_stream.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_termination.c"
+ >
+ </File>
+ <File
+ RelativePath=".\src\mpf_termination_factory.c"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>mpf</ProjectName>\r
- <ProjectGuid>{B5A00BFA-6083-4FAE-A097-71642D6473B5}</ProjectGuid>\r
- <RootNamespace>mpf</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mpf.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mpf.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mpf.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mpf.props" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <TreatWarningAsError>false</TreatWarningAsError>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <TreatWarningAsError>false</TreatWarningAsError>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClCompile Include="codecs\g711\g711.c" />\r
- <ClCompile Include="src\mpf_activity_detector.c" />\r
- <ClCompile Include="src\mpf_audio_file_stream.c" />\r
- <ClCompile Include="src\mpf_bridge.c" />\r
- <ClCompile Include="src\mpf_buffer.c" />\r
- <ClCompile Include="src\mpf_codec_descriptor.c" />\r
- <ClCompile Include="src\mpf_codec_g711.c" />\r
- <ClCompile Include="src\mpf_codec_linear.c" />\r
- <ClCompile Include="src\mpf_codec_manager.c" />\r
- <ClCompile Include="src\mpf_context.c" />\r
- <ClCompile Include="src\mpf_decoder.c" />\r
- <ClCompile Include="src\mpf_dtmf_detector.c" />\r
- <ClCompile Include="src\mpf_dtmf_generator.c" />\r
- <ClCompile Include="src\mpf_encoder.c" />\r
- <ClCompile Include="src\mpf_engine.c" />\r
- <ClCompile Include="src\mpf_file_termination_factory.c" />\r
- <ClCompile Include="src\mpf_frame_buffer.c" />\r
- <ClCompile Include="src\mpf_jitter_buffer.c" />\r
- <ClCompile Include="src\mpf_mixer.c" />\r
- <ClCompile Include="src\mpf_multiplier.c" />\r
- <ClCompile Include="src\mpf_named_event.c" />\r
- <ClCompile Include="src\mpf_resampler.c" />\r
- <ClCompile Include="src\mpf_rtp_attribs.c" />\r
- <ClCompile Include="src\mpf_rtp_stream.c" />\r
- <ClCompile Include="src\mpf_rtp_termination_factory.c" />\r
- <ClCompile Include="src\mpf_scheduler.c" />\r
- <ClCompile Include="src\mpf_stream.c" />\r
- <ClCompile Include="src\mpf_termination.c" />\r
- <ClCompile Include="src\mpf_termination_factory.c" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="codecs\g711\g711.h" />\r
- <ClInclude Include="include\mpf.h" />\r
- <ClInclude Include="include\mpf_activity_detector.h" />\r
- <ClInclude Include="include\mpf_audio_file_descriptor.h" />\r
- <ClInclude Include="include\mpf_audio_file_stream.h" />\r
- <ClInclude Include="include\mpf_bridge.h" />\r
- <ClInclude Include="include\mpf_buffer.h" />\r
- <ClInclude Include="include\mpf_codec.h" />\r
- <ClInclude Include="include\mpf_codec_descriptor.h" />\r
- <ClInclude Include="include\mpf_codec_manager.h" />\r
- <ClInclude Include="include\mpf_context.h" />\r
- <ClInclude Include="include\mpf_decoder.h" />\r
- <ClInclude Include="include\mpf_dtmf_detector.h" />\r
- <ClInclude Include="include\mpf_dtmf_generator.h" />\r
- <ClInclude Include="include\mpf_encoder.h" />\r
- <ClInclude Include="include\mpf_engine.h" />\r
- <ClInclude Include="include\mpf_file_termination_factory.h" />\r
- <ClInclude Include="include\mpf_frame.h" />\r
- <ClInclude Include="include\mpf_frame_buffer.h" />\r
- <ClInclude Include="include\mpf_jitter_buffer.h" />\r
- <ClInclude Include="include\mpf_message.h" />\r
- <ClInclude Include="include\mpf_mixer.h" />\r
- <ClInclude Include="include\mpf_multiplier.h" />\r
- <ClInclude Include="include\mpf_named_event.h" />\r
- <ClInclude Include="include\mpf_object.h" />\r
- <ClInclude Include="include\mpf_resampler.h" />\r
- <ClInclude Include="include\mpf_rtcp_packet.h" />\r
- <ClInclude Include="include\mpf_rtp_attribs.h" />\r
- <ClInclude Include="include\mpf_rtp_defs.h" />\r
- <ClInclude Include="include\mpf_rtp_descriptor.h" />\r
- <ClInclude Include="include\mpf_rtp_header.h" />\r
- <ClInclude Include="include\mpf_rtp_pt.h" />\r
- <ClInclude Include="include\mpf_rtp_stat.h" />\r
- <ClInclude Include="include\mpf_rtp_stream.h" />\r
- <ClInclude Include="include\mpf_rtp_termination_factory.h" />\r
- <ClInclude Include="include\mpf_scheduler.h" />\r
- <ClInclude Include="include\mpf_stream.h" />\r
- <ClInclude Include="include\mpf_stream_descriptor.h" />\r
- <ClInclude Include="include\mpf_termination.h" />\r
- <ClInclude Include="include\mpf_termination_factory.h" />\r
- <ClInclude Include="include\mpf_types.h" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{B5A00BFA-6083-4FAE-A097-71642D6473B5}</ProjectGuid>
+ <RootNamespace>mpf</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mpf.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mpf.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mpf.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mpf.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="codecs\g711\g711.c" />
+ <ClCompile Include="src\mpf_activity_detector.c" />
+ <ClCompile Include="src\mpf_audio_file_stream.c" />
+ <ClCompile Include="src\mpf_bridge.c" />
+ <ClCompile Include="src\mpf_buffer.c" />
+ <ClCompile Include="src\mpf_codec_descriptor.c" />
+ <ClCompile Include="src\mpf_codec_g711.c" />
+ <ClCompile Include="src\mpf_codec_linear.c" />
+ <ClCompile Include="src\mpf_codec_manager.c" />
+ <ClCompile Include="src\mpf_context.c" />
+ <ClCompile Include="src\mpf_decoder.c" />
+ <ClCompile Include="src\mpf_dtmf_detector.c" />
+ <ClCompile Include="src\mpf_dtmf_generator.c" />
+ <ClCompile Include="src\mpf_encoder.c" />
+ <ClCompile Include="src\mpf_engine.c" />
+ <ClCompile Include="src\mpf_engine_factory.c" />
+ <ClCompile Include="src\mpf_file_termination_factory.c" />
+ <ClCompile Include="src\mpf_frame_buffer.c" />
+ <ClCompile Include="src\mpf_jitter_buffer.c" />
+ <ClCompile Include="src\mpf_mixer.c" />
+ <ClCompile Include="src\mpf_multiplier.c" />
+ <ClCompile Include="src\mpf_named_event.c" />
+ <ClCompile Include="src\mpf_resampler.c" />
+ <ClCompile Include="src\mpf_rtp_attribs.c" />
+ <ClCompile Include="src\mpf_rtp_stream.c" />
+ <ClCompile Include="src\mpf_rtp_termination_factory.c" />
+ <ClCompile Include="src\mpf_scheduler.c" />
+ <ClCompile Include="src\mpf_stream.c" />
+ <ClCompile Include="src\mpf_termination.c" />
+ <ClCompile Include="src\mpf_termination_factory.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="codecs\g711\g711.h" />
+ <ClInclude Include="include\mpf.h" />
+ <ClInclude Include="include\mpf_activity_detector.h" />
+ <ClInclude Include="include\mpf_audio_file_descriptor.h" />
+ <ClInclude Include="include\mpf_audio_file_stream.h" />
+ <ClInclude Include="include\mpf_bridge.h" />
+ <ClInclude Include="include\mpf_buffer.h" />
+ <ClInclude Include="include\mpf_codec.h" />
+ <ClInclude Include="include\mpf_codec_descriptor.h" />
+ <ClInclude Include="include\mpf_codec_manager.h" />
+ <ClInclude Include="include\mpf_context.h" />
+ <ClInclude Include="include\mpf_decoder.h" />
+ <ClInclude Include="include\mpf_dtmf_detector.h" />
+ <ClInclude Include="include\mpf_dtmf_generator.h" />
+ <ClInclude Include="include\mpf_encoder.h" />
+ <ClInclude Include="include\mpf_engine.h" />
+ <ClInclude Include="include\mpf_engine_factory.h" />
+ <ClInclude Include="include\mpf_file_termination_factory.h" />
+ <ClInclude Include="include\mpf_frame.h" />
+ <ClInclude Include="include\mpf_frame_buffer.h" />
+ <ClInclude Include="include\mpf_jitter_buffer.h" />
+ <ClInclude Include="include\mpf_message.h" />
+ <ClInclude Include="include\mpf_mixer.h" />
+ <ClInclude Include="include\mpf_multiplier.h" />
+ <ClInclude Include="include\mpf_named_event.h" />
+ <ClInclude Include="include\mpf_object.h" />
+ <ClInclude Include="include\mpf_resampler.h" />
+ <ClInclude Include="include\mpf_rtcp_packet.h" />
+ <ClInclude Include="include\mpf_rtp_attribs.h" />
+ <ClInclude Include="include\mpf_rtp_defs.h" />
+ <ClInclude Include="include\mpf_rtp_descriptor.h" />
+ <ClInclude Include="include\mpf_rtp_header.h" />
+ <ClInclude Include="include\mpf_rtp_pt.h" />
+ <ClInclude Include="include\mpf_rtp_stat.h" />
+ <ClInclude Include="include\mpf_rtp_stream.h" />
+ <ClInclude Include="include\mpf_rtp_termination_factory.h" />
+ <ClInclude Include="include\mpf_scheduler.h" />
+ <ClInclude Include="include\mpf_stream.h" />
+ <ClInclude Include="include\mpf_stream_descriptor.h" />
+ <ClInclude Include="include\mpf_termination.h" />
+ <ClInclude Include="include\mpf_termination_factory.h" />
+ <ClInclude Include="include\mpf_types.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\apr-toolkit\aprtoolkit.vcxproj">
+ <Project>{13deeca0-bdd4-4744-a1a2-8eb0a44df3d2}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup>\r
- <Filter Include="codecs">\r
- <UniqueIdentifier>{3d69fc35-a195-4376-9508-ef77d7b27e71}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="codecs\g711">\r
- <UniqueIdentifier>{81e2eace-c57a-4135-92cd-cc3575dfb088}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="include">\r
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="src">\r
- <UniqueIdentifier>{6fc3533a-b688-477d-914d-e0ffb15aa9a9}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="codecs\g711\g711.c">\r
- <Filter>codecs\g711</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_activity_detector.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_audio_file_stream.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_bridge.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_buffer.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_codec_descriptor.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_codec_g711.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_codec_linear.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_codec_manager.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_context.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_decoder.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_dtmf_detector.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_dtmf_generator.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_encoder.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_engine.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_file_termination_factory.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_frame_buffer.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_jitter_buffer.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_mixer.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_multiplier.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_named_event.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_resampler.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_rtp_attribs.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_rtp_stream.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_rtp_termination_factory.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_scheduler.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_stream.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_termination.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mpf_termination_factory.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="codecs\g711\g711.h">\r
- <Filter>codecs\g711</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_activity_detector.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_audio_file_descriptor.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_audio_file_stream.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_bridge.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_buffer.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_codec.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_codec_descriptor.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_codec_manager.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_context.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_decoder.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_dtmf_detector.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_dtmf_generator.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_encoder.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_engine.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_file_termination_factory.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_frame.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_frame_buffer.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_jitter_buffer.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_message.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_mixer.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_multiplier.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_named_event.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_object.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_resampler.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_rtcp_packet.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_rtp_attribs.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_rtp_defs.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_rtp_descriptor.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_rtp_header.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_rtp_pt.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_rtp_stat.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_rtp_stream.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_rtp_termination_factory.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_scheduler.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_stream.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_stream_descriptor.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_termination.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_termination_factory.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mpf_types.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
-</Project>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="codecs">
+ <UniqueIdentifier>{33a3a10a-4697-4720-8c24-20340757326e}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="codecs\g711">
+ <UniqueIdentifier>{148f1b8f-859b-4dd9-96b0-0474d7bb875b}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{35011b8a-6a42-4e9f-b55b-a84db1d929a8}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="codecs\g711\g711.c">
+ <Filter>codecs\g711</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_activity_detector.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_audio_file_stream.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_bridge.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_buffer.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_codec_descriptor.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_codec_g711.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_codec_linear.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_codec_manager.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_context.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_decoder.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_dtmf_detector.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_dtmf_generator.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_encoder.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_engine.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_file_termination_factory.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_frame_buffer.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_jitter_buffer.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_mixer.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_multiplier.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_named_event.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_resampler.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_rtp_attribs.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_rtp_stream.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_rtp_termination_factory.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_scheduler.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_stream.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_termination.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_termination_factory.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_engine_factory.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="codecs\g711\g711.h">
+ <Filter>codecs\g711</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_activity_detector.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_audio_file_descriptor.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_audio_file_stream.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_bridge.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_buffer.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_codec.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_codec_descriptor.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_codec_manager.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_context.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_decoder.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_dtmf_detector.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_dtmf_generator.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_encoder.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_engine.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_file_termination_factory.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_frame.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_frame_buffer.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_jitter_buffer.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_message.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_mixer.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_multiplier.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_named_event.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_object.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_resampler.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_rtcp_packet.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_rtp_attribs.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_rtp_defs.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_rtp_descriptor.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_rtp_header.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_rtp_pt.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_rtp_stat.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_rtp_stream.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_rtp_termination_factory.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_scheduler.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_stream.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_stream_descriptor.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_termination.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_termination_factory.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_types.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mpf_engine_factory.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_activity_detector.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_activity_detector.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mpf_activity_detector.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_audio_file_stream.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_audio_file_stream.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mpf_audio_file_stream.h"
mpf_audio_file_frame_read,
mpf_audio_file_writer_open,
mpf_audio_file_writer_close,
- mpf_audio_file_frame_write
+ mpf_audio_file_frame_write,
+ NULL /* mpf_audio_file_trace */
};
MPF_DECLARE(mpf_audio_stream_t*) mpf_file_stream_create(mpf_termination_t *termination, apr_pool_t *pool)
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_bridge.c 1693 2010-05-16 18:33:07Z achaloyan $
+ * $Id: mpf_bridge.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mpf_bridge.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_buffer.c 1709 2010-05-24 17:12:11Z achaloyan $
+ * $Id: mpf_buffer.c 2181 2014-09-14 04:29:38Z achaloyan@gmail.com $
*/
#ifdef WIN32
apt_bool_t mpf_buffer_audio_write(mpf_buffer_t *buffer, void *data, apr_size_t size)
{
mpf_chunk_t *chunk;
- apt_bool_t status = TRUE;
+ apt_bool_t status;
apr_thread_mutex_lock(buffer->guard);
chunk = apr_palloc(buffer->pool,sizeof(mpf_chunk_t));
+ APR_RING_ELEM_INIT(chunk,link);
chunk->frame.codec_frame.buffer = apr_palloc(buffer->pool,size);
memcpy(chunk->frame.codec_frame.buffer,data,size);
chunk->frame.codec_frame.size = size;
apt_bool_t mpf_buffer_event_write(mpf_buffer_t *buffer, mpf_frame_type_e event_type)
{
mpf_chunk_t *chunk;
- apt_bool_t status = TRUE;
+ apt_bool_t status;
apr_thread_mutex_lock(buffer->guard);
chunk = apr_palloc(buffer->pool,sizeof(mpf_chunk_t));
+ APR_RING_ELEM_INIT(chunk,link);
chunk->frame.codec_frame.buffer = NULL;
chunk->frame.codec_frame.size = 0;
chunk->frame.type = event_type;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_codec_descriptor.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_codec_descriptor.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mpf_codec_descriptor.h"
return descriptor;
}
-
/** Match two codec descriptors */
MPF_DECLARE(apt_bool_t) mpf_codec_descriptors_match(const mpf_codec_descriptor_t *descriptor1, const mpf_codec_descriptor_t *descriptor2)
{
return apt_string_compare(&descriptor->name,&lpcm_attribs.name);
}
-/** Add default (liear PCM) capabilities */
+/** Add default (linear PCM) capabilities */
MPF_DECLARE(apt_bool_t) mpf_codec_default_capabilities_add(mpf_codec_capabilities_t *capabilities)
{
return mpf_codec_capabilities_add(capabilities,MPF_SAMPLE_RATE_8000,lpcm_attribs.name.buf);
return NULL;
}
-/** Modify codec list according to capabilities specified */
-MPF_DECLARE(apt_bool_t) mpf_codec_list_modify(mpf_codec_list_t *codec_list, const mpf_codec_capabilities_t *capabilities)
+/** Match codec list with specified capabilities */
+MPF_DECLARE(apt_bool_t) mpf_codec_list_match(mpf_codec_list_t *codec_list, const mpf_codec_capabilities_t *capabilities)
{
int i;
mpf_codec_descriptor_t *descriptor;
+ apt_bool_t status = FALSE;
if(!capabilities) {
return FALSE;
}
for(i=0; i<codec_list->descriptor_arr->nelts; i++) {
descriptor = &APR_ARRAY_IDX(codec_list->descriptor_arr,i,mpf_codec_descriptor_t);
+ if(descriptor->enabled == FALSE) continue;
+
/* match capabilities */
- if(!mpf_codec_capabilities_attribs_find(capabilities,descriptor)) {
+ if(mpf_codec_capabilities_attribs_find(capabilities,descriptor)) {
+ /* at least one codec descriptor matches */
+ status = TRUE;
+ }
+ else {
descriptor->enabled = FALSE;
}
}
- return TRUE;
+ return status;
}
/** Intersect two codec lists */
codec_list1->event_descriptor = NULL;
codec_list2->primary_descriptor = NULL;
codec_list2->event_descriptor = NULL;
- /* find only one match for primary and named event descriptors,
+ /* find only one match for primary and named event descriptors,
set the matched descriptors as preffered, disable the others */
for(i=0; i<codec_list1->descriptor_arr->nelts; i++) {
descriptor1 = &APR_ARRAY_IDX(codec_list1->descriptor_arr,i,mpf_codec_descriptor_t);
}
}
+ /* if primary descriptor is disabled or not set, return FALSE */
+ if(!codec_list1->primary_descriptor || codec_list1->primary_descriptor->enabled == FALSE) {
+ return FALSE;
+ }
+
return TRUE;
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_codec_g711.c 1686 2010-05-08 18:46:08Z achaloyan $
+ * $Id: mpf_codec_g711.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mpf_codec.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_codec_linear.c 1686 2010-05-08 18:46:08Z achaloyan $
+ * $Id: mpf_codec_linear.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#define APR_WANT_BYTEFUNC
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_codec_manager.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_codec_manager.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <stdlib.h>
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_context.c 1709 2010-05-24 17:12:11Z achaloyan $
+ * $Id: mpf_context.c 2181 2014-09-14 04:29:38Z achaloyan@gmail.com $
*/
#ifdef WIN32
matrix_item_t *matrix_item;
header_item_t *header_item;
mpf_context_t *context = apr_palloc(pool,sizeof(mpf_context_t));
+ APR_RING_ELEM_INIT(context,link);
context->factory = factory;
context->obj = obj;
context->pool = pool;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_decoder.c 1530 2010-02-19 18:40:08Z achaloyan $
+ * $Id: mpf_decoder.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mpf_decoder.h"
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_dtmf_detector.c 1788 2010-11-22 19:45:38Z tomas.valenta@speechtech.cz $
+ * $Id: mpf_dtmf_detector.c 2227 2014-11-12 01:10:18Z achaloyan@gmail.com $
*/
#include "mpf_dtmf_detector.h"
apr_thread_mutex_lock(detector->mutex);
digit = detector->buf[0];
if (digit) {
- /* This used to be a strcpy(), but that can give overlapping buffer issues */
- memmove(detector->buf, &detector->buf[1], strlen(&detector->buf[1]) + 1);
+ memmove(detector->buf, detector->buf + 1, strlen(detector->buf));
detector->digits--;
}
apr_thread_mutex_unlock(detector->mutex);
} else if (0.25 * detector->totenergy > (reng + ceng)) { /* 16db */
/* Signal energy to total energy ratio test failed */
} else {
- digit = freq2digits[rmax][cmax - DTMF_FREQUENCIES/2];
+ if (cmax >= DTMF_FREQUENCIES/2 && cmax < DTMF_FREQUENCIES)
+ digit = freq2digits[rmax][cmax - DTMF_FREQUENCIES/2];
}
/* Three successive detections will trigger the detection */
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_dtmf_generator.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_dtmf_generator.c 2227 2014-11-12 01:10:18Z achaloyan@gmail.com $
*/
#include "mpf_dtmf_generator.h"
double s2;
} sine_state_t;
-/** Mapping event_it to frequency pair */
+/** Mapping event_id to frequency pair */
static const double dtmf_freq[DTMF_EVENT_ID_MAX+1][2] = {
{941, 1336}, /* 0 */
{697, 1209}, /* 1 */
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 (%"APR_SIZE_T_FMT"), "
- "cannot add %d digit%s, already has %"APR_SIZE_T_FMT, MPF_DTMFGEN_QUEUE_LEN,
- dlen, dlen > 1 ? "s" : "", qlen);
+ apt_log(APT_LOG_MARK, APT_PRIO_WARNING, "DTMF queue too short (%d), "
+ "cannot add %"APR_SIZE_T_FMT" digit%s, already has %"APR_SIZE_T_FMT,
+ MPF_DTMFGEN_QUEUE_LEN, dlen, dlen > 1 ? "s" : "", qlen);
} else {
strcpy(generator->queue + qlen, digits);
ret = TRUE;
/* Get next valid digit from queue */
do {
generator->event_id = (apr_byte_t) mpf_dtmf_char_to_event_id(*generator->queue);
- /* This used to be a strcpy(), but that can give overlapping buffer issues */
- memmove(generator->queue, &generator->queue[1], strlen(&generator->queue[1]) + 1);
+ memmove(generator->queue, generator->queue + 1, strlen(generator->queue));
} while (*generator->queue && (generator->event_id > DTMF_EVENT_ID_MAX));
/* Reset state */
if (generator->event_id <= DTMF_EVENT_ID_MAX) {
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_encoder.c 1530 2010-02-19 18:40:08Z achaloyan $
+ * $Id: mpf_encoder.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mpf_encoder.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_engine.c 1709 2010-05-24 17:12:11Z achaloyan $
+ * $Id: mpf_engine.c 2226 2014-11-12 00:47:40Z achaloyan@gmail.com $
*/
#include "mpf_engine.h"
mpf_engine_t *engine = apt_task_object_get(task);
mpf_scheduler_start(engine->scheduler);
- apt_task_child_start(task);
+ apt_task_start_request_process(task);
return TRUE;
}
mpf_engine_t *engine = apt_task_object_get(task);
mpf_scheduler_stop(engine->scheduler);
- apt_task_child_terminate(task);
+ apt_task_terminate_request_process(task);
return TRUE;
}
mpf_message_container_t *event_msg;
mpf_message_t *mpf_message;
mpf_engine_t *engine;
- engine = termination->event_handler_obj;
+ engine = termination->media_engine;
if(!engine) {
return FALSE;
}
task_msg = apt_task_msg_get(engine->task);
+ if(!task_msg) {
+ return FALSE;
+ }
task_msg->type = engine->task_msg_type;
event_msg = (mpf_message_container_t*) task_msg->data;
mpf_message = event_msg->messages;
const mpf_message_container_t *request = (const mpf_message_container_t*) msg->data;
response_msg = apt_task_msg_get(engine->task);
+ if(!response_msg) {
+ return FALSE;
+ }
response_msg->type = engine->task_msg_type;
response = (mpf_message_container_t*) response_msg->data;
*response = *request;
switch(mpf_request->command_id) {
case MPF_ADD_TERMINATION:
{
- termination->event_handler_obj = engine;
+ termination->media_engine = engine;
termination->event_handler = mpf_engine_event_raise;
termination->codec_manager = engine->codec_manager;
termination->timer_queue = engine->timer_queue;
--- /dev/null
+/*
+ * Copyright 2008-2014 Arsen Chaloyan
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Id: mpf_engine_factory.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
+ */
+
+#include <apr_tables.h>
+#include "mpf_engine_factory.h"
+#include "mpf_termination_factory.h"
+
+/** Factory of media engines */
+struct mpf_engine_factory_t {
+ /** Array of pointers to media engines */
+ apr_array_header_t *engines_arr;
+ /** Index of the current engine */
+ int index;
+};
+
+/** Create factory of media engines. */
+MPF_DECLARE(mpf_engine_factory_t*) mpf_engine_factory_create(apr_pool_t *pool)
+{
+ mpf_engine_factory_t *mpf_factory = apr_palloc(pool,sizeof(mpf_engine_factory_t));
+ mpf_factory->engines_arr = apr_array_make(pool,1,sizeof(mpf_engine_t*));
+ mpf_factory->index = 0;
+ return mpf_factory;
+}
+
+/** Add media engine to factory. */
+MPF_DECLARE(apt_bool_t) mpf_engine_factory_engine_add(mpf_engine_factory_t *mpf_factory, mpf_engine_t *media_engine)
+{
+ mpf_engine_t **slot;
+ if(!media_engine)
+ return FALSE;
+
+ slot = apr_array_push(mpf_factory->engines_arr);
+ *slot = media_engine;
+ return TRUE;
+}
+
+/** Determine whether factory is empty. */
+MPF_DECLARE(apt_bool_t) mpf_engine_factory_is_empty(const mpf_engine_factory_t *mpf_factory)
+{
+ return apr_is_empty_array(mpf_factory->engines_arr);
+}
+
+/** Select next available media engine. */
+MPF_DECLARE(mpf_engine_t*) mpf_engine_factory_engine_select(mpf_engine_factory_t *mpf_factory)
+{
+ mpf_engine_t *media_engine = APR_ARRAY_IDX(mpf_factory->engines_arr, mpf_factory->index, mpf_engine_t*);
+ if(++mpf_factory->index == mpf_factory->engines_arr->nelts) {
+ mpf_factory->index = 0;
+ }
+ return media_engine;
+}
+
+/** Associate media engines with RTP termination factory. */
+MPF_DECLARE(apt_bool_t) mpf_engine_factory_rtp_factory_assign(mpf_engine_factory_t *mpf_factory, mpf_termination_factory_t *rtp_factory)
+{
+ int i;
+ mpf_engine_t *media_engine;
+ for(i=0; i<mpf_factory->engines_arr->nelts; i++) {
+ media_engine = APR_ARRAY_IDX(mpf_factory->engines_arr, i, mpf_engine_t*);
+ mpf_termination_factory_engine_assign(rtp_factory,media_engine);
+ }
+ return TRUE;
+}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_file_termination_factory.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_file_termination_factory.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mpf_termination.h"
{
mpf_termination_factory_t *file_termination_factory = apr_palloc(pool,sizeof(mpf_termination_factory_t));
file_termination_factory->create_termination = mpf_file_termination_create;
+ file_termination_factory->assign_engine = NULL;
return file_termination_factory;
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_frame_buffer.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_frame_buffer.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mpf_frame_buffer.h"
apr_thread_mutex_t *guard;
apr_pool_t *pool;
+
+#ifdef MPF_FRAME_BUFFER_DEBUG
+ FILE *utt_in;
+ FILE *utt_out;
+#endif
};
apr_size_t i;
mpf_frame_t *frame;
mpf_frame_buffer_t *buffer = apr_palloc(pool,sizeof(mpf_frame_buffer_t));
+ buffer->pool = pool;
buffer->frame_size = frame_size;
buffer->frame_count = frame_count;
buffer->write_pos = buffer->read_pos = 0;
apr_thread_mutex_create(&buffer->guard,APR_THREAD_MUTEX_UNNESTED,pool);
+
+#ifdef MPF_FRAME_BUFFER_DEBUG
+ buffer->utt_in = NULL;
+ buffer->utt_out = NULL;
+#endif
return buffer;
}
+#ifdef MPF_FRAME_BUFFER_DEBUG
+static apr_status_t mpf_frame_buffer_file_close(void *obj)
+{
+ mpf_frame_buffer_t *buffer = obj;
+ if(buffer->utt_out) {
+ fclose(buffer->utt_out);
+ buffer->utt_out = NULL;
+ }
+ if(buffer->utt_in) {
+ fclose(buffer->utt_in);
+ buffer->utt_in = NULL;
+ }
+ return APR_SUCCESS;
+}
+
+apt_bool_t mpf_frame_buffer_file_open(mpf_frame_buffer_t *buffer, const char *utt_file_in, const char *utt_file_out)
+{
+ buffer->utt_in = fopen(utt_file_in,"wb");
+ if(!buffer->utt_in)
+ return FALSE;
+
+ buffer->utt_out = fopen(utt_file_out,"wb");
+ if(!buffer->utt_out)
+ return FALSE;
+
+ apr_pool_cleanup_register(buffer->pool,buffer,mpf_frame_buffer_file_close,NULL);
+ return TRUE;
+}
+#endif
+
void mpf_frame_buffer_destroy(mpf_frame_buffer_t *buffer)
{
if(buffer->guard) {
void *data = frame->codec_frame.buffer;
apr_size_t size = frame->codec_frame.size;
+#ifdef MPF_FRAME_BUFFER_DEBUG
+ if(buffer->utt_in) {
+ fwrite(data,1,size,buffer->utt_in);
+ }
+#endif
+
apr_thread_mutex_lock(buffer->guard);
while(buffer->write_pos - buffer->read_pos < buffer->frame_count && size >= buffer->frame_size) {
write_frame = mpf_frame_buffer_frame_get(buffer,buffer->write_pos);
media_frame->codec_frame.buffer,
src_media_frame->codec_frame.buffer,
media_frame->codec_frame.size);
+#ifdef MPF_FRAME_BUFFER_DEBUG
+ if(buffer->utt_out) {
+ fwrite(media_frame->codec_frame.buffer,1,media_frame->codec_frame.size,buffer->utt_out);
+ }
+#endif
}
if(media_frame->type & MEDIA_FRAME_TYPE_EVENT) {
media_frame->event_frame = src_media_frame->event_frame;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_jitter_buffer.c 1802 2011-05-13 02:43:12Z achaloyan $
+ * $Id: mpf_jitter_buffer.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mpf_jitter_buffer.h"
+#include "mpf_trace.h"
-#if ENABLE_JB_TRACE
+#if ENABLE_JB_TRACE == 1
#define JB_TRACE printf
+#elif ENABLE_JB_TRACE == 2
+#define JB_TRACE mpf_debug_output_trace
#else
-static APR_INLINE void null_trace() {}
-#define JB_TRACE null_trace
+#define JB_TRACE mpf_null_trace
#endif
struct mpf_jitter_buffer_t {
/* number of frames */
apr_size_t frame_count;
/* frame timestamp units (samples) */
- apr_uint32_t frame_ts;
+ apr_uint32_t frame_ts;
/* frame size in bytes */
apr_size_t frame_size;
/* playout delay in timetsamp units */
apr_uint32_t playout_delay_ts;
+ /* max playout delay in timetsamp units */
+ apr_uint32_t max_playout_delay_ts;
/* write should be synchronized (offset calculated) */
apr_byte_t write_sync;
/* write timestamp offset */
- int write_ts_offset;
+ apr_int32_t write_ts_offset;
/* write pointer in timestamp units */
apr_uint32_t write_ts;
/* read pointer in timestamp units */
apr_uint32_t read_ts;
+ /* min length of the buffer in timestamp units */
+ apr_int32_t min_length_ts;
+ /* max length of the buffer in timestamp units */
+ apr_int32_t max_length_ts;
+ /* number of statistical measurements made */
+ apr_uint32_t measurment_count;
+
/* timestamp event starts at */
apr_uint32_t event_write_base_ts;
/* the first (base) frame of the event */
mpf_jb_config_init(jb_config);
}
/* validate jb config */
- if(jb_config->initial_playout_delay == 0) {
- /* default configuration */
- jb_config->min_playout_delay = 10; /* ms */
- jb_config->initial_playout_delay = 50; /* ms */
- jb_config->max_playout_delay = 200; /* ms */
+ if(jb_config->min_playout_delay > jb_config->initial_playout_delay) {
+ jb_config->min_playout_delay = jb_config->initial_playout_delay;
}
- else {
- if(jb_config->min_playout_delay > jb_config->initial_playout_delay) {
- jb_config->min_playout_delay = jb_config->initial_playout_delay;
- }
- if(jb_config->max_playout_delay < jb_config->initial_playout_delay) {
- jb_config->max_playout_delay = 2 * jb_config->initial_playout_delay;
- }
+ if(jb_config->max_playout_delay < jb_config->initial_playout_delay) {
+ jb_config->max_playout_delay = 2 * jb_config->initial_playout_delay;
}
+ if(jb_config->max_playout_delay == 0) {
+ jb_config->max_playout_delay = 600; /* ms */
+ }
+
jb->config = jb_config;
jb->codec = codec;
+ /* calculate and allocate frame related data */
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->config->initial_playout_delay += CODEC_FRAME_TIME_BASE - jb->config->initial_playout_delay % CODEC_FRAME_TIME_BASE;
}
- jb->playout_delay_ts = (apr_uint32_t)(jb->config->initial_playout_delay *
- descriptor->channel_count * descriptor->sampling_rate / 1000);
+ /* calculate playout delay in timestamp units */
+ jb->playout_delay_ts = jb->frame_ts * jb->config->initial_playout_delay / CODEC_FRAME_TIME_BASE;
+ jb->max_playout_delay_ts = jb->frame_ts * jb->config->max_playout_delay / CODEC_FRAME_TIME_BASE;
jb->write_sync = 1;
jb->write_ts_offset = 0;
jb->write_ts = jb->read_ts = 0;
+ jb->min_length_ts = jb->max_length_ts = 0;
+ jb->measurment_count = 0;
+
jb->event_write_base_ts = 0;
memset(&jb->event_write_base,0,sizeof(mpf_named_event_frame_t));
jb->event_write_update = NULL;
memset(&jb->event_write_base,0,sizeof(mpf_named_event_frame_t));
jb->event_write_update = NULL;
+ if(jb->config->adaptive && jb->playout_delay_ts == jb->max_playout_delay_ts) {
+ jb->playout_delay_ts = jb->frame_ts * jb->config->initial_playout_delay / CODEC_FRAME_TIME_BASE;
+ }
+
+ JB_TRACE("JB restart\n");
return TRUE;
}
return &jb->frames[index];
}
+static APR_INLINE void mpf_jitter_buffer_stat_update(mpf_jitter_buffer_t *jb)
+{
+ apr_int32_t length_ts;
+
+ if(jb->measurment_count == 50) {
+ /* start over after every N measurements */
+ apr_int32_t mean_length_ts = jb->min_length_ts + (jb->max_length_ts - jb->min_length_ts) / 2;
+ JB_TRACE("JB stat length [%d : %d] playout delay=%u\n",
+ jb->min_length_ts,jb->max_length_ts,jb->playout_delay_ts);
+ jb->min_length_ts = jb->max_length_ts = mean_length_ts;
+ jb->measurment_count = 0;
+ }
+
+ /* calculate current length of the buffer */
+ length_ts = jb->write_ts - jb->read_ts;
+ if(length_ts > jb->max_length_ts) {
+ /* update max length */
+ jb->max_length_ts = length_ts;
+ }
+ else if(length_ts < jb->min_length_ts) {
+ /* update min length */
+ jb->min_length_ts = length_ts;
+ }
+ /* increment the counter after every stat update */
+ jb->measurment_count++;
+}
+
+static APR_INLINE void mpf_jitter_buffer_frame_allign(mpf_jitter_buffer_t *jb, apr_uint32_t *ts)
+{
+ if(*ts % jb->frame_ts != 0)
+ *ts -= *ts % jb->frame_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;
+ JB_TRACE("JB write sync playout delay=%u\n",jb->playout_delay_ts);
+ /* calculate the offset */
+ jb->write_ts_offset = ts - jb->read_ts;
jb->write_sync = 0;
+
+ if(jb->config->time_skew_detection) {
+ /* reset the statistics */
+ jb->min_length_ts = jb->max_length_ts = jb->playout_delay_ts;
+ jb->measurment_count = 0;
+ }
}
+ /* calculate the write pos taking into account current offset and playout delay */
*write_ts = ts - jb->write_ts_offset + jb->playout_delay_ts;
if(*write_ts % jb->frame_ts != 0) {
- /* not frame alligned */
- JB_TRACE("JB write ts=%"APR_SIZE_T_FMT" not alligned -> discard\n",write_ts);
- return JB_DISCARD_NOT_ALLIGNED;
+ /* allign with frame_ts */
+ apr_uint32_t delta_ts = *write_ts % jb->frame_ts;
+ JB_TRACE("JB write allign ts=%u delta_ts=-%u\n",*write_ts,delta_ts);
+ *write_ts -= delta_ts;
}
return JB_OK;
}
jb_result_t result;
if(marker) {
- /* new talkspurt */
+ JB_TRACE("JB marker\n");
+ /* new talkspurt detected => test whether the buffer is empty */
if(jb->write_ts <= jb->read_ts) {
- /* buffer is empty => it's safe to restart */
- mpf_jitter_buffer_restart(jb);
+ /* resync */
+ jb->write_sync = 1;
}
}
+ /* calculate write_ts */
result = mpf_jitter_buffer_write_prepare(jb,ts,&write_ts);
if(result != JB_OK) {
return result;
}
- if(write_ts >= jb->write_ts) {
- if(write_ts - jb->write_ts > jb->frame_ts) {
- /* gap */
+ if(write_ts >= jb->read_ts) {
+ if(write_ts >= jb->write_ts) {
+ /* normal order */
+ }
+ else {
+ /* out of order */
}
- /* normal write */
}
else {
- if(write_ts >= jb->read_ts) {
- /* backward write */
- }
- else {
- /* too late */
- JB_TRACE("JB write ts=%"APR_SIZE_T_FMT" too late\n",write_ts);
+ apr_uint32_t delta_ts;
+ /* packet arrived too late */
+ if(write_ts < jb->write_ts) {
+ /* out of order => discard */
+ JB_TRACE("JB write ts=%u out of order, too late => discard\n",write_ts);
return JB_DISCARD_TOO_LATE;
}
+
+ /* calculate a minimal adjustment needed in order to place the packet into the buffer */
+ delta_ts = jb->read_ts - write_ts;
+
+ if(jb->config->time_skew_detection) {
+ JB_TRACE("JB stat length [%d : %d] playout delay=%u delta=%u\n",
+ jb->min_length_ts,jb->max_length_ts,jb->playout_delay_ts,delta_ts);
+
+ if((apr_uint32_t)(jb->max_length_ts - jb->min_length_ts) > jb->playout_delay_ts + delta_ts) {
+ /* update the adjustment based on the collected statistics */
+ delta_ts = (apr_uint32_t)(jb->max_length_ts - jb->min_length_ts) - jb->playout_delay_ts;
+ mpf_jitter_buffer_frame_allign(jb,&delta_ts);
+ }
+
+ /* determine if there might be a time skew or not */
+ if(jb->max_length_ts > 0 && (apr_uint32_t)jb->max_length_ts < jb->playout_delay_ts) {
+ /* calculate the time skew */
+ apr_uint32_t skew_ts = jb->playout_delay_ts - jb->max_length_ts;
+ mpf_jitter_buffer_frame_allign(jb,&skew_ts);
+ JB_TRACE("JB time skew detected offset=%u\n",skew_ts);
+
+ /* adjust the offset and write pos */
+ jb->write_ts_offset -= skew_ts;
+ write_ts = ts - jb->write_ts_offset + jb->playout_delay_ts;
+
+ /* adjust the statistics */
+ jb->min_length_ts += skew_ts;
+ jb->max_length_ts += skew_ts;
+
+ if(skew_ts < delta_ts) {
+ delta_ts -= skew_ts;
+ }
+ else {
+ delta_ts = 0;
+ }
+ }
+ }
+
+ if(delta_ts) {
+ if(jb->config->adaptive == 0) {
+ /* jitter buffer is not adaptive => discard the packet */
+ JB_TRACE("JB write ts=%u too late => discard\n",write_ts);
+ return JB_DISCARD_TOO_LATE;
+ }
+
+ if(jb->playout_delay_ts + delta_ts > jb->max_playout_delay_ts) {
+ /* max playout delay will be reached => discard the packet */
+ JB_TRACE("JB write ts=%u max playout delay reached => discard\n",write_ts);
+ return JB_DISCARD_TOO_LATE;
+ }
+
+ /* adjust the playout delay */
+ jb->playout_delay_ts += delta_ts;
+ write_ts += delta_ts;
+ JB_TRACE("JB adjust playout delay=%u delta=%u\n",jb->playout_delay_ts,delta_ts);
+
+ if(jb->config->time_skew_detection) {
+ /* adjust the statistics */
+ jb->min_length_ts += delta_ts;
+ jb->max_length_ts += delta_ts;
+ }
+ }
}
+
+ /* get number of frames available to write */
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=%"APR_SIZE_T_FMT" too early\n",write_ts);
+ JB_TRACE("JB write ts=%u too early => discard\n",write_ts);
return JB_DISCARD_TOO_EARLY;
}
- JB_TRACE("JB write ts=%"APR_SIZE_T_FMT" size=%"APR_SIZE_T_FMT"\n",write_ts,size);
+ JB_TRACE("JB write ts=%u 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;
}
if(write_ts > jb->write_ts) {
+ /* advance write pos */
jb->write_ts = write_ts;
}
return result;
}
else {
/* an update */
- if(named_event->duration <= jb->event_write_update->duration) {
- /* ignore this update, it's either a retransmission or
- something from the past, which makes no sense now */
+ if(named_event->duration < jb->event_write_update->duration) {
+ /* ignore this update, it's something from the past, which makes no sense now */
return JB_OK;
}
+ else if(named_event->duration == jb->event_write_update->duration) {
+ /* this should be a retransmission, let it go through only if it contains new data */
+ if(jb->event_write_update->edge == 1 || jb->event_write_update->edge == named_event->edge) {
+ /* ignore this update since either the end of event marker has already been set,
+ or the current event provides no updates */
+ return JB_OK;
+ }
+ }
+
/* calculate position in jitter buffer considering the last received event (update) */
write_ts += jb->event_write_update->duration;
}
if(write_ts < jb->read_ts) {
/* too late */
- 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;
+ apr_uint32_t delta_ts;
+ if(jb->config->adaptive == 0) {
+ /* jitter buffer is not adaptive => discard the packet */
+ JB_TRACE("JB write ts=%u event=%d duration=%d too late => discard\n",
+ write_ts,named_event->event_id,named_event->duration);
+ return JB_DISCARD_TOO_LATE;
+ }
+
+ /* calculate a minimal adjustment needed in order to place the packet into the buffer */
+ delta_ts = jb->read_ts - write_ts;
+
+ if(jb->playout_delay_ts + delta_ts > jb->max_playout_delay_ts) {
+ /* max playout delay will be reached => discard the packet */
+ JB_TRACE("JB write ts=%u event=%d duration=%d max playout delay reached => discard\n",
+ write_ts,named_event->event_id,named_event->duration);
+ return JB_DISCARD_TOO_LATE;
+ }
+
+ /* adjust the playout delay */
+ jb->playout_delay_ts += delta_ts;
+ write_ts += delta_ts;
+ if(marker) {
+ jb->event_write_base_ts = write_ts;
+ }
+ JB_TRACE("JB adjust playout delay=%u delta=%u\n",jb->playout_delay_ts,delta_ts);
}
else if( (write_ts - jb->read_ts)/jb->frame_ts >= jb->frame_count) {
/* too early */
- JB_TRACE("JB write ts=%"APR_SIZE_T_FMT" event=%d duration=%d too early\n",
+ JB_TRACE("JB write ts=%u event=%d duration=%d too early => discard\n",
write_ts,named_event->event_id,named_event->duration);
return JB_DISCARD_TOO_EARLY;
}
- 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;
media_frame->type |= MEDIA_FRAME_TYPE_EVENT;
else if(named_event->edge == 1) {
media_frame->marker = MPF_MARKER_END_OF_EVENT;
}
+ JB_TRACE("JB write ts=%u event=%d duration=%d marker=%d\n",
+ write_ts,named_event->event_id,named_event->duration,media_frame->marker);
jb->event_write_update = &media_frame->event_frame;
write_ts += jb->frame_ts;
if(write_ts > jb->write_ts) {
+ /* advance write pos */
jb->write_ts = write_ts;
}
return result;
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=%"APR_SIZE_T_FMT"\n", jb->read_ts);
+ JB_TRACE("JB read ts=%u\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) {
}
else {
/* underflow */
- JB_TRACE("JB read ts=%"APR_SIZE_T_FMT" underflow\n", jb->read_ts);
+ JB_TRACE("JB read ts=%u underflow\n", jb->read_ts);
media_frame->type = MEDIA_FRAME_TYPE_NONE;
media_frame->marker = MPF_MARKER_NONE;
- jb->write_ts += jb->frame_ts;
}
src_media_frame->type = MEDIA_FRAME_TYPE_NONE;
src_media_frame->marker = MPF_MARKER_NONE;
+ /* advance read pos */
jb->read_ts += jb->frame_ts;
+
+ if(jb->config->time_skew_detection) {
+ /* update statistics after every read */
+ mpf_jitter_buffer_stat_update(jb);
+ }
return TRUE;
}
+
+apr_uint32_t mpf_jitter_buffer_playout_delay_get(const mpf_jitter_buffer_t *jb)
+{
+ if(jb->config->adaptive == 0) {
+ return jb->config->initial_playout_delay;
+ }
+
+ return jb->playout_delay_ts * CODEC_FRAME_TIME_BASE / jb->frame_ts;
+}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_mixer.c 1693 2010-05-16 18:33:07Z achaloyan $
+ * $Id: mpf_mixer.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mpf_mixer.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_multiplier.c 1693 2010-05-16 18:33:07Z achaloyan $
+ * $Id: mpf_multiplier.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mpf_multiplier.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_named_event.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_named_event.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mpf_named_event.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_resampler.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_resampler.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mpf_resampler.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_rtp_attribs.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_rtp_attribs.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "apt_string_table.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_rtp_stream.c 1802 2011-05-13 02:43:12Z achaloyan $
+ * $Id: mpf_rtp_stream.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <apr_network_io.h>
#include "mpf_rtcp_packet.h"
#include "mpf_rtp_defs.h"
#include "mpf_rtp_pt.h"
+#include "mpf_trace.h"
#include "apt_log.h"
/** Max size of RTP packet */
#define RTCP_BYE_SESSION_ENDED "Session ended"
#define RTCP_BYE_TALKSPURT_ENDED "Talskpurt ended"
-#if ENABLE_RTP_PACKET_TRACE
+#if ENABLE_RTP_PACKET_TRACE == 1
#define RTP_TRACE printf
+#elif ENABLE_RTP_PACKET_TRACE == 2
+#define RTP_TRACE mpf_debug_output_trace
#else
-static APR_INLINE void null_trace() {}
-#define RTP_TRACE null_trace
+#define RTP_TRACE mpf_null_trace
#endif
/** RTP stream */
mpf_rtp_stream_receive,
mpf_rtp_tx_stream_open,
mpf_rtp_tx_stream_close,
- mpf_rtp_stream_transmit
+ mpf_rtp_stream_transmit,
+ NULL /* mpf_rtp_stream_trace */
};
-static apt_bool_t mpf_rtp_socket_pair_create(mpf_rtp_stream_t *stream, mpf_rtp_media_descriptor_t *local_media);
+static apt_bool_t mpf_rtp_socket_pair_create(mpf_rtp_stream_t *stream, mpf_rtp_media_descriptor_t *local_media, apt_bool_t bind);
+static apt_bool_t mpf_rtp_socket_pair_bind(mpf_rtp_stream_t *stream, mpf_rtp_media_descriptor_t *local_media);
static void mpf_rtp_socket_pair_close(mpf_rtp_stream_t *stream);
static apt_bool_t mpf_rtcp_report_send(mpf_rtp_stream_t *stream);
local_media->ext_ip = rtp_stream->config->ext_ip;
}
if(local_media->port == 0) {
- /* RTP port management */
- mpf_rtp_config_t *rtp_config = rtp_stream->config;
- apr_port_t first_port_in_search = rtp_config->rtp_port_cur;
- apt_bool_t is_port_ok = FALSE;
-
- do {
- local_media->port = rtp_config->rtp_port_cur;
- rtp_config->rtp_port_cur += 2;
- if(rtp_config->rtp_port_cur == rtp_config->rtp_port_max) {
- rtp_config->rtp_port_cur = rtp_config->rtp_port_min;
- }
- if(mpf_rtp_socket_pair_create(rtp_stream,local_media) == TRUE) {
- is_port_ok = TRUE;
+ if(mpf_rtp_socket_pair_create(rtp_stream,local_media,FALSE) == TRUE) {
+ /* RTP port management */
+ mpf_rtp_config_t *rtp_config = rtp_stream->config;
+ apr_port_t first_port_in_search = rtp_config->rtp_port_cur;
+ apt_bool_t is_port_ok = FALSE;
+ do {
+ local_media->port = rtp_config->rtp_port_cur;
+ rtp_config->rtp_port_cur += 2;
+ if(rtp_config->rtp_port_cur == rtp_config->rtp_port_max) {
+ rtp_config->rtp_port_cur = rtp_config->rtp_port_min;
+ }
+
+ if(mpf_rtp_socket_pair_bind(rtp_stream,local_media) == TRUE) {
+ is_port_ok = TRUE;
+ break;
+ }
+ } while(first_port_in_search != rtp_config->rtp_port_cur);
+
+ if(is_port_ok == FALSE) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Find Free RTP Port %s:[%hu,%hu]",
+ rtp_config->ip.buf,
+ rtp_config->rtp_port_min,
+ rtp_config->rtp_port_max);
+ mpf_rtp_socket_pair_close(rtp_stream);
+ status = FALSE;
}
- } while((is_port_ok == FALSE) && (first_port_in_search != rtp_config->rtp_port_cur));
- if(is_port_ok == FALSE) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Find Free RTP Port %s:[%hu,%hu]",
- rtp_config->ip.buf,
- rtp_config->rtp_port_min,
- rtp_config->rtp_port_max);
- local_media->state = MPF_MEDIA_DISABLED;
+ }
+ else {
status = FALSE;
}
}
- else if(mpf_rtp_socket_pair_create(rtp_stream,local_media) == FALSE) {
- local_media->state = MPF_MEDIA_DISABLED;
+ else if(mpf_rtp_socket_pair_create(rtp_stream,local_media,TRUE) == FALSE) {
status = FALSE;
}
+ if(status == FALSE) {
+ local_media->state = MPF_MEDIA_DISABLED;
+ }
+
if(rtp_stream->settings->ptime) {
local_media->ptime = rtp_stream->settings->ptime;
}
&rtp_stream->settings->codec_list,
rtp_stream->pool);
}
-
- if(capabilities) {
- mpf_codec_list_modify(&local_media->codec_list,&capabilities->codecs);
+ }
+
+ if(capabilities) {
+ if(mpf_codec_list_match(&local_media->codec_list,&capabilities->codecs) == FALSE) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Match Codec List %s:%hu",
+ local_media->ip.buf,
+ local_media->port);
+ local_media->state = MPF_MEDIA_DISABLED;
+ status = FALSE;
}
}
if(apt_string_compare(&rtp_stream->local_media->ip,&media->ip) == FALSE ||
rtp_stream->local_media->port != media->port) {
- if(mpf_rtp_socket_pair_create(rtp_stream,media) == FALSE) {
+ mpf_rtp_socket_pair_close(rtp_stream);
+
+ if(mpf_rtp_socket_pair_create(rtp_stream,media,TRUE) == FALSE) {
media->state = MPF_MEDIA_DISABLED;
status = FALSE;
}
rtp_stream->base->termination->codec_manager,
&media->codec_list,
rtp_stream->pool);
- if(capabilities) {
- mpf_codec_list_modify(&media->codec_list,&capabilities->codecs);
+ }
+
+ if(capabilities) {
+ if(mpf_codec_list_match(&media->codec_list,&capabilities->codecs) == FALSE) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Match Codec List %s:%hu",
+ media->ip.buf,
+ media->port);
+ media->state = MPF_MEDIA_DISABLED;
+ status = FALSE;
}
}
local_media->state = remote_media->state;
local_media->direction = mpf_stream_reverse_direction_get(remote_media->direction);
- rtp_stream->base->direction = local_media->direction;
if(remote_media->state == MPF_MEDIA_ENABLED) {
- if(mpf_codec_list_is_empty(&remote_media->codec_list) == TRUE) {
- /* no remote codecs available, initialize them according to the local codecs */
- mpf_codec_list_copy(&remote_media->codec_list,
- &local_media->codec_list,
- rtp_stream->pool);
- }
+ mpf_codec_list_t *codec_list1 = NULL;
+ mpf_codec_list_t *codec_list2 = NULL;
/* intersect local and remote codecs */
if(rtp_stream->settings->own_preferrence == TRUE) {
- mpf_codec_lists_intersect(
- &local_media->codec_list,
- &remote_media->codec_list);
+ codec_list1 = &local_media->codec_list;
+ codec_list2 = &remote_media->codec_list;
}
else {
- mpf_codec_lists_intersect(
- &remote_media->codec_list,
- &local_media->codec_list);
+ codec_list2 = &local_media->codec_list;
+ codec_list1 = &remote_media->codec_list;
+ }
+
+ if(mpf_codec_lists_intersect(codec_list1,codec_list2) == FALSE) {
+ /* reject RTP/RTCP session */
+ rtp_stream->state = MPF_MEDIA_DISABLED;
+ local_media->direction = STREAM_DIRECTION_NONE;
+ local_media->state = MPF_MEDIA_DISABLED;
+ if(rtp_stream->rtp_l_sockaddr) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Reject RTP Session %s:%hu no codecs matched",
+ rtp_stream->rtp_l_sockaddr->hostname,
+ rtp_stream->rtp_l_sockaddr->port);
+ }
+
+ if(rtp_stream->rtcp_tx_timer) {
+ apt_timer_kill(rtp_stream->rtcp_tx_timer);
+ }
+ if(rtp_stream->rtcp_rx_timer) {
+ apt_timer_kill(rtp_stream->rtcp_rx_timer);
+ }
}
}
+ rtp_stream->base->direction = local_media->direction;
return TRUE;
}
return status;
}
-
static apt_bool_t mpf_rtp_stream_destroy(mpf_audio_stream_t *stream)
{
return TRUE;
{
mpf_rtp_stream_t *rtp_stream = stream->obj;
rtp_receiver_t *receiver = &rtp_stream->receiver;
+ mpf_jb_config_t *jb_config = &rtp_stream->settings->jb_config;
if(!rtp_stream->rtp_socket || !rtp_stream->rtp_l_sockaddr || !rtp_stream->rtp_r_sockaddr) {
return FALSE;
}
receiver->jb = mpf_jitter_buffer_create(
- &rtp_stream->settings->jb_config,
+ jb_config,
stream->rx_descriptor,
codec,
rtp_stream->pool);
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Open RTP Receiver %s:%hu <- %s:%hu playout [%"APR_SIZE_T_FMT" ms]",
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,
+ "Open RTP Receiver %s:%hu <- %s:%hu playout [%u ms] bounds [%u - %u ms] adaptive [%d] skew detection [%d]",
rtp_stream->rtp_l_sockaddr->hostname,
rtp_stream->rtp_l_sockaddr->port,
rtp_stream->rtp_r_sockaddr->hostname,
rtp_stream->rtp_r_sockaddr->port,
- rtp_stream->settings->jb_config.initial_playout_delay);
+ jb_config->initial_playout_delay,
+ jb_config->min_playout_delay,
+ jb_config->max_playout_delay,
+ jb_config->adaptive,
+ jb_config->time_skew_detection);
return TRUE;
}
}
}
- mpf_jitter_buffer_destroy(receiver->jb);
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Close RTP Receiver %s:%hu <- %s:%hu [r:%u l:%u j:%u d:%u i:%u]",
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Close RTP Receiver %s:%hu <- %s:%hu [r:%u l:%u j:%u p:%u d:%u i:%u]",
rtp_stream->rtp_l_sockaddr->hostname,
rtp_stream->rtp_l_sockaddr->port,
rtp_stream->rtp_r_sockaddr->hostname,
receiver->stat.received_packets,
receiver->stat.lost_packets,
receiver->rr_stat.jitter,
+ mpf_jitter_buffer_playout_delay_get(receiver->jb),
receiver->stat.discarded_packets,
receiver->stat.ignored_packets);
+ mpf_jitter_buffer_destroy(receiver->jb);
return TRUE;
}
RTP_TS_DRIFT
} rtp_ts_result_e;
-static APR_INLINE rtp_ts_result_e rtp_rx_ts_update(rtp_receiver_t *receiver, mpf_codec_descriptor_t *descriptor, apr_time_t *time, apr_uint32_t ts)
+static APR_INLINE rtp_ts_result_e rtp_rx_ts_update(rtp_receiver_t *receiver, mpf_codec_descriptor_t *descriptor, apr_time_t *time, apr_uint32_t ts, apr_byte_t *marker)
{
apr_int32_t deviation;
+ apr_int32_t time_diff;
+
+ /* arrival time diff in msec */
+ time_diff = (apr_int32_t)apr_time_as_msec(*time - receiver->history.time_last);
+
+ /* if the time difference is more than the threshold (INTER_TALKSPURT_GAP),
+ and the marker is not set, then this might be a beginning of a
+ new malformed talkspurt */
+ if(!*marker && time_diff > INTER_TALKSPURT_GAP) {
+ /* set the missing marker */
+ *marker = 1;
+ }
/* arrival time diff in samples */
- deviation = (apr_int32_t)apr_time_as_msec(*time - receiver->history.time_last) *
- descriptor->channel_count * descriptor->sampling_rate / 1000;
+ deviation = time_diff * descriptor->channel_count * descriptor->sampling_rate / 1000;
/* arrival timestamp diff */
deviation -= ts - receiver->history.ts_last;
}
receiver->rr_stat.jitter += deviation - ((receiver->rr_stat.jitter + 8) >> 4);
- RTP_TRACE("jitter=%d deviation=%d\n",receiver->rr_stat.jitter,deviation);
+ RTP_TRACE("jitter=%u deviation=%d\n",receiver->rr_stat.jitter,deviation);
receiver->history.time_last = *time;
receiver->history.ts_last = ts;
if(header->type == descriptor->payload_type) {
/* codec */
- if(rtp_rx_ts_update(receiver,descriptor,&time,header->timestamp) == RTP_TS_DRIFT) {
+ apr_byte_t marker = (apr_byte_t)header->marker;
+ if(rtp_rx_ts_update(receiver,descriptor,&time,header->timestamp,&marker) == RTP_TS_DRIFT) {
rtp_rx_restart(receiver);
return FALSE;
}
- if(mpf_jitter_buffer_write(receiver->jb,buffer,size,header->timestamp,(apr_byte_t)header->marker) != JB_OK) {
+ if(mpf_jitter_buffer_write(receiver->jb,buffer,size,header->timestamp,marker) != JB_OK) {
receiver->stat.discarded_packets++;
rtp_rx_failure_threshold_check(receiver);
}
if(++transmitter->current_frames == transmitter->packet_frames) {
rtp_header_t *header = (rtp_header_t*)transmitter->packet_data;
header->sequence = htons(++transmitter->last_seq_num);
- RTP_TRACE("> RTP time=%6lu ssrc=%8lx pt=%3u %cts=%9lu seq=%5u\n",
+ RTP_TRACE("> RTP time=%6u ssrc=%8x pt=%3u %cts=%9u seq=%5hu\n",
(apr_uint32_t)apr_time_usec(apr_time_now()),
transmitter->sr_stat.ssrc, header->type,
(header->marker == 1) ? '*' : ' ',
named_event->edge = (frame->marker == MPF_MARKER_END_OF_EVENT) ? 1 : 0;
header->sequence = htons(++transmitter->last_seq_num);
- RTP_TRACE("> RTP time=%6lu ssrc=%8lx pt=%3u %cts=%9lu seq=%5u event=%2u dur=%3u %c\n",
+ RTP_TRACE("> RTP time=%6u ssrc=%8x pt=%3u %cts=%9u seq=%hu event=%2u dur=%3u %c\n",
(apr_uint32_t)apr_time_usec(apr_time_now()),
transmitter->sr_stat.ssrc,
header->type, (header->marker == 1) ? '*' : ' ',
header->timestamp, transmitter->last_seq_num,
named_event->event_id, named_event->duration,
(named_event->edge == 1) ? '*' : ' ');
-
header->timestamp = htonl(header->timestamp);
named_event->duration = htons((apr_uint16_t)named_event->duration);
if(apr_socket_sendto(
return status;
}
-static apr_socket_t* mpf_socket_create(apr_sockaddr_t **l_sockaddr, const char *ip, apr_port_t port, apr_pool_t *pool)
+static apt_bool_t mpf_socket_create(apr_pool_t *pool, apr_socket_t **socket)
+{
+ if(!socket)
+ return FALSE;
+
+ if(apr_socket_create(socket,APR_INET,SOCK_DGRAM,0,pool) != APR_SUCCESS) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create Socket");
+ *socket = NULL;
+ return FALSE;
+ }
+
+ apr_socket_opt_set(*socket,APR_SO_NONBLOCK,1);
+ apr_socket_timeout_set(*socket,0);
+ return TRUE;
+}
+
+static apt_bool_t mpf_socket_bind(apr_socket_t *socket, const char *ip, apr_port_t port, apr_pool_t *pool, apr_sockaddr_t **l_sockaddr)
{
- apr_socket_t *socket = NULL;
+ if(!socket || !l_sockaddr)
+ return FALSE;
+
*l_sockaddr = NULL;
apr_sockaddr_info_get(
l_sockaddr,
0,
pool);
if(!*l_sockaddr) {
- 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_DEBUG,"Failed to Create Socket %s:%hu", ip,port);
- return NULL;
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Sockaddr %s:%hu",ip,port);
+ return FALSE;
}
- apr_socket_opt_set(socket,APR_SO_NONBLOCK,1);
- apr_socket_timeout_set(socket,0);
- 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_DEBUG,"Failed to Bind Socket to %s:%hu", ip,port);
- apr_socket_close(socket);
- return NULL;
+ return FALSE;
}
- return socket;
+ return TRUE;
}
-static apt_bool_t mpf_rtp_socket_pair_create(mpf_rtp_stream_t *stream, mpf_rtp_media_descriptor_t *local_media)
+/* Create RTP/RTCP sockets */
+static apt_bool_t mpf_rtp_socket_pair_create(mpf_rtp_stream_t *stream, mpf_rtp_media_descriptor_t *local_media, apt_bool_t bind)
{
- 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_DEBUG,"Failed to Create RTP Socket");
+ /* Create and optionally bind RTP socket. Return FALSE in case of an error. */
+ if(mpf_socket_create(stream->pool,&stream->rtp_socket) == FALSE) {
return FALSE;
}
+ if(bind == TRUE) {
+ if(mpf_socket_bind(stream->rtp_socket,local_media->ip.buf,local_media->port,stream->pool,&stream->rtp_l_sockaddr) == FALSE) {
+ apr_socket_close(stream->rtp_socket);
+ stream->rtp_socket = NULL;
+ 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_DEBUG,"Failed to Create RTCP Socket");
+ /* Create and optionally bind RCTP socket. Continue in either way. */
+ if(mpf_socket_create(stream->pool,&stream->rtcp_socket) == TRUE && bind == TRUE) {
+ if(mpf_socket_bind(stream->rtcp_socket,local_media->ip.buf,local_media->port+1,stream->pool,&stream->rtcp_l_sockaddr) == FALSE) {
+ apr_socket_close(stream->rtcp_socket);
+ stream->rtcp_socket = NULL;
+ }
+ }
+ return TRUE;
+}
+
+/* Bind RTP/RTCP sockets */
+static apt_bool_t mpf_rtp_socket_pair_bind(mpf_rtp_stream_t *stream, mpf_rtp_media_descriptor_t *local_media)
+{
+ /* Bind RTP socket. Return FALSE in case of an error. */
+ if(mpf_socket_bind(stream->rtp_socket,local_media->ip.buf,local_media->port,stream->pool,&stream->rtp_l_sockaddr) == FALSE) {
+ return FALSE;
}
+
+ /* Try to bind RTCP socket. Continue in either way. */
+ mpf_socket_bind(stream->rtcp_socket,local_media->ip.buf,local_media->port+1,stream->pool,&stream->rtcp_l_sockaddr);
return TRUE;
}
+/* Close RTP/RTCP sockets */
static void mpf_rtp_socket_pair_close(mpf_rtp_stream_t *stream)
{
if(stream->rtp_socket) {
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_rtp_termination_factory.c 1693 2010-05-16 18:33:07Z achaloyan $
+ * $Id: mpf_rtp_termination_factory.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
+#include <apr_tables.h>
#include "mpf_termination.h"
#include "mpf_rtp_termination_factory.h"
#include "mpf_rtp_stream.h"
#include "apt_log.h"
+typedef struct media_engine_slot_t media_engine_slot_t;
typedef struct rtp_termination_factory_t rtp_termination_factory_t;
+
+struct media_engine_slot_t {
+ mpf_engine_t *media_engine;
+ mpf_rtp_config_t *rtp_config;
+};
+
struct rtp_termination_factory_t {
mpf_termination_factory_t base;
+
mpf_rtp_config_t *config;
+ apr_array_header_t *media_engine_slots;
+ apr_pool_t *pool;
};
static apt_bool_t mpf_rtp_termination_destroy(mpf_termination_t *termination)
mpf_rtp_termination_descriptor_t *rtp_descriptor = descriptor;
mpf_audio_stream_t *audio_stream = termination->audio_stream;
if(!audio_stream) {
- rtp_termination_factory_t *termination_factory = (rtp_termination_factory_t*)termination->termination_factory;
+ int i;
+ media_engine_slot_t *slot;
+ rtp_termination_factory_t *rtp_termination_factory = (rtp_termination_factory_t*)termination->termination_factory;
+ mpf_rtp_config_t *rtp_config = rtp_termination_factory->config;
+ for(i=0; i<rtp_termination_factory->media_engine_slots->nelts; i++) {
+ slot = &APR_ARRAY_IDX(rtp_termination_factory->media_engine_slots,i,media_engine_slot_t);
+ if(slot->media_engine == termination->media_engine) {
+ rtp_config = slot->rtp_config;
+ break;
+ }
+ }
audio_stream = mpf_rtp_stream_create(
termination,
- termination_factory->config,
+ rtp_config,
rtp_descriptor->audio.settings,
termination->pool);
if(!audio_stream) {
return termination;
}
+static apt_bool_t mpf_rtp_factory_engine_assign(mpf_termination_factory_t *termination_factory, mpf_engine_t *media_engine)
+{
+ int i;
+ media_engine_slot_t *slot;
+ mpf_rtp_config_t *rtp_config;
+ rtp_termination_factory_t *rtp_termination_factory;
+ if(!termination_factory || !media_engine) {
+ return FALSE;
+ }
+
+ rtp_termination_factory = (rtp_termination_factory_t *) termination_factory;
+ for(i=0; i<rtp_termination_factory->media_engine_slots->nelts; i++) {
+ slot = &APR_ARRAY_IDX(rtp_termination_factory->media_engine_slots,i,media_engine_slot_t);
+ if(slot->media_engine == media_engine) {
+ /* already exists, just return true */
+ return TRUE;
+ }
+ }
+
+ slot = apr_array_push(rtp_termination_factory->media_engine_slots);
+ slot->media_engine = media_engine;
+ rtp_config = mpf_rtp_config_alloc(rtp_termination_factory->pool);
+ *rtp_config = *rtp_termination_factory->config;
+ slot->rtp_config = rtp_config;
+
+ if(rtp_termination_factory->media_engine_slots->nelts > 1) {
+ mpf_rtp_config_t *rtp_config_prev;
+
+ /* split RTP port range evenly among assigned media engines */
+ apr_uint16_t ports_per_engine = (apr_uint16_t)((rtp_termination_factory->config->rtp_port_max - rtp_termination_factory->config->rtp_port_min) /
+ rtp_termination_factory->media_engine_slots->nelts);
+ if(ports_per_engine % 2 != 0) {
+ /* number of ports per engine should be even (RTP/RTCP pair)*/
+ ports_per_engine--;
+ }
+ /* rewrite max RTP port for the first slot */
+ slot = &APR_ARRAY_IDX(rtp_termination_factory->media_engine_slots,0,media_engine_slot_t);
+ rtp_config_prev = slot->rtp_config;
+ rtp_config_prev->rtp_port_max = rtp_config_prev->rtp_port_min + ports_per_engine;
+
+ /* rewrite cur, min and max RTP ports for the slots between first and last, if any */
+ for(i=1; i<rtp_termination_factory->media_engine_slots->nelts-1; i++) {
+ slot = &APR_ARRAY_IDX(rtp_termination_factory->media_engine_slots,i,media_engine_slot_t);
+ rtp_config = slot->rtp_config;
+ rtp_config->rtp_port_min = rtp_config_prev->rtp_port_max;
+ rtp_config->rtp_port_max = rtp_config->rtp_port_min + ports_per_engine;
+
+ rtp_config->rtp_port_cur = rtp_config->rtp_port_min;
+
+ rtp_config_prev = rtp_config;
+ }
+
+ /* rewrite cur and min but leave max RTP port for the last slot */
+ slot = &APR_ARRAY_IDX(rtp_termination_factory->media_engine_slots,
+ rtp_termination_factory->media_engine_slots->nelts-1,media_engine_slot_t);
+ rtp_config = slot->rtp_config;
+ rtp_config->rtp_port_min = rtp_config_prev->rtp_port_max;
+ rtp_config->rtp_port_cur = rtp_config->rtp_port_min;
+ }
+ return TRUE;
+}
+
MPF_DECLARE(mpf_termination_factory_t*) mpf_rtp_termination_factory_create(
mpf_rtp_config_t *rtp_config,
apr_pool_t *pool)
rtp_config->rtp_port_cur = rtp_config->rtp_port_min;
rtp_termination_factory = apr_palloc(pool,sizeof(rtp_termination_factory_t));
rtp_termination_factory->base.create_termination = mpf_rtp_termination_create;
+ rtp_termination_factory->base.assign_engine = mpf_rtp_factory_engine_assign;
+ rtp_termination_factory->pool = pool;
rtp_termination_factory->config = rtp_config;
+ rtp_termination_factory->media_engine_slots = apr_array_make(pool,1,sizeof(media_engine_slot_t));
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create RTP Termination Factory %s:[%hu,%hu]",
rtp_config->ip.buf,
rtp_config->rtp_port_min,
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_scheduler.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_scheduler.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mpf_scheduler.h"
#else
+#include "apt_task.h"
+
static APR_INLINE void mpf_scheduler_init(mpf_scheduler_t *scheduler)
{
scheduler->thread = NULL;
apr_interval_time_t time_drift = 0;
apr_time_t time_now, time_last;
+#if APR_HAS_SETTHREADNAME
+ apr_thread_name_set("MPF Scheduler");
+#endif
time_now = apr_time_now();
while(scheduler->running == TRUE) {
time_last = time_now;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_stream.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mpf_stream.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mpf_stream.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_termination.c 1693 2010-05-16 18:33:07Z achaloyan $
+ * $Id: mpf_termination.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mpf_termination.h"
termination->pool = pool;
termination->name = "media-tm";
termination->obj = obj;
- termination->event_handler_obj = NULL;
+ termination->media_engine = NULL;
termination->event_handler = NULL;
termination->codec_manager = NULL;
termination->timer_queue = NULL;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_termination_factory.c 1693 2010-05-16 18:33:07Z achaloyan $
+ * $Id: mpf_termination_factory.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mpf_termination_factory.h"
#include "mpf_termination.h"
+/** Assign media engine to termination factory */
+MPF_DECLARE(apt_bool_t) mpf_termination_factory_engine_assign(
+ mpf_termination_factory_t *termination_factory,
+ mpf_engine_t *media_engine)
+{
+ if(termination_factory && termination_factory->assign_engine && media_engine) {
+ return termination_factory->assign_engine(termination_factory,media_engine);
+ }
+ return FALSE;
+}
+
/** Create MPF termination from termination factory */
MPF_DECLARE(mpf_termination_t*) mpf_termination_create(
mpf_termination_factory_t *termination_factory,
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = -I$(top_srcdir)/libs/mrcp-client/include \
-I$(top_srcdir)/libs/mrcp-signaling/include \
-I$(top_srcdir)/libs/mrcp/resources/include \
-I$(top_srcdir)/libs/mpf/include \
-I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+ $(UNIMRCP_APR_INCLUDES)
noinst_LTLIBRARIES = libmrcpclient.la
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_application.h 1779 2010-09-01 05:54:34Z achaloyan $
+ * $Id: mrcp_application.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_APPLICATION_H
*/
MRCP_DECLARE(const apt_str_t*) mrcp_application_session_id_get(const mrcp_session_t *session);
+/**
+ * Get SIP or RTSP response code.
+ * @param session the session to use
+ */
+MRCP_DECLARE(int) mrcp_application_session_response_code_get(const mrcp_session_t *session);
+
/**
* Get external object associated with the session.
* @param session the session to get object from
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_client.h 1733 2010-06-07 17:26:49Z achaloyan $
+ * $Id: mrcp_client.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_CLIENT_H
mrcp_sig_settings_t *signaling_settings,
apr_pool_t *pool);
+/** Create MRCP profile (extended version) */
+MRCP_DECLARE(mrcp_profile_t*) mrcp_client_profile_create_ex(
+ mrcp_version_e mrcp_version,
+ mrcp_resource_factory_t *resource_factory,
+ mrcp_sa_factory_t *sa_factory,
+ mrcp_ca_factory_t *ca_factory,
+ mpf_engine_factory_t *mpf_factory,
+ mpf_termination_factory_t *rtp_factory,
+ mpf_rtp_settings_t *rtp_settings,
+ mrcp_sig_settings_t *signaling_settings,
+ apr_pool_t *pool);
+
+/**
+ * Set a tag to the profile.
+ * @param profile the profile to set a tag for
+ * @param tag the tag to set
+ */
+MRCP_DECLARE(void) mrcp_client_profile_tag_set(mrcp_profile_t *profile, const char *tag);
+
/**
* Register MRCP profile.
* @param client the MRCP client to set profile for
*/
MRCP_DECLARE(mrcp_profile_t*) mrcp_client_profile_get(const mrcp_client_t *client, const char *name);
+/**
+ * Get available profiles.
+ * @param client the MRCP client to get the profile from
+ * @param profiles the array of profiles to be filled in
+ * @param count the max number of profiles on entry; and the number of profiles filled in on exit
+ * @param tag the tag to be used as a filter (no filter is specified if tag is NULL)
+ * @return FALSE if the provided max number of profiles is less than the actual number of profiles
+ */
+MRCP_DECLARE(apt_bool_t) mrcp_client_profiles_get(const mrcp_client_t *client, mrcp_profile_t *profiles[], apr_size_t *count, const char *tag);
+
/**
* Get directory layout.
* @param client the MRCP client to get from
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_client_session.h 1733 2010-06-07 17:26:49Z achaloyan $
+ * $Id: mrcp_client_session.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_CLIENT_SESSION_H
mrcp_sig_status_code_e status;
/** Number of in-progress sub requests */
apr_size_t subrequest_count;
+ /** True, if server unexpectedly closed session/connection */
+ apt_bool_t disconnected;
};
/** MRCP channel */
/** MRCP profile */
struct mrcp_profile_t {
+ /** Unique profile name */
+ const char *name;
+ /** Arbitrary tag set/used by user application */
+ const char *tag;
+ /** MRCP version */
+ mrcp_version_e mrcp_version;
/** MRCP resource factory */
mrcp_resource_factory_t *resource_factory;
- /** Media processing engine */
- mpf_engine_t *media_engine;
+ /** Media engine factory */
+ mpf_engine_factory_t *mpf_factory;
/** RTP termination factory */
mpf_termination_factory_t *rtp_termination_factory;
- /** Signaling agent */
- mrcp_sig_agent_t *signaling_agent;
- /** Connection agent */
- mrcp_connection_agent_t *connection_agent;
-
+ /** Signaling agent factory */
+ mrcp_sa_factory_t *sa_factory;
+ /** Connection agent factory */
+ mrcp_ca_factory_t *ca_factory;
/** Signaling settings */
mrcp_sig_settings_t *signaling_settings;
/** RTP settings */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_client_types.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_client_types.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_CLIENT_TYPES_H
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="mrcpclient"\r
- ProjectGUID="{72782932-37CC-46AE-8C7F-9A7B1A6EE108}"\r
- RootNamespace="mrcpclient"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- <Platform\r
- Name="x64"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpclient.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpclient.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpclient.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpclient.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\include\mrcp_application.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_client.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_client_session.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_client_types.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\src\mrcp_application.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_client.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_client_session.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>mrcpclient</ProjectName>\r
- <ProjectGuid>{72782932-37CC-46AE-8C7F-9A7B1A6EE108}</ProjectGuid>\r
- <RootNamespace>mrcpclient</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpclient.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpclient.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpclient.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpclient.props" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp_application.h" />\r
- <ClInclude Include="include\mrcp_client.h" />\r
- <ClInclude Include="include\mrcp_client_session.h" />\r
- <ClInclude Include="include\mrcp_client_types.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\mrcp_application.c" />\r
- <ClCompile Include="src\mrcp_client.c" />\r
- <ClCompile Include="src\mrcp_client_session.c" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{72782932-37CC-46AE-8C7F-9A7B1A6EE108}</ProjectGuid>
+ <RootNamespace>mrcpclient</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpclient.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpclient.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpclient.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpclient.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="include\mrcp_application.h" />
+ <ClInclude Include="include\mrcp_client.h" />
+ <ClInclude Include="include\mrcp_client_session.h" />
+ <ClInclude Include="include\mrcp_client_types.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\mrcp_application.c" />
+ <ClCompile Include="src\mrcp_client.c" />
+ <ClCompile Include="src\mrcp_client_session.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\mrcp-signaling\mrcpsignaling.vcxproj">
+ <Project>{12a49562-bab9-43a3-a21d-15b60bbb4c31}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\mrcpv2-transport\mrcpv2transport.vcxproj">
+ <Project>{a9edac04-6a5f-4ba7-bc0d-cce7b255b6ea}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup>\r
- <Filter Include="include">\r
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="src">\r
- <UniqueIdentifier>{f3dc550f-1a0f-4b9e-b077-3b6940dc5531}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp_session.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_session_descriptor.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_sig_agent.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_sig_types.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\mrcp_session_descriptor.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mrcp_sig_agent.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{dc4325fe-8e7a-4a40-ab63-4173d85cf131}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="include\mrcp_application.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_client.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_client_session.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_client_types.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\mrcp_application.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_client.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_client_session.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_application.c 1792 2011-01-10 21:08:52Z achaloyan $
+ * $Id: mrcp_application.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mrcp_application.h"
#include "mrcp_client.h"
#include "mrcp_client_session.h"
+#include "mrcp_session_descriptor.h"
#include "mrcp_message.h"
#include "mrcp_sig_agent.h"
#include "mrcp_resource_factory.h"
session->base.log_obj = obj;
session->profile = profile;
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create MRCP Handle "APT_PTR_FMT" [%s]",
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_NOTICE,session->base.log_obj,"Create MRCP Handle "APT_PTR_FMT" [%s]",
MRCP_SESSION_PTR(session),
profile_name);
return &session->base;
return &session->id;
}
+/** Get SIP or RTSP response code */
+MRCP_DECLARE(int) mrcp_application_session_response_code_get(const mrcp_session_t *session)
+{
+ mrcp_client_session_t *client_session = (mrcp_client_session_t*)session;
+ if(!client_session || !client_session->answer) {
+ return 0;
+ }
+ return client_session->answer->response_code;
+}
+
/** Get external object associated with the session */
MRCP_DECLARE(void*) mrcp_application_session_object_get(const mrcp_session_t *session)
{
if(!session) {
return FALSE;
}
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Destroy MRCP Handle %s",session->name);
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_NOTICE,session->log_obj,"Destroy MRCP Handle %s",session->name);
mrcp_session_destroy(session);
return TRUE;
}
if(termination) {
/* Media engine and RTP factory must be specified in this case */
- if(!profile->media_engine || !profile->rtp_termination_factory) {
+ if(!profile->mpf_factory || !profile->rtp_termination_factory) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create Channel: invalid profile");
return FALSE;
}
}
mrcp_message = mrcp_request_create(
channel->resource,
- profile->signaling_agent->mrcp_version,
+ profile->mrcp_version,
method_id,
session->pool);
return mrcp_message;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_client.c 1733 2010-06-07 17:26:49Z achaloyan $
+ * $Id: mrcp_client.c 2234 2014-11-12 01:38:17Z achaloyan@gmail.com $
*/
#include <apr_thread_cond.h>
#include "mrcp_sig_agent.h"
#include "mrcp_client_session.h"
#include "mrcp_client_connection.h"
+#include "mrcp_ca_factory.h"
+#include "mpf_engine_factory.h"
#include "apt_consumer_task.h"
#include "apt_pool.h"
#include "apt_log.h"
mpf_rtp_settings_t *rtp_settings,
mrcp_sig_settings_t *signaling_settings,
apr_pool_t *pool)
+{
+ mrcp_sa_factory_t *sa_factory = NULL;
+ mrcp_ca_factory_t *ca_factory = NULL;
+ mpf_engine_factory_t *mpf_factory = NULL;
+ mrcp_version_e mrcp_version = MRCP_VERSION_2;
+ if(!connection_agent)
+ mrcp_version = MRCP_VERSION_1;
+
+ if(signaling_agent) {
+ sa_factory = mrcp_sa_factory_create(pool);
+ mrcp_sa_factory_agent_add(sa_factory,signaling_agent);
+ }
+
+ if(connection_agent) {
+ ca_factory = mrcp_ca_factory_create(pool);
+ mrcp_ca_factory_agent_add(ca_factory,connection_agent);
+ }
+
+ if(media_engine) {
+ mpf_factory = mpf_engine_factory_create(pool);
+ mpf_engine_factory_engine_add(mpf_factory,media_engine);
+ }
+
+ return mrcp_client_profile_create_ex(
+ mrcp_version,
+ resource_factory,
+ sa_factory,
+ ca_factory,
+ mpf_factory,
+ rtp_factory,
+ rtp_settings,
+ signaling_settings,
+ pool);
+}
+
+/** Create MRCP profile (extended version) */
+MRCP_DECLARE(mrcp_profile_t*) mrcp_client_profile_create_ex(
+ mrcp_version_e mrcp_version,
+ mrcp_resource_factory_t *resource_factory,
+ mrcp_sa_factory_t *sa_factory,
+ mrcp_ca_factory_t *ca_factory,
+ mpf_engine_factory_t *mpf_factory,
+ mpf_termination_factory_t *rtp_factory,
+ mpf_rtp_settings_t *rtp_settings,
+ mrcp_sig_settings_t *signaling_settings,
+ apr_pool_t *pool)
{
mrcp_profile_t *profile = apr_palloc(pool,sizeof(mrcp_profile_t));
+ profile->name = NULL;
+ profile->tag = NULL;
+ profile->mrcp_version = mrcp_version;
profile->resource_factory = resource_factory;
- profile->media_engine = media_engine;
+ profile->mpf_factory = mpf_factory;
profile->rtp_termination_factory = rtp_factory;
profile->rtp_settings = rtp_settings;
- profile->signaling_agent = signaling_agent;
- profile->connection_agent = connection_agent;
+ profile->sa_factory = sa_factory;
+ profile->ca_factory = ca_factory;
profile->signaling_settings = signaling_settings;
+
+ if(mpf_factory && rtp_factory)
+ mpf_engine_factory_rtp_factory_assign(mpf_factory,rtp_factory);
return profile;
}
+/** Set a tag to the profile */
+MRCP_DECLARE(void) mrcp_client_profile_tag_set(mrcp_profile_t *profile, const char *tag)
+{
+ if(profile) {
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Set Profile Tag [%s]",tag);
+ profile->tag = tag;
+ }
+}
+
/** Register MRCP profile */
MRCP_DECLARE(apt_bool_t) mrcp_client_profile_register(mrcp_client_t *client, mrcp_profile_t *profile, const char *name)
{
if(!profile || !name) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Register Profile: no name",name);
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Register Profile: no name");
return FALSE;
}
if(!profile->resource_factory) {
profile->resource_factory = client->resource_factory;
}
- if(!profile->signaling_agent) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Register Profile [%s]: missing signaling agent",name);
+ if(!profile->sa_factory) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Register Profile [%s]: missing signaling agent factory",name);
return FALSE;
}
- if(profile->signaling_agent->mrcp_version == MRCP_VERSION_2 &&
- !profile->connection_agent) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Register Profile [%s]: missing connection agent",name);
+ if(mrcp_sa_factory_is_empty(profile->sa_factory) == TRUE) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Register Profile [%s]: empty signaling agent factory",name);
return FALSE;
}
+ if(profile->mrcp_version == MRCP_VERSION_2) {
+ if(!profile->ca_factory) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Register Profile [%s]: missing connection agent factory",name);
+ return FALSE;
+ }
+ if(mrcp_ca_factory_is_empty(profile->ca_factory) == TRUE) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Register Profile [%s]: empty connection agent factory",name);
+ return FALSE;
+ }
+ }
+
+ /* mpf_factory may not be specified; but if it is specified, it must not be empty */
+ if(profile->mpf_factory) {
+ if(mpf_engine_factory_is_empty(profile->mpf_factory) == TRUE) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Register Profile [%s]: empty media engine factory",name);
+ return FALSE;
+ }
+ }
if(!profile->signaling_settings) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Register Profile [%s]: missing signaling settings",name);
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Register Profile [%s]",name);
apr_hash_set(client->profile_table,name,APR_HASH_KEY_STRING,profile);
+ profile->name = name;
return TRUE;
}
return apr_hash_get(client->profile_table,name,APR_HASH_KEY_STRING);
}
+/** Get available profiles */
+MRCP_DECLARE(apt_bool_t) mrcp_client_profiles_get(const mrcp_client_t *client, mrcp_profile_t *profiles[], apr_size_t *count, const char *tag)
+{
+ apr_hash_index_t *it;
+ void *val;
+ mrcp_profile_t *profile;
+ apr_size_t i = 0;
+ apt_bool_t status = TRUE;
+
+ if(!profiles || !count) {
+ return FALSE;
+ }
+
+ for(it = apr_hash_first(client->pool, client->profile_table); it; it = apr_hash_next(it)) {
+ apr_hash_this(it, NULL, NULL, &val);
+ if(!val) continue;
+
+ if(i >= *count) {
+ status = FALSE;
+ break;
+ }
+
+ profile = val;
+ if(!tag || (profile->tag && strcasecmp(tag,profile->tag) == 0)) {
+ profiles[i] = profile;
+ i++;
+ }
+ }
+ *count = i;
+ return status;
+}
+
/** Register MRCP application */
MRCP_DECLARE(apt_bool_t) mrcp_client_application_register(mrcp_client_t *client, mrcp_application_t *application, const char *name)
{
session->request_queue = apt_list_create(pool);
session->mpf_task_msg = NULL;
session->subrequest_count = 0;
+ session->disconnected = FALSE;
session->state = SESSION_STATE_NONE;
session->status = MRCP_SIG_STATUS_CODE_SUCCESS;
return session;
void mrcp_client_session_add(mrcp_client_t *client, mrcp_client_session_t *session)
{
if(session) {
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Add MRCP Handle "APT_NAMESID_FMT,
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_INFO,session->base.log_obj,"Add MRCP Handle "APT_NAMESID_FMT,
session->base.name,
MRCP_SESSION_SID(&session->base));
- apr_hash_set(client->session_table,session,sizeof(session),session);
+ apr_hash_set(client->session_table,session,sizeof(void*),session);
}
}
void mrcp_client_session_remove(mrcp_client_t *client, mrcp_client_session_t *session)
{
if(session) {
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Remove MRCP Handle "APT_NAMESID_FMT,
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_INFO,session->base.log_obj,"Remove MRCP Handle "APT_NAMESID_FMT,
session->base.name,
MRCP_SESSION_SID(&session->base));
- apr_hash_set(client->session_table,session,sizeof(session),NULL);
+ apr_hash_set(client->session_table,session,sizeof(void*),NULL);
}
}
app_message->control_message = NULL;
app_message->descriptor = NULL;
*slot = app_message;
+ return apt_task_msg_signal(task,task_msg);
}
- return apt_task_msg_signal(task,task_msg);
+ return FALSE;
}
apt_bool_t mrcp_app_control_task_msg_signal(mrcp_session_t *session, mrcp_channel_t *channel, mrcp_message_t *message)
app_message->channel = channel;
app_message->control_message = message;
*slot = app_message;
+ return apt_task_msg_signal(task,task_msg);
}
- return apt_task_msg_signal(task,task_msg);
+ return FALSE;
}
static apt_bool_t mrcp_client_signaling_task_msg_signal(sig_agent_task_msg_type_e type, mrcp_session_t *session, mrcp_session_descriptor_t *descriptor, mrcp_message_t *message)
{
sig_agent_task_msg_data_t *data;
apt_task_msg_t *task_msg = apt_task_msg_acquire(session->signaling_agent->msg_pool);
- task_msg->type = MRCP_CLIENT_SIGNALING_TASK_MSG;
- task_msg->sub_type = type;
- data = (sig_agent_task_msg_data_t*) task_msg->data;
- data->session = (mrcp_client_session_t*)session;
- data->descriptor = descriptor;
- data->message = message;
-
- return apt_task_msg_parent_signal(session->signaling_agent->task,task_msg);
+ if(task_msg) {
+ task_msg->type = MRCP_CLIENT_SIGNALING_TASK_MSG;
+ task_msg->sub_type = type;
+ data = (sig_agent_task_msg_data_t*) task_msg->data;
+ data->session = (mrcp_client_session_t*)session;
+ data->descriptor = descriptor;
+ data->message = message;
+ return apt_task_msg_parent_signal(session->signaling_agent->task,task_msg);
+ }
+ return FALSE;
}
static apt_bool_t mrcp_client_connection_task_msg_signal(
}
task = apt_consumer_task_base_get(client->task);
task_msg = apt_task_msg_acquire(client->cnt_msg_pool);
- task_msg->type = MRCP_CLIENT_CONNECTION_TASK_MSG;
- task_msg->sub_type = type;
- data = (connection_agent_task_msg_data_t*) task_msg->data;
- data->channel = channel ? channel->obj : NULL;
- data->descriptor = descriptor;
- data->message = message;
- data->status = status;
-
- return apt_task_msg_signal(task,task_msg);
+ if(task_msg) {
+ task_msg->type = MRCP_CLIENT_CONNECTION_TASK_MSG;
+ task_msg->sub_type = type;
+ data = (connection_agent_task_msg_data_t*) task_msg->data;
+ data->channel = channel ? channel->obj : NULL;
+ data->descriptor = descriptor;
+ data->message = message;
+ data->status = status;
+ return apt_task_msg_signal(task,task_msg);
+ }
+ return FALSE;
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_client_session.c 1799 2011-05-12 02:32:32Z achaloyan $
+ * $Id: mrcp_client_session.c 2237 2014-11-12 01:48:46Z achaloyan@gmail.com $
*/
#include "mrcp_client_session.h"
#include "mrcp_session_descriptor.h"
#include "mrcp_control_descriptor.h"
#include "mrcp_message.h"
+#include "mrcp_ca_factory.h"
+#include "mpf_engine_factory.h"
#include "mpf_termination_factory.h"
#include "mpf_stream.h"
#include "apt_consumer_task.h"
#define MRCP_SESSION_NAMESID(session) \
session->base.name, MRCP_SESSION_SID(&session->base)
+#define IS_SESSION_TERMINATE(app_message) \
+ (app_message->message_type == MRCP_APP_MESSAGE_TYPE_SIGNALING && \
+ app_message->sig_message.command_id == MRCP_SIG_COMMAND_SESSION_TERMINATE)
void mrcp_client_session_add(mrcp_client_t *client, mrcp_client_session_t *session);
void mrcp_client_session_remove(mrcp_client_t *client, mrcp_client_session_t *session);
static APR_INLINE mrcp_version_e mrcp_session_version_get(mrcp_client_session_t *session)
{
- return session->base.signaling_agent->mrcp_version;
+ return session->profile->mrcp_version;
}
static APR_INLINE void mrcp_client_session_state_set(mrcp_client_session_t *session, mrcp_client_session_state_e state)
{
if(session->subrequest_count != 0) {
/* error case */
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_ERROR,session->base.log_obj,"Unexpected State Change [%d] pending subrequests [%d] "APT_NAMESID_FMT,
+ state,
+ session->subrequest_count,
+ MRCP_SESSION_NAMESID(session));
session->subrequest_count = 0;
}
session->state = state;
return mrcp_app_sig_response_raise(session,TRUE);
}
- apt_obj_log(APT_LOG_MARK,APT_PRIO_INFO,session->base.log_obj,"Receive Answer "APT_NAMESID_FMT" [c:%d a:%d v:%d]",
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_INFO,session->base.log_obj,"Receive Answer "APT_NAMESID_FMT" [c:%d a:%d v:%d] Status %d",
MRCP_SESSION_NAMESID(session),
descriptor->control_media_arr->nelts,
descriptor->audio_media_arr->nelts,
- descriptor->video_media_arr->nelts);
+ descriptor->video_media_arr->nelts,
+ descriptor->response_code);
+
+ if(descriptor->response_code >=200 && descriptor->response_code < 300) {
+ mrcp_client_session_state_set(session,SESSION_STATE_PROCESSING_ANSWER);
+ if(session->context) {
+ /* first, reset/destroy existing associations and topology */
+ if(mpf_engine_topology_message_add(
+ session->base.media_engine,
+ MPF_RESET_ASSOCIATIONS,session->context,
+ &session->mpf_task_msg) == TRUE){
+ mrcp_client_session_subrequest_add(session);
+ }
+ }
- mrcp_client_session_state_set(session,SESSION_STATE_PROCESSING_ANSWER);
- if(session->context) {
- /* first, reset/destroy existing associations and topology */
- if(mpf_engine_topology_message_add(
- session->profile->media_engine,
- MPF_RESET_ASSOCIATIONS,session->context,
- &session->mpf_task_msg) == TRUE){
- mrcp_client_session_subrequest_add(session);
+ if(mrcp_session_version_get(session) == MRCP_VERSION_1) {
+ if(mrcp_client_resource_answer_process(session,descriptor) != TRUE) {
+ session->status = MRCP_SIG_STATUS_CODE_FAILURE;
+ }
+ }
+ else {
+ mrcp_client_control_media_answer_process(session,descriptor);
+ mrcp_client_av_media_answer_process(session,descriptor);
}
- }
- if(mrcp_session_version_get(session) == MRCP_VERSION_1) {
- if(mrcp_client_resource_answer_process(session,descriptor) != TRUE) {
- session->status = MRCP_SIG_STATUS_CODE_FAILURE;
+ if(session->context) {
+ /* apply topology based on assigned associations */
+ if(mpf_engine_topology_message_add(
+ session->base.media_engine,
+ MPF_APPLY_TOPOLOGY,session->context,
+ &session->mpf_task_msg) == TRUE) {
+ mrcp_client_session_subrequest_add(session);
+ }
+
+ mpf_engine_message_send(session->base.media_engine,&session->mpf_task_msg);
}
}
else {
- mrcp_client_control_media_answer_process(session,descriptor);
- mrcp_client_av_media_answer_process(session,descriptor);
- }
-
- if(session->context) {
- /* apply topology based on assigned associations */
- if(mpf_engine_topology_message_add(
- session->profile->media_engine,
- MPF_APPLY_TOPOLOGY,session->context,
- &session->mpf_task_msg) == TRUE) {
- mrcp_client_session_subrequest_add(session);
- }
-
- mpf_engine_message_send(session->profile->media_engine,&session->mpf_task_msg);
+ session->status = MRCP_SIG_STATUS_CODE_TERMINATE;
}
/* store received answer */
MRCP_SESSION_NAMESID(session));
return FALSE;
}
-
- if(session->active_request) {
- /* raise app response */
- session->status = MRCP_SIG_STATUS_CODE_TERMINATE;
- mrcp_app_failure_message_raise(session);
-
- /* cancel remaing requests, but do process session termination request (if any) */
- do {
- session->active_request = apt_list_pop_front(session->request_queue);
- if(session->active_request) {
- const mrcp_app_message_t *app_message = session->active_request;
- if(app_message->message_type == MRCP_APP_MESSAGE_TYPE_SIGNALING &&
- app_message->sig_message.command_id == MRCP_SIG_COMMAND_SESSION_TERMINATE) {
- /* process session termination */
- mrcp_app_request_dispatch(session,app_message);
- break;
- }
- /* cancel pending request */
- session->status = MRCP_SIG_STATUS_CODE_CANCEL;
- mrcp_app_failure_message_raise(session);
- }
- }
- while(session->active_request);
- }
- else {
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_DEBUG,session->base.log_obj,"Mark Session as Disconnected "APT_NAMESID_FMT,
+ MRCP_SESSION_NAMESID(session));
+ session->disconnected = TRUE;
+ if(!session->active_request) {
/* raise app event */
mrcp_app_sig_event_raise(session,NULL);
}
+
return TRUE;
}
return FALSE;
}
session->active_request = NULL;
+ if(session->disconnected == TRUE) {
+ session->status = MRCP_SIG_STATUS_CODE_TERMINATE;
+ }
response = mrcp_client_app_response_create(request,session->status,session->base.pool);
apt_obj_log(APT_LOG_MARK,APT_PRIO_INFO,session->base.log_obj,"Raise App Response "APT_NAMESID_FMT" [%d] %s [%d]",
MRCP_SESSION_NAMESID(session),
rtp_termination_slot_t *slot;
for(i=0; i<session->terminations->nelts; i++) {
slot = &APR_ARRAY_IDX(session->terminations,i,rtp_termination_slot_t);
- if(slot && slot->termination == termination) {
+ if(slot->termination == termination) {
return slot;
}
}
else {
mrcp_control_descriptor_t *control_media;
if(!channel->control_channel) {
- channel->control_channel = mrcp_client_control_channel_create(profile->connection_agent,channel,pool);
+ channel->control_channel = mrcp_client_control_channel_create(session->base.connection_agent,channel,pool);
mrcp_client_control_channel_log_obj_set(channel->control_channel,session->base.log_obj);
}
control_media = mrcp_control_offer_create(pool);
if(!session->context) {
/* create media context first */
session->context = mpf_engine_context_create(
- profile->media_engine,
+ session->base.media_engine,
session->base.name,
session,5,pool);
}
MRCP_SESSION_NAMESID(session),
mpf_termination_name_get(channel->termination));
if(mpf_engine_termination_message_add(
- profile->media_engine,
+ session->base.media_engine,
MPF_ADD_TERMINATION,session->context,channel->termination,NULL,
&session->mpf_task_msg) == TRUE) {
channel->waiting_for_termination = TRUE;
media->state = MPF_MEDIA_ENABLED;
media->direction = mpf_stream_reverse_direction_get(audio_stream->direction);
rtp_descriptor->audio.local = media;
+ if(audio_stream->capabilities) {
+ rtp_descriptor->audio.capabilities = mpf_stream_capabilities_clone(audio_stream->capabilities,pool);
+ rtp_descriptor->audio.capabilities->direction = media->direction;
+ }
}
/* create rtp termination */
- termination = mpf_termination_create(profile->rtp_termination_factory,session,pool);
+ termination = mpf_termination_create(session->base.rtp_factory,session,pool);
slot->termination = termination;
apt_obj_log(APT_LOG_MARK,APT_PRIO_DEBUG,session->base.log_obj,"Add Media Termination "APT_NAMESIDRES_FMT,
MRCP_SESSION_NAMESID(session),
/* send add termination request (add to media context) */
if(mpf_engine_termination_message_add(
- profile->media_engine,
+ session->base.media_engine,
MPF_ADD_TERMINATION,session->context,termination,rtp_descriptor,
&session->mpf_task_msg) == TRUE) {
slot->waiting = TRUE;
mrcp_client_session_subrequest_add(session);
}
- mpf_engine_message_send(profile->media_engine,&session->mpf_task_msg);
+ mpf_engine_message_send(session->base.media_engine,&session->mpf_task_msg);
}
else {
/* bypass media mode */
slot->id = session->offer->audio_media_arr->nelts - 1;
}
}
- }
+ }
}
slot->descriptor = rtp_descriptor;
static apt_bool_t mrcp_client_session_terminate(mrcp_client_session_t *session)
{
- mrcp_profile_t *profile;
mrcp_channel_t *channel;
rtp_termination_slot_t *slot;
int i;
apt_obj_log(APT_LOG_MARK,APT_PRIO_INFO,session->base.log_obj,"Terminate Session "APT_NAMESID_FMT,
MRCP_SESSION_NAMESID(session));
- profile = session->profile;
mrcp_client_session_state_set(session,SESSION_STATE_TERMINATING);
if(session->context) {
/* first destroy existing topology */
if(mpf_engine_topology_message_add(
- session->profile->media_engine,
+ session->base.media_engine,
MPF_DESTROY_TOPOLOGY,session->context,
&session->mpf_task_msg) == TRUE){
mrcp_client_session_subrequest_add(session);
MRCP_SESSION_NAMESID(session),
mpf_termination_name_get(channel->termination));
if(mpf_engine_termination_message_add(
- profile->media_engine,
+ session->base.media_engine,
MPF_SUBTRACT_TERMINATION,session->context,channel->termination,NULL,
&session->mpf_task_msg) == TRUE) {
channel->waiting_for_termination = TRUE;
for(i=0; i<session->terminations->nelts; i++) {
/* get existing termination */
slot = &APR_ARRAY_IDX(session->terminations,i,rtp_termination_slot_t);
- if(!slot || !slot->termination) continue;
+ if(!slot->termination) continue;
/* send subtract termination request */
apt_obj_log(APT_LOG_MARK,APT_PRIO_DEBUG,session->base.log_obj,"Subtract Media Termination "APT_NAMESIDRES_FMT,
MRCP_SESSION_NAMESID(session),
mpf_termination_name_get(slot->termination));
if(mpf_engine_termination_message_add(
- profile->media_engine,
+ session->base.media_engine,
MPF_SUBTRACT_TERMINATION,session->context,slot->termination,NULL,
&session->mpf_task_msg) == TRUE) {
slot->waiting = TRUE;
}
}
- mpf_engine_message_send(profile->media_engine,&session->mpf_task_msg);
+ mpf_engine_message_send(session->base.media_engine,&session->mpf_task_msg);
}
mrcp_client_session_subrequest_add(session);
static apt_bool_t mrcp_client_on_termination_add(mrcp_client_session_t *session, const mpf_message_t *mpf_message)
{
rtp_termination_slot_t *termination_slot;
- if(!session) {
- return FALSE;
- }
apt_obj_log(APT_LOG_MARK,APT_PRIO_DEBUG,session->base.log_obj,"Media Termination Added "APT_NAMESIDRES_FMT,
MRCP_SESSION_NAMESID(session),
mpf_termination_name_get(mpf_message->termination));
static apt_bool_t mrcp_client_on_termination_modify(mrcp_client_session_t *session, const mpf_message_t *mpf_message)
{
rtp_termination_slot_t *termination_slot;
- if(!session) {
- return FALSE;
- }
apt_obj_log(APT_LOG_MARK,APT_PRIO_DEBUG,session->base.log_obj,"Media Termination Modified "APT_NAMESIDRES_FMT,
MRCP_SESSION_NAMESID(session),
mpf_termination_name_get(mpf_message->termination));
static apt_bool_t mrcp_client_on_termination_subtract(mrcp_client_session_t *session, const mpf_message_t *mpf_message)
{
rtp_termination_slot_t *termination_slot;
- if(!session) {
- return FALSE;
- }
apt_obj_log(APT_LOG_MARK,APT_PRIO_DEBUG,session->base.log_obj,"Media Termination Subtracted "APT_NAMESIDRES_FMT,
MRCP_SESSION_NAMESID(session),
mpf_termination_name_get(mpf_message->termination));
else {
session = NULL;
}
+ if(!session) {
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Received MPF Message: NULL session");
+ continue;
+ }
if(mpf_message->message_type == MPF_MESSAGE_TYPE_RESPONSE) {
switch(mpf_message->command_id) {
case MPF_ADD_TERMINATION:
}
}
else if(mpf_message->message_type == MPF_MESSAGE_TYPE_EVENT) {
- apt_obj_log(APT_LOG_MARK,APT_PRIO_DEBUG,session->base.log_obj,"Process MPF Event "APT_NAMESID_FMT,
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_DEBUG,session->base.log_obj,"Process MPF Event "APT_NAMESID_FMT,
MRCP_SESSION_NAMESID(session));
}
}
mpf_rtp_termination_descriptor_t *rtp_descriptor;
/* get existing termination */
slot = &APR_ARRAY_IDX(session->terminations,i,rtp_termination_slot_t);
- if(!slot) continue;
-
remote_media = mrcp_session_audio_media_get(descriptor,i);
if(slot->descriptor) {
slot->descriptor->audio.remote = remote_media;
MRCP_SESSION_NAMESID(session),
mpf_termination_name_get(slot->termination));
if(mpf_engine_termination_message_add(
- session->profile->media_engine,
+ session->base.media_engine,
MPF_MODIFY_TERMINATION,session->context,slot->termination,rtp_descriptor,
&session->mpf_task_msg) == TRUE) {
slot->waiting = TRUE;
}
if(slot->channel && slot->channel->termination) {
if(mpf_engine_assoc_message_add(
- session->profile->media_engine,
+ session->base.media_engine,
MPF_ADD_ASSOCIATION,session->context,slot->termination,slot->channel->termination,
&session->mpf_task_msg) == TRUE) {
mrcp_client_session_subrequest_add(session);
app_message->sig_message.command_id);
return FALSE;
}
-
+
+ if(session->disconnected == TRUE) {
+ /* cancel all the requests besides session termination one */
+ if(!IS_SESSION_TERMINATE(app_message)) {
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_WARNING,session->base.log_obj,"Cancel App Request "APT_NAMESID_FMT" [%d]",
+ MRCP_SESSION_NAMESID(session), app_message->sig_message.command_id);
+ session->status = MRCP_SIG_STATUS_CODE_CANCEL;
+ return mrcp_app_failure_message_raise(session);
+ }
+ }
+
if(session->registered == FALSE) {
- session->base.signaling_agent = session->profile->signaling_agent;
- session->base.signaling_agent->create_client_session(&session->base,session->profile->signaling_settings);
+ if(IS_SESSION_TERMINATE(app_message)) {
+ /* if session is not registered, nothing to terminate, just respond with success */
+ session->status = MRCP_SIG_STATUS_CODE_SUCCESS;
+ return mrcp_app_sig_response_raise(session,FALSE);
+ }
+
+ /* select signaling agent */
+ session->base.signaling_agent = mrcp_sa_factory_agent_select(session->profile->sa_factory);
+ if(!session->base.signaling_agent) {
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_WARNING,session->base.log_obj,"Failed to Select Signaling Agent "APT_NAMESID_FMT" [%d]",
+ MRCP_SESSION_NAMESID(session),
+ app_message->sig_message.command_id);
+ session->status = MRCP_SIG_STATUS_CODE_FAILURE;
+ }
+ if(session->profile->mrcp_version == MRCP_VERSION_2) {
+ /* select connection agent */
+ session->base.connection_agent = mrcp_ca_factory_agent_select(session->profile->ca_factory);
+ if(!session->base.connection_agent) {
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_WARNING,session->base.log_obj,"Failed to Select Connection Agent "APT_NAMESID_FMT" [%d]",
+ MRCP_SESSION_NAMESID(session),
+ app_message->sig_message.command_id);
+ session->status = MRCP_SIG_STATUS_CODE_FAILURE;
+ }
+ }
+ if(session->profile->mpf_factory) {
+ /* select media engine */
+ session->base.media_engine = mpf_engine_factory_engine_select(session->profile->mpf_factory);
+ if(!session->base.media_engine) {
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_WARNING,session->base.log_obj,"Failed to Select Media Engine "APT_NAMESID_FMT" [%d]",
+ MRCP_SESSION_NAMESID(session),
+ app_message->sig_message.command_id);
+ session->status = MRCP_SIG_STATUS_CODE_FAILURE;
+ }
+ }
+ /* set rtp termination factory */
+ session->base.rtp_factory = session->profile->rtp_termination_factory;
+
+ if(session->status == MRCP_SIG_STATUS_CODE_FAILURE) {
+ /* raise app response in case of failure */
+ return mrcp_app_failure_message_raise(session);
+ }
+
+ if(session->base.signaling_agent->create_client_session(&session->base,session->profile->signaling_settings) != TRUE) {
+ /* raise app response */
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_WARNING,session->base.log_obj,"Failed to Create Session "APT_NAMESID_FMT" [%d]",
+ MRCP_SESSION_NAMESID(session),
+ app_message->sig_message.command_id);
+ session->status = MRCP_SIG_STATUS_CODE_FAILURE;
+ return mrcp_app_failure_message_raise(session);
+ }
mrcp_client_session_add(session->application->client,session);
session->registered = TRUE;
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = -I$(top_srcdir)/libs/mrcp-engine/include \
-I$(top_srcdir)/libs/mrcp/include \
-I$(top_srcdir)/libs/mrcp/resources/include \
-I$(top_srcdir)/libs/mpf/include \
-I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+ $(UNIMRCP_APR_INCLUDES)
noinst_LTLIBRARIES = libmrcpengine.la
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_engine_factory.h 1710 2010-05-24 17:36:19Z achaloyan $
+ * $Id: mrcp_engine_factory.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_ENGINE_FACTORY_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_engine_iface.h 1677 2010-05-01 18:45:50Z achaloyan $
+ * $Id: mrcp_engine_iface.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_ENGINE_IFACE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_engine_impl.h 1710 2010-05-24 17:36:19Z achaloyan $
+ * $Id: mrcp_engine_impl.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_ENGINE_IMPL_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_engine_loader.h 1700 2010-05-21 18:56:06Z achaloyan $
+ * $Id: mrcp_engine_loader.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_ENGINE_LOADER_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_engine_plugin.h 1724 2010-06-02 18:42:20Z achaloyan $
+ * $Id: mrcp_engine_plugin.h 2139 2014-07-07 05:06:19Z achaloyan@gmail.com $
*/
#ifndef MRCP_ENGINE_PLUGIN_H
APT_BEGIN_EXTERN_C
+/** Let the plugin symbols be always exported as C functions */
+#ifdef __cplusplus
+#define MRCP_PLUGIN_EXTERN_C extern "C"
+#else
+#define MRCP_PLUGIN_EXTERN_C extern
+#endif
+
/** Plugin export defines */
#ifdef WIN32
-#define MRCP_PLUGIN_DECLARE(type) EXTERN_C __declspec(dllexport) type
+#define MRCP_PLUGIN_DECLARE(type) MRCP_PLUGIN_EXTERN_C __declspec(dllexport) type
#else
-#define MRCP_PLUGIN_DECLARE(type) type
+#define MRCP_PLUGIN_DECLARE(type) MRCP_PLUGIN_EXTERN_C type
#endif
/** [REQUIRED] Symbol name of the main entry point in plugin DSO */
/** Declare this macro in plugins to set plugin version */
#define MRCP_PLUGIN_VERSION_DECLARE \
- MRCP_PLUGIN_DECLARE(mrcp_plugin_version_t) mrcp_plugin_version = \
+ MRCP_PLUGIN_DECLARE(mrcp_plugin_version_t) mrcp_plugin_version; \
+ mrcp_plugin_version_t mrcp_plugin_version = \
{PLUGIN_MAJOR_VERSION, PLUGIN_MINOR_VERSION, PLUGIN_PATCH_VERSION};
* Minor API changes that do not cause binary compatibility problems.
* Reset to 0 when upgrading PLUGIN_MAJOR_VERSION
*/
-#define PLUGIN_MINOR_VERSION 0
+#define PLUGIN_MINOR_VERSION 2
/** patch level
* The Patch Level never includes API changes, simply bug fixes.
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_engine_types.h 1700 2010-05-21 18:56:06Z achaloyan $
+ * $Id: mrcp_engine_types.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_ENGINE_TYPES_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_recog_engine.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_recog_engine.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_RECOG_ENGINE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_recog_state_machine.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_recog_state_machine.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_RECOG_STATE_MACHINE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_recorder_engine.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_recorder_engine.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_RECORDER_ENGINE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_recorder_state_machine.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_recorder_state_machine.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_RECORDER_STATE_MACHINE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_resource_engine.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_resource_engine.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_RESOURCE_ENGINE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_state_machine.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_state_machine.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_STATE_MACHINE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_synth_engine.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_synth_engine.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_SYNTH_ENGINE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_synth_state_machine.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_synth_state_machine.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_SYNTH_STATE_MACHINE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_verifier_engine.h 1755 2010-08-18 19:35:08Z achaloyan $
+ * $Id: mrcp_verifier_engine.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_VERIFIER_ENGINE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_verifier_state_machine.h 1755 2010-08-18 19:35:08Z achaloyan $
+ * $Id: mrcp_verifier_state_machine.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_VERIFIER_STATE_MACHINE_H
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="mrcpengine"\r
- ProjectGUID="{843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}"\r
- RootNamespace="mrcpengine"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpengine.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpengine.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\include\mrcp_engine_factory.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_engine_iface.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_engine_impl.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_engine_loader.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_engine_plugin.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_engine_types.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_recog_engine.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_recog_state_machine.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_recorder_engine.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_recorder_state_machine.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_resource_engine.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_state_machine.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_synth_engine.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_synth_state_machine.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_verifier_engine.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_verifier_state_machine.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\src\mrcp_engine_factory.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_engine_iface.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_engine_impl.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_engine_loader.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_recog_state_machine.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_recorder_state_machine.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_synth_state_machine.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_verifier_state_machine.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}</ProjectGuid>
+ <RootNamespace>mrcpengine</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpengine.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpengine.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpengine.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpengine.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="include\mrcp_engine_factory.h" />
+ <ClInclude Include="include\mrcp_engine_iface.h" />
+ <ClInclude Include="include\mrcp_engine_impl.h" />
+ <ClInclude Include="include\mrcp_engine_loader.h" />
+ <ClInclude Include="include\mrcp_engine_plugin.h" />
+ <ClInclude Include="include\mrcp_engine_types.h" />
+ <ClInclude Include="include\mrcp_recog_engine.h" />
+ <ClInclude Include="include\mrcp_recog_state_machine.h" />
+ <ClInclude Include="include\mrcp_recorder_engine.h" />
+ <ClInclude Include="include\mrcp_recorder_state_machine.h" />
+ <ClInclude Include="include\mrcp_resource_engine.h" />
+ <ClInclude Include="include\mrcp_state_machine.h" />
+ <ClInclude Include="include\mrcp_synth_engine.h" />
+ <ClInclude Include="include\mrcp_synth_state_machine.h" />
+ <ClInclude Include="include\mrcp_verifier_engine.h" />
+ <ClInclude Include="include\mrcp_verifier_state_machine.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\mrcp_engine_factory.c" />
+ <ClCompile Include="src\mrcp_engine_iface.c" />
+ <ClCompile Include="src\mrcp_engine_impl.c" />
+ <ClCompile Include="src\mrcp_engine_loader.c" />
+ <ClCompile Include="src\mrcp_recog_state_machine.c" />
+ <ClCompile Include="src\mrcp_recorder_state_machine.c" />
+ <ClCompile Include="src\mrcp_synth_state_machine.c" />
+ <ClCompile Include="src\mrcp_verifier_state_machine.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\mpf\mpf.vcxproj">
+ <Project>{b5a00bfa-6083-4fae-a097-71642d6473b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\mrcp\mrcp.vcxproj">
+ <Project>{1c320193-46a6-4b34-9c56-8ab584fc1b56}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{dd062ad2-9a06-4efc-8e17-328567b52854}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="include\mrcp_engine_factory.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_engine_iface.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_engine_impl.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_engine_loader.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_engine_plugin.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_engine_types.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_recog_engine.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_recog_state_machine.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_recorder_engine.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_recorder_state_machine.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_resource_engine.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_state_machine.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_synth_engine.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_synth_state_machine.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_verifier_engine.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_verifier_state_machine.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\mrcp_engine_factory.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_engine_iface.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_engine_impl.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_engine_loader.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_recog_state_machine.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_recorder_state_machine.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_synth_state_machine.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_verifier_state_machine.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_engine_factory.c 1761 2010-08-20 17:35:28Z achaloyan $
+ * $Id: mrcp_engine_factory.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <apr_hash.h>
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_engine_iface.c 1700 2010-05-21 18:56:06Z achaloyan $
+ * $Id: mrcp_engine_iface.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mrcp_engine_iface.h"
return NULL;
}
if(engine->config->max_channel_count && engine->cur_channel_count >= engine->config->max_channel_count) {
+ apt_log(APT_LOG_MARK, APT_PRIO_NOTICE, "Maximum channel count %"APR_SIZE_T_FMT" exceeded for engine [%s]",
+ engine->config->max_channel_count, engine->id);
return NULL;
}
channel = engine->method_vtable->create_channel(engine,pool);
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_engine_impl.c 1710 2010-05-24 17:36:19Z achaloyan $
+ * $Id: mrcp_engine_impl.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mrcp_engine_impl.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_engine_loader.c 1700 2010-05-21 18:56:06Z achaloyan $
+ * $Id: mrcp_engine_loader.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <apr_dso.h>
engine = plugin_creator(loader->pool);
if(!engine) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create MRCP Engine");
+ return NULL;
}
engine->id = id;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_recog_state_machine.c 1782 2010-09-06 17:52:41Z achaloyan $
+ * $Id: mrcp_recog_state_machine.c 2228 2014-11-12 01:18:27Z achaloyan@gmail.com $
*/
#include "apt_obj_list.h"
static apt_bool_t recog_response_get_params(mrcp_recog_state_machine_t *state_machine, mrcp_message_t *message)
{
- mrcp_header_fields_set(&message->header,&state_machine->active_request->header,message->pool);
- mrcp_header_fields_get(&message->header,state_machine->properties,message->pool);
+ mrcp_header_fields_get(&message->header,state_machine->properties,&state_machine->active_request->header,message->pool);
return recog_response_dispatch(state_machine,message);
}
mrcp_generic_header_t *generic_header = mrcp_generic_header_get(request_message);
mrcp_generic_header_t *response_generic_header = mrcp_generic_header_prepare(response_message);
if(generic_header && mrcp_generic_header_property_check(request_message,GENERIC_HEADER_ACTIVE_REQUEST_ID_LIST) == TRUE) {
- if(generic_header->active_request_id_list.ids && generic_header->active_request_id_list.count) {
+ if(generic_header->active_request_id_list.count) {
/* selective STOP request */
request_id_list = &generic_header->active_request_id_list;
}
mrcp_request_id_list_t *request_id_list = NULL;
mrcp_generic_header_t *generic_header = mrcp_generic_header_get(message);
if(generic_header && mrcp_generic_header_property_check(message,GENERIC_HEADER_ACTIVE_REQUEST_ID_LIST) == TRUE) {
- if(generic_header->active_request_id_list.ids && generic_header->active_request_id_list.count) {
+ if(generic_header->active_request_id_list.count) {
/* selective STOP request */
request_id_list = &generic_header->active_request_id_list;
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_recorder_state_machine.c 1705 2010-05-23 14:04:20Z achaloyan $
+ * $Id: mrcp_recorder_state_machine.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "apt_obj_list.h"
static apt_bool_t recorder_response_get_params(mrcp_recorder_state_machine_t *state_machine, mrcp_message_t *message)
{
- mrcp_header_fields_set(&message->header,&state_machine->active_request->header,message->pool);
- mrcp_header_fields_get(&message->header,state_machine->properties,message->pool);
+ mrcp_header_fields_get(&message->header,state_machine->properties,&state_machine->active_request->header,message->pool);
return recorder_response_dispatch(state_machine,message);
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_synth_state_machine.c 1705 2010-05-23 14:04:20Z achaloyan $
+ * $Id: mrcp_synth_state_machine.c 2228 2014-11-12 01:18:27Z achaloyan@gmail.com $
*/
#include "apt_obj_list.h"
static apt_bool_t synth_response_get_params(mrcp_synth_state_machine_t *state_machine, mrcp_message_t *message)
{
- mrcp_header_fields_set(&message->header,&state_machine->active_request->header,message->pool);
- mrcp_header_fields_get(&message->header,state_machine->properties,message->pool);
+ mrcp_header_fields_get(&message->header,state_machine->properties,&state_machine->active_request->header,message->pool);
return synth_response_dispatch(state_machine,message);
}
mrcp_generic_header_t *generic_header = mrcp_generic_header_get(request_message);
mrcp_generic_header_t *response_generic_header = mrcp_generic_header_prepare(response_message);
if(generic_header && mrcp_generic_header_property_check(request_message,GENERIC_HEADER_ACTIVE_REQUEST_ID_LIST) == TRUE) {
- if(generic_header->active_request_id_list.ids && generic_header->active_request_id_list.count) {
+ if(generic_header->active_request_id_list.count) {
/* selective STOP request */
request_id_list = &generic_header->active_request_id_list;
}
mrcp_request_id_list_t *request_id_list = NULL;
mrcp_generic_header_t *generic_header = mrcp_generic_header_get(message);
if(generic_header && mrcp_generic_header_property_check(message,GENERIC_HEADER_ACTIVE_REQUEST_ID_LIST) == TRUE) {
- if(generic_header->active_request_id_list.ids && generic_header->active_request_id_list.count) {
+ if(generic_header->active_request_id_list.count) {
/* selective STOP request */
request_id_list = &generic_header->active_request_id_list;
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_verifier_state_machine.c 1756 2010-08-19 19:02:39Z achaloyan $
+ * $Id: mrcp_verifier_state_machine.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "apt_obj_list.h"
static apt_bool_t verifier_response_get_params(mrcp_verifier_state_machine_t *state_machine, mrcp_message_t *message)
{
- mrcp_header_fields_set(&message->header,&state_machine->active_request->header,message->pool);
- mrcp_header_fields_get(&message->header,state_machine->properties,message->pool);
+ mrcp_header_fields_get(&message->header,state_machine->properties,&state_machine->active_request->header,message->pool);
return verifier_response_dispatch(state_machine,message);
}
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = -I$(top_srcdir)/libs/mrcp-server/include \
-I$(top_srcdir)/libs/mrcp-engine/include \
-I$(top_srcdir)/libs/mrcp/resources/include \
-I$(top_srcdir)/libs/mpf/include \
-I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+ $(UNIMRCP_APR_INCLUDES)
noinst_LTLIBRARIES = libmrcpserver.la
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_server.h 1721 2010-06-01 05:45:46Z achaloyan $
+ * $Id: mrcp_server.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_SERVER_H
/** Create MRCP profile */
MRCP_DECLARE(mrcp_profile_t*) mrcp_server_profile_create(
const char *id,
+ mrcp_version_e mrcp_version,
mrcp_resource_factory_t *resource_factory,
mrcp_sig_agent_t *signaling_agent,
mrcp_connection_agent_t *connection_agent,
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_server_session.h 1700 2010-05-21 18:56:06Z achaloyan $
+ * $Id: mrcp_server_session.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_SERVER_SESSION_H
struct mrcp_profile_t {
/** Identifier of the profile */
const char *id;
+ /** MRCP version */
+ mrcp_version_e mrcp_version;
/** Table of engines (mrcp_engine_t*) */
apr_hash_t *engine_table;
/** MRCP resource factory */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_server_types.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_server_types.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_SERVER_TYPES_H
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="mrcpserver"\r
- ProjectGUID="{18B1F35A-10F8-4287-9B37-2D10501B0B38}"\r
- RootNamespace="mrcpserver"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpserver.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpserver.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\include\mrcp_server.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_server_session.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_server_types.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\src\mrcp_server.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_server_session.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{18B1F35A-10F8-4287-9B37-2D10501B0B38}</ProjectGuid>
+ <RootNamespace>mrcpserver</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpserver.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpserver.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpserver.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpserver.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="include\mrcp_server.h" />
+ <ClInclude Include="include\mrcp_server_session.h" />
+ <ClInclude Include="include\mrcp_server_types.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\mrcp_server.c" />
+ <ClCompile Include="src\mrcp_server_session.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\mrcp-engine\mrcpengine.vcxproj">
+ <Project>{843425be-9a9a-44f4-a4e3-4b57d6abd53c}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\mrcp-signaling\mrcpsignaling.vcxproj">
+ <Project>{12a49562-bab9-43a3-a21d-15b60bbb4c31}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\mrcpv2-transport\mrcpv2transport.vcxproj">
+ <Project>{a9edac04-6a5f-4ba7-bc0d-cce7b255b6ea}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup>\r
- <Filter Include="include">\r
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="src">\r
- <UniqueIdentifier>{6e92b598-880e-4fe5-88fb-f69df8e06a57}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp_sdp.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_sofiasip_client_agent.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_sofiasip_server_agent.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\mrcp_sdp.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mrcp_sofiasip_client_agent.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mrcp_sofiasip_server_agent.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{4557fd27-79b0-442d-809b-82996c7da820}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="include\mrcp_server.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_server_session.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_server_types.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\mrcp_server.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_server_session.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_server.c 1721 2010-06-01 05:45:46Z achaloyan $
+ * $Id: mrcp_server.c 2178 2014-09-13 02:36:05Z achaloyan@gmail.com $
*/
#include "mrcp_server.h"
#include "mrcp_engine_loader.h"
#include "mrcp_sig_agent.h"
#include "mrcp_server_connection.h"
-#include "mpf_engine.h"
+#include "mpf_termination_factory.h"
#include "apt_pool.h"
#include "apt_consumer_task.h"
#include "apt_obj_list.h"
static const mrcp_session_request_vtable_t session_request_vtable = {
mrcp_server_offer_signal,
mrcp_server_terminate_signal,
- mrcp_server_control_signal
+ mrcp_server_control_signal,
+ NULL /* mrcp_server_discover_signal */
};
};
/* Task interface */
-static void mrcp_server_on_start_request(apt_task_t *task);
-static void mrcp_server_on_terminate_request(apt_task_t *task);
+static apt_bool_t mrcp_server_msg_process(apt_task_t *task, apt_task_msg_t *msg);
+static apt_bool_t mrcp_server_start_request_process(apt_task_t *task);
+static apt_bool_t mrcp_server_terminate_request_process(apt_task_t *task);
static void mrcp_server_on_start_complete(apt_task_t *task);
static void mrcp_server_on_terminate_complete(apt_task_t *task);
-static apt_bool_t mrcp_server_msg_process(apt_task_t *task, apt_task_msg_t *msg);
static mrcp_session_t* mrcp_server_sig_agent_session_create(mrcp_sig_agent_t *signaling_agent);
vtable = apt_task_vtable_get(task);
if(vtable) {
vtable->process_msg = mrcp_server_msg_process;
- vtable->on_start_request = mrcp_server_on_start_request;
- vtable->on_terminate_request = mrcp_server_on_terminate_request;
+ vtable->process_start = mrcp_server_start_request_process;
+ vtable->process_terminate = mrcp_server_terminate_request_process;
vtable->on_start_complete = mrcp_server_on_start_complete;
vtable->on_terminate_complete = mrcp_server_on_terminate_complete;
}
/** Create MRCP profile */
MRCP_DECLARE(mrcp_profile_t*) mrcp_server_profile_create(
const char *id,
+ mrcp_version_e mrcp_version,
mrcp_resource_factory_t *resource_factory,
mrcp_sig_agent_t *signaling_agent,
mrcp_connection_agent_t *connection_agent,
{
mrcp_profile_t *profile = apr_palloc(pool,sizeof(mrcp_profile_t));
profile->id = id;
+ profile->mrcp_version = mrcp_version;
profile->resource_factory = resource_factory;
profile->engine_table = NULL;
profile->media_engine = media_engine;
profile->rtp_settings = rtp_settings;
profile->signaling_agent = signaling_agent;
profile->connection_agent = connection_agent;
+
+ mpf_termination_factory_engine_assign(rtp_factory,media_engine);
return profile;
}
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Register Profile [%s]: missing signaling agent",profile->id);
return FALSE;
}
- if(profile->signaling_agent->mrcp_version == MRCP_VERSION_2 &&
+ if(profile->mrcp_version == MRCP_VERSION_2 &&
!profile->connection_agent) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Register Profile [%s]: missing connection agent",profile->id);
return FALSE;
return apr_hash_get(server->session_table,session_id->buf,session_id->length);
}
-static void mrcp_server_on_start_request(apt_task_t *task)
+static apt_bool_t mrcp_server_start_request_process(apt_task_t *task)
{
apt_consumer_task_t *consumer_task = apt_task_object_get(task);
mrcp_server_t *server = apt_consumer_task_object_get(consumer_task);
}
}
}
+
+ return apt_task_start_request_process(task);
}
-static void mrcp_server_on_terminate_request(apt_task_t *task)
+static apt_bool_t mrcp_server_terminate_request_process(apt_task_t *task)
{
apt_consumer_task_t *consumer_task = apt_task_object_get(task);
mrcp_server_t *server = apt_consumer_task_object_get(consumer_task);
}
}
}
+
+ return apt_task_terminate_request_process(task);
}
static void mrcp_server_on_start_complete(apt_task_t *task)
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_server_session.c 1794 2011-01-20 18:59:01Z achaloyan $
+ * $Id: mrcp_server_session.c 2237 2014-11-12 01:48:46Z achaloyan@gmail.com $
*/
#include "mrcp_server.h"
static APR_INLINE mrcp_version_e mrcp_session_version_get(mrcp_server_session_t *session)
{
- return session->base.signaling_agent->mrcp_version;
+ return session->profile->mrcp_version;
}
static mrcp_engine_channel_t* mrcp_server_engine_channel_create(
for(i=0; i<session->terminations->nelts; i++) {
/* get existing termination */
slot = &APR_ARRAY_IDX(session->terminations,i,mrcp_termination_slot_t);
- if(!slot || !slot->termination) continue;
+ if(!slot->termination) continue;
/* send subtract termination request */
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Subtract Media Termination "APT_NAMESIDRES_FMT,
if(!channel->resource || !channel->state_machine) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Missing Resource "APT_NAMESIDRES_FMT,
MRCP_SESSION_NAMESID(session),
- channel->resource->name.buf);
+ message->channel_id.resource_name.buf);
return FALSE;
}
/* create new MRCP channel instance */
channel = mrcp_server_channel_create(session,&control_descriptor->resource_name,i,control_descriptor->cmid_arr);
- if(!channel) continue;
+ if(!channel || !channel->resource) continue;
control_descriptor->session_id = session->base.id;
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Add Control Channel "APT_NAMESIDRES_FMT" [%d]",
}
if(mrcp_session_version_get(session) == MRCP_VERSION_1) {
- /* implicitly modify the descriptor, if needed */
mpf_stream_direction_e direction = audio_stream->direction;
+ /* implicitly modify the descriptor, if needed */
+ if(media_descriptor->direction == STREAM_DIRECTION_NONE && mpf_codec_list_is_empty(&media_descriptor->codec_list) == TRUE) {
+ /* this is the case when SETUP contains no SDP, assume all the available codecs are offered */
+ if(mpf_codec_list_is_empty(&session->profile->rtp_settings->codec_list) == FALSE) {
+ mpf_codec_list_copy(&media_descriptor->codec_list,
+ &session->profile->rtp_settings->codec_list,
+ session->base.pool);
+ }
+ }
+
media_descriptor->direction |= direction;
if(media_descriptor->state == MPF_MEDIA_DISABLED) {
media_descriptor->state = MPF_MEDIA_ENABLED;
for(i=0; i<count; i++) {
/* get existing termination */
slot = &APR_ARRAY_IDX(session->terminations,i,mrcp_termination_slot_t);
- if(!slot || !slot->termination) continue;
+ if(!slot->termination) continue;
/* build associations between specified RTP termination and control channels */
rtp_descriptor = mrcp_server_associations_build(session,descriptor,slot);
mrcp_termination_slot_t *slot;
for(i=0; i<session->terminations->nelts; i++) {
slot = &APR_ARRAY_IDX(session->terminations,i,mrcp_termination_slot_t);
- if(slot && slot->termination == termination) {
+ if(slot->termination == termination) {
return slot;
}
}
static apt_bool_t mrcp_server_on_termination_modify(mrcp_server_session_t *session, const mpf_message_t *mpf_message)
{
mrcp_termination_slot_t *termination_slot;
- if(!session) {
- return FALSE;
- }
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Media Termination Modified "APT_NAMESIDRES_FMT,
MRCP_SESSION_NAMESID(session),
mpf_termination_name_get(mpf_message->termination));
static apt_bool_t mrcp_server_on_termination_subtract(mrcp_server_session_t *session, const mpf_message_t *mpf_message)
{
mrcp_termination_slot_t *termination_slot;
- if(!session) {
- return FALSE;
- }
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Media Termination Subtracted "APT_NAMESIDRES_FMT,
MRCP_SESSION_NAMESID(session),
mpf_termination_name_get(mpf_message->termination));
else {
session = NULL;
}
-
+ if(!session) {
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Received MPF Message: NULL session");
+ continue;
+ }
if(mpf_message->message_type == MPF_MESSAGE_TYPE_RESPONSE) {
switch(mpf_message->command_id) {
case MPF_ADD_TERMINATION:
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = -I$(top_srcdir)/libs/mrcp-signaling/include \
-I$(top_srcdir)/libs/mrcp/include \
-I$(top_srcdir)/libs/mpf/include \
-I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+ $(UNIMRCP_APR_INCLUDES)
noinst_LTLIBRARIES = libmrcpsignaling.la
include/mrcp_session_descriptor.h
libmrcpsignaling_la_SOURCES = src/mrcp_sig_agent.c \
- src/mrcp_session_descriptor.c
+ src/mrcp_session_descriptor.c
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_session.h 1792 2011-01-10 21:08:52Z achaloyan $
+ * $Id: mrcp_session.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_SESSION_H
*/
#include "mrcp_sig_types.h"
+#include "mpf_types.h"
#include "apt_string.h"
APT_BEGIN_EXTERN_C
void *log_obj;
/** Informative name of the session used for debugging */
const char *name;
- /** Back pointer to signaling agent */
- mrcp_sig_agent_t *signaling_agent;
+
+ /** Signaling (session managment) agent */
+ mrcp_sig_agent_t *signaling_agent;
+ /** MRCPv2 connection agent, if any */
+ void *connection_agent;
+ /** Media processing engine */
+ mpf_engine_t *media_engine;
+ /** RTP termination factory */
+ mpf_termination_factory_t *rtp_factory;
/** Session identifier */
apt_str_t id;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_session_descriptor.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_session_descriptor.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_SESSION_DESCRIPTOR_H
/** MRCP session status */
typedef enum {
- MRCP_SESSION_STATUS_OK, /**< OK */
+ MRCP_SESSION_STATUS_OK, /**< OK */
MRCP_SESSION_STATUS_NO_SUCH_RESOURCE, /**< no such resource found */
MRCP_SESSION_STATUS_UNACCEPTABLE_RESOURCE,/**< resource exists, but no implementation (plugin) found */
MRCP_SESSION_STATUS_UNAVAILABLE_RESOURCE, /**< resource exists, but is temporary unavailable */
- MRCP_SESSION_STATUS_ERROR /**< internal error occuried */
+ MRCP_SESSION_STATUS_ERROR /**< internal error occurred */
} mrcp_session_status_e;
/** MRCP session descriptor */
apt_bool_t resource_state;
/** Session status */
mrcp_session_status_e status;
+ /** Response code (SIP for MRCPv2 and RTSP for MRCPv1) */
+ int response_code;
/** MRCP control media array (mrcp_control_descriptor_t) */
apr_array_header_t *control_media_arr;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_sig_agent.h 1750 2010-07-23 19:33:34Z achaloyan $
+ * $Id: mrcp_sig_agent.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_SIG_AGENT_H
char *feature_tags;
};
-
-
/** MRCP signaling agent */
struct mrcp_sig_agent_t {
/** Agent identifier */
void *obj;
/** Parent object (client/server) */
void *parent;
- /** MRCP version */
- mrcp_version_e mrcp_version;
/** MRCP resource factory */
mrcp_resource_factory_t *resource_factory;
/** Task interface */
};
/** Create signaling agent. */
-MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_signaling_agent_create(const char *id, void *obj, mrcp_version_e mrcp_version, apr_pool_t *pool);
+MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_signaling_agent_create(const char *id, void *obj, apr_pool_t *pool);
+
+/** Create factory of signaling agents. */
+MRCP_DECLARE(mrcp_sa_factory_t*) mrcp_sa_factory_create(apr_pool_t *pool);
+
+/** Add signaling agent to factory. */
+MRCP_DECLARE(apt_bool_t) mrcp_sa_factory_agent_add(mrcp_sa_factory_t *sa_factory, mrcp_sig_agent_t *sig_agent);
+
+/** Determine whether factory is empty. */
+MRCP_DECLARE(apt_bool_t) mrcp_sa_factory_is_empty(const mrcp_sa_factory_t *sa_factory);
+
+/** Select next available signaling agent. */
+MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_sa_factory_agent_select(mrcp_sa_factory_t *sa_factory);
/** Allocate MRCP signaling settings. */
MRCP_DECLARE(mrcp_sig_settings_t*) mrcp_signaling_settings_alloc(apr_pool_t *pool);
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_sig_types.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_sig_types.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_SIG_TYPES_H
/** Opaque MRCP signaling agent declaration */
typedef struct mrcp_sig_agent_t mrcp_sig_agent_t;
+/** Opaque MRCP signaling agent factory declaration */
+typedef struct mrcp_sa_factory_t mrcp_sa_factory_t;
+
/** Opaque MRCP session declaration */
typedef struct mrcp_session_t mrcp_session_t;
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="mrcpsignaling"\r
- ProjectGUID="{12A49562-BAB9-43A3-A21D-15B60BBB4C31}"\r
- RootNamespace="mrcpsignaling"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- <Platform\r
- Name="x64"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\include\mrcp_session.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_session_descriptor.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_sig_agent.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_sig_types.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\src\mrcp_session_descriptor.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_sig_agent.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>mrcpsignaling</ProjectName>\r
- <ProjectGuid>{12A49562-BAB9-43A3-A21D-15B60BBB4C31}</ProjectGuid>\r
- <RootNamespace>mrcpsignaling</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp_session.h" />\r
- <ClInclude Include="include\mrcp_session_descriptor.h" />\r
- <ClInclude Include="include\mrcp_sig_agent.h" />\r
- <ClInclude Include="include\mrcp_sig_types.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\mrcp_session_descriptor.c" />\r
- <ClCompile Include="src\mrcp_sig_agent.c" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{12A49562-BAB9-43A3-A21D-15B60BBB4C31}</ProjectGuid>
+ <RootNamespace>mrcpsignaling</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpsignaling.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpsignaling.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpsignaling.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpsignaling.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="include\mrcp_session.h" />
+ <ClInclude Include="include\mrcp_session_descriptor.h" />
+ <ClInclude Include="include\mrcp_sig_agent.h" />
+ <ClInclude Include="include\mrcp_sig_types.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\mrcp_session_descriptor.c" />
+ <ClCompile Include="src\mrcp_sig_agent.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\mpf\mpf.vcxproj">
+ <Project>{b5a00bfa-6083-4fae-a097-71642d6473b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\mrcp\mrcp.vcxproj">
+ <Project>{1c320193-46a6-4b34-9c56-8ab584fc1b56}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup>\r
- <Filter Include="include">\r
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="src">\r
- <UniqueIdentifier>{f3dc550f-1a0f-4b9e-b077-3b6940dc5531}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp_session.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_session_descriptor.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_sig_agent.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_sig_types.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\mrcp_session_descriptor.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mrcp_sig_agent.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{38ec7b90-673c-4c54-9c3a-13d5270556a0}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="include\mrcp_session.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_session_descriptor.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_sig_agent.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_sig_types.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\mrcp_session_descriptor.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_sig_agent.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_session_descriptor.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_session_descriptor.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mrcp_session_descriptor.h"
apt_string_reset(&descriptor->resource_name);
descriptor->resource_state = FALSE;
descriptor->status = MRCP_SESSION_STATUS_OK;
+ descriptor->response_code = 0;
descriptor->control_media_arr = apr_array_make(pool,1,sizeof(void*));
descriptor->audio_media_arr = apr_array_make(pool,1,sizeof(mpf_rtp_media_descriptor_t*));
descriptor->video_media_arr = apr_array_make(pool,0,sizeof(mpf_rtp_media_descriptor_t*));
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_sig_agent.c 1792 2011-01-10 21:08:52Z achaloyan $
+ * $Id: mrcp_sig_agent.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mrcp_sig_agent.h"
#include "mrcp_session.h"
#include "apt_pool.h"
-MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_signaling_agent_create(const char *id, void *obj, mrcp_version_e mrcp_version, apr_pool_t *pool)
+/** Factory of MRCP signaling agents */
+struct mrcp_sa_factory_t {
+ /** Array of pointers to signaling agents */
+ apr_array_header_t *agents_arr;
+ /** Index of the current agent */
+ int index;
+};
+
+/** Create signaling agent */
+MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_signaling_agent_create(const char *id, void *obj, apr_pool_t *pool)
{
mrcp_sig_agent_t *sig_agent = apr_palloc(pool,sizeof(mrcp_sig_agent_t));
sig_agent->id = id;
sig_agent->pool = pool;
sig_agent->obj = obj;
- sig_agent->mrcp_version = mrcp_version;
sig_agent->resource_factory = NULL;
sig_agent->parent = NULL;
sig_agent->task = NULL;
return sig_agent;
}
+/** Create factory of signaling agents */
+MRCP_DECLARE(mrcp_sa_factory_t*) mrcp_sa_factory_create(apr_pool_t *pool)
+{
+ mrcp_sa_factory_t *sa_factory = apr_palloc(pool,sizeof(mrcp_sa_factory_t));
+ sa_factory->agents_arr = apr_array_make(pool,1,sizeof(mrcp_sig_agent_t*));
+ sa_factory->index = 0;
+ return sa_factory;
+}
+
+/** Add signaling agent to pool */
+MRCP_DECLARE(apt_bool_t) mrcp_sa_factory_agent_add(mrcp_sa_factory_t *sa_factory, mrcp_sig_agent_t *sig_agent)
+{
+ mrcp_sig_agent_t **slot;
+ if(!sig_agent)
+ return FALSE;
+
+ slot = apr_array_push(sa_factory->agents_arr);
+ *slot = sig_agent;
+ return TRUE;
+}
+
+/** Determine whether factory is empty. */
+MRCP_DECLARE(apt_bool_t) mrcp_sa_factory_is_empty(const mrcp_sa_factory_t *sa_factory)
+{
+ return apr_is_empty_array(sa_factory->agents_arr);
+}
+
+/** Select next available signaling agent */
+MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_sa_factory_agent_select(mrcp_sa_factory_t *sa_factory)
+{
+ mrcp_sig_agent_t *sig_agent = APR_ARRAY_IDX(sa_factory->agents_arr, sa_factory->index, mrcp_sig_agent_t*);
+ if(++sa_factory->index == sa_factory->agents_arr->nelts) {
+ sa_factory->index = 0;
+ }
+ return sig_agent;
+}
+
/** Allocate MRCP signaling settings */
MRCP_DECLARE(mrcp_sig_settings_t*) mrcp_signaling_settings_alloc(apr_pool_t *pool)
{
session->log_obj = NULL;
session->name = NULL;
session->signaling_agent = NULL;
+ session->connection_agent = NULL;
+ session->media_engine = NULL;
+ session->rtp_factory = NULL;
session->request_vtable = NULL;
session->response_vtable = NULL;
session->event_vtable = NULL;
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = -I$(top_srcdir)/libs/mrcp/include \
-I$(top_srcdir)/libs/mrcp/message/include \
-I$(top_srcdir)/libs/mrcp/control/include \
-I$(top_srcdir)/libs/mrcp/resources/include \
-I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+ $(UNIMRCP_APR_INCLUDES)
noinst_LTLIBRARIES = libmrcp.la
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_resource.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_resource.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_RESOURCE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_resource_factory.h 1632 2010-03-30 20:46:25Z achaloyan $
+ * $Id: mrcp_resource_factory.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_RESOURCE_FACTORY_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_resource_loader.h 1710 2010-05-24 17:36:19Z achaloyan $
+ * $Id: mrcp_resource_loader.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_RESOURCE_LOADER_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_stream.h 1660 2010-04-19 18:29:06Z achaloyan $
+ * $Id: mrcp_stream.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_STREAM_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_resource_factory.c 1632 2010-03-30 20:46:25Z achaloyan $
+ * $Id: mrcp_resource_factory.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <apr_hash.h>
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_resource_loader.c 1764 2010-08-23 18:02:18Z achaloyan $
+ * $Id: mrcp_resource_loader.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mrcp_resource_loader.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_stream.c 1671 2010-04-28 19:50:29Z achaloyan $
+ * $Id: mrcp_stream.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mrcp_stream.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_types.h 1753 2010-08-16 20:46:45Z achaloyan $
+ * $Id: mrcp_types.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_TYPES_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_generic_header.h 1710 2010-05-24 17:36:19Z achaloyan $
+ * $Id: mrcp_generic_header.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_GENERIC_HEADER_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_header.h 1648 2010-04-12 20:03:59Z achaloyan $
+ * $Id: mrcp_header.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_HEADER_H
MRCP_DECLARE(apt_bool_t) mrcp_header_fields_set(mrcp_message_header_t *header, const mrcp_message_header_t *src_header, apr_pool_t *pool);
/** Get (copy) MRCP header fields */
-MRCP_DECLARE(apt_bool_t) mrcp_header_fields_get(mrcp_message_header_t *header, const mrcp_message_header_t *src_header, apr_pool_t *pool);
+MRCP_DECLARE(apt_bool_t) mrcp_header_fields_get(mrcp_message_header_t *header, const mrcp_message_header_t *src_header, const mrcp_message_header_t *mask_header, apr_pool_t *pool);
/** Inherit (copy) MRCP header fields */
MRCP_DECLARE(apt_bool_t) mrcp_header_fields_inherit(mrcp_message_header_t *header, const mrcp_message_header_t *src_header, apr_pool_t *pool);
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_header_accessor.h 1632 2010-03-30 20:46:25Z achaloyan $
+ * $Id: mrcp_header_accessor.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_HEADER_ACCESSOR_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_message.h 1721 2010-06-01 05:45:46Z achaloyan $
+ * $Id: mrcp_message.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_MESSAGE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_start_line.h 1632 2010-03-30 20:46:25Z achaloyan $
+ * $Id: mrcp_start_line.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_START_LINE_H
/** The request was processed to completion and there will be no
more events from that resource to the client with that request-id */
MRCP_REQUEST_STATE_COMPLETE,
- /** The job has been placed on a queue and will be processed in first-in-first-out order */
- MRCP_REQUEST_STATE_INPROGRESS,
/** Indicate that further event messages will be delivered with that request-id */
+ MRCP_REQUEST_STATE_INPROGRESS,
+ /** The job has been placed on a queue and will be processed in first-in-first-out order */
MRCP_REQUEST_STATE_PENDING,
/** Number of request states */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_generic_header.c 1710 2010-05-24 17:36:19Z achaloyan $
+ * $Id: mrcp_generic_header.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mrcp_generic_header.h"
}
/** Generate mrcp request-id list */
-static apt_bool_t mrcp_request_id_list_generate(mrcp_request_id_list_t *request_id_list, apt_str_t *str, apr_pool_t *pool)
+static apt_bool_t mrcp_request_id_list_generate(const mrcp_request_id_list_t *request_id_list, apt_str_t *str, apr_pool_t *pool)
{
apr_size_t i;
- char buf[256];
- apt_text_stream_t stream;
- apt_text_stream_init(&stream,buf,sizeof(buf));
+ int length;
+ char *pos;
+
+ /* compute estimated length, assuming request-ids consist of upto 10 digits */
+ str->length = 10 * request_id_list->count;
+ if(request_id_list->count > 1) {
+ /* , */
+ str->length += request_id_list->count - 1;
+ }
+
+ str->buf = apr_palloc(pool,str->length + 1);
+
+ pos = str->buf;
for(i=0; i<request_id_list->count; i++) {
- mrcp_request_id_generate(request_id_list->ids[i],&stream);
- if(i < request_id_list->count-1) {
- *stream.pos++ = ',';
+ if(i != 0) {
+ *pos++ = ',';
}
- }
- apt_string_assign_n(str,stream.text.buf, stream.pos - stream.text.buf, pool);
+ length = apr_snprintf(pos, str->length - (pos - str->buf), "%"MRCP_REQUEST_ID_FMT, request_id_list->ids[i]);
+ if(length < 0)
+ return FALSE;
+ pos += length;
+ }
+ *pos = '\0';
return TRUE;
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_header.c 1737 2010-06-15 18:29:17Z achaloyan $
+ * $Id: mrcp_header.c 2238 2014-11-12 01:50:43Z achaloyan@gmail.com $
*/
#include "mrcp_header.h"
header_field->id += GENERIC_HEADER_COUNT;
}
else if(mrcp_header_field_value_parse(&header->generic_header_accessor,header_field,pool) == TRUE) {
- status = apt_header_section_field_add(&header->header_section,header_field);
}
else {
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Unknown MRCP header field: %s",header_field->name.buf);
return TRUE;
}
+static apt_bool_t mrcp_header_accessor_value_duplicate(mrcp_message_header_t *header, apt_header_field_t *header_field,
+ const mrcp_message_header_t *src_header, const apt_header_field_t *src_header_field,
+ apr_pool_t *pool)
+{
+ apt_bool_t status = FALSE;
+ if(header_field->id < GENERIC_HEADER_COUNT) {
+ status = mrcp_header_field_value_duplicate(
+ &header->generic_header_accessor,
+ &src_header->generic_header_accessor,
+ header_field->id,
+ &header_field->value,
+ pool);
+ }
+ else {
+ status = mrcp_header_field_value_duplicate(
+ &header->resource_header_accessor,
+ &src_header->resource_header_accessor,
+ header_field->id - GENERIC_HEADER_COUNT,
+ &header_field->value,
+ pool);
+ }
+ return status;
+}
+
/** Set (copy) MRCP header fields */
MRCP_DECLARE(apt_bool_t) mrcp_header_fields_set(mrcp_message_header_t *header, const mrcp_message_header_t *src_header, apr_pool_t *pool)
{
src_header_field != APR_RING_SENTINEL(&src_header->header_section.ring, apt_header_field_t, link);
src_header_field = APR_RING_NEXT(src_header_field, link)) {
- header_field = apt_header_field_copy(src_header_field,pool);
- if(header_field->id < GENERIC_HEADER_COUNT) {
- if(mrcp_header_field_value_duplicate(
- &header->generic_header_accessor,
- &src_header->generic_header_accessor,
- header_field->id,
- &header_field->value,
- pool) == TRUE) {
- apt_header_section_field_add(&header->header_section,header_field);
- }
+ header_field = apt_header_section_field_get(&header->header_section,src_header_field->id);
+ if(header_field) {
+ /* this header field has already been set, just copy its value */
+ apt_string_copy(&header_field->value,&src_header_field->value,pool);
}
else {
- if(mrcp_header_field_value_duplicate(
- &header->resource_header_accessor,
- &src_header->resource_header_accessor,
- header_field->id - GENERIC_HEADER_COUNT,
- &header_field->value,
- pool) == TRUE) {
- apt_header_section_field_add(&header->header_section,header_field);
- }
+ /* copy the entire header field and add it to the header section */
+ header_field = apt_header_field_copy(src_header_field,pool);
+ apt_header_section_field_add(&header->header_section,header_field);
}
+
+ mrcp_header_accessor_value_duplicate(header,header_field,src_header,src_header_field,pool);
}
return TRUE;
}
/** Get (copy) MRCP header fields */
-MRCP_DECLARE(apt_bool_t) mrcp_header_fields_get(mrcp_message_header_t *header, const mrcp_message_header_t *src_header, apr_pool_t *pool)
+MRCP_DECLARE(apt_bool_t) mrcp_header_fields_get(mrcp_message_header_t *header, const mrcp_message_header_t *src_header, const mrcp_message_header_t *mask_header, apr_pool_t *pool)
{
apt_header_field_t *header_field;
const apt_header_field_t *src_header_field;
- for(header_field = APR_RING_FIRST(&header->header_section.ring);
- header_field != APR_RING_SENTINEL(&header->header_section.ring, apt_header_field_t, link);
- header_field = APR_RING_NEXT(header_field, link)) {
+ const apt_header_field_t *mask_header_field;
+ for(mask_header_field = APR_RING_FIRST(&mask_header->header_section.ring);
+ mask_header_field != APR_RING_SENTINEL(&mask_header->header_section.ring, apt_header_field_t, link);
+ mask_header_field = APR_RING_NEXT(mask_header_field, link)) {
- src_header_field = apt_header_section_field_get(&src_header->header_section,header_field->id);
+ header_field = apt_header_section_field_get(&header->header_section,mask_header_field->id);
+ if(header_field) {
+ /* this header field has already been set, skip to the next one */
+ continue;
+ }
+
+ src_header_field = apt_header_section_field_get(&src_header->header_section,mask_header_field->id);
if(src_header_field) {
- if(header_field->id < GENERIC_HEADER_COUNT) {
- apt_string_copy(&header_field->value,&src_header_field->value,pool);
- mrcp_header_field_value_duplicate(
- &header->generic_header_accessor,
- &src_header->generic_header_accessor,
- header_field->id,
- &header_field->value,
- pool);
- }
- else {
- apt_string_copy(&header_field->value,&src_header_field->value,pool);
- mrcp_header_field_value_duplicate(
- &header->resource_header_accessor,
- &src_header->resource_header_accessor,
- header_field->id - GENERIC_HEADER_COUNT,
- &header_field->value,
- pool);
- }
+ /* copy the entire header field */
+ header_field = apt_header_field_copy(src_header_field,pool);
+ mrcp_header_accessor_value_duplicate(header,header_field,src_header,src_header_field,pool);
}
+ else {
+ /* copy only the name of the header field */
+ header_field = apt_header_field_copy(mask_header_field,pool);
+ }
+ /* add the header field to the header section */
+ apt_header_section_field_add(&header->header_section,header_field);
}
return TRUE;
src_header_field = APR_RING_NEXT(src_header_field, link)) {
header_field = apt_header_section_field_get(&header->header_section,src_header_field->id);
- if(!header_field) {
- header_field = apt_header_field_copy(src_header_field,pool);
- if(header_field->id < GENERIC_HEADER_COUNT) {
- if(mrcp_header_field_value_duplicate(
- &header->generic_header_accessor,
- &src_header->generic_header_accessor,
- header_field->id,
- &header_field->value,
- pool) == TRUE) {
- apt_header_section_field_add(&header->header_section,header_field);
- }
- }
- else {
- if(mrcp_header_field_value_duplicate(
- &header->resource_header_accessor,
- &src_header->resource_header_accessor,
- header_field->id - GENERIC_HEADER_COUNT,
- &header_field->value,
- pool) == TRUE) {
- apt_header_section_field_add(&header->header_section,header_field);
- }
- }
+ if(header_field) {
+ /* this header field has already been set, skip to the next one */
+ continue;
}
+
+ /* copy the entire header field and add it to the header section */
+ header_field = apt_header_field_copy(src_header_field,pool);
+ mrcp_header_accessor_value_duplicate(header,header_field,src_header,src_header_field,pool);
+ apt_header_section_field_add(&header->header_section,header_field);
}
return TRUE;
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_header_accessor.c 1737 2010-06-15 18:29:17Z achaloyan $
+ * $Id: mrcp_header_accessor.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mrcp_header_accessor.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_message.c 1701 2010-05-22 16:38:10Z achaloyan $
+ * $Id: mrcp_message.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mrcp_message.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_start_line.c 1671 2010-04-28 19:50:29Z achaloyan $
+ * $Id: mrcp_start_line.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <stdlib.h>
/** Generate MRCP request-id */
MRCP_DECLARE(apt_bool_t) mrcp_request_id_generate(mrcp_request_id request_id, apt_text_stream_t *stream)
{
- int length = sprintf(stream->pos, "%"MRCP_REQUEST_ID_FMT, request_id);
+ int length = apr_snprintf(stream->pos, stream->end - stream->pos, "%"MRCP_REQUEST_ID_FMT, request_id);
if(length <= 0) {
return FALSE;
}
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="mrcp"\r
- ProjectGUID="{1C320193-46A6-4B34-9C56-8AB584FC1B56}"\r
- RootNamespace="mrcp"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- <Platform\r
- Name="x64"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcp.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcp.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcp.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcp.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\include\mrcp.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_types.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="message"\r
- >\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- >\r
- <File\r
- RelativePath=".\message\include\mrcp_generic_header.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\message\include\mrcp_header.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\message\include\mrcp_header_accessor.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\message\include\mrcp_message.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\message\include\mrcp_start_line.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\message\src\mrcp_generic_header.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\message\src\mrcp_header.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\message\src\mrcp_header_accessor.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\message\src\mrcp_message.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\message\src\mrcp_start_line.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Filter>\r
- <Filter\r
- Name="control"\r
- >\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- >\r
- <File\r
- RelativePath=".\control\include\mrcp_resource.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\control\include\mrcp_resource_factory.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\control\include\mrcp_resource_loader.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\control\include\mrcp_stream.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\control\src\mrcp_resource_factory.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\control\src\mrcp_resource_loader.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\control\src\mrcp_stream.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Filter>\r
- <Filter\r
- Name="resources"\r
- >\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- >\r
- <File\r
- RelativePath=".\resources\include\mrcp_recog_header.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\resources\include\mrcp_recog_resource.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\resources\include\mrcp_recorder_header.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\resources\include\mrcp_recorder_resource.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\resources\include\mrcp_synth_header.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\resources\include\mrcp_synth_resource.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\resources\include\mrcp_verifier_header.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\resources\include\mrcp_verifier_resource.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\resources\src\mrcp_recog_header.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\resources\src\mrcp_recog_resource.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\resources\src\mrcp_recorder_header.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\resources\src\mrcp_recorder_resource.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\resources\src\mrcp_synth_header.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\resources\src\mrcp_synth_resource.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\resources\src\mrcp_verifier_header.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\resources\src\mrcp_verifier_resource.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup>\r
- <Filter Include="include">\r
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="message">\r
- <UniqueIdentifier>{19ad4bde-c4f4-4937-9073-ca2780341d76}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="message\include">\r
- <UniqueIdentifier>{8ec996ac-8a0a-4bf0-9b3c-535616585109}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="message\src">\r
- <UniqueIdentifier>{5ba77874-7c17-4748-b5ba-b07b7f0a2169}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- <Filter Include="control">\r
- <UniqueIdentifier>{f30fd049-a10d-4aea-b4bb-3eb674690fdd}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="control\include">\r
- <UniqueIdentifier>{7e71717b-6f22-4c59-ba50-7b5a15516b2f}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="control\src">\r
- <UniqueIdentifier>{c66dbb84-ce9d-4408-b54d-4d0ec51069fb}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- <Filter Include="resources">\r
- <UniqueIdentifier>{f20cfd62-4bb9-42de-bf1c-d578c8cd1a18}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="resources\include">\r
- <UniqueIdentifier>{039a4834-7ddb-40e7-9177-55d11ef1e733}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="resources\src">\r
- <UniqueIdentifier>{dc087d31-8ecf-473c-baa1-f3091e16014d}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_types.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="message\include\mrcp_generic_header.h">\r
- <Filter>message\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="message\include\mrcp_header_accessor.h">\r
- <Filter>message\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="message\include\mrcp_message.h">\r
- <Filter>message\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="message\include\mrcp_start_line.h">\r
- <Filter>message\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="control\include\mrcp_resource.h">\r
- <Filter>control\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="control\include\mrcp_resource_factory.h">\r
- <Filter>control\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="control\include\mrcp_resource_loader.h">\r
- <Filter>control\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="control\include\mrcp_stream.h">\r
- <Filter>control\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="resources\include\mrcp_recog_header.h">\r
- <Filter>resources\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="resources\include\mrcp_recog_resource.h">\r
- <Filter>resources\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="resources\include\mrcp_recorder_header.h">\r
- <Filter>resources\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="resources\include\mrcp_recorder_resource.h">\r
- <Filter>resources\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="resources\include\mrcp_synth_header.h">\r
- <Filter>resources\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="resources\include\mrcp_synth_resource.h">\r
- <Filter>resources\include</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="message\src\mrcp_generic_header.c">\r
- <Filter>message\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="message\src\mrcp_header_accessor.c">\r
- <Filter>message\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="message\src\mrcp_message.c">\r
- <Filter>message\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="message\src\mrcp_start_line.c">\r
- <Filter>message\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="control\src\mrcp_resource_factory.c">\r
- <Filter>control\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="control\src\mrcp_resource_loader.c">\r
- <Filter>control\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="control\src\mrcp_stream.c">\r
- <Filter>control\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="resources\src\mrcp_recog_header.c">\r
- <Filter>resources\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="resources\src\mrcp_recog_resource.c">\r
- <Filter>resources\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="resources\src\mrcp_recorder_header.c">\r
- <Filter>resources\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="resources\src\mrcp_recorder_resource.c">\r
- <Filter>resources\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="resources\src\mrcp_synth_header.c">\r
- <Filter>resources\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="resources\src\mrcp_synth_resource.c">\r
- <Filter>resources\src</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
-</Project>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>mrcp</ProjectName>\r
- <ProjectGuid>{1C320193-46A6-4B34-9C56-8AB584FC1B56}</ProjectGuid>\r
- <RootNamespace>mrcp</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcp.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcp.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcp.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcp.props" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp.h" />\r
- <ClInclude Include="include\mrcp_types.h" />\r
- <ClInclude Include="message\include\mrcp_generic_header.h" />\r
- <ClInclude Include="message\include\mrcp__header.h" />\r
- <ClInclude Include="message\include\mrcp_header_accessor.h" />\r
- <ClInclude Include="message\include\mrcp_message.h" />\r
- <ClInclude Include="message\include\mrcp_start_line.h" />\r
- <ClInclude Include="control\include\mrcp_resource.h" />\r
- <ClInclude Include="control\include\mrcp_resource_factory.h" />\r
- <ClInclude Include="control\include\mrcp_resource_loader.h" />\r
- <ClInclude Include="control\include\mrcp_stream.h" />\r
- <ClInclude Include="resources\include\mrcp_recog_header.h" />\r
- <ClInclude Include="resources\include\mrcp_recog_resource.h" />\r
- <ClInclude Include="resources\include\mrcp_recorder_header.h" />\r
- <ClInclude Include="resources\include\mrcp_recorder_resource.h" />\r
- <ClInclude Include="resources\include\mrcp_synth_header.h" />\r
- <ClInclude Include="resources\include\mrcp_synth_resource.h" />\r
- <ClInclude Include="resources\include\mrcp_verifier_header.h" />\r
- <ClInclude Include="resources\include\mrcp_verifier_resource.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="message\src\mrcp_generic_header.c" />\r
- <ClCompile Include="message\src\mrcp_header.c" />\r
- <ClCompile Include="message\src\mrcp_header_accessor.c" />\r
- <ClCompile Include="message\src\mrcp_message.c" />\r
- <ClCompile Include="message\src\mrcp_start_line.c" />\r
- <ClCompile Include="control\src\mrcp_resource_factory.c" />\r
- <ClCompile Include="control\src\mrcp_resource_loader.c" />\r
- <ClCompile Include="control\src\mrcp_stream.c" />\r
- <ClCompile Include="resources\src\mrcp_recog_header.c" />\r
- <ClCompile Include="resources\src\mrcp_recog_resource.c" />\r
- <ClCompile Include="resources\src\mrcp_recorder_header.c" />\r
- <ClCompile Include="resources\src\mrcp_recorder_resource.c" />\r
- <ClCompile Include="resources\src\mrcp_synth_header.c" />\r
- <ClCompile Include="resources\src\mrcp_synth_resource.c" />\r
- <ClCompile Include="resources\src\mrcp_verifier_header.c" />\r
- <ClCompile Include="resources\src\mrcp_verifier_resource.c" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
-</Project>\r
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>mrcp</ProjectName>\r
- <ProjectGuid>{1C320193-46A6-4B34-9C56-8AB584FC1B56}</ProjectGuid>\r
- <RootNamespace>mrcp</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcp.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcp.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcp.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcp.props" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp.h" />\r
- <ClInclude Include="include\mrcp_types.h" />\r
- <ClInclude Include="message\include\mrcp_generic_header.h" />\r
- <ClInclude Include="message\include\mrcp__header.h" />\r
- <ClInclude Include="message\include\mrcp_header_accessor.h" />\r
- <ClInclude Include="message\include\mrcp_message.h" />\r
- <ClInclude Include="message\include\mrcp_start_line.h" />\r
- <ClInclude Include="control\include\mrcp_resource.h" />\r
- <ClInclude Include="control\include\mrcp_resource_factory.h" />\r
- <ClInclude Include="control\include\mrcp_resource_loader.h" />\r
- <ClInclude Include="control\include\mrcp_stream.h" />\r
- <ClInclude Include="resources\include\mrcp_recog_header.h" />\r
- <ClInclude Include="resources\include\mrcp_recog_resource.h" />\r
- <ClInclude Include="resources\include\mrcp_recorder_header.h" />\r
- <ClInclude Include="resources\include\mrcp_recorder_resource.h" />\r
- <ClInclude Include="resources\include\mrcp_synth_header.h" />\r
- <ClInclude Include="resources\include\mrcp_synth_resource.h" />\r
- <ClInclude Include="resources\include\mrcp_verifier_header.h" />\r
- <ClInclude Include="resources\include\mrcp_verifier_resource.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="message\src\mrcp_generic_header.c" />\r
- <ClCompile Include="message\src\mrcp_header.c" />\r
- <ClCompile Include="message\src\mrcp_header_accessor.c" />\r
- <ClCompile Include="message\src\mrcp_message.c" />\r
- <ClCompile Include="message\src\mrcp_start_line.c" />\r
- <ClCompile Include="control\src\mrcp_resource_factory.c" />\r
- <ClCompile Include="control\src\mrcp_resource_loader.c" />\r
- <ClCompile Include="control\src\mrcp_stream.c" />\r
- <ClCompile Include="resources\src\mrcp_recog_header.c" />\r
- <ClCompile Include="resources\src\mrcp_recog_resource.c" />\r
- <ClCompile Include="resources\src\mrcp_recorder_header.c" />\r
- <ClCompile Include="resources\src\mrcp_recorder_resource.c" />\r
- <ClCompile Include="resources\src\mrcp_synth_header.c" />\r
- <ClCompile Include="resources\src\mrcp_synth_resource.c" />\r
- <ClCompile Include="resources\src\mrcp_verifier_header.c" />\r
- <ClCompile Include="resources\src\mrcp_verifier_resource.c" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{1C320193-46A6-4B34-9C56-8AB584FC1B56}</ProjectGuid>
+ <RootNamespace>mrcp</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcp.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcp.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcp.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcp.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="include\mrcp.h" />
+ <ClInclude Include="include\mrcp_types.h" />
+ <ClInclude Include="message\include\mrcp_generic_header.h" />
+ <ClInclude Include="message\include\mrcp_header.h" />
+ <ClInclude Include="message\include\mrcp_header_accessor.h" />
+ <ClInclude Include="message\include\mrcp_message.h" />
+ <ClInclude Include="message\include\mrcp_start_line.h" />
+ <ClInclude Include="control\include\mrcp_resource.h" />
+ <ClInclude Include="control\include\mrcp_resource_factory.h" />
+ <ClInclude Include="control\include\mrcp_resource_loader.h" />
+ <ClInclude Include="control\include\mrcp_stream.h" />
+ <ClInclude Include="resources\include\mrcp_recog_header.h" />
+ <ClInclude Include="resources\include\mrcp_recog_resource.h" />
+ <ClInclude Include="resources\include\mrcp_recorder_header.h" />
+ <ClInclude Include="resources\include\mrcp_recorder_resource.h" />
+ <ClInclude Include="resources\include\mrcp_synth_header.h" />
+ <ClInclude Include="resources\include\mrcp_synth_resource.h" />
+ <ClInclude Include="resources\include\mrcp_verifier_header.h" />
+ <ClInclude Include="resources\include\mrcp_verifier_resource.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="message\src\mrcp_generic_header.c" />
+ <ClCompile Include="message\src\mrcp_header.c" />
+ <ClCompile Include="message\src\mrcp_header_accessor.c" />
+ <ClCompile Include="message\src\mrcp_message.c" />
+ <ClCompile Include="message\src\mrcp_start_line.c" />
+ <ClCompile Include="control\src\mrcp_resource_factory.c" />
+ <ClCompile Include="control\src\mrcp_resource_loader.c" />
+ <ClCompile Include="control\src\mrcp_stream.c" />
+ <ClCompile Include="resources\src\mrcp_recog_header.c" />
+ <ClCompile Include="resources\src\mrcp_recog_resource.c" />
+ <ClCompile Include="resources\src\mrcp_recorder_header.c" />
+ <ClCompile Include="resources\src\mrcp_recorder_resource.c" />
+ <ClCompile Include="resources\src\mrcp_synth_header.c" />
+ <ClCompile Include="resources\src\mrcp_synth_resource.c" />
+ <ClCompile Include="resources\src\mrcp_verifier_header.c" />
+ <ClCompile Include="resources\src\mrcp_verifier_resource.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup>\r
- <Filter Include="include">\r
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="message">\r
- <UniqueIdentifier>{19ad4bde-c4f4-4937-9073-ca2780341d76}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="message\include">\r
- <UniqueIdentifier>{8ec996ac-8a0a-4bf0-9b3c-535616585109}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="message\src">\r
- <UniqueIdentifier>{5ba77874-7c17-4748-b5ba-b07b7f0a2169}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- <Filter Include="control">\r
- <UniqueIdentifier>{f30fd049-a10d-4aea-b4bb-3eb674690fdd}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="control\include">\r
- <UniqueIdentifier>{7e71717b-6f22-4c59-ba50-7b5a15516b2f}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="control\src">\r
- <UniqueIdentifier>{c66dbb84-ce9d-4408-b54d-4d0ec51069fb}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- <Filter Include="resources">\r
- <UniqueIdentifier>{f20cfd62-4bb9-42de-bf1c-d578c8cd1a18}</UniqueIdentifier>\r
- </Filter>\r
- <Filter Include="resources\include">\r
- <UniqueIdentifier>{039a4834-7ddb-40e7-9177-55d11ef1e733}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="resources\src">\r
- <UniqueIdentifier>{dc087d31-8ecf-473c-baa1-f3091e16014d}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_types.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="message\include\mrcp_generic_header.h">\r
- <Filter>message\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="message\include\mrcp_header_accessor.h">\r
- <Filter>message\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="message\include\mrcp_message.h">\r
- <Filter>message\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="message\include\mrcp_start_line.h">\r
- <Filter>message\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="control\include\mrcp_resource.h">\r
- <Filter>control\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="control\include\mrcp_resource_factory.h">\r
- <Filter>control\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="control\include\mrcp_resource_loader.h">\r
- <Filter>control\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="control\include\mrcp_stream.h">\r
- <Filter>control\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="resources\include\mrcp_recog_header.h">\r
- <Filter>resources\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="resources\include\mrcp_recog_resource.h">\r
- <Filter>resources\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="resources\include\mrcp_recorder_header.h">\r
- <Filter>resources\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="resources\include\mrcp_recorder_resource.h">\r
- <Filter>resources\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="resources\include\mrcp_synth_header.h">\r
- <Filter>resources\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="resources\include\mrcp_synth_resource.h">\r
- <Filter>resources\include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="message\include\mrcp__header.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="resources\include\mrcp_verifier_header.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="resources\include\mrcp_verifier_resource.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="message\src\mrcp_generic_header.c">\r
- <Filter>message\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="message\src\mrcp_header_accessor.c">\r
- <Filter>message\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="message\src\mrcp_message.c">\r
- <Filter>message\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="message\src\mrcp_start_line.c">\r
- <Filter>message\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="control\src\mrcp_resource_factory.c">\r
- <Filter>control\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="control\src\mrcp_resource_loader.c">\r
- <Filter>control\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="control\src\mrcp_stream.c">\r
- <Filter>control\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="resources\src\mrcp_recog_header.c">\r
- <Filter>resources\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="resources\src\mrcp_recog_resource.c">\r
- <Filter>resources\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="resources\src\mrcp_recorder_header.c">\r
- <Filter>resources\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="resources\src\mrcp_recorder_resource.c">\r
- <Filter>resources\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="resources\src\mrcp_synth_header.c">\r
- <Filter>resources\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="resources\src\mrcp_synth_resource.c">\r
- <Filter>resources\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="message\src\mrcp_header.c">\r
- <Filter>message\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="resources\src\mrcp_verifier_header.c">\r
- <Filter>message\src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="resources\src\mrcp_verifier_resource.c">\r
- <Filter>message\src</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
-</Project>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="message">
+ <UniqueIdentifier>{235b9544-2004-49c6-96de-a5830544296e}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="message\include">
+ <UniqueIdentifier>{64717899-118b-46de-8646-d7312b19ce00}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="message\src">
+ <UniqueIdentifier>{1b656d42-e8f0-4126-85da-9bb8a470cfaa}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="control">
+ <UniqueIdentifier>{39545f85-6811-4878-af3f-26d813012ea3}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="control\include">
+ <UniqueIdentifier>{e165b2a9-81db-4030-9e72-7189ee45182b}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="control\src">
+ <UniqueIdentifier>{a4e3b1a7-762d-4fcf-83e8-f52675aab2ff}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="resources">
+ <UniqueIdentifier>{35e8458d-fc25-4066-b4be-ab452a6da8a9}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="resources\include">
+ <UniqueIdentifier>{8bbdedd2-2c1e-4474-8dbb-fcecf1f9a869}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="resources\src">
+ <UniqueIdentifier>{1d167695-a5d2-4f87-8bd3-ea21cea5a368}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="include\mrcp.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_types.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="message\include\mrcp_generic_header.h">
+ <Filter>message\include</Filter>
+ </ClInclude>
+ <ClInclude Include="message\include\mrcp_header.h">
+ <Filter>message\include</Filter>
+ </ClInclude>
+ <ClInclude Include="message\include\mrcp_header_accessor.h">
+ <Filter>message\include</Filter>
+ </ClInclude>
+ <ClInclude Include="message\include\mrcp_message.h">
+ <Filter>message\include</Filter>
+ </ClInclude>
+ <ClInclude Include="message\include\mrcp_start_line.h">
+ <Filter>message\include</Filter>
+ </ClInclude>
+ <ClInclude Include="control\include\mrcp_resource.h">
+ <Filter>control\include</Filter>
+ </ClInclude>
+ <ClInclude Include="control\include\mrcp_resource_factory.h">
+ <Filter>control\include</Filter>
+ </ClInclude>
+ <ClInclude Include="control\include\mrcp_resource_loader.h">
+ <Filter>control\include</Filter>
+ </ClInclude>
+ <ClInclude Include="control\include\mrcp_stream.h">
+ <Filter>control\include</Filter>
+ </ClInclude>
+ <ClInclude Include="resources\include\mrcp_recog_header.h">
+ <Filter>resources\include</Filter>
+ </ClInclude>
+ <ClInclude Include="resources\include\mrcp_recog_resource.h">
+ <Filter>resources\include</Filter>
+ </ClInclude>
+ <ClInclude Include="resources\include\mrcp_recorder_header.h">
+ <Filter>resources\include</Filter>
+ </ClInclude>
+ <ClInclude Include="resources\include\mrcp_recorder_resource.h">
+ <Filter>resources\include</Filter>
+ </ClInclude>
+ <ClInclude Include="resources\include\mrcp_synth_header.h">
+ <Filter>resources\include</Filter>
+ </ClInclude>
+ <ClInclude Include="resources\include\mrcp_synth_resource.h">
+ <Filter>resources\include</Filter>
+ </ClInclude>
+ <ClInclude Include="resources\include\mrcp_verifier_header.h">
+ <Filter>resources\include</Filter>
+ </ClInclude>
+ <ClInclude Include="resources\include\mrcp_verifier_resource.h">
+ <Filter>resources\include</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="message\src\mrcp_generic_header.c">
+ <Filter>message\src</Filter>
+ </ClCompile>
+ <ClCompile Include="message\src\mrcp_header.c">
+ <Filter>message\src</Filter>
+ </ClCompile>
+ <ClCompile Include="message\src\mrcp_header_accessor.c">
+ <Filter>message\src</Filter>
+ </ClCompile>
+ <ClCompile Include="message\src\mrcp_message.c">
+ <Filter>message\src</Filter>
+ </ClCompile>
+ <ClCompile Include="message\src\mrcp_start_line.c">
+ <Filter>message\src</Filter>
+ </ClCompile>
+ <ClCompile Include="control\src\mrcp_resource_factory.c">
+ <Filter>control\src</Filter>
+ </ClCompile>
+ <ClCompile Include="control\src\mrcp_resource_loader.c">
+ <Filter>control\src</Filter>
+ </ClCompile>
+ <ClCompile Include="control\src\mrcp_stream.c">
+ <Filter>control\src</Filter>
+ </ClCompile>
+ <ClCompile Include="resources\src\mrcp_recog_header.c">
+ <Filter>resources\src</Filter>
+ </ClCompile>
+ <ClCompile Include="resources\src\mrcp_recog_resource.c">
+ <Filter>resources\src</Filter>
+ </ClCompile>
+ <ClCompile Include="resources\src\mrcp_recorder_header.c">
+ <Filter>resources\src</Filter>
+ </ClCompile>
+ <ClCompile Include="resources\src\mrcp_recorder_resource.c">
+ <Filter>resources\src</Filter>
+ </ClCompile>
+ <ClCompile Include="resources\src\mrcp_synth_header.c">
+ <Filter>resources\src</Filter>
+ </ClCompile>
+ <ClCompile Include="resources\src\mrcp_synth_resource.c">
+ <Filter>resources\src</Filter>
+ </ClCompile>
+ <ClCompile Include="resources\src\mrcp_verifier_header.c">
+ <Filter>resources\src</Filter>
+ </ClCompile>
+ <ClCompile Include="resources\src\mrcp_verifier_resource.c">
+ <Filter>resources\src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_recog_header.h 1736 2010-06-14 20:16:22Z achaloyan $
+ * $Id: mrcp_recog_header.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_RECOG_HEADER_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_recog_resource.h 1781 2010-09-01 07:33:00Z achaloyan $
+ * $Id: mrcp_recog_resource.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_RECOG_RESOURCE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_recorder_header.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_recorder_header.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_RECORDER_HEADER_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_recorder_resource.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_recorder_resource.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_RECORDER_RESOURCE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_synth_header.h 1643 2010-04-08 13:40:09Z achaloyan $
+ * $Id: mrcp_synth_header.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_SYNTH_HEADER_H
/** prosody-volume value */
union {
- /** one of "silent", "x-soft,..." */
+ /** one of "silent", "x-soft", ... */
mrcp_prosody_volume_label_e label;
/** numeric value */
float numeric;
/** prosody-rate value */
union {
- /** one of "x-slow", "slow,..." */
+ /** one of "x-slow", "slow", ... */
mrcp_prosody_rate_label_e label;
/** relative change */
float relative;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_synth_resource.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_synth_resource.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_SYNTH_RESOURCE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_recog_header.c 1736 2010-06-14 20:16:22Z achaloyan $
+ * $Id: mrcp_recog_header.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mrcp_recog_header.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_recog_resource.c 1781 2010-09-01 07:33:00Z achaloyan $
+ * $Id: mrcp_recog_resource.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mrcp_recog_resource.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_recorder_header.c 1632 2010-03-30 20:46:25Z achaloyan $
+ * $Id: mrcp_recorder_header.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mrcp_recorder_header.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_recorder_resource.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_recorder_resource.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mrcp_recorder_resource.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_synth_header.c 1632 2010-03-30 20:46:25Z achaloyan $
+ * $Id: mrcp_synth_header.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mrcp_synth_header.h"
return apt_string_table_id_find(string_table,count,value);
}
-static apt_bool_t apt_string_table_value_generate(const apt_str_table_item_t *string_table, apr_size_t count, apr_size_t id, apt_text_stream_t *stream)
-{
- const apt_str_t *name = apt_string_table_str_get(string_table,count,id);
- if(!name) {
- return FALSE;
- }
-
- memcpy(stream->pos,name->buf,name->length);
- stream->pos += name->length;
- return TRUE;
-}
-
static apt_bool_t apt_string_table_value_pgenerate(const apt_str_table_item_t *string_table, apr_size_t count, apr_size_t id, apt_str_t *str, apr_pool_t *pool)
{
const apt_str_t *name = apt_string_table_str_get(string_table,count,id);
}
}
else {
- char buf[256];
- apt_text_stream_t stream;
- apt_text_stream_init(&stream,buf,sizeof(buf));
- if(speech_length->type == SPEECH_LENGTH_TYPE_NUMERIC_POSITIVE) {
- *stream.pos++ = '+';
- }
- else {
- *stream.pos++ = '-';
+ const apt_str_t *unit_name = apt_string_table_str_get(
+ speech_unit_string_table,
+ SPEECH_UNIT_COUNT,
+ speech_length->value.numeric.unit);
+ if(!unit_name) {
+ return FALSE;
}
- apt_text_size_value_insert(&stream,speech_length->value.numeric.length);
- *stream.pos++ = APT_TOKEN_SP;
- apt_string_table_value_generate(speech_unit_string_table,SPEECH_UNIT_COUNT,speech_length->value.numeric.unit,&stream);
- apt_string_assign_n(str,stream.text.buf, stream.pos - stream.text.buf, pool);
+ str->buf = apr_psprintf(pool, "%c%"APR_SIZE_T_FMT" %s",
+ speech_length->type == SPEECH_LENGTH_TYPE_NUMERIC_POSITIVE ? '+' : '-',
+ speech_length->value.numeric.length,
+ unit_name->buf);
+ str->length = strlen(str->buf);
}
return TRUE;
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_synth_resource.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_synth_resource.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "mrcp_synth_resource.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = -I$(top_srcdir)/libs/mrcpv2-transport/include \
-I$(top_srcdir)/libs/mrcp/include \
-I$(top_srcdir)/libs/mrcp/message/include \
-I$(top_srcdir)/libs/mrcp/control/include \
-I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+ $(UNIMRCP_APR_INCLUDES)
noinst_LTLIBRARIES = libmrcpv2transport.la
include/mrcp_control_descriptor.h \
include/mrcp_connection.h \
include/mrcp_client_connection.h \
- include/mrcp_server_connection.h
+ include/mrcp_server_connection.h \
+ include/mrcp_ca_factory.h
libmrcpv2transport_la_SOURCES = src/mrcp_control_descriptor.c \
src/mrcp_connection.c \
src/mrcp_client_connection.c \
- src/mrcp_server_connection.c
+ src/mrcp_server_connection.c \
+ src/mrcp_ca_factory.c
--- /dev/null
+/*
+ * Copyright 2008-2014 Arsen Chaloyan
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Id: mrcp_ca_factory.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
+ */
+
+#ifndef MRCP_CA_FACTORY_H
+#define MRCP_CA_FACTORY_H
+
+/**
+ * @file mrcp_ca_factory.h
+ * @brief Factory of MRCPv2 Connection Agents
+ */
+
+#include "mrcp_connection_types.h"
+
+APT_BEGIN_EXTERN_C
+
+/** Create factory of connection agents. */
+MRCP_DECLARE(mrcp_ca_factory_t*) mrcp_ca_factory_create(apr_pool_t *pool);
+
+/** Add connection agent to factory. */
+MRCP_DECLARE(apt_bool_t) mrcp_ca_factory_agent_add(mrcp_ca_factory_t *mpf_factory, mrcp_connection_agent_t *agent);
+
+/** Determine whether factory is empty. */
+MRCP_DECLARE(apt_bool_t) mrcp_ca_factory_is_empty(const mrcp_ca_factory_t *factory);
+
+/** Select next available agent. */
+MRCP_DECLARE(mrcp_connection_agent_t*) mrcp_ca_factory_agent_select(mrcp_ca_factory_t *factory);
+
+APT_END_EXTERN_C
+
+#endif /* MRCP_CA_FACTORY_H */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_client_connection.h 1792 2011-01-10 21:08:52Z achaloyan $
+ * $Id: mrcp_client_connection.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_CLIENT_CONNECTION_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_connection.h 1710 2010-05-24 17:36:19Z achaloyan $
+ * $Id: mrcp_connection.h 2170 2014-09-09 05:19:48Z achaloyan@gmail.com $
*/
#ifndef MRCP_CONNECTION_H
#include <apr_poll.h>
#include <apr_hash.h>
-#include "apt_obj_list.h"
+#ifdef WIN32
+#pragma warning(disable: 4127)
+#endif
+#include <apr_ring.h>
#include "mrcp_connection_types.h"
#include "mrcp_stream.h"
/** MRCPv2 connection */
struct mrcp_connection_t {
+ /** Ring entry */
+ APR_RING_ENTRY(mrcp_connection_t) link;
+
/** Memory pool */
apr_pool_t *pool;
/** Reference count */
apr_size_t access_count;
- /** Agent list element */
- apt_list_elem_t *it;
/** Opaque agent */
void *agent;
};
/** Create MRCP connection. */
-mrcp_connection_t* mrcp_connection_create();
+mrcp_connection_t* mrcp_connection_create(void);
/** Destroy MRCP connection. */
void mrcp_connection_destroy(mrcp_connection_t *connection);
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_connection_types.h 1792 2011-01-10 21:08:52Z achaloyan $
+ * $Id: mrcp_connection_types.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_CONNECTION_TYPES_H
/** Opaque MRCPv2 connection agent declaration */
typedef struct mrcp_connection_agent_t mrcp_connection_agent_t;
+/** Opaque MRCPv2 connection agent factory declaration */
+typedef struct mrcp_ca_factory_t mrcp_ca_factory_t;
+
/** MRCPv2 connection event vtable declaration */
typedef struct mrcp_connection_event_vtable_t mrcp_connection_event_vtable_t;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_control_descriptor.h 1710 2010-05-24 17:36:19Z achaloyan $
+ * $Id: mrcp_control_descriptor.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_CONTROL_DESCRIPTOR_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_server_connection.h 1721 2010-06-01 05:45:46Z achaloyan $
+ * $Id: mrcp_server_connection.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_SERVER_CONNECTION_H
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="mrcpv2transport"\r
- ProjectGUID="{A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}"\r
- RootNamespace="mrcpv2transport"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- <Platform\r
- Name="x64"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\include\mrcp_client_connection.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_connection.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_connection_types.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_control_descriptor.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_server_connection.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\src\mrcp_client_connection.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_connection.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_control_descriptor.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_server_connection.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>mrcpv2transport</ProjectName>\r
- <ProjectGuid>{A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}</ProjectGuid>\r
- <RootNamespace>mrcpv2transport</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp_client_connection.h" />\r
- <ClInclude Include="include\mrcp_connection.h" />\r
- <ClInclude Include="include\mrcp_connection_types.h" />\r
- <ClInclude Include="include\mrcp_control_descriptor.h" />\r
- <ClInclude Include="include\mrcp_server_connection.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\mrcp_client_connection.c" />\r
- <ClCompile Include="src\mrcp_connection.c" />\r
- <ClCompile Include="src\mrcp_control_descriptor.c" />\r
- <ClCompile Include="src\mrcp_server_connection.c" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
-</Project>\r
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
+ <File
+ RelativePath=".\include\mrcp_ca_factory.h"
+ >
+ </File>
<File
RelativePath=".\include\mrcp_client_connection.h"
>
Name="src"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
>
+ <File
+ RelativePath=".\src\mrcp_ca_factory.c"
+ >
+ </File>
<File
RelativePath=".\src\mrcp_client_connection.c"
>
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>mrcpv2transport</ProjectName>\r
- <ProjectGuid>{A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}</ProjectGuid>\r
- <RootNamespace>mrcpv2transport</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp_client_connection.h" />\r
- <ClInclude Include="include\mrcp_connection.h" />\r
- <ClInclude Include="include\mrcp_connection_types.h" />\r
- <ClInclude Include="include\mrcp_control_descriptor.h" />\r
- <ClInclude Include="include\mrcp_server_connection.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\mrcp_client_connection.c" />\r
- <ClCompile Include="src\mrcp_connection.c" />\r
- <ClCompile Include="src\mrcp_control_descriptor.c" />\r
- <ClCompile Include="src\mrcp_server_connection.c" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}</ProjectGuid>
+ <RootNamespace>mrcpv2transport</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpv2transport.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpv2transport.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpv2transport.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpv2transport.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="include\mrcp_ca_factory.h" />
+ <ClInclude Include="include\mrcp_client_connection.h" />
+ <ClInclude Include="include\mrcp_connection.h" />
+ <ClInclude Include="include\mrcp_connection_types.h" />
+ <ClInclude Include="include\mrcp_control_descriptor.h" />
+ <ClInclude Include="include\mrcp_server_connection.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\mrcp_ca_factory.c" />
+ <ClCompile Include="src\mrcp_client_connection.c" />
+ <ClCompile Include="src\mrcp_connection.c" />
+ <ClCompile Include="src\mrcp_control_descriptor.c" />
+ <ClCompile Include="src\mrcp_server_connection.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\mrcp\mrcp.vcxproj">
+ <Project>{1c320193-46a6-4b34-9c56-8ab584fc1b56}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup>\r
- <Filter Include="include">\r
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="src">\r
- <UniqueIdentifier>{a92d3b8c-d54d-416c-b458-dc57ac24d2e9}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp_client_connection.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_connection.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_connection_types.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_control_descriptor.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_server_connection.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\mrcp_client_connection.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mrcp_connection.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mrcp_control_descriptor.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mrcp_server_connection.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{119450fa-653a-4fdc-9017-a4350ff3066c}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="include\mrcp_client_connection.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_connection.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_connection_types.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_control_descriptor.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_server_connection.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_ca_factory.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\mrcp_client_connection.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_connection.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_control_descriptor.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_server_connection.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_ca_factory.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
</Project>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright 2008-2014 Arsen Chaloyan
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Id: mrcp_ca_factory.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
+ */
+
+#include <apr_tables.h>
+#include "mrcp_ca_factory.h"
+
+/** Factory of MRCPv2 connection agents */
+struct mrcp_ca_factory_t {
+ /** Array of pointers to agents */
+ apr_array_header_t *agent_arr;
+ /** Index of the current agent */
+ int index;
+};
+
+/** Create factory of connection agents. */
+MRCP_DECLARE(mrcp_ca_factory_t*) mrcp_ca_factory_create(apr_pool_t *pool)
+{
+ mrcp_ca_factory_t *factory = apr_palloc(pool,sizeof(mrcp_ca_factory_t));
+ factory->agent_arr = apr_array_make(pool,1,sizeof(mrcp_connection_agent_t*));
+ factory->index = 0;
+ return factory;
+}
+
+/** Add connection agent to factory. */
+MRCP_DECLARE(apt_bool_t) mrcp_ca_factory_agent_add(mrcp_ca_factory_t *factory, mrcp_connection_agent_t *agent)
+{
+ mrcp_connection_agent_t **slot;
+ if(!agent)
+ return FALSE;
+
+ slot = apr_array_push(factory->agent_arr);
+ *slot = agent;
+ return TRUE;
+}
+
+/** Determine whether factory is empty. */
+MRCP_DECLARE(apt_bool_t) mrcp_ca_factory_is_empty(const mrcp_ca_factory_t *factory)
+{
+ return apr_is_empty_array(factory->agent_arr);
+}
+
+/** Select next available agent. */
+MRCP_DECLARE(mrcp_connection_agent_t*) mrcp_ca_factory_agent_select(mrcp_ca_factory_t *factory)
+{
+ mrcp_connection_agent_t *agent = APR_ARRAY_IDX(factory->agent_arr, factory->index, mrcp_connection_agent_t*);
+ if(++factory->index == factory->agent_arr->nelts) {
+ factory->index = 0;
+ }
+ return agent;
+}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_client_connection.c 1792 2011-01-10 21:08:52Z achaloyan $
+ * $Id: mrcp_client_connection.c 2235 2014-11-12 01:41:51Z achaloyan@gmail.com $
*/
#include "mrcp_connection.h"
struct mrcp_connection_agent_t {
+ /** List (ring) of MRCP connections */
+ APR_RING_HEAD(mrcp_connection_head_t, mrcp_connection_t) connection_list;
+
apr_pool_t *pool;
apt_poller_task_t *task;
const mrcp_resource_factory_t *resource_factory;
- apt_obj_list_t *connection_list;
-
apr_uint32_t request_timeout;
apt_bool_t offer_new_connection;
apr_size_t tx_buffer_size;
apt_task_vtable_t *vtable;
apt_task_msg_pool_t *msg_pool;
mrcp_connection_agent_t *agent;
-
+
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create MRCPv2 Agent [%s] [%"APR_SIZE_T_FMT"]",
id, max_connection_count);
agent = apr_palloc(pool,sizeof(mrcp_connection_agent_t));
vtable->process_msg = mrcp_client_agent_msg_process;
}
- agent->connection_list = apt_list_create(pool);
+ APR_RING_INIT(&agent->connection_list, mrcp_connection_t, link);
return agent;
}
{
char *local_ip = NULL;
char *remote_ip = NULL;
- apt_pollset_t *pollset = apt_poller_task_pollset_get(agent->task);
mrcp_connection_t *connection = mrcp_connection_create();
apr_sockaddr_info_get(&connection->r_sockaddr,descriptor->ip.buf,APR_INET,descriptor->port,0,connection->pool);
connection->sock_pfd.reqevents = APR_POLLIN;
connection->sock_pfd.desc.s = connection->sock;
connection->sock_pfd.client_data = connection;
- if(apt_pollset_add(pollset, &connection->sock_pfd) != TRUE) {
+ if(apt_poller_task_descriptor_add(agent->task, &connection->sock_pfd) != TRUE) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Add to Pollset %s",connection->id);
apr_socket_close(connection->sock);
mrcp_connection_destroy(connection);
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Established TCP/MRCPv2 Connection %s",connection->id);
connection->agent = agent;
- connection->it = apt_list_push_back(agent->connection_list,connection,connection->pool);
+ APR_RING_INSERT_TAIL(&agent->connection_list,connection,mrcp_connection_t,link);
connection->parser = mrcp_parser_create(agent->resource_factory,connection->pool);
connection->generator = mrcp_generator_create(agent->resource_factory,connection->pool);
static mrcp_connection_t* mrcp_client_agent_connection_find(mrcp_connection_agent_t *agent, mrcp_control_descriptor_t *descriptor)
{
apr_sockaddr_t *sockaddr;
- mrcp_connection_t *connection = NULL;
- apt_list_elem_t *elem = apt_list_first_elem_get(agent->connection_list);
- /* walk through the list of connections */
- while(elem) {
- connection = apt_list_elem_object_get(elem);
- if(connection) {
- if(apr_sockaddr_info_get(&sockaddr,descriptor->ip.buf,APR_INET,descriptor->port,0,connection->pool) == APR_SUCCESS) {
- if(apr_sockaddr_equal(sockaddr,connection->r_sockaddr) != 0 &&
- descriptor->port == connection->r_sockaddr->port) {
- return connection;
- }
+ mrcp_connection_t *connection;
+
+ for(connection = APR_RING_FIRST(&agent->connection_list);
+ connection != APR_RING_SENTINEL(&agent->connection_list, mrcp_connection_t, link);
+ connection = APR_RING_NEXT(connection, link)) {
+ if(apr_sockaddr_info_get(&sockaddr,descriptor->ip.buf,APR_INET,descriptor->port,0,connection->pool) == APR_SUCCESS) {
+ if(apr_sockaddr_equal(sockaddr,connection->r_sockaddr) != 0 &&
+ descriptor->port == connection->r_sockaddr->port) {
+ return connection;
}
}
- elem = apt_list_next_elem_get(agent->connection_list,elem);
}
+
return NULL;
}
static apt_bool_t mrcp_client_agent_connection_remove(mrcp_connection_agent_t *agent, mrcp_connection_t *connection)
{
- apt_pollset_t *pollset = apt_poller_task_pollset_get(agent->task);
-
/* remove from the list */
- if(connection->it) {
- apt_list_elem_remove(agent->connection_list,connection->it);
- connection->it = NULL;
- }
-
- if(pollset) {
- apt_pollset_remove(pollset,&connection->sock_pfd);
- }
+ APR_RING_REMOVE(connection,link);
+
if(connection->sock) {
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Close TCP/MRCPv2 Connection %s",connection->id);
+ apt_poller_task_descriptor_remove(agent->task,&connection->sock_pfd);
apr_socket_close(connection->sock);
connection->sock = NULL;
}
}
else {
descriptor->connection_type = MRCP_CONNECTION_TYPE_EXISTING;
- if(apt_list_is_empty(agent->connection_list) == TRUE) {
+ if(APR_RING_EMPTY(&agent->connection_list, mrcp_connection_t, link)) {
/* offer new connection if there is no established connection yet */
descriptor->connection_type = MRCP_CONNECTION_TYPE_NEW;
}
status = apr_socket_recv(connection->sock,stream->pos,&length);
if(status == APR_EOF || length == 0) {
- apt_pollset_t *pollset = apt_poller_task_pollset_get(agent->task);
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"TCP/MRCPv2 Peer Disconnected %s",connection->id);
- if(pollset) {
- apt_pollset_remove(pollset,&connection->sock_pfd);
- }
+ apt_poller_task_descriptor_remove(agent->task,&connection->sock_pfd);
apr_socket_close(connection->sock);
connection->sock = NULL;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_connection.c 1710 2010-05-24 17:36:19Z achaloyan $
+ * $Id: mrcp_connection.c 2170 2014-09-09 05:19:48Z achaloyan@gmail.com $
*/
#include "mrcp_connection.h"
#include "apt_pool.h"
-mrcp_connection_t* mrcp_connection_create()
+mrcp_connection_t* mrcp_connection_create(void)
{
mrcp_connection_t *connection;
apr_pool_t *pool = apt_pool_create();
connection->id = NULL;
connection->verbose = TRUE;
connection->access_count = 0;
- connection->it = NULL;
+ APR_RING_ELEM_INIT(connection,link);
connection->channel_table = apr_hash_make(pool);
connection->parser = NULL;
connection->generator = NULL;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_control_descriptor.c 1710 2010-05-24 17:36:19Z achaloyan $
+ * $Id: mrcp_control_descriptor.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "apt_string_table.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_server_connection.c 1792 2011-01-10 21:08:52Z achaloyan $
+ * $Id: mrcp_server_connection.c 2235 2014-11-12 01:41:51Z achaloyan@gmail.com $
*/
#include "mrcp_connection.h"
apt_poller_task_t *task;
const mrcp_resource_factory_t *resource_factory;
- apt_obj_list_t *connection_list;
- mrcp_connection_t *null_connection;
+ /** List (ring) of MRCP connections */
+ APR_RING_HEAD(mrcp_connection_head_t, mrcp_connection_t) connection_list;
+ /** Table of pending control channels */
+ apr_hash_t *pending_channel_table;
apt_bool_t force_new_connection;
apr_size_t tx_buffer_size;
agent->rx_buffer_size = MRCP_STREAM_BUFFER_SIZE;
agent->tx_buffer_size = MRCP_STREAM_BUFFER_SIZE;
- apr_sockaddr_info_get(&agent->sockaddr,listen_ip,APR_INET,listen_port,0,agent->pool);
+ apr_sockaddr_info_get(&agent->sockaddr,listen_ip,APR_INET,listen_port,0,pool);
if(!agent->sockaddr) {
return NULL;
}
vtable->process_msg = mrcp_server_agent_msg_process;
}
- agent->connection_list = NULL;
- agent->null_connection = NULL;
-
- if(mrcp_server_agent_listening_socket_create(agent) == TRUE) {
- /* add listening socket to pollset */
- apt_pollset_t *pollset = apt_poller_task_pollset_get(agent->task);
- memset(&agent->listen_sock_pfd,0,sizeof(apr_pollfd_t));
- agent->listen_sock_pfd.desc_type = APR_POLL_SOCKET;
- agent->listen_sock_pfd.reqevents = APR_POLLIN;
- agent->listen_sock_pfd.desc.s = agent->listen_sock;
- agent->listen_sock_pfd.client_data = agent->listen_sock;
- if(apt_pollset_add(pollset, &agent->listen_sock_pfd) != TRUE) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Add Listening Socket to Pollset");
- mrcp_server_agent_listening_socket_destroy(agent);
- }
- }
- else {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create Listening Socket");
+ APR_RING_INIT(&agent->connection_list, mrcp_connection_t, link);
+ agent->pending_channel_table = apr_hash_make(pool);
+
+ if(mrcp_server_agent_listening_socket_create(agent) != TRUE) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create Listening Socket [%s] %s:%hu",
+ id,
+ listen_ip,
+ listen_port);
}
return agent;
}
apt_poller_task_t *poller_task = apt_task_object_get(task);
mrcp_connection_agent_t *agent = apt_poller_task_object_get(poller_task);
- apt_pollset_t *pollset = apt_poller_task_pollset_get(poller_task);
- if(pollset) {
- apt_pollset_remove(pollset,&agent->listen_sock_pfd);
- }
mrcp_server_agent_listening_socket_destroy(agent);
-
apt_poller_task_cleanup(poller_task);
return TRUE;
}
/** Set connection event handler. */
MRCP_DECLARE(void) mrcp_server_connection_agent_handler_set(
- mrcp_connection_agent_t *agent,
- void *obj,
+ mrcp_connection_agent_t *agent,
+ void *obj,
const mrcp_connection_event_vtable_t *vtable)
{
agent->obj = obj;
/** Set MRCP resource factory */
MRCP_DECLARE(void) mrcp_server_connection_resource_factory_set(
- mrcp_connection_agent_t *agent,
+ mrcp_connection_agent_t *agent,
const mrcp_resource_factory_t *resource_factroy)
{
agent->resource_factory = resource_factroy;
return mrcp_server_control_message_signal(CONNECTION_TASK_MSG_SEND_MESSAGE,channel->agent,channel,NULL,message);
}
+/** Create listening socket and add it to pollset */
static apt_bool_t mrcp_server_agent_listening_socket_create(mrcp_connection_agent_t *agent)
{
apr_status_t status;
return FALSE;
}
+ /* add listening socket to pollset */
+ memset(&agent->listen_sock_pfd,0,sizeof(apr_pollfd_t));
+ agent->listen_sock_pfd.desc_type = APR_POLL_SOCKET;
+ agent->listen_sock_pfd.reqevents = APR_POLLIN;
+ agent->listen_sock_pfd.desc.s = agent->listen_sock;
+ agent->listen_sock_pfd.client_data = agent->listen_sock;
+ if(apt_poller_task_descriptor_add(agent->task, &agent->listen_sock_pfd) != TRUE) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Add Listening Socket to Pollset [%s]",
+ apt_task_name_get(apt_poller_task_base_get(agent->task)));
+ apr_socket_close(agent->listen_sock);
+ agent->listen_sock = NULL;
+ return FALSE;
+ }
+
return TRUE;
}
+/** Remove from pollset and destroy listening socket */
static void mrcp_server_agent_listening_socket_destroy(mrcp_connection_agent_t *agent)
{
if(agent->listen_sock) {
+ apt_poller_task_descriptor_remove(agent->task,&agent->listen_sock_pfd);
apr_socket_close(agent->listen_sock);
agent->listen_sock = NULL;
}
apt_id_resource_generate(&message->channel_id.session_id,&message->channel_id.resource_name,'@',&identifier,connection->pool);
channel = mrcp_connection_channel_find(connection,&identifier);
if(!channel) {
- channel = mrcp_connection_channel_find(agent->null_connection,&identifier);
+ channel = apr_hash_get(agent->pending_channel_table,identifier.buf,identifier.length);
if(channel) {
- mrcp_connection_channel_remove(agent->null_connection,channel);
+ apr_hash_set(agent->pending_channel_table,identifier.buf,identifier.length,NULL);
mrcp_connection_channel_add(connection,channel);
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Attach Control Channel <%s> to Connection %s [%d]",
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Assign Control Channel <%s> to Connection %s [%d] -> [%d]",
channel->identifier.buf,
connection->id,
+ apr_hash_count(agent->pending_channel_table),
apr_hash_count(connection->channel_table));
}
}
static mrcp_connection_t* mrcp_connection_find(mrcp_connection_agent_t *agent, const apt_str_t *remote_ip)
{
- mrcp_connection_t *connection = NULL;
- apt_list_elem_t *elem;
- if(!agent || !agent->connection_list || !remote_ip) {
+ mrcp_connection_t *connection;
+ if(!agent || !remote_ip) {
return NULL;
}
- elem = apt_list_first_elem_get(agent->connection_list);
- /* walk through the list of connections */
- while(elem) {
- connection = apt_list_elem_object_get(elem);
- if(connection) {
- if(apt_string_compare(&connection->remote_ip,remote_ip) == TRUE) {
- return connection;
- }
+ for(connection = APR_RING_FIRST(&agent->connection_list);
+ connection != APR_RING_SENTINEL(&agent->connection_list, mrcp_connection_t, link);
+ connection = APR_RING_NEXT(connection, link)) {
+ if(apt_string_compare(&connection->remote_ip,remote_ip) == TRUE) {
+ return connection;
}
- elem = apt_list_next_elem_get(agent->connection_list,elem);
}
+
return NULL;
}
static apt_bool_t mrcp_connection_remove(mrcp_connection_agent_t *agent, mrcp_connection_t *connection)
{
- if(connection->it) {
- apt_list_elem_remove(agent->connection_list,connection->it);
- connection->it = NULL;
- }
- if(agent->null_connection) {
- if(apt_list_is_empty(agent->connection_list) == TRUE && apr_hash_count(agent->null_connection->channel_table) == 0) {
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Destroy Container for Pending Control Channels");
- mrcp_connection_destroy(agent->null_connection);
- agent->null_connection = NULL;
- agent->connection_list = NULL;
- }
- }
+ APR_RING_REMOVE(connection,link);
return TRUE;
}
{
char *local_ip = NULL;
char *remote_ip = NULL;
- apr_socket_t *sock;
- apr_pool_t *pool;
- apt_pollset_t *pollset = apt_poller_task_pollset_get(agent->task);
- mrcp_connection_t *connection;
-
- if(!agent->null_connection) {
- pool = apt_pool_create();
- if(apr_socket_accept(&sock,agent->listen_sock,pool) != APR_SUCCESS) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Accept Connection");
- return FALSE;
- }
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Rejected TCP/MRCPv2 Connection");
- apr_socket_close(sock);
- apr_pool_destroy(pool);
- return FALSE;
- }
+
+ mrcp_connection_t *connection = mrcp_connection_create();
- pool = agent->null_connection->pool;
- if(apr_socket_accept(&sock,agent->listen_sock,pool) != APR_SUCCESS) {
+ if(apr_socket_accept(&connection->sock,agent->listen_sock,connection->pool) != APR_SUCCESS) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Accept Connection");
+ mrcp_connection_destroy(connection);
return FALSE;
}
- connection = mrcp_connection_create();
- connection->sock = sock;
-
- if(apr_socket_addr_get(&connection->r_sockaddr,APR_REMOTE,sock) != APR_SUCCESS ||
- apr_socket_addr_get(&connection->l_sockaddr,APR_LOCAL,sock) != APR_SUCCESS) {
+ if(apr_socket_addr_get(&connection->r_sockaddr,APR_REMOTE,connection->sock) != APR_SUCCESS ||
+ apr_socket_addr_get(&connection->l_sockaddr,APR_LOCAL,connection->sock) != APR_SUCCESS) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Socket Address");
- apr_socket_close(sock);
+ apr_socket_close(connection->sock);
mrcp_connection_destroy(connection);
return FALSE;
}
local_ip,connection->l_sockaddr->port,
remote_ip,connection->r_sockaddr->port);
+ if(apr_hash_count(agent->pending_channel_table) == 0) {
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Reject Unexpected TCP/MRCPv2 Connection %s",connection->id);
+ apr_socket_close(connection->sock);
+ mrcp_connection_destroy(connection);
+ return FALSE;
+ }
+
memset(&connection->sock_pfd,0,sizeof(apr_pollfd_t));
connection->sock_pfd.desc_type = APR_POLL_SOCKET;
connection->sock_pfd.reqevents = APR_POLLIN;
connection->sock_pfd.desc.s = connection->sock;
connection->sock_pfd.client_data = connection;
- if(apt_pollset_add(pollset, &connection->sock_pfd) != TRUE) {
+ if(apt_poller_task_descriptor_add(agent->task, &connection->sock_pfd) != TRUE) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Add to Pollset %s",connection->id);
- apr_socket_close(sock);
+ apr_socket_close(connection->sock);
mrcp_connection_destroy(connection);
return FALSE;
}
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Accepted TCP/MRCPv2 Connection %s",connection->id);
connection->agent = agent;
- connection->it = apt_list_push_back(agent->connection_list,connection,connection->pool);
+ APR_RING_INSERT_TAIL(&agent->connection_list,connection,mrcp_connection_t,link);
connection->parser = mrcp_parser_create(agent->resource_factory,connection->pool);
connection->generator = mrcp_generator_create(agent->resource_factory,connection->pool);
static apt_bool_t mrcp_server_agent_connection_close(mrcp_connection_agent_t *agent, mrcp_connection_t *connection)
{
- apt_pollset_t *pollset = apt_poller_task_pollset_get(agent->task);
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"TCP/MRCPv2 Peer Disconnected %s",connection->id);
- apt_pollset_remove(pollset,&connection->sock_pfd);
+ apt_poller_task_descriptor_remove(agent->task,&connection->sock_pfd);
apr_socket_close(connection->sock);
connection->sock = NULL;
if(!connection->access_count) {
}
}
- if(!agent->null_connection) {
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Create Container for Pending Control Channels");
- agent->null_connection = mrcp_connection_create();
- agent->connection_list = apt_list_create(agent->null_connection->pool);
- }
- mrcp_connection_channel_add(agent->null_connection,channel);
+ apr_hash_set(agent->pending_channel_table,channel->identifier.buf,channel->identifier.length,channel);
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Add Pending Control Channel <%s> [%d]",
channel->identifier.buf,
- apr_hash_count(agent->null_connection->channel_table));
+ apr_hash_count(agent->pending_channel_table));
/* send response */
return mrcp_control_channel_add_respond(agent->vtable,channel,answer,TRUE);
}
static apt_bool_t mrcp_server_agent_channel_remove(mrcp_connection_agent_t *agent, mrcp_control_channel_t *channel)
{
mrcp_connection_t *connection = channel->connection;
- mrcp_connection_channel_remove(connection,channel);
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Remove Control Channel <%s> [%d]",
- channel->identifier.buf,
- apr_hash_count(connection->channel_table));
- if(!connection->access_count) {
- if(connection == agent->null_connection) {
- if(apt_list_is_empty(agent->connection_list) == TRUE) {
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Destroy Container for Pending Control Channels");
- mrcp_connection_destroy(agent->null_connection);
- agent->null_connection = NULL;
- agent->connection_list = NULL;
+ if(connection) {
+ mrcp_connection_channel_remove(connection,channel);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Remove Control Channel <%s> [%d]",
+ channel->identifier.buf,
+ apr_hash_count(connection->channel_table));
+ if(!connection->access_count) {
+ if(!connection->sock) {
+ mrcp_connection_remove(agent,connection);
+ /* set connection to be destroyed on channel destroy */
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Mark Connection for Removal %s",connection->id);
+ channel->connection = connection;
+ channel->removed = TRUE;
}
}
- else if(!connection->sock) {
- mrcp_connection_remove(agent,connection);
- /* set connection to be destroyed on channel destroy */
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Mark Connection for Removal %s",connection->id);
- channel->connection = connection;
- channel->removed = TRUE;
- }
+ }
+ else {
+ apr_hash_set(agent->pending_channel_table,channel->identifier.buf,channel->identifier.length,NULL);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Remove Pending Control Channel <%s> [%d]",
+ channel->identifier.buf,
+ apr_hash_count(agent->pending_channel_table));
}
/* send response */
return mrcp_control_channel_remove_respond(agent->vtable,channel,TRUE);
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = -I$(top_srcdir)/libs/uni-rtsp/include \
-I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+ $(UNIMRCP_APR_INCLUDES)
noinst_LTLIBRARIES = libunirtsp.la
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: rtsp.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: rtsp.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef RTSP_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: rtsp_client.h 1710 2010-05-24 17:36:19Z achaloyan $
+ * $Id: rtsp_client.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef RTSP_CLIENT_H
/**
* Create RTSP client.
+ * @param id the identifier of the client
* @param max_connection_count the number of max RTSP connections
* @param request_timeout the request timeout to set
* @param obj the external object to send event to
* @param pool the pool to allocate memory from
*/
RTSP_DECLARE(rtsp_client_t*) rtsp_client_create(
- apr_size_t max_connection_count,
- apr_size_t request_timeout,
- void *obj,
- const rtsp_client_vtable_t *handler,
- apr_pool_t *pool);
+ const char *id,
+ apr_size_t max_connection_count,
+ apr_size_t request_timeout,
+ void *obj,
+ const rtsp_client_vtable_t *handler,
+ apr_pool_t *pool);
/**
* Destroy RTSP client.
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: rtsp_header.h 1648 2010-04-12 20:03:59Z achaloyan $
+ * $Id: rtsp_header.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef RTSP_HEADER_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: rtsp_message.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: rtsp_message.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef RTSP_MESSAGE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: rtsp_server.h 1710 2010-05-24 17:36:19Z achaloyan $
+ * $Id: rtsp_server.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef RTSP_SERVER_H
/**
* Create RTSP server.
+ * @param id the identifier of the server
* @param listen_ip the listen IP address
* @param listen_port the listen port
* @param max_connection_count the number of max RTSP connections
* @param pool the pool to allocate memory from
*/
RTSP_DECLARE(rtsp_server_t*) rtsp_server_create(
- const char *listen_ip,
- apr_port_t listen_port,
- apr_size_t max_connection_count,
- void *obj,
- const rtsp_server_vtable_t *handler,
- apr_pool_t *pool);
+ const char *id,
+ const char *listen_ip,
+ apr_port_t listen_port,
+ apr_size_t max_connection_count,
+ void *obj,
+ const rtsp_server_vtable_t *handler,
+ apr_pool_t *pool);
/**
* Destroy RTSP server.
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: rtsp_start_line.h 1632 2010-03-30 20:46:25Z achaloyan $
+ * $Id: rtsp_start_line.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef RTSP_START_LINE_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: rtsp_stream.h 1632 2010-03-30 20:46:25Z achaloyan $
+ * $Id: rtsp_stream.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef RTSP_STREAM_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: rtsp_client.c 1710 2010-05-24 17:36:19Z achaloyan $
+ * $Id: rtsp_client.c 2220 2014-11-11 02:39:48Z achaloyan@gmail.com $
*/
+#ifdef WIN32
+#pragma warning(disable: 4127)
+#endif
+#include <apr_ring.h>
#include <apr_hash.h>
#include "rtsp_client.h"
#include "rtsp_stream.h"
apr_pool_t *pool;
apt_poller_task_t *task;
- apr_pool_t *sub_pool;
- apt_obj_list_t *connection_list;
+ /** List (ring) of RTSP connections */
+ APR_RING_HEAD(rtsp_client_connection_head_t, rtsp_client_connection_t) connection_list;
apr_uint32_t request_timeout;
/** RTSP connection */
struct rtsp_client_connection_t {
+ /** Ring entry */
+ APR_RING_ENTRY(rtsp_client_connection_t) link;
+
/** Memory pool */
apr_pool_t *pool;
/** Connected socket */
const char *id;
/** RTSP client, connection belongs to */
rtsp_client_t *client;
- /** Element of the connection list in agent */
- apt_list_elem_t *it;
/** Handle table (rtsp_client_session_t*) */
apr_hash_t *handle_table;
static apt_bool_t rtsp_client_message_handler(rtsp_client_connection_t *rtsp_connection, rtsp_message_t *message, apt_message_status_e status);
static apt_bool_t rtsp_client_message_send(rtsp_client_t *client, rtsp_client_connection_t *connection, rtsp_message_t *message);
static apt_bool_t rtsp_client_session_message_process(rtsp_client_t *client, rtsp_client_session_t *session, rtsp_message_t *message);
-static apt_bool_t rtsp_client_session_request_process(rtsp_client_t *client, rtsp_client_session_t *session, rtsp_message_t *message);
static apt_bool_t rtsp_client_session_response_process(rtsp_client_t *client, rtsp_client_session_t *session, rtsp_message_t *request, rtsp_message_t *response);
+
static void rtsp_client_timer_proc(apt_timer_t *timer, void *obj);
+/** Get string identifier */
+static const char* rtsp_client_id_get(const rtsp_client_t *client)
+{
+ apt_task_t *task = apt_poller_task_base_get(client->task);
+ return apt_task_name_get(task);
+}
+
/** Create RTSP client */
RTSP_DECLARE(rtsp_client_t*) rtsp_client_create(
- apr_size_t max_connection_count,
- apr_size_t request_timeout,
- void *obj,
- const rtsp_client_vtable_t *handler,
- apr_pool_t *pool)
-{
+ const char *id,
+ apr_size_t max_connection_count,
+ apr_size_t request_timeout,
+ void *obj,
+ const rtsp_client_vtable_t *handler,
+ apr_pool_t *pool)
+{
+ apt_task_t *task;
apt_task_vtable_t *vtable;
apt_task_msg_pool_t *msg_pool;
rtsp_client_t *client;
-
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Create RTSP Client [%"APR_SIZE_T_FMT"]",max_connection_count);
+
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create RTSP Client [%s] [%"APR_SIZE_T_FMT"]",
+ id, max_connection_count);
client = apr_palloc(pool,sizeof(rtsp_client_t));
client->pool = pool;
client->obj = obj;
return NULL;
}
+ task = apt_poller_task_base_get(client->task);
+ if(task) {
+ apt_task_name_set(task,id);
+ }
+
vtable = apt_poller_task_vtable_get(client->task);
if(vtable) {
vtable->process_msg = rtsp_client_task_msg_process;
}
- client->sub_pool = apt_subpool_create(pool);
- client->connection_list = NULL;
+ APR_RING_INIT(&client->connection_list, rtsp_client_connection_t, link);
client->request_timeout = (apr_uint32_t)request_timeout;
return client;
}
/** Destroy RTSP client */
RTSP_DECLARE(apt_bool_t) rtsp_client_destroy(rtsp_client_t *client)
{
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Destroy RTSP Client");
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Destroy RTSP Client [%s]",
+ rtsp_client_id_get(client));
return apt_poller_task_destroy(client->task);
}
/** Create connection */
-static apt_bool_t rtsp_client_connect(rtsp_client_connection_t *connection, apt_pollset_t *pollset, const char *ip, apr_port_t port)
+static apt_bool_t rtsp_client_connect(rtsp_client_t *client, rtsp_client_connection_t *connection, const char *ip, apr_port_t port)
{
char *local_ip = NULL;
char *remote_ip = NULL;
apr_sockaddr_t *l_sockaddr = NULL;
apr_sockaddr_t *r_sockaddr = NULL;
-
+
if(apr_sockaddr_info_get(&r_sockaddr,ip,APR_INET,port,0,connection->pool) != APR_SUCCESS) {
return FALSE;
}
connection->sock_pfd.reqevents = APR_POLLIN;
connection->sock_pfd.desc.s = connection->sock;
connection->sock_pfd.client_data = connection;
- if(apt_pollset_add(pollset,&connection->sock_pfd) != TRUE) {
+ if(apt_poller_task_descriptor_add(client->task,&connection->sock_pfd) != TRUE) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Add to Pollset %s",connection->id);
apr_socket_close(connection->sock);
connection->sock = NULL;
return FALSE;
}
-
+
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Established RTSP Connection %s",connection->id);
return TRUE;
}
/** Close connection */
-static apt_bool_t rtsp_client_connection_close(rtsp_client_connection_t *connection, apt_pollset_t *pollset)
+static apt_bool_t rtsp_client_connection_close(rtsp_client_t *client, rtsp_client_connection_t *connection)
{
if(connection->sock) {
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Close RTSP Connection %s",connection->id);
- apt_pollset_remove(pollset,&connection->sock_pfd);
+ apt_poller_task_descriptor_remove(client->task,&connection->sock_pfd);
apr_socket_close(connection->sock);
connection->sock = NULL;
}
static apt_bool_t rtsp_client_connection_create(rtsp_client_t *client, rtsp_client_session_t *session)
{
rtsp_client_connection_t *rtsp_connection;
- apt_pollset_t *pollset = apt_poller_task_pollset_get(client->task);
apr_pool_t *pool = apt_pool_create();
if(!pool) {
return FALSE;
rtsp_connection = apr_palloc(pool,sizeof(rtsp_client_connection_t));
rtsp_connection->pool = pool;
rtsp_connection->sock = NULL;
+ APR_RING_ELEM_INIT(rtsp_connection,link);
- if(rtsp_client_connect(rtsp_connection,pollset,session->server_ip.buf,session->server_port) == FALSE) {
+ if(rtsp_client_connect(client,rtsp_connection,session->server_ip.buf,session->server_port) == FALSE) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Connect to RTSP Server %s:%hu",
session->server_ip.buf,session->server_port);
apr_pool_destroy(pool);
rtsp_connection->parser = rtsp_parser_create(pool);
rtsp_connection->generator = rtsp_generator_create(pool);
rtsp_connection->last_cseq = 0;
- if(!client->connection_list) {
- client->connection_list = apt_list_create(client->sub_pool);
- }
+
rtsp_connection->client = client;
- rtsp_connection->it = apt_list_push_back(client->connection_list,rtsp_connection,pool);
+ APR_RING_INSERT_TAIL(&client->connection_list,rtsp_connection,rtsp_client_connection_t,link);
session->connection = rtsp_connection;
return TRUE;
}
static apt_bool_t rtsp_client_connection_destroy(rtsp_client_connection_t *rtsp_connection)
{
rtsp_client_t *client = rtsp_connection->client;
- apt_pollset_t *pollset = apt_poller_task_pollset_get(client->task);
- apt_list_elem_remove(client->connection_list,rtsp_connection->it);
- rtsp_client_connection_close(rtsp_connection,pollset);
+ APR_RING_REMOVE(rtsp_connection,link);
+ rtsp_client_connection_close(client,rtsp_connection);
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Destroy RTSP Connection %s",rtsp_connection->id);
apr_pool_destroy(rtsp_connection->pool);
- if(apt_list_is_empty(client->connection_list) == TRUE) {
- apr_pool_clear(client->sub_pool);
- client->connection_list = NULL;
- }
return TRUE;
}
{
rtsp_client_connection_t *rtsp_connection = session->connection;
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Remove RTSP Handle "APT_PTR_FMT,session);
- apr_hash_set(rtsp_connection->handle_table,session,sizeof(session),NULL);
+ apr_hash_set(rtsp_connection->handle_table,session,sizeof(void*),NULL);
session->term_state = TERMINATION_STATE_NONE;
client->vtable->on_session_terminate_response(client,session);
return FALSE;
}
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Add RTSP Handle "APT_PTR_FMT,session);
- apr_hash_set(session->connection->handle_table,session,sizeof(session),session);
+ apr_hash_set(session->connection->handle_table,session,sizeof(void*),session);
}
rtsp_client_session_url_generate(session,message);
message->header.session_id = session->id;
rtsp_header_property_add(&message->header,RTSP_HEADER_FIELD_SESSION_ID,message->pool);
}
-
+
message->header.cseq = ++session->connection->last_cseq;
rtsp_header_property_add(&message->header,RTSP_HEADER_FIELD_CSEQ,message->pool);
if(rtsp_client_session_request_process(client,session,request) == TRUE) {
return TRUE;
}
-
+
/* respond with error */
response = rtsp_response_create(
request,
RTSP_REASON_PHRASE_INTERNAL_SERVER_ERROR,
session->pool);
rtsp_client_session_response_process(client,session,request,response);
-
+
/* process the next pending request / if any */
request = apt_list_pop_front(session->pending_request_queue);
}
const char *resource_name;
if(request->start_line.common.request_line.method_id == RTSP_METHOD_SETUP &&
response->start_line.common.status_line.status_code == RTSP_STATUS_CODE_OK) {
-
+
if(apr_hash_count(session->resource_table) == 0) {
if(rtsp_header_property_check(&response->header,RTSP_HEADER_FIELD_SESSION_ID) == TRUE) {
session->id = response->header.session_id;
apr_hash_set(session->connection->session_table,session->id.buf,session->id.length,session);
}
}
-
+
/* add resource */
resource_name = request->start_line.common.request_line.resource_name;
apr_hash_set(session->resource_table,resource_name,APR_HASH_KEY_STRING,request);
}
while(request);
-
if(session->term_state == TERMINATION_STATE_NONE) {
client->vtable->on_session_terminate_event(client,session);
}
}
request = session->active_request;
-
response = rtsp_response_create(
request,
status_code,
reason,
session->pool);
+
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Cancel RTSP Request "APT_PTRSID_FMT" CSeq:%"APR_SIZE_T_FMT" [%d]",
session,
request->header.session_id.buf ? request->header.session_id.buf : "new",
request->header.cseq,
status_code);
-
+
return rtsp_client_message_handler(session->connection, response, APT_MESSAGE_STATUS_COMPLETE);
}
static apt_bool_t rtsp_client_on_disconnect(rtsp_client_t *client, rtsp_client_connection_t *rtsp_connection)
{
rtsp_client_session_t *session;
- apr_size_t remaining_handles = 0;
- apr_size_t cancelled_requests = 0;
- apt_pollset_t *pollset = apt_poller_task_pollset_get(client->task);
+ apr_size_t remaining_handles;
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"RTSP Peer Disconnected %s", rtsp_connection->id);
- rtsp_client_connection_close(rtsp_connection,pollset);
+ rtsp_client_connection_close(client,rtsp_connection);
/* Cancel in-progreess requests */
do {
session,
RTSP_STATUS_CODE_INTERNAL_SERVER_ERROR,
RTSP_REASON_PHRASE_INTERNAL_SERVER_ERROR) == TRUE) {
- cancelled_requests++;
apt_timer_kill(session->request_timer);
}
}
rtsp_client_session_terminate_raise(client,session);
}
}
- remaining_handles = apr_hash_count(rtsp_connection->session_table);
}
return TRUE;
return FALSE;
}
stream = &rtsp_connection->tx_stream;
-
+
do {
stream->text.length = sizeof(rtsp_connection->tx_buffer)-1;
apt_text_stream_reset(stream);
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: rtsp_header.c 1718 2010-05-31 13:12:43Z achaloyan $
+ * $Id: rtsp_header.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "rtsp_header.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: rtsp_message.c 1648 2010-04-12 20:03:59Z achaloyan $
+ * $Id: rtsp_message.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "rtsp_message.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: rtsp_server.c 1710 2010-05-24 17:36:19Z achaloyan $
+ * $Id: rtsp_server.c 2173 2014-09-11 01:42:21Z achaloyan@gmail.com $
*/
+#ifdef WIN32
+#pragma warning(disable: 4127)
+#endif
+#include <apr_ring.h>
#include <apr_hash.h>
#include "rtsp_server.h"
#include "rtsp_stream.h"
apr_pool_t *pool;
apt_poller_task_t *task;
- apr_pool_t *sub_pool;
- apt_obj_list_t *connection_list;
+ /** List (ring) of RTSP connections */
+ APR_RING_HEAD(rtsp_server_connection_head_t, rtsp_server_connection_t) connection_list;
/* Listening socket descriptor */
apr_sockaddr_t *sockaddr;
/** RTSP connection */
struct rtsp_server_connection_t {
+ /** Ring entry */
+ APR_RING_ENTRY(rtsp_server_connection_t) link;
+
/** Memory pool */
apr_pool_t *pool;
/** Client IP address */
/** RTSP server, connection belongs to */
rtsp_server_t *server;
- /** Element of the connection list in agent */
- apt_list_elem_t *it;
/** Session table (rtsp_server_session_t*) */
apr_hash_t *session_table;
static apt_bool_t rtsp_server_listening_socket_create(rtsp_server_t *server);
static void rtsp_server_listening_socket_destroy(rtsp_server_t *server);
+/** Get string identifier */
+static const char* rtsp_server_id_get(const rtsp_server_t *server)
+{
+ apt_task_t *task = apt_poller_task_base_get(server->task);
+ return apt_task_name_get(task);
+}
/** Create RTSP server */
RTSP_DECLARE(rtsp_server_t*) rtsp_server_create(
- const char *listen_ip,
- apr_port_t listen_port,
- apr_size_t max_connection_count,
- void *obj,
- const rtsp_server_vtable_t *handler,
- apr_pool_t *pool)
-{
+ const char *id,
+ const char *listen_ip,
+ apr_port_t listen_port,
+ apr_size_t max_connection_count,
+ void *obj,
+ const rtsp_server_vtable_t *handler,
+ apr_pool_t *pool)
+{
+ apt_task_t *task;
apt_task_vtable_t *vtable;
apt_task_msg_pool_t *msg_pool;
rtsp_server_t *server;
if(!listen_ip) {
return NULL;
}
-
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Create RTSP Server %s:%hu [%"APR_SIZE_T_FMT"]",
- listen_ip,
- listen_port,
- max_connection_count);
+
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create RTSP Server [%s] %s:%hu [%"APR_SIZE_T_FMT"]",
+ id,
+ listen_ip,
+ listen_port,
+ max_connection_count);
server = apr_palloc(pool,sizeof(rtsp_server_t));
server->pool = pool;
server->obj = obj;
if(!server->task) {
return NULL;
}
-
+
+ task = apt_poller_task_base_get(server->task);
+ if(task) {
+ apt_task_name_set(task,id);
+ }
+
vtable = apt_poller_task_vtable_get(server->task);
if(vtable) {
vtable->destroy = rtsp_server_on_destroy;
vtable->process_msg = rtsp_server_task_msg_process;
}
- server->sub_pool = apt_subpool_create(pool);
- server->connection_list = NULL;
+ APR_RING_INIT(&server->connection_list, rtsp_server_connection_t, link);
- rtsp_server_listening_socket_create(server);
+ if(rtsp_server_listening_socket_create(server) != TRUE) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create Listening Socket [%s] %s:%hu",
+ id,
+ listen_ip,
+ listen_port);
+ }
return server;
}
/** Destroy RTSP server */
RTSP_DECLARE(apt_bool_t) rtsp_server_destroy(rtsp_server_t *server)
{
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Destroy RTSP Server");
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Destroy RTSP Server [%s]",
+ rtsp_server_id_get(server));
return apt_poller_task_destroy(server->task);
}
/* Destroy RTSP session */
static void rtsp_server_session_destroy(rtsp_server_session_t *session)
{
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Destroy RTSP Session "APT_SID_FMT,session->id.buf);
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Destroy RTSP Session "APT_SID_FMT,
+ session ? session->id.buf : "(null)");
if(session && session->pool) {
apr_pool_destroy(session->pool);
}
/* Finally terminate RTSP session */
static apt_bool_t rtsp_server_session_do_terminate(rtsp_server_t *server, rtsp_server_session_t *session)
-{
+{
rtsp_server_connection_t *rtsp_connection = session->connection;
if(session->active_request) {
}
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Remove RTSP Session "APT_SID_FMT,session->id.buf);
- apr_hash_set(rtsp_connection->session_table,session->id.buf,session->id.length,NULL);
+ if(rtsp_connection) {
+ apr_hash_set(rtsp_connection->session_table,session->id.buf,session->id.length,NULL);
+ }
rtsp_server_session_destroy(session);
- if(rtsp_connection && !rtsp_connection->it) {
+ if(rtsp_connection && !rtsp_connection->sock) {
if(apr_hash_count(rtsp_connection->session_table) == 0) {
rtsp_server_connection_destroy(rtsp_connection);
}
RTSP_STATUS_CODE_NOT_ACCEPTABLE,
RTSP_REASON_PHRASE_NOT_ACCEPTABLE);
}
-
+
if(session->active_request) {
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Push RTSP Request to Queue "APT_SID_FMT,session->id.buf);
apt_list_push_back(session->request_queue,message,message->pool);
return FALSE;
}
stream = &rtsp_connection->tx_stream;
-
+
do {
stream->text.length = sizeof(rtsp_connection->tx_buffer)-1;
apt_text_stream_reset(stream);
return TRUE;
}
-/** Create listening socket and add to pollset */
+/** Create listening socket and add it to pollset */
static apt_bool_t rtsp_server_listening_socket_create(rtsp_server_t *server)
{
apr_status_t status;
- apt_pollset_t *pollset = apt_poller_task_pollset_get(server->task);
- if(!server->sockaddr || !pollset) {
+ if(!server->sockaddr) {
return FALSE;
}
return FALSE;
}
+ /* add listening socket to pollset */
memset(&server->listen_sock_pfd,0,sizeof(apr_pollfd_t));
server->listen_sock_pfd.desc_type = APR_POLL_SOCKET;
server->listen_sock_pfd.reqevents = APR_POLLIN;
server->listen_sock_pfd.desc.s = server->listen_sock;
server->listen_sock_pfd.client_data = server->listen_sock;
- if(apt_pollset_add(pollset, &server->listen_sock_pfd) != TRUE) {
+ if(apt_poller_task_descriptor_add(server->task, &server->listen_sock_pfd) != TRUE) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Add Listening Socket to Pollset");
apr_socket_close(server->listen_sock);
server->listen_sock = NULL;
+ return FALSE;
}
return TRUE;
/** Remove from pollset and destroy listening socket */
static void rtsp_server_listening_socket_destroy(rtsp_server_t *server)
{
- apt_pollset_t *pollset = apt_poller_task_pollset_get(server->task);
- if(pollset) {
- apt_pollset_remove(pollset,&server->listen_sock_pfd);
- }
-
if(server->listen_sock) {
+ apt_poller_task_descriptor_remove(server->task,&server->listen_sock_pfd);
apr_socket_close(server->listen_sock);
server->listen_sock = NULL;
}
char *remote_ip = NULL;
apr_sockaddr_t *l_sockaddr = NULL;
apr_sockaddr_t *r_sockaddr = NULL;
- apt_pollset_t *pollset = apt_poller_task_pollset_get(server->task);
apr_pool_t *pool = apt_pool_create();
if(!pool) {
return FALSE;
}
-
+
rtsp_connection = apr_palloc(pool,sizeof(rtsp_server_connection_t));
rtsp_connection->pool = pool;
rtsp_connection->sock = NULL;
rtsp_connection->client_ip = NULL;
+ APR_RING_ELEM_INIT(rtsp_connection,link);
if(apr_socket_accept(&rtsp_connection->sock,server->listen_sock,rtsp_connection->pool) != APR_SUCCESS) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Accept RTSP Connection");
apr_pool_destroy(pool);
return FALSE;
}
if(apr_socket_addr_get(&l_sockaddr,APR_LOCAL,rtsp_connection->sock) != APR_SUCCESS ||
apr_socket_addr_get(&r_sockaddr,APR_REMOTE,rtsp_connection->sock) != APR_SUCCESS) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get RTSP Socket Address");
apr_pool_destroy(pool);
return FALSE;
}
rtsp_connection->sock_pfd.reqevents = APR_POLLIN;
rtsp_connection->sock_pfd.desc.s = rtsp_connection->sock;
rtsp_connection->sock_pfd.client_data = rtsp_connection;
- if(apt_pollset_add(pollset,&rtsp_connection->sock_pfd) != TRUE) {
+ if(apt_poller_task_descriptor_add(server->task,&rtsp_connection->sock_pfd) != TRUE) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Add to Pollset %s",rtsp_connection->id);
apr_socket_close(rtsp_connection->sock);
apr_pool_destroy(pool);
apt_text_stream_init(&rtsp_connection->tx_stream,rtsp_connection->tx_buffer,sizeof(rtsp_connection->tx_buffer)-1);
rtsp_connection->parser = rtsp_parser_create(rtsp_connection->pool);
rtsp_connection->generator = rtsp_generator_create(rtsp_connection->pool);
- if(!server->connection_list) {
- server->connection_list = apt_list_create(server->sub_pool);
- }
rtsp_connection->server = server;
- rtsp_connection->it = apt_list_push_back(server->connection_list,rtsp_connection,rtsp_connection->pool);
+ APR_RING_INSERT_TAIL(&server->connection_list,rtsp_connection,rtsp_server_connection_t,link);
return TRUE;
}
/** Close connection */
static apt_bool_t rtsp_server_connection_close(rtsp_server_t *server, rtsp_server_connection_t *rtsp_connection)
{
- apt_pollset_t *pollset = apt_poller_task_pollset_get(server->task);
apr_size_t remaining_sessions = 0;
if(!rtsp_connection || !rtsp_connection->sock) {
return FALSE;
}
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Close RTSP Connection %s",rtsp_connection->id);
- apt_pollset_remove(pollset,&rtsp_connection->sock_pfd);
+ apt_poller_task_descriptor_remove(server->task,&rtsp_connection->sock_pfd);
apr_socket_close(rtsp_connection->sock);
rtsp_connection->sock = NULL;
- apt_list_elem_remove(server->connection_list,rtsp_connection->it);
- rtsp_connection->it = NULL;
- if(apt_list_is_empty(server->connection_list) == TRUE) {
- apr_pool_clear(server->sub_pool);
- server->connection_list = NULL;
- }
+ APR_RING_REMOVE(rtsp_connection,link);
remaining_sessions = apr_hash_count(rtsp_connection->session_table);
if(remaining_sessions) {
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: rtsp_start_line.c 1671 2010-04-28 19:50:29Z achaloyan $
+ * $Id: rtsp_start_line.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "rtsp_start_line.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: rtsp_stream.c 1648 2010-04-12 20:03:59Z achaloyan $
+ * $Id: rtsp_stream.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "rtsp_stream.h"
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="unirtsp"\r
- ProjectGUID="{504B3154-7A4F-459D-9877-B951021C3F1F}"\r
- RootNamespace="unirtsp"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- <Platform\r
- Name="x64"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="codecs"\r
- PreprocessorDefinitions="APT_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="codecs"\r
- PreprocessorDefinitions="APT_STATIC_LIB"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="codecs"\r
- PreprocessorDefinitions="APT_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="codecs"\r
- PreprocessorDefinitions="APT_STATIC_LIB"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\include\rtsp.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\rtsp_client.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\rtsp_header.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\rtsp_message.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\rtsp_server.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\rtsp_start_line.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\rtsp_stream.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\src\rtsp_client.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\rtsp_header.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\rtsp_message.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\rtsp_server.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\rtsp_start_line.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\rtsp_stream.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>unirtsp</ProjectName>\r
- <ProjectGuid>{504B3154-7A4F-459D-9877-B951021C3F1F}</ProjectGuid>\r
- <RootNamespace>unirtsp</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirtsp.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirtsp.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirtsp.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirtsp.props" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\rtsp.h" />\r
- <ClInclude Include="include\rtsp_client.h" />\r
- <ClInclude Include="include\rtsp_header.h" />\r
- <ClInclude Include="include\rtsp_message.h" />\r
- <ClInclude Include="include\rtsp_server.h" />\r
- <ClInclude Include="include\rtsp_start_line.h" />\r
- <ClInclude Include="include\rtsp_stream.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\rtsp_client.c" />\r
- <ClCompile Include="src\rtsp_header.c" />\r
- <ClCompile Include="src\rtsp_message.c" />\r
- <ClCompile Include="src\rtsp_server.c" />\r
- <ClCompile Include="src\rtsp_start_line.c" />\r
- <ClCompile Include="src\rtsp_stream.c" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
-</Project>\r
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup>\r
- <Filter Include="include">\r
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="src">\r
- <UniqueIdentifier>{fd4564ef-9f34-4f23-992d-37f127e289a2}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\rtsp.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\rtsp_client.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\rtsp_header.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\rtsp_message.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\rtsp_server.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\rtsp_start_line.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\rtsp_stream.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\rtsp_client.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\rtsp_header.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\rtsp_message.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\rtsp_server.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\rtsp_start_line.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\rtsp_stream.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
-</Project>
\ No newline at end of file
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="codecs"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="codecs"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="codecs"
DebugInformationFormat="3"
/>
<Tool
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="codecs"
/>
<Tool
Name="VCManagedResourceCompilerTool"
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>unirtsp</ProjectName>\r
- <ProjectGuid>{504B3154-7A4F-459D-9877-B951021C3F1F}</ProjectGuid>\r
- <RootNamespace>unirtsp</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirtsp.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirtsp.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirtsp.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirtsp.props" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>codecs;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\rtsp.h" />\r
- <ClInclude Include="include\rtsp_client.h" />\r
- <ClInclude Include="include\rtsp_header.h" />\r
- <ClInclude Include="include\rtsp_message.h" />\r
- <ClInclude Include="include\rtsp_server.h" />\r
- <ClInclude Include="include\rtsp_start_line.h" />\r
- <ClInclude Include="include\rtsp_stream.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\rtsp_client.c" />\r
- <ClCompile Include="src\rtsp_header.c" />\r
- <ClCompile Include="src\rtsp_message.c" />\r
- <ClCompile Include="src\rtsp_server.c" />\r
- <ClCompile Include="src\rtsp_start_line.c" />\r
- <ClCompile Include="src\rtsp_stream.c" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{504B3154-7A4F-459D-9877-B951021C3F1F}</ProjectGuid>
+ <RootNamespace>unirtsp</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirtsp.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirtsp.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirtsp.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirtsp.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="include\rtsp.h" />
+ <ClInclude Include="include\rtsp_client.h" />
+ <ClInclude Include="include\rtsp_header.h" />
+ <ClInclude Include="include\rtsp_message.h" />
+ <ClInclude Include="include\rtsp_server.h" />
+ <ClInclude Include="include\rtsp_start_line.h" />
+ <ClInclude Include="include\rtsp_stream.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\rtsp_client.c" />
+ <ClCompile Include="src\rtsp_header.c" />
+ <ClCompile Include="src\rtsp_message.c" />
+ <ClCompile Include="src\rtsp_server.c" />
+ <ClCompile Include="src\rtsp_start_line.c" />
+ <ClCompile Include="src\rtsp_stream.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\apr-toolkit\aprtoolkit.vcxproj">
+ <Project>{13deeca0-bdd4-4744-a1a2-8eb0a44df3d2}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup>\r
- <Filter Include="include">\r
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="src">\r
- <UniqueIdentifier>{fd4564ef-9f34-4f23-992d-37f127e289a2}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\rtsp.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\rtsp_client.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\rtsp_header.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\rtsp_message.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\rtsp_server.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\rtsp_start_line.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\rtsp_stream.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\rtsp_client.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\rtsp_header.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\rtsp_message.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\rtsp_server.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\rtsp_start_line.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\rtsp_stream.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{8ffd50c3-3b28-438d-a305-071644d5f115}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="include\rtsp.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\rtsp_client.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\rtsp_header.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\rtsp_message.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\rtsp_server.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\rtsp_start_line.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\rtsp_stream.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\rtsp_client.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\rtsp_header.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\rtsp_message.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\rtsp_server.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\rtsp_start_line.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\rtsp_stream.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
</Project>
\ No newline at end of file
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
-AM_CPPFLAGS = -Iinclude \
- -I$(unimrcp_srcdir)/modules/mrcp-sofiasip/include \
+AM_CPPFLAGS = -I$(top_srcdir)/modules/mrcp-sofiasip/include \
-I$(top_srcdir)/libs/mrcpv2-transport/include \
-I$(top_srcdir)/libs/mrcp-signaling/include \
-I$(top_srcdir)/libs/mrcp/include \
-I$(top_srcdir)/libs/mrcp/resources/include \
-I$(top_srcdir)/libs/mpf/include \
-I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES) $(UNIMRCP_SOFIA_INCLUDES)
+ $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_SOFIA_INCLUDES)
noinst_LTLIBRARIES = libmrcpsofiasip.la
include/mrcp_sofiasip_client_agent.h
libmrcpsofiasip_la_SOURCES = src/mrcp_sdp.c \
src/mrcp_sofiasip_server_agent.c \
- src/mrcp_sofiasip_client_agent.c
+ src/mrcp_sofiasip_client_agent.c \
+ src/mrcp_sofiasip_logger.c
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_sdp.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_sdp.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_SDP_H
MRCP_DECLARE(apr_size_t) sdp_string_generate_by_mrcp_descriptor(char *buffer, apr_size_t size, const mrcp_session_descriptor_t *descriptor, apt_bool_t offer);
/** Generate MRCP descriptor by SDP session */
-MRCP_DECLARE(mrcp_session_descriptor_t*) mrcp_descriptor_generate_by_sdp_session(const sdp_session_t *sdp, const char *force_destination_ip, apr_pool_t *pool);
+MRCP_DECLARE(apt_bool_t) mrcp_descriptor_generate_by_sdp_session(mrcp_session_descriptor_t* descriptor, const sdp_session_t *sdp, const char *force_destination_ip, apr_pool_t *pool);
/** Generate SDP resource discovery string */
MRCP_DECLARE(apr_size_t) sdp_resource_discovery_string_generate(const char *ip, const char *origin, char *buffer, apr_size_t size);
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_sofiasip_client_agent.h 1700 2010-05-21 18:56:06Z achaloyan $
+ * $Id: mrcp_sofiasip_client_agent.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_SOFIASIP_CLIENT_AGENT_H
apr_size_t sip_t4;
/** SIP T1x64 timer */
apr_size_t sip_t1x64;
+ /** Print out SIP messages to the console */
+ apt_bool_t tport_log;
+ /** Dump SIP messages to the specified file */
+ char *tport_dump_file;
};
/**
*/
MRCP_DECLARE(mrcp_sofia_client_config_t*) mrcp_sofiasip_client_config_alloc(apr_pool_t *pool);
+/**
+ * Initialize Sofia-SIP logger.
+ */
+MRCP_DECLARE(apt_bool_t) mrcp_sofiasip_client_logger_init(const char *name, const char *level_str, apt_bool_t redirect);
+
APT_END_EXTERN_C
#endif /* MRCP_SOFIASIP_CLIENT_AGENT_H */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_sofiasip_server_agent.h 1700 2010-05-21 18:56:06Z achaloyan $
+ * $Id: mrcp_sofiasip_server_agent.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_SOFIASIP_SERVER_AGENT_H
apr_size_t sip_t4;
/** SIP T1x64 timer */
apr_size_t sip_t1x64;
+ /** Print out SIP messages to the console */
+ apt_bool_t tport_log;
+ /** Dump SIP messages to the specified file */
+ char *tport_dump_file;
};
/**
*/
MRCP_DECLARE(mrcp_sofia_server_config_t*) mrcp_sofiasip_server_config_alloc(apr_pool_t *pool);
+/**
+ * Initialize Sofia-SIP logger.
+ */
+MRCP_DECLARE(apt_bool_t) mrcp_sofiasip_server_logger_init(const char *name, const char *level_str, apt_bool_t redirect);
+
APT_END_EXTERN_C
#endif /* MRCP_SOFIASIP_SERVER_AGENT_H */
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="mrcpsofiasip"\r
- ProjectGUID="{746F3632-5BB2-4570-9453-31D6D58A7D8E}"\r
- RootNamespace="mrcpsofiasip"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- <Platform\r
- Name="x64"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="include"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="include"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="include"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="include"\r
- PreprocessorDefinitions="APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\include\mrcp_sdp.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_sofiasip_client_agent.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_sofiasip_server_agent.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\src\mrcp_sdp.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_sofiasip_client_agent.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_sofiasip_server_agent.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>mrcpsofiasip</ProjectName>\r
- <ProjectGuid>{746F3632-5BB2-4570-9453-31D6D58A7D8E}</ProjectGuid>\r
- <RootNamespace>mrcpsofiasip</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp_sdp.h" />\r
- <ClInclude Include="include\mrcp_sofiasip_client_agent.h" />\r
- <ClInclude Include="include\mrcp_sofiasip_server_agent.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\mrcp_sdp.c" />\r
- <ClCompile Include="src\mrcp_sofiasip_client_agent.c" />\r
- <ClCompile Include="src\mrcp_sofiasip_server_agent.c" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ProjectReference Include="..\..\..\win32\sofia\libsofia_sip_ua_static.2012.vcxproj">\r
- <Project>{70a49bc2-7500-41d0-b75d-edcc5be987a0}</Project>\r
- </ProjectReference>\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
-</Project>\r
RelativePath=".\include\mrcp_sofiasip_server_agent.h"
>
</File>
+ <File
+ RelativePath=".\include\mrcp_sofiasip_log.h"
+ >
+ </File>
</Filter>
<Filter
Name="src"
RelativePath=".\src\mrcp_sofiasip_client_agent.c"
>
</File>
+ <File
+ RelativePath=".\src\mrcp_sofiasip_logger.c"
+ >
+ </File>
<File
RelativePath=".\src\mrcp_sofiasip_server_agent.c"
>
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>mrcpsofiasip</ProjectName>\r
- <ProjectGuid>{746F3632-5BB2-4570-9453-31D6D58A7D8E}</ProjectGuid>\r
- <RootNamespace>mrcpsofiasip</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpv2transport.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp_sdp.h" />\r
- <ClInclude Include="include\mrcp_sofiasip_client_agent.h" />\r
- <ClInclude Include="include\mrcp_sofiasip_server_agent.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\mrcp_sdp.c" />\r
- <ClCompile Include="src\mrcp_sofiasip_client_agent.c" />\r
- <ClCompile Include="src\mrcp_sofiasip_server_agent.c" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ProjectReference Include="..\..\..\win32\sofia\libsofia_sip_ua_static.2010.vcxproj">\r
- <Project>{70a49bc2-7500-41d0-b75d-edcc5be987a0}</Project>\r
- </ProjectReference>\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{746F3632-5BB2-4570-9453-31D6D58A7D8E}</ProjectGuid>
+ <RootNamespace>mrcpsofiasip</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpv2transport.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpsignaling.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpv2transport.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpsignaling.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpv2transport.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpsignaling.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpv2transport.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpsignaling.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="include\mrcp_sdp.h" />
+ <ClInclude Include="include\mrcp_sofiasip_client_agent.h" />
+ <ClInclude Include="include\mrcp_sofiasip_server_agent.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\mrcp_sdp.c" />
+ <ClCompile Include="src\mrcp_sofiasip_client_agent.c" />
+ <ClCompile Include="src\mrcp_sofiasip_logger.c" />
+ <ClCompile Include="src\mrcp_sofiasip_server_agent.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\libs\mrcp-signaling\mrcpsignaling.vcxproj">
+ <Project>{12a49562-bab9-43a3-a21d-15b60bbb4c31}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\libs\mrcpv2-transport\mrcpv2transport.vcxproj">
+ <Project>{a9edac04-6a5f-4ba7-bc0d-cce7b255b6ea}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup>\r
- <Filter Include="include">\r
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="src">\r
- <UniqueIdentifier>{6e92b598-880e-4fe5-88fb-f69df8e06a57}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp_sdp.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_sofiasip_client_agent.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_sofiasip_server_agent.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\mrcp_sdp.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mrcp_sofiasip_client_agent.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mrcp_sofiasip_server_agent.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{5256b9c6-18be-48fc-aaa3-8e2c17df7f8d}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="include\mrcp_sdp.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_sofiasip_client_agent.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_sofiasip_server_agent.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\mrcp_sdp.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_sofiasip_client_agent.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_sofiasip_server_agent.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_sofiasip_logger.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_sdp.c 1647 2010-04-12 19:34:53Z achaloyan $
+ * $Id: mrcp_sdp.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <stdlib.h>
#include "mrcp_session_descriptor.h"
#include "mrcp_control_descriptor.h"
#include "mpf_rtp_attribs.h"
+#include "mpf_rtp_pt.h"
#include "apt_text_stream.h"
#include "apt_log.h"
}
/** Generate MRCP descriptor by SDP session */
-MRCP_DECLARE(mrcp_session_descriptor_t*) mrcp_descriptor_generate_by_sdp_session(const sdp_session_t *sdp, const char *force_destination_ip, apr_pool_t *pool)
+MRCP_DECLARE(apt_bool_t) mrcp_descriptor_generate_by_sdp_session(mrcp_session_descriptor_t* descriptor, const sdp_session_t *sdp, const char *force_destination_ip, apr_pool_t *pool)
{
sdp_media_t *sdp_media;
- mrcp_session_descriptor_t *descriptor;
if(!sdp) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Invalid SDP Message");
- return NULL;
+ return FALSE;
}
- descriptor = mrcp_session_descriptor_create(pool);
-
if(force_destination_ip) {
apt_string_assign(&descriptor->ip,force_destination_ip,pool);
}
break;
}
}
- return descriptor;
+ return TRUE;
}
-
/** Generate SDP media by RTP media descriptor */
static apr_size_t sdp_rtp_media_generate(char *buffer, apr_size_t size, const mrcp_session_descriptor_t *descriptor, const mpf_rtp_media_descriptor_t *audio_media)
{
apr_size_t offset = 0;
- int i;
- mpf_codec_descriptor_t *codec_descriptor;
- apr_array_header_t *descriptor_arr = audio_media->codec_list.descriptor_arr;
- if(!descriptor_arr) {
- return 0;
- }
- offset += snprintf(buffer+offset,size-offset,
- "m=audio %d RTP/AVP",
- audio_media->state == MPF_MEDIA_ENABLED ? audio_media->port : 0);
- for(i=0; i<descriptor_arr->nelts; i++) {
- codec_descriptor = &APR_ARRAY_IDX(descriptor_arr,i,mpf_codec_descriptor_t);
- if(codec_descriptor->enabled == TRUE) {
- offset += snprintf(buffer+offset,size-offset," %d", codec_descriptor->payload_type);
- }
- }
- offset += snprintf(buffer+offset,size-offset,"\r\n");
- if(descriptor->ip.length && audio_media->ip.length &&
- apt_string_compare(&descriptor->ip,&audio_media->ip) != TRUE) {
- const char *media_ip = audio_media->ext_ip.buf ? audio_media->ext_ip.buf : audio_media->ip.buf;
- offset += sprintf(buffer+offset,"c=IN IP4 %s\r\n",media_ip);
- }
if(audio_media->state == MPF_MEDIA_ENABLED) {
- const apt_str_t *direction_str = mpf_rtp_direction_str_get(audio_media->direction);
+ int codec_count = 0;
+ int i;
+ mpf_codec_descriptor_t *codec_descriptor;
+ apr_array_header_t *descriptor_arr = audio_media->codec_list.descriptor_arr;
+ const apt_str_t *direction_str;
+ if(!descriptor_arr) {
+ return 0;
+ }
+
+ offset += snprintf(buffer+offset,size-offset,"m=audio %d RTP/AVP",audio_media->port);
+ for(i=0; i<descriptor_arr->nelts; i++) {
+ codec_descriptor = &APR_ARRAY_IDX(descriptor_arr,i,mpf_codec_descriptor_t);
+ if(codec_descriptor->enabled == TRUE) {
+ offset += snprintf(buffer+offset,size-offset," %d",codec_descriptor->payload_type);
+ codec_count++;
+ }
+ }
+ if(!codec_count){
+ /* SDP m line should have at least one media format listed; use a reserved RTP payload type */
+ offset += snprintf(buffer+offset,size-offset," %d",RTP_PT_RESERVED);
+ }
+ offset += snprintf(buffer+offset,size-offset,"\r\n");
+
+ if(descriptor->ip.length && audio_media->ip.length &&
+ apt_string_compare(&descriptor->ip,&audio_media->ip) != TRUE) {
+ const char *media_ip = audio_media->ext_ip.buf ? audio_media->ext_ip.buf : audio_media->ip.buf;
+ offset += snprintf(buffer+offset,size-offset,"c=IN IP4 %s\r\n",media_ip);
+ }
+
for(i=0; i<descriptor_arr->nelts; i++) {
codec_descriptor = &APR_ARRAY_IDX(descriptor_arr,i,mpf_codec_descriptor_t);
if(codec_descriptor->enabled == TRUE && codec_descriptor->name.buf) {
}
}
}
+
+ direction_str = mpf_rtp_direction_str_get(audio_media->direction);
if(direction_str) {
offset += snprintf(buffer+offset,size-offset,"a=%s\r\n",direction_str->buf);
}
offset += snprintf(buffer+offset,size-offset,"a=ptime:%hu\r\n",audio_media->ptime);
}
}
+ else {
+ offset += snprintf(buffer+offset,size-offset,"m=audio 0 RTP/AVP %d\r\n",RTP_PT_RESERVED);
+ }
+
offset += snprintf(buffer+offset,size-offset,"a=mid:%"APR_SIZE_T_FMT"\r\n",audio_media->mid);
return offset;
}
}
else { /* answer */
if(control_media->port) {
- offset += sprintf(buffer+offset,
+ offset += snprintf(buffer+offset,size-offset,
"m=application %d %s 1\r\n"
"a=setup:%s\r\n"
"a=connection:%s\r\n"
control_media->resource_name.buf);
}
else {
- offset += sprintf(buffer+offset,
+ offset += snprintf(buffer+offset,size-offset,
"m=application %d %s 1\r\n"
"a=channel:%s@%s\r\n",
control_media->port,
offset += snprintf(buffer+offset,size-offset,
"a=cmid:%"APR_SIZE_T_FMT"\r\n",
APR_ARRAY_IDX(control_media->cmid_arr,i,apr_size_t));
-
}
return offset;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_sofiasip_client_agent.c 1799 2011-05-12 02:32:32Z achaloyan $
+ * $Id: mrcp_sofiasip_client_agent.c 2225 2014-11-12 00:45:19Z achaloyan@gmail.com $
*/
typedef struct mrcp_sofia_agent_t mrcp_sofia_agent_t;
#include <sofia-sip/nua.h>
#include <sofia-sip/sip_status.h>
#include <sofia-sip/sdp.h>
+#include <sofia-sip/tport.h>
#include <sofia-sip/sofia_features.h>
#undef strcasecmp
#undef strncasecmp
su_home_t *home;
nua_handle_t *nh;
+ enum nua_callstate nua_state;
apt_bool_t terminate_requested;
mrcp_session_descriptor_t *descriptor;
sip_t const *sip,
tagi_t tags[]);
+apt_bool_t mrcp_sofiasip_log_init(const char *name, const char *level_str, apt_bool_t redirect);
/** Create Sofia-SIP Signaling Agent */
MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_sofiasip_client_agent_create(const char *id, mrcp_sofia_client_config_t *config, apr_pool_t *pool)
apt_task_vtable_t *vtable;
mrcp_sofia_agent_t *sofia_agent;
sofia_agent = apr_palloc(pool,sizeof(mrcp_sofia_agent_t));
- sofia_agent->sig_agent = mrcp_signaling_agent_create(id,sofia_agent,MRCP_VERSION_2,pool);
+ sofia_agent->sig_agent = mrcp_signaling_agent_create(id,sofia_agent,pool);
sofia_agent->sig_agent->create_client_session = mrcp_sofia_session_create;
sofia_agent->root = NULL;
sofia_agent->nua = NULL;
config->sip_t2 = 0;
config->sip_t4 = 0;
config->sip_t1x64 = 0;
+
+ config->tport_log = FALSE;
+ config->tport_dump_file = NULL;
+
return config;
}
+MRCP_DECLARE(apt_bool_t) mrcp_sofiasip_client_logger_init(const char *name, const char *level_str, apt_bool_t redirect)
+{
+ return mrcp_sofiasip_log_init(name,level_str,redirect);
+}
+
static apt_bool_t mrcp_sofia_config_validate(mrcp_sofia_agent_t *sofia_agent, mrcp_sofia_client_config_t *config, apr_pool_t *pool)
{
- const char *local_ip = config->ext_ip ? config->ext_ip : config->local_ip;
if(!config->local_ip) {
return FALSE;
}
sofia_agent->config = config;
- sofia_agent->sip_contact_str = apr_psprintf(pool,"sip:%s:%hu", local_ip, config->local_port);
- sofia_agent->sip_from_str = apr_psprintf(pool,"sip:%s:%hu", local_ip, config->local_port);
+ if(config->ext_ip) {
+ /* Use external IP address in Contact and From headers, if behind NAT */
+ sofia_agent->sip_contact_str = apr_psprintf(pool,"sip:%s:%hu", config->ext_ip, config->local_port);
+ sofia_agent->sip_from_str = apr_psprintf(pool,"sip:%s:%hu", config->ext_ip, config->local_port);
+ }
+ else {
+ sofia_agent->sip_contact_str = NULL; /* Let Sofia-SIP implicitly set Contact header by default */
+ sofia_agent->sip_from_str = apr_psprintf(pool,"sip:%s:%hu", config->local_ip, config->local_port);
+ }
if(config->transport) {
sofia_agent->sip_bind_str = apr_psprintf(pool,"sip:%s:%hu;transport=%s",
mrcp_sofia_event_callback, /* Callback for processing events */
sofia_agent, /* Additional data to pass to callback */
NUTAG_URL(sofia_agent->sip_bind_str), /* Address to bind to */
+ TAG_IF(sofia_config->tport_log == TRUE,TPTAG_LOG(1)), /* Print out SIP messages to the console */
+ TAG_IF(sofia_config->tport_dump_file,TPTAG_DUMP(sofia_config->tport_dump_file)), /* Dump SIP messages to the file */
TAG_END()); /* Last tag should always finish the sequence */
if(sofia_agent->nua) {
nua_set_params(
SIPTAG_USER_AGENT_STR(sofia_config->user_agent_name),
TAG_END());
}
+ else {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create NUA [%s] %s",
+ apt_task_name_get(task),
+ sofia_agent->sip_bind_str);
+ }
}
static apt_bool_t mrcp_sofia_task_run(apt_task_t *task)
sofia_agent->root = NULL;
su_deinit();
- apt_task_child_terminate(task);
+ apt_task_terminate_request_process(task);
return TRUE;
}
{
mrcp_sofia_agent_t *sofia_agent = apt_task_object_get(task);
if(sofia_agent->nua) {
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Send Shutdown Signal to NUA");
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Send Shutdown Signal to NUA [%s]",
+ apt_task_name_get(task));
nua_shutdown(sofia_agent->nua);
}
return TRUE;
mrcp_sofia_session_t *sofia_session;
session->request_vtable = &session_request_vtable;
+ if(!sofia_agent->nua) {
+ return FALSE;
+ }
+
sofia_session = apr_palloc(session->pool,sizeof(mrcp_sofia_session_t));
sofia_session->mutex = NULL;
sofia_session->home = su_home_new(sizeof(*sofia_session->home));
sofia_session->descriptor = NULL;
session->obj = sofia_session;
- if(settings->user_name && settings->user_name != '\0') {
+ if(settings->user_name && *settings->user_name != '\0') {
sofia_session->sip_to_str = apr_psprintf(session->pool,"sip:%s@%s:%hu",
settings->user_name,
settings->server_ip,
sofia_session,
SIPTAG_TO_STR(sofia_session->sip_to_str),
SIPTAG_FROM_STR(sofia_agent->sip_from_str),
- SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str),
+ TAG_IF(sofia_agent->sip_contact_str,SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str)),
TAG_IF(settings->feature_tags,SIPTAG_ACCEPT_CONTACT_STR(settings->feature_tags)),
TAG_END());
+ sofia_session->nua_state = nua_callstate_init;
apr_thread_mutex_create(&sofia_session->mutex,APR_THREAD_MUTEX_DEFAULT,session->pool);
return TRUE;
}
-static apt_bool_t mrcp_sofia_session_destroy(mrcp_sofia_session_t *sofia_session)
+static apt_bool_t mrcp_sofia_session_cleanup(mrcp_sofia_session_t *sofia_session)
{
if(sofia_session->mutex) {
apr_thread_mutex_destroy(sofia_session->mutex);
static apt_bool_t mrcp_sofia_session_offer(mrcp_session_t *session, mrcp_session_descriptor_t *descriptor)
{
char sdp_str[2048];
- char *local_sdp_str = NULL;
+ const char *local_sdp_str = NULL;
apt_bool_t res = FALSE;
mrcp_sofia_session_t *sofia_session = session->obj;
if(!sofia_session) {
apr_thread_mutex_unlock(sofia_session->mutex);
if(sofia_session->terminate_requested == FALSE) {
- mrcp_sofia_session_destroy(sofia_session);
+ mrcp_sofia_session_cleanup(sofia_session);
mrcp_session_terminate_response(session);
}
return TRUE;
tagi_t tags[])
{
mrcp_session_t *session = sofia_session->session;
- if(session) {
- const char *local_sdp_str = NULL, *remote_sdp_str = NULL;
- mrcp_session_descriptor_t *descriptor = NULL;
+ const char *remote_sdp_str = NULL;
+ mrcp_session_descriptor_t *descriptor = mrcp_session_descriptor_create(session->pool);
+ descriptor->response_code = status;
- tl_gets(tags,
- SOATAG_LOCAL_SDP_STR_REF(local_sdp_str),
- SOATAG_REMOTE_SDP_STR_REF(remote_sdp_str),
- TAG_END());
+ tl_gets(tags,
+ SOATAG_REMOTE_SDP_STR_REF(remote_sdp_str),
+ TAG_END());
- if(remote_sdp_str) {
- sdp_parser_t *parser = NULL;
- sdp_session_t *sdp = NULL;
- const char *force_destination_ip = NULL;
- apt_obj_log(APT_LOG_MARK,APT_PRIO_INFO,session->log_obj,"Remote SDP "APT_NAMESID_FMT"\n%s",
- session->name,
- MRCP_SESSION_SID(session),
- remote_sdp_str);
+ if(remote_sdp_str) {
+ sdp_parser_t *parser = NULL;
+ sdp_session_t *sdp = NULL;
+ const char *force_destination_ip = NULL;
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_INFO,session->log_obj,"Remote SDP "APT_NAMESID_FMT"\n%s",
+ session->name,
+ MRCP_SESSION_SID(session),
+ remote_sdp_str);
- parser = sdp_parse(sofia_session->home,remote_sdp_str,(int)strlen(remote_sdp_str),0);
- sdp = sdp_session(parser);
- if(sofia_session->sip_settings->force_destination == TRUE) {
- force_destination_ip = sofia_session->sip_settings->server_ip;
- }
- descriptor = mrcp_descriptor_generate_by_sdp_session(sdp,force_destination_ip,session->pool);
- sdp_parser_free(parser);
+ parser = sdp_parse(sofia_session->home,remote_sdp_str,(int)strlen(remote_sdp_str),0);
+ sdp = sdp_session(parser);
+ if(sofia_session->sip_settings->force_destination == TRUE) {
+ force_destination_ip = sofia_session->sip_settings->server_ip;
}
- mrcp_session_answer(session,descriptor);
+ mrcp_descriptor_generate_by_sdp_session(descriptor,sdp,force_destination_ip,session->pool);
+ sdp_parser_free(parser);
}
+
+ mrcp_session_answer(session,descriptor);
}
static void mrcp_sofia_on_session_redirect(
return;
}
sip_contact = sip->sip_contact;
- if(!sip_contact || !sip_contact->m_url) {
+ if(!sip_contact) {
return;
}
- if(sip_contact->m_url->url_user && sip_contact->m_url->url_user != '\0') {
+ if(sip_contact->m_url->url_user && *sip_contact->m_url->url_user != '\0') {
sofia_session->sip_to_str = apr_psprintf(session->pool,"sip:%s@%s:%s",
sip_contact->m_url->url_user,
sip_contact->m_url->url_host,
sofia_session,
SIPTAG_TO_STR(sofia_session->sip_to_str),
SIPTAG_FROM_STR(sofia_agent->sip_from_str),
- SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str),
+ TAG_IF(sofia_agent->sip_contact_str,SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str)),
TAG_END());
apr_thread_mutex_unlock(sofia_session->mutex);
sip_t const *sip,
tagi_t tags[])
{
- mrcp_session_t *session = sofia_session->session;
- if(session) {
- apt_bool_t terminate_requested;
-
- apr_thread_mutex_lock(sofia_session->mutex);
- terminate_requested = sofia_session->terminate_requested;
- session = sofia_session->session;
- mrcp_sofia_session_unref(sofia_session);
- apr_thread_mutex_unlock(sofia_session->mutex);
-
- if(terminate_requested == TRUE) {
- mrcp_sofia_session_destroy(sofia_session);
- mrcp_session_terminate_response(session);
- }
- else {
- mrcp_session_terminate_event(session);
- }
+ mrcp_session_t *session;
+ apt_bool_t terminate_requested;
+
+ apr_thread_mutex_lock(sofia_session->mutex);
+ terminate_requested = sofia_session->terminate_requested;
+ session = sofia_session->session;
+ mrcp_sofia_session_unref(sofia_session);
+ apr_thread_mutex_unlock(sofia_session->mutex);
+
+ if(terminate_requested == TRUE) {
+ sofia_session->nua_state = nua_callstate_terminated;
+ mrcp_sofia_session_cleanup(sofia_session);
+ mrcp_session_terminate_response(session);
+ return;
}
+
+ if(sofia_session->nua_state == nua_callstate_ready) {
+ mrcp_session_terminate_event(session);
+ }
+ else {
+ mrcp_session_descriptor_t *descriptor = mrcp_session_descriptor_create(session->pool);
+ descriptor->response_code = status;
+ mrcp_session_answer(session,descriptor);
+ }
+ sofia_session->nua_state = nua_callstate_terminated;
}
static void mrcp_sofia_on_state_change(
sip_t const *sip,
tagi_t tags[])
{
- int ss_state = nua_callstate_init;
+ int nua_state = nua_callstate_init;
tl_gets(tags,
- NUTAG_CALLSTATE_REF(ss_state),
+ NUTAG_CALLSTATE_REF(nua_state),
TAG_END());
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"SIP Call State %s [%s]",
- sofia_session ? sofia_session->session->name : "",
- nua_callstate_name(ss_state));
+ if(!sofia_session || !sofia_session->session) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"SIP Call State [%s]", nua_callstate_name(nua_state));
+ return;
+ }
+ apt_obj_log(APT_LOG_MARK,APT_PRIO_NOTICE,sofia_session->session->log_obj,"SIP Call State %s [%s]",
+ sofia_session->session->name,
+ nua_callstate_name(nua_state));
- switch(ss_state) {
- case nua_callstate_ready:
- mrcp_sofia_on_session_ready(status,sofia_agent,nh,sofia_session,sip,tags);
- break;
- case nua_callstate_terminated:
- mrcp_sofia_on_session_terminate(status,sofia_agent,nh,sofia_session,sip,tags);
- break;
+ if(nua_state == nua_callstate_terminated) {
+ mrcp_sofia_on_session_terminate(status,sofia_agent,nh,sofia_session,sip,tags);
+ return;
+ }
+
+ if(nua_state == nua_callstate_ready) {
+ mrcp_sofia_on_session_ready(status,sofia_agent,nh,sofia_session,sip,tags);
}
+ sofia_session->nua_state = nua_state;
}
static void mrcp_sofia_on_resource_discover(
mrcp_session_t *session = sofia_session->session;
if(session) {
const char *remote_sdp_str = NULL;
- mrcp_session_descriptor_t *descriptor = NULL;
+ mrcp_session_descriptor_t *descriptor = mrcp_session_descriptor_create(session->pool);
+ descriptor->response_code = status;
if(sip->sip_payload) {
remote_sdp_str = sip->sip_payload->pl_data;
parser = sdp_parse(sofia_session->home,remote_sdp_str,(int)strlen(remote_sdp_str),0);
sdp = sdp_session(parser);
- descriptor = mrcp_descriptor_generate_by_sdp_session(sdp,NULL,session->pool);
+ mrcp_descriptor_generate_by_sdp_session(descriptor,sdp,NULL,session->pool);
sdp_parser_free(parser);
}
sip_t const *sip,
tagi_t tags[])
{
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive SIP Event [%s] Status %d %s",
- nua_event_name(nua_event),status,phrase);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive SIP Event [%s] Status %d %s [%s]",
+ nua_event_name(nua_event),
+ status,
+ phrase,
+ sofia_agent->sig_agent->id);
switch(nua_event) {
case nua_i_state:
--- /dev/null
+/*
+ * Copyright 2008-2014 Arsen Chaloyan
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Id: mrcp_sofiasip_logger.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
+ */
+
+#include <stdlib.h>
+#include <apr_general.h>
+#include <sofia-sip/su_log.h>
+#include "apt_log.h"
+
+SOFIAPUBVAR su_log_t tport_log[]; /* Transport event debug */
+SOFIAPUBVAR su_log_t nea_log[]; /* Event engine debug */
+SOFIAPUBVAR su_log_t nta_log[]; /* Transaction engine debug */
+SOFIAPUBVAR su_log_t nua_log[]; /* User Agent engine debug */
+SOFIAPUBVAR su_log_t soa_log[]; /* SDP Offer/Answer engine debug */
+SOFIAPUBVAR su_log_t su_log_default[]; /* Default debug */
+
+static void mrcp_sofiasip_log(void *stream, char const *format, va_list arg_ptr)
+{
+ if(format) {
+ /* use generic vsnprintf() since apr_vformatter doesn't support
+ the format %p widely used by SofiaSIP. */
+ char buf[4096];
+ int len = vsnprintf(buf, sizeof(buf), format, arg_ptr);
+ if(len <= 0)
+ return;
+ if(buf[len-1] == '\n') {
+ /* remove trailing '\n' since apt logger appends it anyway */
+ len--;
+ buf[len] = '\0';
+ }
+ apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "%.*s", len, buf);
+ }
+}
+
+static su_log_t* mrcp_sofiasip_logger_get(const char *name)
+{
+ if (!strcasecmp(name,"tport"))
+ return tport_log;
+ else if (!strcasecmp(name,"nea"))
+ return nea_log;
+ else if (!strcasecmp(name,"nta"))
+ return nta_log;
+ else if (!strcasecmp(name,"nua"))
+ return nua_log;
+ else if (!strcasecmp(name,"soa"))
+ return soa_log;
+ else if (!strcasecmp(name,"default"))
+ return su_log_default;
+ return NULL;
+}
+
+apt_bool_t mrcp_sofiasip_log_init(const char *name, const char *level_str, apt_bool_t redirect)
+{
+ su_log_t *logger = mrcp_sofiasip_logger_get(name);
+ if(!logger) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown SofiaSIP Logger <%s>",name);
+ return FALSE;
+ }
+
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Init SofiaSIP Logger [%s] level:%s redirect:%d",
+ name, level_str, redirect);
+ su_log_init(logger);
+
+ if(redirect == TRUE) {
+ su_log_redirect(logger, mrcp_sofiasip_log, NULL);
+ }
+
+ if(level_str) {
+ int level = atoi(level_str);
+ if(level >=0 && level < 10) {
+ su_log_set_level(logger, level);
+ }
+ else {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown SofiaSIP Log Level [%s]: must be in range [0..9]",level_str);
+ }
+ }
+ return TRUE;
+}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_sofiasip_server_agent.c 1700 2010-05-21 18:56:06Z achaloyan $
+ * $Id: mrcp_sofiasip_server_agent.c 2221 2014-11-11 02:44:03Z achaloyan@gmail.com $
*/
typedef struct mrcp_sofia_agent_t mrcp_sofia_agent_t;
#include <sofia-sip/nua.h>
#include <sofia-sip/sip_status.h>
#include <sofia-sip/sdp.h>
+#include <sofia-sip/tport.h>
#include <sofia-sip/sofia_features.h>
#undef strcasecmp
#undef strncasecmp
static const mrcp_session_response_vtable_t session_response_vtable = {
mrcp_sofia_on_session_answer,
- mrcp_sofia_on_session_terminate
+ mrcp_sofia_on_session_terminate,
+ NULL /* mrcp_sofia_on_session_control */,
+ NULL /* mrcp_sofia_on_session_discover */
};
static apt_bool_t mrcp_sofia_config_validate(mrcp_sofia_agent_t *sofia_agent, mrcp_sofia_server_config_t *config, apr_pool_t *pool);
sip_t const *sip,
tagi_t tags[]);
+apt_bool_t mrcp_sofiasip_log_init(const char *name, const char *level_str, apt_bool_t redirect);
/** Create Sofia-SIP Signaling Agent */
MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_sofiasip_server_agent_create(const char *id, mrcp_sofia_server_config_t *config, apr_pool_t *pool)
apt_task_vtable_t *vtable;
mrcp_sofia_agent_t *sofia_agent;
sofia_agent = apr_palloc(pool,sizeof(mrcp_sofia_agent_t));
- sofia_agent->sig_agent = mrcp_signaling_agent_create(id,sofia_agent,MRCP_VERSION_2,pool);
+ sofia_agent->sig_agent = mrcp_signaling_agent_create(id,sofia_agent,pool);
sofia_agent->config = config;
sofia_agent->root = NULL;
sofia_agent->nua = NULL;
config->sip_t2 = 0;
config->sip_t4 = 0;
config->sip_t1x64 = 0;
+
+ config->tport_log = FALSE;
+ config->tport_dump_file = NULL;
+
return config;
}
+MRCP_DECLARE(apt_bool_t) mrcp_sofiasip_server_logger_init(const char *name, const char *level_str, apt_bool_t redirect)
+{
+ return mrcp_sofiasip_log_init(name,level_str,redirect);
+}
+
static apt_bool_t mrcp_sofia_config_validate(mrcp_sofia_agent_t *sofia_agent, mrcp_sofia_server_config_t *config, apr_pool_t *pool)
{
- const char *local_ip = config->ext_ip ? config->ext_ip : config->local_ip;
sofia_agent->config = config;
- sofia_agent->sip_contact_str = apr_psprintf(pool,"sip:%s:%hu",local_ip,config->local_port);
+ sofia_agent->sip_contact_str = NULL; /* Let Sofia-SIP implicitly set Contact header by default */
+ if(config->ext_ip) {
+ /* Use external IP address in Contact header, if behind NAT */
+ sofia_agent->sip_contact_str = apr_psprintf(pool,"sip:%s:%hu",config->ext_ip,config->local_port);
+ }
if(config->transport) {
sofia_agent->sip_bind_str = apr_psprintf(pool,"sip:%s:%hu;transport=%s",
config->local_ip,
mrcp_sofia_event_callback, /* Callback for processing events */
sofia_agent, /* Additional data to pass to callback */
NUTAG_URL(sofia_agent->sip_bind_str), /* Address to bind to */
+ TAG_IF(sofia_config->tport_log == TRUE,TPTAG_LOG(1)), /* Print out SIP messages to the console */
+ TAG_IF(sofia_config->tport_dump_file,TPTAG_DUMP(sofia_config->tport_dump_file)), /* Dump SIP messages to the file */
TAG_END()); /* Last tag should always finish the sequence */
if(sofia_agent->nua) {
nua_set_params(
SIPTAG_USER_AGENT_STR(sofia_config->user_agent_name),
TAG_END());
}
+ else {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create NUA [%s] %s",
+ apt_task_name_get(task),
+ sofia_agent->sip_bind_str);
+ }
}
static apt_bool_t mrcp_sofia_task_run(apt_task_t *task)
sofia_agent->root = NULL;
su_deinit();
- apt_task_child_terminate(task);
+ apt_task_terminate_request_process(task);
return TRUE;
}
{
mrcp_sofia_agent_t *sofia_agent = apt_task_object_get(task);
if(sofia_agent->nua) {
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Send Shutdown Signal to NUA");
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Send Shutdown Signal to NUA [%s]",
+ apt_task_name_get(task));
nua_shutdown(sofia_agent->nua);
}
return TRUE;
if(descriptor->status != MRCP_SESSION_STATUS_OK) {
int status = sip_status_get(descriptor->status);
nua_respond(sofia_session->nh, status, sip_status_phrase(status),
- SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str),
+ TAG_IF(sofia_agent->sip_contact_str,SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str)),
TAG_END());
return TRUE;
}
}
nua_respond(sofia_session->nh, SIP_200_OK,
- SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str),
+ TAG_IF(sofia_agent->sip_contact_str,SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str)),
TAG_IF(local_sdp_str,SOATAG_USER_SDP_STR(local_sdp_str)),
SOATAG_AUDIO_AUX("telephone-event"),
NUTAG_AUTOANSWER(0),
sip_t const *sip,
tagi_t tags[])
{
- int offer_recv = 0, answer_recv = 0, offer_sent = 0, answer_sent = 0;
- const char *local_sdp_str = NULL, *remote_sdp_str = NULL;
- mrcp_session_descriptor_t *descriptor = NULL;
+ apt_bool_t status = FALSE;
+ const char *remote_sdp_str = NULL;
+ mrcp_session_descriptor_t *descriptor;
- tl_gets(tags,
- NUTAG_OFFER_RECV_REF(offer_recv),
- NUTAG_ANSWER_RECV_REF(answer_recv),
- NUTAG_OFFER_SENT_REF(offer_sent),
- NUTAG_ANSWER_SENT_REF(answer_sent),
- SOATAG_LOCAL_SDP_STR_REF(local_sdp_str),
- SOATAG_REMOTE_SDP_STR_REF(remote_sdp_str),
- TAG_END());
-
if(!sofia_session) {
sofia_session = mrcp_sofia_session_create(sofia_agent,nh);
if(!sofia_session) {
}
}
+ descriptor = mrcp_session_descriptor_create(sofia_session->session->pool);
+
+ tl_gets(tags,
+ SOATAG_REMOTE_SDP_STR_REF(remote_sdp_str),
+ TAG_END());
+
if(remote_sdp_str) {
sdp_parser_t *parser = NULL;
sdp_session_t *sdp = NULL;
remote_sdp_str);
parser = sdp_parse(sofia_session->home,remote_sdp_str,(int)strlen(remote_sdp_str),0);
- sdp = sdp_session(parser);
- descriptor = mrcp_descriptor_generate_by_sdp_session(sdp,NULL,sofia_session->session->pool);
+ sdp = sdp_session(parser);
+ status = mrcp_descriptor_generate_by_sdp_session(descriptor,sdp,NULL,sofia_session->session->pool);
sdp_parser_free(parser);
}
- if(!descriptor) {
+ if(status == FALSE) {
nua_respond(nh, SIP_400_BAD_REQUEST, TAG_END());
return;
}
sip_t const *sip,
tagi_t tags[])
{
- int ss_state = nua_callstate_init;
+ int nua_state = nua_callstate_init;
tl_gets(tags,
- NUTAG_CALLSTATE_REF(ss_state),
+ NUTAG_CALLSTATE_REF(nua_state),
TAG_END());
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"SIP Call State %s [%s]",
sofia_session ? sofia_session->session->name : "",
- nua_callstate_name(ss_state));
+ nua_callstate_name(nua_state));
- switch(ss_state) {
+ switch(nua_state) {
case nua_callstate_received:
mrcp_sofia_on_call_receive(sofia_agent,nh,sofia_session,sip,tags);
break;
tagi_t tags[])
{
char sdp_str[2048];
- char *local_sdp_str = NULL;
+ const char *local_sdp_str = NULL;
const char *ip = sofia_agent->config->ext_ip ?
sofia_agent->config->ext_ip : sofia_agent->config->local_ip;
nua_respond(nh, SIP_200_OK,
NUTAG_WITH_CURRENT(sofia_agent->nua),
- SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str),
+ TAG_IF(sofia_agent->sip_contact_str,SIPTAG_CONTACT_STR(sofia_agent->sip_contact_str)),
TAG_IF(local_sdp_str,SOATAG_USER_SDP_STR(local_sdp_str)),
SOATAG_AUDIO_AUX("telephone-event"),
TAG_END());
sip_t const *sip,
tagi_t tags[])
{
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive SIP Event [%s] Status %d %s",nua_event_name(nua_event),status,phrase);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Receive SIP Event [%s] Status %d %s [%s]",
+ nua_event_name(nua_event),
+ status,
+ phrase,
+ sofia_agent->sig_agent->id);
switch(nua_event) {
case nua_i_state:
-MAINTAINERCLEANFILES = Makefile.in
+MAINTAINERCLEANFILES = Makefile.in
-AM_CPPFLAGS = -Iinclude \
- -I$(unimrcp_srcdir)/modules/mrcp-unirtsp/include \
+AM_CPPFLAGS = -I$(top_srcdir)/modules/mrcp-unirtsp/include \
-I$(top_srcdir)/libs/mrcp-signaling/include \
-I$(top_srcdir)/libs/mrcp/include \
-I$(top_srcdir)/libs/mrcp/message/include \
-I$(top_srcdir)/libs/mpf/include \
-I$(top_srcdir)/libs/uni-rtsp/include \
-I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES) $(UNIMRCP_SOFIA_INCLUDES)
+ $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_SOFIA_INCLUDES)
noinst_LTLIBRARIES = libmrcpunirtsp.la
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_unirtsp_client_agent.h 1700 2010-05-21 18:56:06Z achaloyan $
+ * $Id: mrcp_unirtsp_client_agent.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_UNIRTSP_CLIENT_AGENT_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_unirtsp_sdp.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: mrcp_unirtsp_sdp.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_UNIRTSP_SDP_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_unirtsp_server_agent.h 1700 2010-05-21 18:56:06Z achaloyan $
+ * $Id: mrcp_unirtsp_server_agent.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef MRCP_UNIRTSP_SERVER_AGENT_H
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="mrcpunirtsp"\r
- ProjectGUID="{DEB01ACB-D65F-4A62-AED9-58C1054499E9}"\r
- RootNamespace="mrcpunirtsp"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- <Platform\r
- Name="x64"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="include"\r
- PreprocessorDefinitions="APT_STATIC_LIB;RTSP_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="include"\r
- PreprocessorDefinitions="APT_STATIC_LIB;RTSP_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC"\r
- DebugInformationFormat="3"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
- IntermediateDirectory="$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="include"\r
- PreprocessorDefinitions="APT_STATIC_LIB;RTSP_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|x64"\r
- OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"\r
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- TargetEnvironment="3"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="include"\r
- PreprocessorDefinitions="APT_STATIC_LIB;RTSP_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\include\mrcp_unirtsp_client_agent.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_unirtsp_sdp.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\mrcp_unirtsp_server_agent.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\src\mrcp_unirtsp_client_agent.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_unirtsp_sdp.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_unirtsp_server_agent.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>mrcpunirtsp</ProjectName>\r
- <ProjectGuid>{DEB01ACB-D65F-4A62-AED9-58C1054499E9}</ProjectGuid>\r
- <RootNamespace>mrcpunirtsp</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirtsp.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirtsp.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirtsp.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirtsp.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;RTSP_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;RTSP_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;RTSP_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;RTSP_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp_unirtsp_client_agent.h" />\r
- <ClInclude Include="include\mrcp_unirtsp_sdp.h" />\r
- <ClInclude Include="include\mrcp_unirtsp_server_agent.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\mrcp_unirtsp_client_agent.c" />\r
- <ClCompile Include="src\mrcp_unirtsp_sdp.c" />\r
- <ClCompile Include="src\mrcp_unirtsp_server_agent.c" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{DEB01ACB-D65F-4A62-AED9-58C1054499E9}</ProjectGuid>
+ <RootNamespace>mrcpunirtsp</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpsignaling.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirtsp.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpsignaling.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirtsp.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpsignaling.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirtsp.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcpsignaling.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirtsp.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\sofiasip.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="include\mrcp_unirtsp_client_agent.h" />
+ <ClInclude Include="include\mrcp_unirtsp_sdp.h" />
+ <ClInclude Include="include\mrcp_unirtsp_server_agent.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\mrcp_unirtsp_client_agent.c" />
+ <ClCompile Include="src\mrcp_unirtsp_sdp.c" />
+ <ClCompile Include="src\mrcp_unirtsp_server_agent.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\libs\mrcp-signaling\mrcpsignaling.vcxproj">
+ <Project>{12a49562-bab9-43a3-a21d-15b60bbb4c31}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\libs\uni-rtsp\unirtsp.vcxproj">
+ <Project>{504b3154-7a4f-459d-9877-b951021c3f1f}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup>\r
- <Filter Include="include">\r
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="src">\r
- <UniqueIdentifier>{f87f8ada-12d1-412b-bd14-7e62df3f92a0}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp_unirtsp_client_agent.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_unirtsp_sdp.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_unirtsp_server_agent.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\mrcp_unirtsp_client_agent.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mrcp_unirtsp_sdp.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mrcp_unirtsp_server_agent.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{1ae8fa5f-5d29-4bd7-a332-b2e917a801ca}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="include\mrcp_unirtsp_client_agent.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_unirtsp_sdp.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\mrcp_unirtsp_server_agent.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\mrcp_unirtsp_client_agent.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_unirtsp_sdp.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mrcp_unirtsp_server_agent.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_unirtsp_client_agent.c 1700 2010-05-21 18:56:06Z achaloyan $
+ * $Id: mrcp_unirtsp_client_agent.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <apr_general.h>
apt_task_t *task;
mrcp_unirtsp_agent_t *agent;
agent = apr_palloc(pool,sizeof(mrcp_unirtsp_agent_t));
- agent->sig_agent = mrcp_signaling_agent_create(id,agent,MRCP_VERSION_1,pool);
+ agent->sig_agent = mrcp_signaling_agent_create(id,agent,pool);
agent->sig_agent->create_client_session = mrcp_unirtsp_session_create;
agent->config = config;
}
agent->rtsp_client = rtsp_client_create(
+ id,
config->max_connection_count,
config->request_timeout,
agent,
}
task = rtsp_client_task_get(agent->rtsp_client);
- apt_task_name_set(task,id);
agent->sig_agent->task = task;
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create UniRTSP Agent [%s] [%"APR_SIZE_T_FMT"]",
- id,config->max_connection_count);
return agent->sig_agent;
}
{
mrcp_unirtsp_agent_t *agent = rtsp_client_object_get(rtsp_client);
mrcp_unirtsp_session_t *session = rtsp_client_session_object_get(rtsp_session);
- const char *resource_name = mrcp_name_get_by_rtsp_name(
+ const char *resource_name;
+
+ if(!session) {
+ return FALSE;
+ }
+
+ resource_name = mrcp_name_get_by_rtsp_name(
session->rtsp_settings->resource_map,
message->start_line.common.request_line.resource_name);
- if(!session || !resource_name) {
+ if(!resource_name) {
return FALSE;
}
mrcp_unirtsp_session_t *session = mrcp_session->obj;
mrcp_unirtsp_agent_t *agent = mrcp_session->signaling_agent->obj;
- char buffer[500];
+ char buffer[2000];
apt_text_stream_t stream;
rtsp_message_t *rtsp_message = NULL;
apt_str_t *body;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_unirtsp_sdp.c 1752 2010-08-09 19:05:23Z achaloyan $
+ * $Id: mrcp_unirtsp_sdp.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <stdlib.h>
#include "rtsp_message.h"
#include "mrcp_unirtsp_sdp.h"
#include "mpf_rtp_attribs.h"
+#include "mpf_rtp_pt.h"
#include "apt_text_stream.h"
#include "apt_log.h"
-
/** Generate SDP media by RTP media descriptor */
static apr_size_t sdp_rtp_media_generate(char *buffer, apr_size_t size, const mrcp_session_descriptor_t *descriptor, const mpf_rtp_media_descriptor_t *audio_media)
{
apr_size_t offset = 0;
- int i;
- mpf_codec_descriptor_t *codec_descriptor;
- apr_array_header_t *descriptor_arr = audio_media->codec_list.descriptor_arr;
- if(!descriptor_arr) {
- return 0;
- }
- offset += snprintf(buffer+offset,size-offset,
- "m=audio %d RTP/AVP",
- audio_media->state == MPF_MEDIA_ENABLED ? audio_media->port : 0);
- for(i=0; i<descriptor_arr->nelts; i++) {
- codec_descriptor = &APR_ARRAY_IDX(descriptor_arr,i,mpf_codec_descriptor_t);
- if(codec_descriptor->enabled == TRUE) {
- offset += snprintf(buffer+offset,size-offset," %d", codec_descriptor->payload_type);
- }
- }
- offset += snprintf(buffer+offset,size-offset,"\r\n");
if(audio_media->state == MPF_MEDIA_ENABLED) {
- const apt_str_t *direction_str = mpf_rtp_direction_str_get(audio_media->direction);
+ int codec_count = 0;
+ int i;
+ mpf_codec_descriptor_t *codec_descriptor;
+ apr_array_header_t *descriptor_arr = audio_media->codec_list.descriptor_arr;
+ const apt_str_t *direction_str;
+ if(!descriptor_arr) {
+ return 0;
+ }
+ offset += snprintf(buffer+offset,size-offset,"m=audio %d RTP/AVP",audio_media->port);
+ for(i=0; i<descriptor_arr->nelts; i++) {
+ codec_descriptor = &APR_ARRAY_IDX(descriptor_arr,i,mpf_codec_descriptor_t);
+ if(codec_descriptor->enabled == TRUE) {
+ offset += snprintf(buffer+offset,size-offset," %d",codec_descriptor->payload_type);
+ codec_count++;
+ }
+ }
+ if(!codec_count){
+ /* SDP m line should have at least one media format listed; use a reserved RTP payload type */
+ offset += snprintf(buffer+offset,size-offset," %d",RTP_PT_RESERVED);
+ }
+ offset += snprintf(buffer+offset,size-offset,"\r\n");
+
for(i=0; i<descriptor_arr->nelts; i++) {
codec_descriptor = &APR_ARRAY_IDX(descriptor_arr,i,mpf_codec_descriptor_t);
if(codec_descriptor->enabled == TRUE && codec_descriptor->name.buf) {
}
}
}
+
+ direction_str = mpf_rtp_direction_str_get(audio_media->direction);
if(direction_str) {
offset += snprintf(buffer+offset,size-offset,"a=%s\r\n",direction_str->buf);
}
if(audio_media->ptime) {
- offset += snprintf(buffer+offset,size-offset,"a=ptime:%hu\r\n",
- audio_media->ptime);
+ offset += snprintf(buffer+offset,size-offset,"a=ptime:%hu\r\n",audio_media->ptime);
}
}
+ else {
+ offset += snprintf(buffer+offset,size-offset,"m=audio 0 RTP/AVP %d\r\n",RTP_PT_RESERVED);
+ }
+
return offset;
}
}
/** Generate MRCP descriptor by SDP session */
-static mrcp_session_descriptor_t* mrcp_descriptor_generate_by_sdp_session(mrcp_session_descriptor_t *descriptor, const sdp_session_t *sdp, const char *force_destination_ip, apr_pool_t *pool)
+static apt_bool_t mrcp_descriptor_generate_by_rtsp_sdp_session(mrcp_session_descriptor_t *descriptor, const sdp_session_t *sdp, const char *force_destination_ip, apr_pool_t *pool)
{
sdp_media_t *sdp_media;
break;
}
}
- return descriptor;
+ return TRUE;
}
-
/** Generate MRCP descriptor by RTSP request */
MRCP_DECLARE(mrcp_session_descriptor_t*) mrcp_descriptor_generate_by_rtsp_request(
const rtsp_message_t *request,
if(!resource_name) {
return NULL;
}
-
+
if(request->start_line.common.request_line.method_id == RTSP_METHOD_SETUP) {
if(rtsp_header_property_check(&request->header,RTSP_HEADER_FIELD_CONTENT_TYPE) == TRUE &&
rtsp_header_property_check(&request->header,RTSP_HEADER_FIELD_CONTENT_LENGTH) == TRUE &&
sdp = sdp_session(parser);
if(sdp) {
descriptor = mrcp_session_descriptor_create(pool);
- mrcp_descriptor_generate_by_sdp_session(descriptor,sdp,force_destination_ip,pool);
+ mrcp_descriptor_generate_by_rtsp_sdp_session(descriptor,sdp,force_destination_ip,pool);
}
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Parse SDP Message");
if(!resource_name) {
return NULL;
}
-
+
if(request->start_line.common.request_line.method_id == RTSP_METHOD_SETUP) {
if(rtsp_header_property_check(&response->header,RTSP_HEADER_FIELD_CONTENT_TYPE) == TRUE &&
rtsp_header_property_check(&response->header,RTSP_HEADER_FIELD_CONTENT_LENGTH) == TRUE &&
response->body.buf) {
-
+
sdp_parser_t *parser;
sdp_session_t *sdp;
sdp = sdp_session(parser);
if(sdp) {
descriptor = mrcp_session_descriptor_create(pool);
- mrcp_descriptor_generate_by_sdp_session(descriptor,sdp,force_destination_ip,pool);
+ mrcp_descriptor_generate_by_rtsp_sdp_session(descriptor,sdp,force_destination_ip,pool);
apt_string_assign(&descriptor->resource_name,resource_name,pool);
descriptor->resource_state = TRUE;
+ descriptor->response_code = response->start_line.common.status_line.status_code;
}
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Parse SDP Message");
}
-
+
sdp_parser_free(parser);
}
else {
if(rtsp_header_property_check(&response->header,RTSP_HEADER_FIELD_CONTENT_TYPE) == TRUE &&
rtsp_header_property_check(&response->header,RTSP_HEADER_FIELD_CONTENT_LENGTH) == TRUE &&
response->body.buf) {
-
+
sdp_parser_t *parser;
sdp_session_t *sdp;
parser = sdp_parse(home,response->body.buf,response->body.length,0);
sdp = sdp_session(parser);
if(sdp) {
- mrcp_descriptor_generate_by_sdp_session(descriptor,sdp,0,pool);
+ mrcp_descriptor_generate_by_rtsp_sdp_session(descriptor,sdp,0,pool);
descriptor->resource_state = TRUE;
+ descriptor->response_code = response->start_line.common.status_line.status_code;
}
else {
apt_string_assign(&descriptor->resource_name,resource_name,pool);
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_unirtsp_server_agent.c 1700 2010-05-21 18:56:06Z achaloyan $
+ * $Id: mrcp_unirtsp_server_agent.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <apr_general.h>
static const mrcp_session_response_vtable_t session_response_vtable = {
mrcp_unirtsp_on_session_answer,
mrcp_unirtsp_on_session_terminate,
- mrcp_unirtsp_on_session_control
+ mrcp_unirtsp_on_session_control,
+ NULL /* mrcp_unirtsp_on_session_discover */
};
static apt_bool_t mrcp_unirtsp_session_create(rtsp_server_t *server, rtsp_server_session_t *session);
apt_task_t *task;
mrcp_unirtsp_agent_t *agent;
agent = apr_palloc(pool,sizeof(mrcp_unirtsp_agent_t));
- agent->sig_agent = mrcp_signaling_agent_create(id,agent,MRCP_VERSION_1,pool);
+ agent->sig_agent = mrcp_signaling_agent_create(id,agent,pool);
agent->config = config;
if(rtsp_config_validate(agent,config,pool) == FALSE) {
}
agent->rtsp_server = rtsp_server_create(
- config->local_ip,
- config->local_port,
- config->max_connection_count,
- agent,
- &session_request_vtable,
- pool);
+ id,
+ config->local_ip,
+ config->local_port,
+ config->max_connection_count,
+ agent,
+ &session_request_vtable,
+ pool);
if(!agent->rtsp_server) {
return NULL;
}
-
+
task = rtsp_server_task_get(agent->rtsp_server);
- apt_task_name_set(task,id);
agent->sig_agent->task = task;
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create UniRTSP Agent [%s] %s:%hu [%"APR_SIZE_T_FMT"]",
- id,
- config->local_ip,
- config->local_port,
- config->max_connection_count);
return agent->sig_agent;
}
mrcp_unirtsp_session_t *session = mrcp_session->obj;
mrcp_unirtsp_agent_t *agent = mrcp_session->signaling_agent->obj;
- char buffer[500];
+ char buffer[2000];
apt_text_stream_t stream;
rtsp_message_t *rtsp_message = NULL;
apt_str_t *body;
-#define uni_version "1.0.0"
+#define uni_version "1.2.0"
#define uni_src "..\.."
AppName=UniMRCP
-AppVerName=UniMRCP-{#= uni_version}
+AppVerName=UniMRCP {#= uni_version}
AppPublisher=UniMRCP
AppPublisherURL=http://www.unimrcp.org/
AppSupportURL=http://groups.google.com/group/unimrcp
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: docs\api; Description: API reference; Types: full docs
[Files]
Source: {#= uni_src}\libs\apr\include\*.h; DestDir: {app}\include; 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}\build\*.h; DestDir: {app}\include; Components: sdk
+Source: {#= uni_src}\build\props\sdk\*.props; DestDir: {app}\props; Components: sdk; AfterInstall: SetProjectPath(ExpandConstant('{app}\props\unimrcpsdk.props'))
+Source: {#= uni_src}\build\vsprops\sdk\*.vsprops; DestDir: {app}\vsprops; Components: sdk; AfterInstall: SetProjectPath(ExpandConstant('{app}\vsprops\unimrcpsdk.vsprops'))
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
Name: {group}\Uninstall; Filename: {uninstallexe}
[Code]
-procedure SetProjectPath();
+procedure SetProjectPath(PropertySheetFile: String);
var
- VspropsFile: String;
Content: String;
begin
- VspropsFile := ExpandConstant('{app}\vsprops\unimrcpsdk.vsprops');
- LoadStringFromFile (VspropsFile, Content);
- StringChange (Content, 'Value="C:\Program Files\UniMRCP"', ExpandConstant('Value="{app}"'));
- SaveStringToFile (VspropsFile, Content, False);
+ LoadStringFromFile (PropertySheetFile, Content);
+ StringChange (Content, 'C:\Program Files\UniMRCP', ExpandConstant('{app}'));
+ SaveStringToFile (PropertySheetFile, Content, False);
end;
-
Name: server\recorder; Description: Recorder plugin; Types: full server
Name: server\demosynth; Description: Demo synthesizer plugin; Types: full server
Name: server\demorecog; Description: Demo recognizer plugin; Types: full server
-Name: client; Description: UniMRCP client (demo application); Types: full client
+Name: server\demoverifier; Description: Demo verifier plugin; Types: full server
+Name: client; Description: UniMRCP client (sample applications); Types: full client
[Dirs]
Name: {app}\data; Permissions: everyone-full
Source: {#= uni_outdir}\plugin\mrcprecorder.dll; DestDir: {app}\plugin; Components: server/recorder
Source: {#= uni_outdir}\plugin\demosynth.dll; DestDir: {app}\plugin; Components: server/demosynth
Source: {#= uni_outdir}\plugin\demorecog.dll; DestDir: {app}\plugin; Components: server/demorecog
+Source: {#= uni_outdir}\plugin\demoverifier.dll; DestDir: {app}\plugin; Components: server/demoverifier
Source: {#= uni_outdir}\conf\unimrcpserver.xml; DestDir: {app}\conf; Components: server
Source: {#= uni_outdir}\conf\unimrcpclient.xml; DestDir: {app}\conf; Components: client
Source: {#= uni_outdir}\conf\client-profiles\*.xml; DestDir: {app}\conf\client-profiles; Components: client
Source: {#= uni_outdir}\conf\umcscenarios.xml; DestDir: {app}\conf; Components: client
Source: {#= uni_outdir}\data\*.pcm; DestDir: {app}\data; Components: server client
Source: {#= uni_outdir}\data\*.xml; DestDir: {app}\data; Components: server client
+Source: {#= uni_outdir}\data\*.txt; DestDir: {app}\data; Components: server client
[Icons]
Name: {group}\UniMRCP Server Console; Filename: {app}\bin\unimrcpserver.exe; Parameters: "--root-dir ""{app}"""; Components: server
ModifyPluginConf ('mrcprecorder', IsComponentSelected('server\recorder'));
ModifyPluginConf ('demosynth', IsComponentSelected('server\demosynth'));
ModifyPluginConf ('demorecog', IsComponentSelected('server\demorecog'));
+ ModifyPluginConf ('demoverifier', IsComponentSelected('server\demoverifier'));
SaveStringToFile (CfgFile, Content, False);
end
end;
-
MAINTAINERCLEANFILES = Makefile.in
-SUBDIRS = libunimrcp-server unimrcp-server \
- libunimrcp-client unimrcp-client \
- libasr-client asr-client \
- umc
+SUBDIRS =
+
+if UNIMRCP_CLIENT_LIB
+SUBDIRS += libunimrcp-client
+endif
+
+if UNIMRCP_CLIENT_APP
+SUBDIRS += unimrcp-client
+endif
+
+if UMC
+SUBDIRS += umc
+endif
+
+if ASR_CLIENT
+SUBDIRS += libasr-client asr-client
+endif
+
+if UNIMRCP_SERVER_LIB
+SUBDIRS += libunimrcp-server
+endif
+
+if UNIMRCP_SERVER_APP
+SUBDIRS += unimrcp-server
+endif
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = -Iinclude \
- -I$(top_srcdir)/platforms/libasr-client/include \
- -I$(top_srcdir)/platforms/libunimrcp-client/include \
- -I$(top_srcdir)/libs/mrcp-client/include \
- -I$(top_srcdir)/libs/mrcp-signaling/include \
- -I$(top_srcdir)/libs/mrcpv2-transport/include \
- -I$(top_srcdir)/libs/mrcp/include \
- -I$(top_srcdir)/libs/mrcp/message/include \
- -I$(top_srcdir)/libs/mrcp/control/include \
- -I$(top_srcdir)/libs/mrcp/resources/include \
- -I$(top_srcdir)/libs/mpf/include \
- -I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir)/platforms/libasr-client/include \
+ $(UNIMRCP_CLIENTAPP_INCLUDES)
bin_PROGRAMS = asrclient
-asrclient_SOURCES = src/main.c
-
+
+asrclient_SOURCES = src/main.c
asrclient_LDADD = $(top_builddir)/platforms/libasr-client/libasrclient.la
+asrclient_LDFLAGS = $(UNIMRCP_CLIENTAPP_OPTS)
-if ISMAC
-asrclient_LDFLAGS = -framework CoreFoundation -framework SystemConfiguration
-endif
+include $(top_srcdir)/build/rules/uniclientapp.am
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{6B83AC6D-01CE-4E1C-81CE-02AD8116C684}</ProjectGuid>
+ <RootNamespace>asrclient</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;..\libasr-client\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libasrclient.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;..\libasr-client\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libasrclient.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;..\libasr-client\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libasrclient.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;..\libasr-client\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libasrclient.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="src\main.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\libasr-client\libasrclient.vcxproj">
+ <Project>{272fafa8-2b2f-4716-b95f-3b37cf2e0cb3}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="src">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\main.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: main.c 1541 2010-02-22 20:20:10Z achaloyan $
+ * $Id: main.c 2213 2014-11-06 03:02:45Z achaloyan@gmail.com $
*/
#include <stdio.h>
{
apt_bool_t running = TRUE;
char cmdline[1024];
- int i;
+ apr_size_t i;
do {
printf(">");
memset(&cmdline, 0, sizeof(cmdline));
return TRUE;
}
-static void usage()
+static void usage(void)
{
printf(
"\n"
options = apr_palloc(pool,sizeof(client_options_t));
options->pool = pool;
/* set the default options */
- options->root_dir_path = "../";
+ options->root_dir_path = NULL;
options->log_priority = APT_PRIO_INFO;
options->log_output = APT_LOG_OUTPUT_CONSOLE;
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = -Iinclude \
- -I$(unimrcp_srcdir)/platforms/libasr-client/include \
+AM_CPPFLAGS = -I$(top_srcdir)/platforms/libasr-client/include \
-I$(top_srcdir)/platforms/libunimrcp-client/include \
- -I$(top_srcdir)/libs/mrcp-client/include \
- -I$(top_srcdir)/libs/mrcp-signaling/include \
- -I$(top_srcdir)/libs/mrcpv2-transport/include \
- -I$(top_srcdir)/libs/mrcp/include \
- -I$(top_srcdir)/libs/mrcp/message/include \
- -I$(top_srcdir)/libs/mrcp/control/include \
- -I$(top_srcdir)/libs/mrcp/resources/include \
- -I$(top_srcdir)/libs/mpf/include \
- -I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+ $(UNIMRCP_CLIENTLIB_INCLUDES)
lib_LTLIBRARIES = libasrclient.la
include_HEADERS = include/asr_engine.h
-
libasrclient_la_SOURCES = src/asr_engine.c
-
libasrclient_la_LIBADD = $(top_builddir)/platforms/libunimrcp-client/libunimrcpclient.la
-
-libasrclient_la_LDFLAGS = $(UNI_LT_VERSION)
+libasrclient_la_LDFLAGS = $(UNIMRCP_CLIENTLIB_OPTS)
+
+include $(top_srcdir)/build/rules/uniclientlib.am
/*
- * Copyright 2009-2010 Arsen Chaloyan
+ * Copyright 2009-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: asr_engine.h 1566 2010-03-06 16:45:05Z achaloyan $
+ * $Id: asr_engine.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef ASR_ENGINE_H
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>mrcpunirtsp</ProjectName>\r
- <ProjectGuid>{DEB01ACB-D65F-4A62-AED9-58C1054499E9}</ProjectGuid>\r
- <RootNamespace>mrcpunirtsp</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirtsp.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirtsp.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirtsp.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirtsp.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\sofiasip.props" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;RTSP_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;RTSP_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;RTSP_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;RTSP_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;LIBSOFIA_SIP_UA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp_unirtsp_client_agent.h" />\r
- <ClInclude Include="include\mrcp_unirtsp_sdp.h" />\r
- <ClInclude Include="include\mrcp_unirtsp_server_agent.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\mrcp_unirtsp_client_agent.c" />\r
- <ClCompile Include="src\mrcp_unirtsp_sdp.c" />\r
- <ClCompile Include="src\mrcp_unirtsp_server_agent.c" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
-</Project>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}</ProjectGuid>
+ <RootNamespace>libasrclient</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASR_CLIENT_LIB_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>$(UniMRCPClientLibs);%(AdditionalDependencies)</AdditionalDependencies>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASR_CLIENT_LIB_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>$(UniMRCPClientLibs);%(AdditionalDependencies)</AdditionalDependencies>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASR_CLIENT_LIB_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>$(UniMRCPClientLibs);%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>ASR_CLIENT_LIB_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>$(UniMRCPClientLibs);%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="include\asr_engine.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\asr_engine.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\libunimrcp-client\libunimrcpclient.vcxproj">
+ <Project>{ee157390-1e85-416c-946e-620e32c9ad33}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{21e6c16e-f977-468a-9576-0c5981eb7da5}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="include\asr_engine.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\asr_engine.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
/*
- * Copyright 2009-2010 Arsen Chaloyan
+ * Copyright 2009-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: asr_engine.c 1785 2010-09-22 06:14:29Z achaloyan $
+ * $Id: asr_engine.c 2204 2014-10-31 01:01:42Z achaloyan@gmail.com $
*/
#include <stdlib.h>
asr_stream_read,
NULL,
NULL,
+ NULL,
NULL
};
if((log_output & APT_LOG_OUTPUT_FILE) == APT_LOG_OUTPUT_FILE) {
/* open the log file */
- apt_log_file_open(dir_layout->log_dir_path,"unimrcpclient",MAX_LOG_FILE_SIZE,MAX_LOG_FILE_COUNT,FALSE,pool);
+ const char *log_dir_path = apt_dir_layout_path_get(dir_layout,APT_LAYOUT_LOG_DIR);
+ apt_log_file_open(log_dir_path,"unimrcpclient",MAX_LOG_FILE_SIZE,MAX_LOG_FILE_COUNT,FALSE,pool);
}
engine = apr_palloc(pool,sizeof(asr_engine_t));
apr_pool_t *pool = mrcp_application_session_pool_get(asr_session->mrcp_session);
char *grammar_file_path = apt_datadir_filepath_get(dir_layout,grammar_file,pool);
if(grammar_file_path) {
- char text[1024];
- apr_size_t size;
- FILE *grammar = fopen(grammar_file_path,"r");
- if(!grammar) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Cannot Open [%s]",grammar_file_path);
+ apr_finfo_t finfo;
+ apr_file_t *grammar_file;
+ apt_str_t *content = &mrcp_message->body;
+
+ if(apr_file_open(&grammar_file,grammar_file_path,APR_FOPEN_READ|APR_FOPEN_BINARY,0,pool) != APR_SUCCESS) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Open Grammar File %s",grammar_file_path);
+ return NULL;
+ }
+
+ if(apr_file_info_get(&finfo,APR_FINFO_SIZE,grammar_file) != APR_SUCCESS) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Grammar File Info %s",grammar_file_path);
+ apr_file_close(grammar_file);
return NULL;
}
- size = fread(text,1,sizeof(text),grammar);
- apt_string_assign_n(&mrcp_message->body,text,size,mrcp_message->pool);
- fclose(grammar);
+ content->length = (apr_size_t)finfo.size;
+ content->buf = (char*) apr_palloc(pool,content->length+1);
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Load Grammar File Content size [%"APR_SIZE_T_FMT" bytes] %s",
+ content->length,grammar_file_path);
+ if(apr_file_read(grammar_file,content->buf,&content->length) != APR_SUCCESS) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Read Grammar File Content %s",grammar_file_path);
+ apr_file_close(grammar_file);
+ return NULL;
+ }
+ content->buf[content->length] = '\0';
+ apr_file_close(grammar_file);
}
/* get/allocate generic header */
return mrcp_message;
}
-/** Get NLSML input result */
-static const char* nlsml_input_get(mrcp_message_t *message)
+/** Get NLSML result */
+static const char* nlsml_result_get(mrcp_message_t *message)
{
- apr_xml_elem *interpret;
- apr_xml_elem *instance;
- apr_xml_elem *input;
- apr_xml_doc *doc = nlsml_doc_load(&message->body,message->pool);
- if(!doc) {
+ nlsml_interpretation_t *interpretation;
+ nlsml_instance_t *instance;
+ nlsml_result_t *result = nlsml_result_parse(message->body.buf, message->body.length, message->pool);
+ if(!result) {
return NULL;
}
- /* get interpreted result */
- interpret = nlsml_first_interpret_get(doc);
- if(!interpret) {
+ /* get first interpretation */
+ interpretation = nlsml_first_interpretation_get(result);
+ if(!interpretation) {
return NULL;
}
- /* get instance and input */
- nlsml_interpret_results_get(interpret,&instance,&input);
- if(!input || !input->first_cdata.first) {
+
+ /* get first instance */
+ instance = nlsml_interpretation_first_instance_get(interpretation);
+ if(!instance) {
return NULL;
}
-
- /* return input */
- return input->first_cdata.first->text;
+
+ nlsml_instance_swi_suppress(instance);
+ return nlsml_instance_content_generate(instance, message->pool);
}
while(!asr_session->recog_complete);
/* Get results */
- return nlsml_input_get(asr_session->recog_complete);
+ return nlsml_result_get(asr_session->recog_complete);
}
/** Initiate recognition based on specified grammar and input stream */
while(!asr_session->recog_complete);
/* Get results */
- return nlsml_input_get(asr_session->recog_complete);
+ return nlsml_result_get(asr_session->recog_complete);
}
/** Write audio frame to recognize */
-MAINTAINERCLEANFILES = Makefile.in
-
AM_CPPFLAGS = -I$(top_srcdir)/platforms/libunimrcp-client/include \
- -I$(unimrcp_srcdir)/modules/mrcp-sofiasip/include \
- -I$(top_srcdir)/modules/mrcp-unirtsp/include \
- -I$(top_srcdir)/libs/mrcp-client/include \
- -I$(top_srcdir)/libs/mrcp-signaling/include \
- -I$(top_srcdir)/libs/mrcpv2-transport/include \
- -I$(top_srcdir)/libs/mrcp/include \
- -I$(top_srcdir)/libs/mrcp/message/include \
- -I$(top_srcdir)/libs/mrcp/control/include \
- -I$(top_srcdir)/libs/mrcp/resources/include \
- -I$(top_srcdir)/libs/mpf/include \
- -I$(top_srcdir)/libs/apr-toolkit/include \
- -I$(top_srcdir)/build \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+ $(UNIMRCP_CLIENTLIB_INCLUDES)
lib_LTLIBRARIES = libunimrcpclient.la
include_HEADERS = include/unimrcp_client.h
-
libunimrcpclient_la_SOURCES = src/unimrcp_client.c
+libunimrcpclient_la_LIBADD = $(UNIMRCP_CLIENTLIB_LIBS)
+libunimrcpclient_la_LDFLAGS = $(UNIMRCP_CLIENTLIB_OPTS)
-libunimrcpclient_la_LIBADD = $(top_builddir)/modules/mrcp-sofiasip/libmrcpsofiasip.la \
- $(top_builddir)/modules/mrcp-unirtsp/libmrcpunirtsp.la \
- $(top_builddir)/libs/mrcpv2-transport/libmrcpv2transport.la \
- $(top_builddir)/libs/mrcp-client/libmrcpclient.la \
- $(top_builddir)/libs/mrcp-signaling/libmrcpsignaling.la \
- $(top_builddir)/libs/mrcp/libmrcp.la \
- $(top_builddir)/libs/mpf/libmpf.la \
- $(top_builddir)/libs/apr-toolkit/libaprtoolkit.la \
- $(UNIMRCP_APR_LIBS) $(UNIMRCP_APU_LIBS) $(UNIMRCP_SOFIA_LIBS) -lm
-
-libunimrcpclient_la_LDFLAGS = $(UNI_LT_VERSION)
+include $(top_srcdir)/build/rules/uniclientlib.am
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: unimrcp_client.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: unimrcp_client.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef UNIMRCP_CLIENT_H
*/
MRCP_DECLARE(mrcp_client_t*) unimrcp_client_create(apt_dir_layout_t *dir_layout);
+/**
+ * Create UniMRCP client.
+ * @param xmlconfig XML configuration string
+ */
+MRCP_DECLARE(mrcp_client_t*) unimrcp_client_create2(const char *xmlconfig);
+
APT_END_EXTERN_C
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="libunimrcpclient"\r
- ProjectGUID="{EE157390-1E85-416C-946E-620E32C9AD33}"\r
- RootNamespace="libunimrcpclient"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpclient.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""$(ProjectRootDir)modules\mrcp-sofiasip\include";"$(ProjectRootDir)modules\mrcp-unirtsp\include""\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpclient.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""$(ProjectRootDir)modules\mrcp-sofiasip\include";"$(ProjectRootDir)modules\mrcp-unirtsp\include""\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath="..\..\build\uni_revision.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\build\uni_version.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\unimrcp_client.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\src\unimrcp_client.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{EE157390-1E85-416C-946E-620E32C9AD33}</ProjectGuid>
+ <RootNamespace>libunimrcpclient</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)modules\mrcp-sofiasip\include;$(ProjectRootDir)modules\mrcp-unirtsp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)modules\mrcp-sofiasip\include;$(ProjectRootDir)modules\mrcp-unirtsp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)modules\mrcp-sofiasip\include;$(ProjectRootDir)modules\mrcp-unirtsp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)modules\mrcp-sofiasip\include;$(ProjectRootDir)modules\mrcp-unirtsp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\build\uni_revision.h" />
+ <ClInclude Include="..\..\build\uni_version.h" />
+ <ClInclude Include="include\unimrcp_client.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\unimrcp_client.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\libs\mrcp-client\mrcpclient.vcxproj">
+ <Project>{72782932-37cc-46ae-8c7f-9a7b1a6ee108}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\modules\mrcp-sofiasip\mrcpsofiasip.vcxproj">
+ <Project>{746f3632-5bb2-4570-9453-31d6d58a7d8e}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\modules\mrcp-unirtsp\mrcpunirtsp.vcxproj">
+ <Project>{deb01acb-d65f-4a62-aed9-58c1054499e9}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{15d2ec58-ba87-4dd8-9f7a-434f9e186e4e}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\build\uni_revision.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\build\uni_version.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\unimrcp_client.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\unimrcp_client.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: unimrcp_client.c 1750 2010-07-23 19:33:34Z achaloyan $
+ * $Id: unimrcp_client.c 2231 2014-11-12 01:32:03Z achaloyan@gmail.com $
*/
#include <stdlib.h>
#include <apr_fnmatch.h>
#include <apr_version.h>
#include "uni_version.h"
+#include "uni_revision.h"
#include "unimrcp_client.h"
#include "mrcp_resource_loader.h"
#include "mpf_engine.h"
+#include "mpf_engine_factory.h"
#include "mpf_codec_manager.h"
#include "mpf_rtp_termination_factory.h"
#include "mrcp_sofiasip_client_agent.h"
#include "mrcp_unirtsp_client_agent.h"
#include "mrcp_client_connection.h"
+#include "mrcp_ca_factory.h"
#include "apt_net.h"
#include "apt_log.h"
#define CONF_FILE_NAME "unimrcpclient.xml"
-#define DEFAULT_CONF_DIR_PATH "../conf"
#define DEFAULT_IP_ADDRESS "127.0.0.1"
#define DEFAULT_SIP_PORT 8062
struct unimrcp_client_loader_t {
/** MRCP client */
mrcp_client_t *client;
+ /** Directory layout */
+ apt_dir_layout_t *dir_layout;
/** XML document */
apr_xml_doc *doc;
/** Pool to allocate memory from */
const char *auto_ip;
};
-static apt_bool_t unimrcp_client_load(unimrcp_client_loader_t *loader, const char *dir_path, const char *file_name, apr_pool_t *pool);
+static apt_bool_t unimrcp_client_load(unimrcp_client_loader_t *loader, const char *dir_path, const char *file_name);
+static apt_bool_t unimrcp_client_load2(unimrcp_client_loader_t *loader, const char *xmlconfig);
-/** Create and load UniMRCP client */
-MRCP_DECLARE(mrcp_client_t*) unimrcp_client_create(apt_dir_layout_t *dir_layout)
+/** Initialize client -- common to unimrcp_client_create and unimrcp_client_create2 */
+static unimrcp_client_loader_t* unimrcp_client_init(apt_dir_layout_t *dir_layout)
{
apr_pool_t *pool;
mrcp_client_t *client;
- const char *dir_path;
unimrcp_client_loader_t *loader;
- if(!dir_layout) {
- return NULL;
- }
-
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"UniMRCP Client ["UNI_VERSION_STRING"]");
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"UniMRCP Client ["UNI_VERSION_STRING"] [r"UNI_REVISION_STRING"]");
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"APR ["APR_VERSION_STRING"]");
client = mrcp_client_create(dir_layout);
if(!client) {
}
loader = apr_palloc(pool,sizeof(unimrcp_client_loader_t));
+ loader->dir_layout = dir_layout;
loader->doc = NULL;
loader->client = client;
loader->pool = pool;
loader->ext_ip = NULL;
loader->server_ip = NULL;
loader->auto_ip = NULL;
+ return loader;
+}
+
+/** Create and load UniMRCP client using the directories layout */
+MRCP_DECLARE(mrcp_client_t*) unimrcp_client_create(apt_dir_layout_t *dir_layout)
+{
+ const char *dir_path;
+ unimrcp_client_loader_t *loader;
- dir_path = dir_layout->conf_dir_path;
- if(!dir_path) {
- dir_path = DEFAULT_CONF_DIR_PATH;
+ if(!dir_layout) {
+ return NULL;
}
- if(unimrcp_client_load(loader,dir_path,CONF_FILE_NAME,pool) == FALSE) {
+ loader = unimrcp_client_init(dir_layout);
+ if (!loader)
+ return NULL;
+
+ dir_path = apt_dir_layout_path_get(dir_layout,APT_LAYOUT_CONF_DIR);
+
+ if(unimrcp_client_load(loader,dir_path,CONF_FILE_NAME) == FALSE) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Load UniMRCP Client Document");
}
- return client;
+ return loader->client;
+}
+
+/** Create UniMRCP client from XML string configuration */
+MRCP_DECLARE(mrcp_client_t*) unimrcp_client_create2(const char *xmlconfig)
+{
+ unimrcp_client_loader_t *loader;
+
+ loader = unimrcp_client_init(NULL);
+ if (!loader)
+ return NULL;
+
+ if(unimrcp_client_load2(loader,xmlconfig) == FALSE) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Process UniMRCP Client Configuration");
+ }
+
+ return loader->client;
}
/** Check whether specified attribute is valid */
static APR_INLINE apt_bool_t is_attr_valid(const apr_xml_attr *attr)
{
- return (attr && attr->value && attr->value != '\0');
+ return (attr && attr->value && *attr->value != '\0');
}
/** Check whether specified attribute is enabled (true) */
*enable = attr;
}
}
-
+
+ if(is_attr_valid(*id) == FALSE) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Missing Required Attribute <id> in Element <%s>",elem->name);
+ return FALSE;
+ }
+ return TRUE;
+}
+
+/** Get profile attributes such as "id", "enable" and "tag" */
+static apt_bool_t profile_attribs_get(const apr_xml_elem *elem, const apr_xml_attr **id, const apr_xml_attr **enable, const apr_xml_attr **tag)
+{
+ const apr_xml_attr *attr;
+ if(!id || !enable || !tag) {
+ return FALSE;
+ }
+
+ *id = NULL;
+ *enable = NULL;
+ *tag = NULL;
+ for(attr = elem->attr; attr; attr = attr->next) {
+ if(strcasecmp(attr->name,"id") == 0) {
+ *id = attr;
+ }
+ else if(strcasecmp(attr->name,"enable") == 0) {
+ *enable = attr;
+ }
+ else if(strcasecmp(attr->name,"tag") == 0) {
+ *tag = attr;
+ }
+ }
+
if(is_attr_valid(*id) == FALSE) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Missing Required Attribute <id> in Element <%s>",elem->name);
return FALSE;
}
return apr_pstrdup(loader->pool,loader->auto_ip);
}
+ else if(attr && strcasecmp(attr->value,"iface") == 0) {
+ /* get ip address by network interface name */
+ char *ip_addr = DEFAULT_IP_ADDRESS;
+ if(is_cdata_valid(elem) == TRUE) {
+ const char *iface_name = cdata_text_get(elem);
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Get IP Address by Interface [%s]", iface_name);
+ apt_ip_get_by_iface(iface_name,&ip_addr,loader->pool);
+ }
+ return ip_addr;
+ }
if(is_cdata_valid(elem)) {
/* use specified ip address */
if(header_attribs_get(root,&id_attr,&enable_attr) == FALSE) {
return FALSE;
}
-
+
if(is_attr_enabled(enable_attr) == FALSE) {
return TRUE;
}
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
}
-
+
resource_factory = mrcp_resource_factory_get(resource_loader);
return mrcp_client_resource_factory_register(loader->client,resource_factory);
}
}
else if(strcasecmp(elem->name,"ua-name") == 0) {
if(is_cdata_valid(elem) == TRUE) {
- config->user_agent_name = cdata_copy(elem,loader->pool);
+ const apr_xml_attr *attr = NULL;
+ for(attr = elem->attr; attr; attr = attr->next) {
+ if(strcasecmp(attr->name,"appendversion") == 0) {
+ break;
+ }
+ }
+ if(is_attr_enabled(attr)) {
+ config->user_agent_name = apr_psprintf(loader->pool,"%s "UNI_VERSION_STRING,cdata_text_get(elem));
+ }
+ else {
+ config->user_agent_name = cdata_copy(elem,loader->pool);
+ }
}
}
else if(strcasecmp(elem->name,"sdp-origin") == 0) {
config->sip_t1x64 = atol(cdata_text_get(elem));
}
}
+ else if(strcasecmp(elem->name,"sip-message-output") == 0) {
+ if(is_cdata_valid(elem) == TRUE) {
+ config->tport_log = cdata_bool_get(elem);
+ }
+ }
+ else if(strcasecmp(elem->name,"sip-message-dump") == 0) {
+ if(is_cdata_valid(elem) == TRUE) {
+ const char *root_path;
+ const char *path = cdata_text_get(elem);
+ if(loader->dir_layout && apr_filepath_root(&root_path,&path,0,loader->pool) == APR_ERELATIVE)
+ config->tport_dump_file = apt_dir_layout_path_compose(
+ loader->dir_layout,
+ APT_LAYOUT_LOG_DIR,
+ path,
+ loader->pool);
+ else
+ config->tport_dump_file = cdata_copy(elem,loader->pool);
+ }
+ }
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
}
-
+
agent = mrcp_unirtsp_client_agent_create(id,config,loader->pool);
return mrcp_client_signaling_agent_register(loader->client,agent);
}
}
else if(strcasecmp(elem->name,"offer-new-connection") == 0) {
if(is_cdata_valid(elem) == TRUE) {
- offer_new_connection = atoi(cdata_text_get(elem));
+ offer_new_connection = cdata_bool_get(elem);
}
}
else if(strcasecmp(elem->name,"rx-buffer-size") == 0) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
}
-
+
media_engine = mpf_engine_create(id,loader->pool);
if(media_engine) {
mpf_engine_scheduler_rate_set(media_engine,realtime_rate);
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
- }
-
+ }
+
if(rtp_ip) {
apt_string_set(&rtp_config->ip,rtp_ip);
}
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
}
-
+
if(!settings->server_ip) {
settings->server_ip = apr_pstrdup(loader->pool,loader->server_ip);
}
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Loading Param %s:%s",name_attr->value,value_attr->value);
apr_table_set(settings->resource_map,name_attr->value,value_attr->value);
}
- }
+ }
}
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
}
-
+
if(!settings->server_ip) {
settings->server_ip = apr_pstrdup(loader->pool,loader->server_ip);
}
jb->max_playout_delay = atol(cdata_text_get(elem));
}
}
+ else if(strcasecmp(elem->name,"adaptive") == 0) {
+ if(is_cdata_valid(elem) == TRUE) {
+ jb->adaptive = (apr_byte_t) atol(cdata_text_get(elem));
+ }
+ }
+ else if(strcasecmp(elem->name,"time-skew-detection") == 0) {
+ if(is_cdata_valid(elem) == TRUE) {
+ jb->time_skew_detection = (apr_byte_t) atol(cdata_text_get(elem));
+ }
+ }
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
- }
+ }
return mrcp_client_rtp_settings_register(loader->client,rtp_settings,id);
}
+/** Create factory of signaling agents */
+static mrcp_sa_factory_t* unimrcp_client_sa_factory_create(unimrcp_client_loader_t *loader, const apr_xml_elem *elem)
+{
+ mrcp_sa_factory_t *sa_factory = NULL;
+ mrcp_sig_agent_t *sig_agent;
+ char *uac_name;
+ char *state;
+ char *uac_list_str = apr_pstrdup(loader->pool,cdata_text_get(elem));
+ do {
+ uac_name = apr_strtok(uac_list_str, ",", &state);
+ if(uac_name) {
+ sig_agent = mrcp_client_signaling_agent_get(loader->client,uac_name);
+ if(sig_agent) {
+ if(!sa_factory)
+ sa_factory = mrcp_sa_factory_create(loader->pool);
+
+ mrcp_sa_factory_agent_add(sa_factory,sig_agent);
+ }
+ else {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown UAC Name <%s>",uac_name);
+ }
+ }
+ uac_list_str = NULL; /* make sure we pass NULL on subsequent calls of apr_strtok() */
+ }
+ while(uac_name);
+ return sa_factory;
+}
+
+/** Create factory of MRCPv2 connection agents */
+static mrcp_ca_factory_t* unimrcp_client_ca_factory_create(unimrcp_client_loader_t *loader, const apr_xml_elem *elem)
+{
+ mrcp_ca_factory_t *ca_factory = NULL;
+ mrcp_connection_agent_t *agent;
+ char *name;
+ char *state;
+ char *list_str = apr_pstrdup(loader->pool,cdata_text_get(elem));
+ do {
+ name = apr_strtok(list_str, ",", &state);
+ if(name) {
+ agent = mrcp_client_connection_agent_get(loader->client,name);
+ if(agent) {
+ if(!ca_factory)
+ ca_factory = mrcp_ca_factory_create(loader->pool);
+
+ mrcp_ca_factory_agent_add(ca_factory,agent);
+ }
+ else {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown MRCPv2-UAC Name <%s>",name);
+ }
+ }
+ list_str = NULL; /* make sure we pass NULL on subsequent calls of apr_strtok() */
+ }
+ while(name);
+ return ca_factory;
+}
+
+/** Create factory of media engines */
+static mpf_engine_factory_t* unimrcp_client_mpf_factory_create(unimrcp_client_loader_t *loader, const apr_xml_elem *elem)
+{
+ mpf_engine_factory_t *mpf_factory = NULL;
+ mpf_engine_t *media_engine;
+
+ char *name;
+ char *state;
+ char *list_str = apr_pstrdup(loader->pool,cdata_text_get(elem));
+ do {
+ name = apr_strtok(list_str, ",", &state);
+ if(name) {
+ media_engine = mrcp_client_media_engine_get(loader->client,name);
+ if(media_engine) {
+ if(!mpf_factory)
+ mpf_factory = mpf_engine_factory_create(loader->pool);
+
+ mpf_engine_factory_engine_add(mpf_factory,media_engine);
+ }
+ else {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Media Engine Name <%s>",name);
+ }
+ }
+ list_str = NULL; /* make sure we pass NULL on subsequent calls of apr_strtok() */
+ }
+ while(name);
+
+ return mpf_factory;
+}
+
/** Load MRCPv2 profile */
-static apt_bool_t unimrcp_client_mrcpv2_profile_load(unimrcp_client_loader_t *loader, const apr_xml_elem *root, const char *id)
+static apt_bool_t unimrcp_client_mrcpv2_profile_load(unimrcp_client_loader_t *loader, const apr_xml_elem *root, const char *id, const char *tag)
{
const apr_xml_elem *elem;
mrcp_profile_t *profile;
- mrcp_sig_agent_t *sip_agent = NULL;
- mrcp_connection_agent_t *mrcpv2_agent = NULL;
- mpf_engine_t *media_engine = NULL;
+ mrcp_sa_factory_t *sa_factory = NULL;
+ mrcp_ca_factory_t *ca_factory = NULL;
+ mpf_engine_factory_t *mpf_factory = NULL;
mpf_termination_factory_t *rtp_factory = NULL;
mpf_rtp_settings_t *rtp_settings = NULL;
mrcp_sig_settings_t *sip_settings = NULL;
}
if(strcasecmp(elem->name,"sip-uac") == 0) {
- sip_agent = mrcp_client_signaling_agent_get(loader->client,cdata_text_get(elem));
+ sa_factory = unimrcp_client_sa_factory_create(loader,elem);
}
else if(strcasecmp(elem->name,"mrcpv2-uac") == 0) {
- mrcpv2_agent = mrcp_client_connection_agent_get(loader->client,cdata_text_get(elem));
+ ca_factory = unimrcp_client_ca_factory_create(loader,elem);
}
else if(strcasecmp(elem->name,"media-engine") == 0) {
- media_engine = mrcp_client_media_engine_get(loader->client,cdata_text_get(elem));
+ mpf_factory = unimrcp_client_mpf_factory_create(loader,elem);
}
else if(strcasecmp(elem->name,"rtp-factory") == 0) {
rtp_factory = mrcp_client_rtp_factory_get(loader->client,cdata_text_get(elem));
}
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create MRCPv2 Profile [%s]",id);
- profile = mrcp_client_profile_create(
- NULL,sip_agent,mrcpv2_agent,
- media_engine,rtp_factory,
+ profile = mrcp_client_profile_create_ex(
+ MRCP_VERSION_2,NULL,
+ sa_factory,ca_factory,
+ mpf_factory,rtp_factory,
rtp_settings,sip_settings,
loader->pool);
+ if(tag) {
+ mrcp_client_profile_tag_set(profile,tag);
+ }
return mrcp_client_profile_register(loader->client,profile,id);
}
/** Load MRCPv1 profile */
-static apt_bool_t unimrcp_client_mrcpv1_profile_load(unimrcp_client_loader_t *loader, const apr_xml_elem *root, const char *id)
+static apt_bool_t unimrcp_client_mrcpv1_profile_load(unimrcp_client_loader_t *loader, const apr_xml_elem *root, const char *id, const char *tag)
{
const apr_xml_elem *elem;
mrcp_profile_t *profile;
- mrcp_sig_agent_t *rtsp_agent = NULL;
- mpf_engine_t *media_engine = NULL;
+ mrcp_sa_factory_t *sa_factory = NULL;
+ mpf_engine_factory_t *mpf_factory = NULL;
mpf_termination_factory_t *rtp_factory = NULL;
mpf_rtp_settings_t *rtp_settings = NULL;
mrcp_sig_settings_t *rtsp_settings = NULL;
}
if(strcasecmp(elem->name,"rtsp-uac") == 0) {
- rtsp_agent = mrcp_client_signaling_agent_get(loader->client,cdata_text_get(elem));
+ sa_factory = unimrcp_client_sa_factory_create(loader,elem);
}
else if(strcasecmp(elem->name,"media-engine") == 0) {
- media_engine = mrcp_client_media_engine_get(loader->client,cdata_text_get(elem));
+ mpf_factory = unimrcp_client_mpf_factory_create(loader,elem);
}
else if(strcasecmp(elem->name,"rtp-factory") == 0) {
rtp_factory = mrcp_client_rtp_factory_get(loader->client,cdata_text_get(elem));
}
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create MRCPv1 Profile [%s]",id);
- profile = mrcp_client_profile_create(
- NULL,rtsp_agent,NULL,
- media_engine,rtp_factory,
+ profile = mrcp_client_profile_create_ex(
+ MRCP_VERSION_1,
+ NULL,sa_factory,NULL,
+ mpf_factory,rtp_factory,
rtp_settings,rtsp_settings,
loader->pool);
+ if(tag) {
+ mrcp_client_profile_tag_set(profile,tag);
+ }
return mrcp_client_profile_register(loader->client,profile,id);
}
unimrcp_client_resource_factory_load(loader,elem);
continue;
}
-
+
/* get common "id" and "enable" attributes */
if(header_attribs_get(elem,&id_attr,&enable_attr) == FALSE) {
/* invalid id */
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
- }
+ }
return TRUE;
}
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
- }
+ }
return TRUE;
}
const apr_xml_elem *elem;
const apr_xml_attr *id_attr;
const apr_xml_attr *enable_attr;
+ const apr_xml_attr *tag_attr;
const char *id;
+ const char *tag;
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Loading Profiles");
for(elem = root->first_child; elem; elem = elem->next) {
/* get common "id" and "enable" attributes */
- if(header_attribs_get(elem,&id_attr,&enable_attr) == FALSE) {
+ if(profile_attribs_get(elem,&id_attr,&enable_attr,&tag_attr) == FALSE) {
/* invalid id */
continue;
}
continue;
}
id = apr_pstrdup(loader->pool,id_attr->value);
+ tag = tag_attr ? apr_pstrdup(loader->pool,tag_attr->value) : NULL;
if(strcasecmp(elem->name,"mrcpv2-profile") == 0) {
- unimrcp_client_mrcpv2_profile_load(loader,elem,id);
+ unimrcp_client_mrcpv2_profile_load(loader,elem,id,tag);
}
else if(strcasecmp(elem->name,"mrcpv1-profile") == 0) {
- unimrcp_client_mrcpv1_profile_load(loader,elem,id);
+ unimrcp_client_mrcpv1_profile_load(loader,elem,id,tag);
+ }
+ else {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
+ }
+ }
+ return TRUE;
+}
+
+/** Load misc parameters */
+static apt_bool_t unimrcp_client_misc_load(unimrcp_client_loader_t *loader, const apr_xml_elem *root)
+{
+ const apr_xml_elem *elem;
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Loading Misc Parameters");
+ for(elem = root->first_child; elem; elem = elem->next) {
+ if(strcasecmp(elem->name,"sofiasip-logger") == 0) {
+ char *logger_list_str;
+ char *logger_name;
+ char *state;
+ apr_xml_attr *attr;
+ apt_bool_t redirect = FALSE;
+ const char *loglevel_str = NULL;
+ for(attr = elem->attr; attr; attr = attr->next) {
+ if(strcasecmp(attr->name,"redirect") == 0) {
+ if(attr->value && strcasecmp(attr->value,"true") == 0)
+ redirect = TRUE;
+ }
+ else if(strcasecmp(attr->name,"loglevel") == 0) {
+ loglevel_str = attr->value;
+ }
+ }
+
+ logger_list_str = apr_pstrdup(loader->pool,cdata_text_get(elem));
+ do {
+ logger_name = apr_strtok(logger_list_str, ",", &state);
+ if(logger_name) {
+ mrcp_sofiasip_client_logger_init(logger_name,loglevel_str,redirect);
+ }
+ logger_list_str = NULL; /* make sure we pass NULL on subsequent calls of apr_strtok() */
+ }
+ while(logger_name);
}
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
- }
+ }
return TRUE;
}
return xml_doc;
}
-/** Load UniMRCP client */
-static apt_bool_t unimrcp_client_load(unimrcp_client_loader_t *loader, const char *dir_path, const char *file_name, apr_pool_t *pool)
+/** Process parsed XML document */
+static apt_bool_t unimrcp_client_doc_process(unimrcp_client_loader_t *loader, const char *dir_path, apr_xml_doc *doc, apr_pool_t *pool)
{
- apr_xml_doc *doc;
const apr_xml_elem *elem;
const apr_xml_elem *root;
const apr_xml_attr *attr;
- const char *file_path;
const char *version = NULL;
const char *subfolder = NULL;
- if(!dir_path || !file_name) {
- return FALSE;
- }
-
- if(*dir_path == '\0') {
- file_path = file_name;
- }
- else {
- file_path = apr_psprintf(pool,"%s/%s",dir_path,file_name);
- }
-
- /* Parse XML document */
- doc = unimrcp_client_doc_parse(file_path,pool);
if(!doc) {
return FALSE;
}
/* Match document name */
if(!root || strcasecmp(root->name,"unimrcpclient") != 0) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Document <%s>",root->name);
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Document <%s>",root ? root->name : "null");
return FALSE;
}
else if(strcasecmp(elem->name,"profiles") == 0) {
unimrcp_client_profiles_load(loader,elem);
}
+ else if(strcasecmp(elem->name,"misc") == 0) {
+ unimrcp_client_misc_load(loader,elem);
+ }
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
}
- if(subfolder && subfolder != '\0') {
+ if(subfolder && *subfolder != '\0') {
apr_dir_t *dir;
apr_finfo_t finfo;
apr_status_t rv;
-
- dir_path = apr_psprintf(pool,"%s/%s",dir_path,subfolder);
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Enter Directory [%s]",dir_path);
- rv = apr_dir_open(&dir,dir_path,pool);
- if(rv == APR_SUCCESS) {
- while(apr_dir_read(&finfo, APR_FINFO_NAME, dir) == APR_SUCCESS) {
- if(apr_fnmatch("*.xml", finfo.name, 0) == APR_SUCCESS) {
- unimrcp_client_load(loader,dir_path,finfo.name,pool);
+ char *subdir_path;
+
+ if (!dir_path) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Attempt to Process Subdirectory when "
+ "Creating from Config String");
+ return TRUE;
+ }
+
+ if(apr_filepath_merge(&subdir_path,dir_path,subfolder,APR_FILEPATH_NATIVE,pool) == APR_SUCCESS) {
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Enter Directory [%s]",subdir_path);
+ rv = apr_dir_open(&dir,subdir_path,pool);
+ if(rv == APR_SUCCESS) {
+ while(apr_dir_read(&finfo, APR_FINFO_NAME, dir) == APR_SUCCESS) {
+ if(apr_fnmatch("*.xml", finfo.name, 0) == APR_SUCCESS) {
+ unimrcp_client_load(loader,subdir_path,finfo.name);
+ }
}
+ apr_dir_close(dir);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Leave Directory [%s]",dir_path);
+ }
+ else {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"No Such Directory %s",dir_path);
}
- apr_dir_close(dir);
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Leave Directory [%s]",dir_path);
- }
- else {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"No Such Directory %s",dir_path);
}
}
return TRUE;
}
+
+/** Load UniMRCP client from file */
+static apt_bool_t unimrcp_client_load(unimrcp_client_loader_t *loader, const char *dir_path, const char *file_name)
+{
+ apr_pool_t *pool = loader->pool;
+ apr_xml_doc *doc;
+ char *file_path;
+
+ if(!dir_path || !file_name) {
+ return FALSE;
+ }
+
+ if(apr_filepath_merge(&file_path,dir_path,file_name,APR_FILEPATH_NATIVE,pool) != APR_SUCCESS) {
+ return FALSE;
+ }
+
+ /* Parse XML document */
+ doc = unimrcp_client_doc_parse(file_path,pool);
+ return unimrcp_client_doc_process(loader, dir_path, doc, pool);
+}
+
+/** Read configuration from string */
+static apt_bool_t unimrcp_client_load2(unimrcp_client_loader_t *loader, const char *xmlconfig)
+{
+ apr_pool_t *pool = loader->pool;
+ apr_xml_parser *parser;
+ apr_xml_doc *xml_doc;
+ char errbuf[4096];
+ apr_status_t rv;
+
+ parser = apr_xml_parser_create(pool);
+ if (!parser) return FALSE;
+ rv = apr_xml_parser_feed(parser, xmlconfig, strlen(xmlconfig));
+ if (rv != APR_SUCCESS) {
+ apr_xml_parser_geterror(parser, errbuf, sizeof(errbuf));
+ apt_log(APT_LOG_MARK, APT_PRIO_ERROR, "Error parsing XML configuration: %d %pm: %s",
+ rv, &rv, errbuf);
+ return FALSE;
+ }
+ rv = apr_xml_parser_done(parser, &xml_doc);
+ if (rv != APR_SUCCESS) {
+ apr_xml_parser_geterror(parser, errbuf, sizeof(errbuf));
+ apt_log(APT_LOG_MARK, APT_PRIO_ERROR, "Error parsing XML configuration: %d %pm: %s",
+ rv, &rv, errbuf);
+ return FALSE;
+ }
+ return unimrcp_client_doc_process(loader, NULL, xml_doc, pool);
+}
-MAINTAINERCLEANFILES = Makefile.in
-
AM_CPPFLAGS = -I$(top_srcdir)/platforms/libunimrcp-server/include \
- -I$(unimrcp_srcdir)/modules/mrcp-sofiasip/include \
- -I$(top_srcdir)/modules/mrcp-unirtsp/include \
- -I$(top_srcdir)/libs/mrcp-server/include \
- -I$(top_srcdir)/libs/mrcp-engine/include \
- -I$(top_srcdir)/libs/mrcp-signaling/include \
- -I$(top_srcdir)/libs/mrcpv2-transport/include \
- -I$(top_srcdir)/libs/mrcp/include \
- -I$(top_srcdir)/libs/mrcp/message/include \
- -I$(top_srcdir)/libs/mrcp/control/include \
- -I$(top_srcdir)/libs/mrcp/resources/include \
- -I$(top_srcdir)/libs/mpf/include \
- -I$(top_srcdir)/libs/apr-toolkit/include \
- -I$(top_srcdir)/build \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+ $(UNIMRCP_SERVERLIB_INCLUDES)
lib_LTLIBRARIES = libunimrcpserver.la
include_HEADERS = include/unimrcp_server.h
-
libunimrcpserver_la_SOURCES = src/unimrcp_server.c
+libunimrcpserver_la_LIBADD = $(UNIMRCP_SERVERLIB_LIBS)
+libunimrcpserver_la_LDFLAGS = $(UNIMRCP_SERVERLIB_OPTS)
-libunimrcpserver_la_LIBADD = $(top_builddir)/modules/mrcp-sofiasip/libmrcpsofiasip.la \
- $(top_builddir)/modules/mrcp-unirtsp/libmrcpunirtsp.la \
- $(top_builddir)/libs/mrcp-server/libmrcpserver.la \
- $(top_builddir)/libs/mrcp-signaling/libmrcpsignaling.la \
- $(top_builddir)/libs/mrcpv2-transport/libmrcpv2transport.la \
- $(top_builddir)/libs/mrcp-engine/libmrcpengine.la \
- $(top_builddir)/libs/mrcp/libmrcp.la \
- $(top_builddir)/libs/mpf/libmpf.la \
- $(top_builddir)/libs/apr-toolkit/libaprtoolkit.la \
- $(UNIMRCP_APR_LIBS) $(UNIMRCP_APU_LIBS) $(UNIMRCP_SOFIA_LIBS) -lm
-
-libunimrcpserver_la_LDFLAGS = $(UNI_LT_VERSION)
+include $(top_srcdir)/build/rules/uniserverlib.am
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: unimrcp_server.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: unimrcp_server.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef UNIMRCP_SERVER_H
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="libunimrcpserver"\r
- ProjectGUID="{C98AF157-352E-4737-BD30-A24E2647F5AE}"\r
- RootNamespace="libunimrcpserver"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpserver.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""$(ProjectRootDir)modules\mrcp-sofiasip\include";"$(ProjectRootDir)modules\mrcp-unirtsp\include""\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="4"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpserver.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories=""$(ProjectRootDir)modules\mrcp-sofiasip\include";"$(ProjectRootDir)modules\mrcp-unirtsp\include""\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLibrarianTool"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath="..\..\build\uni_revision.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath="..\..\build\uni_version.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\unimrcp_server.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\src\unimrcp_server.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C98AF157-352E-4737-BD30-A24E2647F5AE}</ProjectGuid>
+ <RootNamespace>libunimrcpserver</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpserver.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpserver.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpserver.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unilib-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpserver.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)modules\mrcp-sofiasip\include;$(ProjectRootDir)modules\mrcp-unirtsp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)modules\mrcp-sofiasip\include;$(ProjectRootDir)modules\mrcp-unirtsp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)modules\mrcp-sofiasip\include;$(ProjectRootDir)modules\mrcp-unirtsp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectRootDir)modules\mrcp-sofiasip\include;$(ProjectRootDir)modules\mrcp-unirtsp\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\build\uni_revision.h" />
+ <ClInclude Include="..\..\build\uni_version.h" />
+ <ClInclude Include="include\unimrcp_server.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\unimrcp_server.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\libs\mrcp-server\mrcpserver.vcxproj">
+ <Project>{18b1f35a-10f8-4287-9b37-2d10501b0b38}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\modules\mrcp-sofiasip\mrcpsofiasip.vcxproj">
+ <Project>{746f3632-5bb2-4570-9453-31d6d58a7d8e}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\modules\mrcp-unirtsp\mrcpunirtsp.vcxproj">
+ <Project>{deb01acb-d65f-4a62-aed9-58c1054499e9}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{c164436d-b3de-474f-99bc-6b2ca1a4c879}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\build\uni_revision.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\build\uni_version.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\unimrcp_server.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\unimrcp_server.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: unimrcp_server.c 1711 2010-05-25 17:54:02Z achaloyan $
+ * $Id: unimrcp_server.c 2231 2014-11-12 01:32:03Z achaloyan@gmail.com $
*/
#include <stdlib.h>
#include <apr_xml.h>
#include <apr_version.h>
#include "uni_version.h"
+#include "uni_revision.h"
#include "unimrcp_server.h"
#include "mrcp_resource_loader.h"
#include "mpf_engine.h"
#include "apt_log.h"
#define CONF_FILE_NAME "unimrcpserver.xml"
-#define DEFAULT_PLUGIN_DIR_PATH "../plugin"
#ifdef WIN32
#define DEFAULT_PLUGIN_EXT "dll"
#else
return NULL;
}
- apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"UniMRCP Server ["UNI_VERSION_STRING"]");
+ apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"UniMRCP Server ["UNI_VERSION_STRING"] [r"UNI_REVISION_STRING"]");
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"APR ["APR_VERSION_STRING"]");
server = mrcp_server_create(dir_layout);
if(!server) {
/** Check whether specified attribute is valid */
static APR_INLINE apt_bool_t is_attr_valid(const apr_xml_attr *attr)
{
- return (attr && attr->value && attr->value != '\0');
+ return (attr && attr->value && *attr->value != '\0');
}
/** Check whether specified attribute is enabled (true) */
*enable = attr;
}
}
-
+
if(is_attr_valid(*id) == FALSE) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Missing Required Attribute <id> in Element <%s>",elem->name);
return FALSE;
}
return apr_pstrdup(loader->pool,loader->auto_ip);
}
+ else if(attr && strcasecmp(attr->value,"iface") == 0) {
+ /* get ip address by network interface name */
+ char *ip_addr = DEFAULT_IP_ADDRESS;
+ if(is_cdata_valid(elem) == TRUE) {
+ const char *iface_name = cdata_text_get(elem);
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Get IP Address by Interface [%s]", iface_name);
+ apt_ip_get_by_iface(iface_name,&ip_addr,loader->pool);
+ }
+ return ip_addr;
+ }
if(is_cdata_valid(elem)) {
/* use provided ip address */
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
}
-
+
resource_factory = mrcp_resource_factory_get(resource_loader);
return mrcp_server_resource_factory_register(loader->server,resource_factory);
}
}
else if(strcasecmp(elem->name,"ua-name") == 0) {
if(is_cdata_valid(elem) == TRUE) {
- config->user_agent_name = cdata_copy(elem,loader->pool);
+ const apr_xml_attr *attr = NULL;
+ for(attr = elem->attr; attr; attr = attr->next) {
+ if(strcasecmp(attr->name,"appendversion") == 0) {
+ break;
+ }
+ }
+ if(is_attr_enabled(attr)) {
+ config->user_agent_name = apr_psprintf(loader->pool,"%s "UNI_VERSION_STRING,cdata_text_get(elem));
+ }
+ else {
+ config->user_agent_name = cdata_copy(elem,loader->pool);
+ }
}
}
else if(strcasecmp(elem->name,"sdp-origin") == 0) {
config->sip_t1x64 = atol(cdata_text_get(elem));
}
}
+ else if(strcasecmp(elem->name,"sip-message-output") == 0) {
+ if(is_cdata_valid(elem) == TRUE) {
+ config->tport_log = cdata_bool_get(elem);
+ }
+ }
+ else if(strcasecmp(elem->name,"sip-message-dump") == 0) {
+ if(is_cdata_valid(elem) == TRUE) {
+ const char *root_path;
+ const char *path = cdata_text_get(elem);
+ if(loader->dir_layout && apr_filepath_root(&root_path,&path,0,loader->pool) == APR_ERELATIVE)
+ config->tport_dump_file = apt_dir_layout_path_compose(
+ loader->dir_layout,
+ APT_LAYOUT_LOG_DIR,
+ path,
+ loader->pool);
+ else
+ config->tport_dump_file = cdata_copy(elem,loader->pool);
+ }
+ }
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
- }
-
+ }
+
if(rtp_ip) {
apt_string_set(&rtp_config->ip,rtp_ip);
}
{
mrcp_engine_t *engine;
mrcp_engine_config_t *config;
+ char *plugin_file_name;
+ char *plugin_path;
const char *plugin_id = NULL;
const char *plugin_name = NULL;
const char *plugin_ext = NULL;
- const char *plugin_path = NULL;
apt_bool_t plugin_enabled = TRUE;
const apr_xml_attr *attr;
for(attr = root->attr; attr; attr = attr->next) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Missing plugin id or name");
return FALSE;
}
-
+
if(!plugin_enabled) {
/* disabled plugin, just skip it */
return TRUE;
plugin_ext = DEFAULT_PLUGIN_EXT;
}
- if(*loader->dir_layout->plugin_dir_path == '\0') {
- plugin_path = apr_psprintf(loader->pool,"%s.%s",
- plugin_name,plugin_ext);
- }
- else {
- plugin_path = apr_psprintf(loader->pool,"%s/%s.%s",
- loader->dir_layout->plugin_dir_path,plugin_name,plugin_ext);
+ plugin_file_name = apr_psprintf(loader->pool,"%s.%s",plugin_name,plugin_ext);
+ plugin_path = apt_dir_layout_path_compose(loader->dir_layout,APT_LAYOUT_PLUGIN_DIR,plugin_file_name,loader->pool);
+ if(!plugin_path) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to compose plugin path %s",plugin_file_name);
+ return FALSE;
}
config = mrcp_engine_config_alloc(loader->pool);
{
const apr_xml_elem *elem;
- if(!loader->dir_layout->plugin_dir_path) {
- loader->dir_layout->plugin_dir_path = DEFAULT_PLUGIN_DIR_PATH;
- }
-
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Loading Plugin Factory");
for(elem = root->first_child; elem; elem = elem->next) {
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Loading Element <%s>",elem->name);
jb->max_playout_delay = atol(cdata_text_get(elem));
}
}
+ else if(strcasecmp(elem->name,"adaptive") == 0) {
+ if(is_cdata_valid(elem) == TRUE) {
+ jb->adaptive = (apr_byte_t) atol(cdata_text_get(elem));
+ }
+ }
+ else if(strcasecmp(elem->name,"time-skew-detection") == 0) {
+ if(is_cdata_valid(elem) == TRUE) {
+ jb->time_skew_detection = (apr_byte_t) atol(cdata_text_get(elem));
+ }
+ }
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
- }
+ }
return mrcp_server_rtp_settings_register(loader->server,rtp_settings,id);
}
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create MRCPv2 Profile [%s]",id);
profile = mrcp_server_profile_create(
id,
+ MRCP_VERSION_2,
NULL,
sip_agent,
mrcpv2_agent,
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create MRCPv1 Profile [%s]",id);
profile = mrcp_server_profile_create(
id,
+ MRCP_VERSION_1,
NULL,
rtsp_agent,
NULL,
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
- }
+ }
return TRUE;
}
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
- }
+ }
+ return TRUE;
+}
+
+/** Load misc parameters */
+static apt_bool_t unimrcp_server_misc_load(unimrcp_server_loader_t *loader, const apr_xml_elem *root)
+{
+ const apr_xml_elem *elem;
+ apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Loading Misc Parameters");
+ for(elem = root->first_child; elem; elem = elem->next) {
+ if(strcasecmp(elem->name,"sofiasip-logger") == 0) {
+ char *logger_list_str;
+ char *logger_name;
+ char *state;
+ apr_xml_attr *attr;
+ apt_bool_t redirect = FALSE;
+ const char *loglevel_str = NULL;
+ for(attr = elem->attr; attr; attr = attr->next) {
+ if(strcasecmp(attr->name,"redirect") == 0) {
+ if(attr->value && strcasecmp(attr->value,"true") == 0)
+ redirect = TRUE;
+ }
+ else if(strcasecmp(attr->name,"loglevel") == 0) {
+ loglevel_str = attr->value;
+ }
+ }
+
+ logger_list_str = apr_pstrdup(loader->pool,cdata_text_get(elem));
+ do {
+ logger_name = apr_strtok(logger_list_str, ",", &state);
+ if(logger_name) {
+ mrcp_sofiasip_server_logger_init(logger_name,loglevel_str,redirect);
+ }
+ logger_list_str = NULL; /* make sure we pass NULL on subsequent calls of apr_strtok() */
+ }
+ while(logger_name);
+ }
+ else {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
+ }
+ }
return TRUE;
}
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Parse Config File [%s]",file_path);
xml_doc = NULL;
}
-
+
apr_file_close(fd);
return xml_doc;
}
/* Match document name */
if(!root || strcasecmp(root->name,"unimrcpserver") != 0) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Document <%s>",root->name);
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Document <%s>",root ? root->name : "null");
return FALSE;
}
else if(strcasecmp(elem->name,"profiles") == 0) {
unimrcp_server_profiles_load(loader,elem);
}
+ else if(strcasecmp(elem->name,"misc") == 0) {
+ unimrcp_server_misc_load(loader,elem);
+ }
else {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
}
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = -Iinclude \
- -I$(unimrcp_srcdir)/platforms/umc/include \
- -I$(top_srcdir)/platforms/libunimrcp-client/include \
- -I$(top_srcdir)/libs/mrcp-client/include \
- -I$(top_srcdir)/libs/mrcp-signaling/include \
- -I$(top_srcdir)/libs/mrcpv2-transport/include \
- -I$(top_srcdir)/libs/mrcp/include \
- -I$(top_srcdir)/libs/mrcp/message/include \
- -I$(top_srcdir)/libs/mrcp/control/include \
- -I$(top_srcdir)/libs/mrcp/resources/include \
- -I$(top_srcdir)/libs/mpf/include \
- -I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir)/platforms/umc/include \
+ $(UNIMRCP_CLIENTAPP_INCLUDES)
bin_PROGRAMS = umc
+
umc_SOURCES = src/main.cpp \
src/umcconsole.cpp \
src/umcframework.cpp \
src/setparamsession.cpp \
src/verifierscenario.cpp \
src/verifiersession.cpp
-
-umc_LDADD = $(top_builddir)/platforms/libunimrcp-client/libunimrcpclient.la
+umc_LDADD = $(UNIMRCP_CLIENTAPP_LIBS)
+umc_LDFLAGS = $(UNIMRCP_CLIENTAPP_OPTS)
-if ISMAC
-umc_LDFLAGS = -framework CoreFoundation -framework SystemConfiguration
-endif
+include $(top_srcdir)/build/rules/uniclientapp.am
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: dtmfscenario.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: dtmfscenario.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef DTMF_SCENARIO_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: dtmfsession.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: dtmfsession.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef DTMF_SESSION_H
mrcp_message_t* CreateRecognizeRequest(mrcp_channel_t* pMrcpChannel);
- bool ParseNLSMLResult(mrcp_message_t* pMrcpMessage) const;
+ static bool ParseNLSMLResult(mrcp_message_t* pMrcpMessage);
/* ============================ HANDLERS =================================== */
virtual bool OnSessionTerminate(mrcp_sig_status_code_e status);
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: recogscenario.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: recogscenario.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef RECOG_SCENARIO_H
/* ============================ ACCESSORS ================================== */
const char* GetContentType() const;
const char* GetContent() const;
+ apr_size_t GetContentLength() const;
const char* GetAudioSource() const;
/* ============================ INQUIRIES ================================== */
bool m_Recognize;
const char* m_ContentType;
const char* m_Content;
+ apr_size_t m_ContentLength;
const char* m_AudioSource;
};
return m_Content;
}
+inline apr_size_t RecogScenario::GetContentLength() const
+{
+ return m_ContentLength;
+}
+
inline const char* RecogScenario::GetAudioSource() const
{
return m_AudioSource;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: recogsession.h 1587 2010-03-12 19:40:02Z achaloyan $
+ * $Id: recogsession.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef RECOG_SESSION_H
mrcp_message_t* CreateDefineGrammarRequest(mrcp_channel_t* pMrcpChannel);
mrcp_message_t* CreateRecognizeRequest(mrcp_channel_t* pMrcpChannel);
- bool ParseNLSMLResult(mrcp_message_t* pMrcpMessage) const;
+ static bool ParseNLSMLResult(mrcp_message_t* pMrcpMessage);
FILE* GetAudioIn(const mpf_codec_descriptor_t* pDescriptor, apr_pool_t* pool) const;
/* ============================ HANDLERS =================================== */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: recorderscenario.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: recorderscenario.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef RECORDER_SCENARIO_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: recordersession.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: recordersession.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef RECORDER_SESSION_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: setparamscenario.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: setparamscenario.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef SETPARAM_SCENARIO_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: setparamsession.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: setparamsession.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef SETPARAM_SESSION_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: synthscenario.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: synthscenario.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef SYNTH_SCENARIO_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: synthsession.h 1586 2010-03-12 19:39:02Z achaloyan $
+ * $Id: synthsession.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef SYNTH_SESSION_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: umcconsole.h 1525 2010-02-16 14:58:56Z achaloyan $
+ * $Id: umcconsole.h 2197 2014-10-16 01:34:19Z achaloyan@gmail.com $
*/
#ifndef UMC_CONSOLE_H
bool LoadOptions(int argc, const char * const *argv, apr_pool_t *pool);
bool RunCmdLine();
bool ProcessCmdLine(char* pCmdLine);
- void Usage() const;
+ static void Usage();
private:
/* ============================ DATA ======================================= */
struct UmcOptions
{
const char* m_RootDirPath;
+ const char* m_DirLayoutConf;
const char* m_LogPriority;
const char* m_LogOutput;
+
+ UmcOptions() :
+ m_RootDirPath(NULL), m_DirLayoutConf(NULL),
+ m_LogPriority(NULL), m_LogOutput(NULL) {}
};
- UmcOptions m_Options;
- UmcFramework* m_pFramework;
+ UmcOptions m_Options;
+ UmcFramework* m_pFramework;
};
#endif /* UMC_CONSOLE_H */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: umcframework.h 1585 2010-03-12 19:12:05Z achaloyan $
+ * $Id: umcframework.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef UMC_FRAMEWORK_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: umcscenario.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: umcscenario.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef UMC_SCENARIO_H
bool LoadCapabilities(const apr_xml_elem* pElem, apr_pool_t* pool);
bool LoadRtpTermination(const apr_xml_elem* pElem, apr_pool_t* pool);
+ const char* LoadFileContent(const char* pFileName, apr_size_t& size, apr_pool_t* pool) const;
const char* LoadFileContent(const char* pFileName, apr_pool_t* pool) const;
- int ParseRates(const char* pStr, apr_pool_t* pool) const;
+ static int ParseRates(const char* pStr, apr_pool_t* pool);
/* ============================ INQUIRIES ================================== */
- bool IsElementEnabled(const apr_xml_elem* pElem) const;
+ static bool IsElementEnabled(const apr_xml_elem* pElem);
/* ============================ DATA ======================================= */
const char* m_pName;
}
+inline const char* UmcScenario::LoadFileContent(const char* pFileName, apr_pool_t* pool) const
+{
+ apr_size_t dummy;
+ return LoadFileContent(pFileName, dummy, pool);
+}
+
#endif /* UMC_SCENARIO_H */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: umcsession.h 1585 2010-03-12 19:12:05Z achaloyan $
+ * $Id: umcsession.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef UMC_SESSION_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: verifierscenario.h 1775 2010-08-26 18:23:38Z achaloyan $
+ * $Id: verifierscenario.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef VERIFIER_SCENARIO_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: verifiersession.h 1776 2010-08-27 16:36:38Z achaloyan $
+ * $Id: verifiersession.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef VERIFIER_SESSION_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: dtmfscenario.cpp 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: dtmfscenario.cpp 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <stdlib.h>
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: dtmfsession.cpp 1780 2010-09-01 05:59:32Z achaloyan $
+ * $Id: dtmfsession.cpp 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "dtmfsession.h"
ReadStream,
NULL,
NULL,
+ NULL,
NULL
};
return pMrcpMessage;
}
-bool DtmfSession::ParseNLSMLResult(mrcp_message_t* pMrcpMessage) const
+bool DtmfSession::ParseNLSMLResult(mrcp_message_t* pMrcpMessage)
{
- apr_xml_elem* pInterpret;
- apr_xml_elem* pInstance;
- apr_xml_elem* pInput;
- apr_xml_doc* pDoc = nlsml_doc_load(&pMrcpMessage->body,pMrcpMessage->pool);
- if(!pDoc)
+ nlsml_result_t *pResult = nlsml_result_parse(pMrcpMessage->body.buf, pMrcpMessage->body.length, pMrcpMessage->pool);
+ if(!pResult)
return false;
-
- /* walk through interpreted results */
- pInterpret = nlsml_first_interpret_get(pDoc);
- for(; pInterpret; pInterpret = nlsml_next_interpret_get(pInterpret))
- {
- /* get instance and input */
- nlsml_interpret_results_get(pInterpret,&pInstance,&pInput);
- if(pInstance)
- {
- /* process instance */
- if(pInstance->first_cdata.first)
- {
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Interpreted Instance [%s]",pInstance->first_cdata.first->text);
- }
- }
- if(pInput)
- {
- /* process input */
- if(pInput->first_cdata.first)
- {
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Interpreted Input [%s]",pInput->first_cdata.first->text);
- }
- }
- }
+
+ nlsml_result_trace(pResult, pMrcpMessage->pool);
return true;
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: main.cpp 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: main.cpp 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "umcconsole.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: recogscenario.cpp 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: recogscenario.cpp 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <stdlib.h>
m_Recognize(true),
m_ContentType("application/srgs+xml"),
m_Content(NULL),
+ m_ContentLength(0),
m_AudioSource(NULL)
{
}
}
else if(strcasecmp(pAttr->name,"content-location") == 0)
{
- m_Content = LoadFileContent(pAttr->value,pool);
+ m_Content = LoadFileContent(pAttr->value,m_ContentLength,pool);
}
}
return true;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: recogsession.cpp 1587 2010-03-12 19:40:02Z achaloyan $
+ * $Id: recogsession.cpp 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "recogsession.h"
ReadStream,
NULL,
NULL,
+ NULL,
NULL
};
bool RecogSession::StartRecognition(mrcp_channel_t* pMrcpChannel)
{
+ const mpf_codec_descriptor_t* pDescriptor = mrcp_application_source_descriptor_get(pMrcpChannel);
+ if(!pDescriptor)
+ {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Media Source Descriptor");
+ return Terminate();
+ }
+
RecogChannel* pRecogChannel = (RecogChannel*) mrcp_application_channel_object_get(pMrcpChannel);
/* create and send RECOGNIZE request */
mrcp_message_t* pMrcpMessage = CreateRecognizeRequest(pMrcpChannel);
SendMrcpRequest(pRecogChannel->m_pMrcpChannel,pMrcpMessage);
}
- const mpf_codec_descriptor_t* pDescriptor = mrcp_application_source_descriptor_get(pMrcpChannel);
pRecogChannel->m_pAudioIn = GetAudioIn(pDescriptor,GetSessionPool());
if(!pRecogChannel->m_pAudioIn)
{
/* set message body */
if(pScenario->GetContent())
- apt_string_assign(&pMrcpMessage->body,pScenario->GetContent(),pMrcpMessage->pool);
+ apt_string_assign_n(&pMrcpMessage->body,pScenario->GetContent(),pScenario->GetContentLength(),pMrcpMessage->pool);
return pMrcpMessage;
}
mrcp_resource_header_property_add(pMrcpMessage,RECOGNIZER_HEADER_START_INPUT_TIMERS);
pRecogHeader->confidence_threshold = 0.87f;
mrcp_resource_header_property_add(pMrcpMessage,RECOGNIZER_HEADER_CONFIDENCE_THRESHOLD);
+ pRecogHeader->save_waveform = TRUE;
+ mrcp_resource_header_property_add(pMrcpMessage,RECOGNIZER_HEADER_SAVE_WAVEFORM);
}
return pMrcpMessage;
}
-bool RecogSession::ParseNLSMLResult(mrcp_message_t* pMrcpMessage) const
+bool RecogSession::ParseNLSMLResult(mrcp_message_t* pMrcpMessage)
{
- apr_xml_elem* pInterpret;
- apr_xml_elem* pInstance;
- apr_xml_elem* pInput;
- apr_xml_doc* pDoc = nlsml_doc_load(&pMrcpMessage->body,pMrcpMessage->pool);
- if(!pDoc)
+ nlsml_result_t *pResult = nlsml_result_parse(pMrcpMessage->body.buf, pMrcpMessage->body.length, pMrcpMessage->pool);
+ if(!pResult)
return false;
-
- /* walk through interpreted results */
- pInterpret = nlsml_first_interpret_get(pDoc);
- for(; pInterpret; pInterpret = nlsml_next_interpret_get(pInterpret))
- {
- /* get instance and input */
- nlsml_interpret_results_get(pInterpret,&pInstance,&pInput);
- if(pInstance)
- {
- /* process instance */
- if(pInstance->first_cdata.first)
- {
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Interpreted Instance [%s]",pInstance->first_cdata.first->text);
- }
- }
- if(pInput)
- {
- /* process input */
- if(pInput->first_cdata.first)
- {
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Interpreted Input [%s]",pInput->first_cdata.first->text);
- }
- }
- }
+
+ nlsml_result_trace(pResult, pMrcpMessage->pool);
return true;
}
const char* pFileName = GetScenario()->GetAudioSource();
if(!pFileName)
{
- pFileName = apr_psprintf(pool,"one-%dkHz.pcm",
- pDescriptor ? pDescriptor->sampling_rate/1000 : 8);
+ pFileName = apr_psprintf(pool,"one-%dkHz.pcm",pDescriptor->sampling_rate/1000);
}
apt_dir_layout_t* pDirLayout = GetScenario()->GetDirLayout();
const char* pFilePath = apt_datadir_filepath_get(pDirLayout,pFileName,pool);
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: recorderscenario.cpp 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: recorderscenario.cpp 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <stdlib.h>
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: recordersession.cpp 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: recordersession.cpp 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "recordersession.h"
ReadStream,
NULL,
NULL,
+ NULL,
NULL
};
bool RecorderSession::StartRecorder(mrcp_channel_t* pMrcpChannel)
{
+ const mpf_codec_descriptor_t* pDescriptor = mrcp_application_source_descriptor_get(pMrcpChannel);
+ if(!pDescriptor)
+ {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Media Source Descriptor");
+ return Terminate();
+ }
+
RecorderChannel* pRecorderChannel = (RecorderChannel*) mrcp_application_channel_object_get(pMrcpChannel);
/* create and send RECORD request */
mrcp_message_t* pMrcpMessage = CreateRecordRequest(pMrcpChannel);
SendMrcpRequest(pRecorderChannel->m_pMrcpChannel,pMrcpMessage);
}
- const mpf_codec_descriptor_t* pDescriptor = mrcp_application_source_descriptor_get(pMrcpChannel);
pRecorderChannel->m_pAudioIn = GetAudioIn(pDescriptor,GetSessionPool());
return true;
}
const char* pFileName = GetScenario()->GetAudioSource();
if(!pFileName)
{
- pFileName = apr_psprintf(pool,"demo-%dkHz.pcm",
- pDescriptor ? pDescriptor->sampling_rate/1000 : 8);
+ pFileName = apr_psprintf(pool,"demo-%dkHz.pcm",pDescriptor->sampling_rate/1000);
}
apt_dir_layout_t* pDirLayout = GetScenario()->GetDirLayout();
const char* pFilePath = apt_datadir_filepath_get(pDirLayout,pFileName,pool);
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: setparamscenario.cpp 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: setparamscenario.cpp 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "setparamscenario.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: setparamsession.cpp 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: setparamsession.cpp 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "setparamsession.h"
ReadStream,
NULL,
NULL,
+ NULL,
NULL
};
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: synthscenario.cpp 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: synthscenario.cpp 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <stdlib.h>
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: synthsession.cpp 1586 2010-03-12 19:39:02Z achaloyan $
+ * $Id: synthsession.cpp 2193 2014-10-08 03:44:33Z achaloyan@gmail.com $
*/
#include "synthsession.h"
#include "mrcp_generic_header.h"
#include "mrcp_synth_header.h"
#include "mrcp_synth_resource.h"
+#include "apt_log.h"
struct SynthChannel
{
NULL,
NULL,
NULL,
- WriteStream
+ WriteStream,
+ NULL
};
pTermination = CreateAudioTermination(
if(!UmcSession::OnChannelAdd(pMrcpChannel,status))
return false;
+ const mpf_codec_descriptor_t* pDescriptor = mrcp_application_sink_descriptor_get(pMrcpChannel);
+ if(!pDescriptor)
+ {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Media Sink Descriptor");
+ return Terminate();
+ }
+
SynthChannel* pSynthChannel = (SynthChannel*) mrcp_application_channel_object_get(pMrcpChannel);
if(status != MRCP_SIG_STATUS_CODE_SUCCESS)
{
SendMrcpRequest(pSynthChannel->m_pMrcpChannel,pMrcpMessage);
}
- const mpf_codec_descriptor_t* pDescriptor = mrcp_application_sink_descriptor_get(pMrcpChannel);
pSynthChannel->m_pAudioOut = GetAudioOut(pDescriptor,GetSessionPool());
return true;
}
FILE* SynthSession::GetAudioOut(const mpf_codec_descriptor_t* pDescriptor, apr_pool_t* pool) const
{
- char* pFileName = apr_psprintf(pool,"synth-%dkHz-%s.pcm",
- pDescriptor ? pDescriptor->sampling_rate/1000 : 8, GetMrcpSessionId());
+ FILE* file;
+ char* pFileName = apr_psprintf(pool,"synth-%dkHz-%s.pcm",pDescriptor->sampling_rate/1000, GetMrcpSessionId());
apt_dir_layout_t* pDirLayout = GetScenario()->GetDirLayout();
- char* pFilePath = apt_datadir_filepath_get(pDirLayout,pFileName,pool);
- if(!pFilePath)
+ char* pFilePath = apt_vardir_filepath_get(pDirLayout,pFileName,pool);
+ if(!pFilePath)
return NULL;
- return fopen(pFilePath,"wb");
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Open Speech Output File [%s] for Writing",pFilePath);
+ file = fopen(pFilePath,"wb");
+ if(!file)
+ {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Open Speech Output File [%s] for Writing",pFilePath);
+ return NULL;
+ }
+ return file;
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: umcconsole.cpp 1785 2010-09-22 06:14:29Z achaloyan $
+ * $Id: umcconsole.cpp 2204 2014-10-31 01:01:42Z achaloyan@gmail.com $
*/
#include <stdio.h>
#include "umcconsole.h"
#include "umcframework.h"
#include "apt_pool.h"
+#include "uni_version.h"
UmcConsole::UmcConsole() :
return false;
}
- /* create the structure of default directories layout */
- pDirLayout = apt_default_dir_layout_create(m_Options.m_RootDirPath,pool);
+ if(m_Options.m_DirLayoutConf)
+ {
+ /* create and load directories layout from the configuration file */
+ pDirLayout = apt_dir_layout_create(pool);
+ if(pDirLayout)
+ apt_dir_layout_load(pDirLayout,m_Options.m_DirLayoutConf,pool);
+ }
+ else
+ {
+ /* create default directories layout */
+ pDirLayout = apt_default_dir_layout_create(m_Options.m_RootDirPath,pool);
+ }
+
+ if(!pDirLayout)
+ {
+ printf("Failed to Create Directories Layout\n");
+ apr_pool_destroy(pool);
+ apr_terminate();
+ return false;
+ }
/* get path to logger configuration file */
logConfPath = apt_confdir_filepath_get(pDirLayout,"logger.xml",pool);
if(apt_log_output_mode_check(APT_LOG_OUTPUT_FILE) == TRUE)
{
/* open the log file */
- apt_log_file_open(pDirLayout->log_dir_path,"unimrcpclient",MAX_LOG_FILE_SIZE,MAX_LOG_FILE_COUNT,FALSE,pool);
+ const char *logDirPath = apt_dir_layout_path_get(pDirLayout,APT_LAYOUT_LOG_DIR);
+ apt_log_file_open(logDirPath,"unimrcpclient",MAX_LOG_FILE_SIZE,MAX_LOG_FILE_COUNT,FALSE,pool);
}
/* create demo framework */
{
apt_bool_t running = true;
char cmdline[1024];
- int i;
+ apr_size_t i;
do
{
printf(">");
return true;
}
-void UmcConsole::Usage() const
+void UmcConsole::Usage()
{
printf(
+ "\n"
+ " * "UNI_COPYRIGHT"\n"
+ " *\n"
+ UNI_LICENSE"\n"
"\n"
"Usage:\n"
"\n"
"\n"
" Available options:\n"
"\n"
- " -r [--root-dir] path : Set the project root directory path.\n"
+ " -r [--root-dir] path : Set the path to the project root directory.\n"
+ "\n"
+ " -c [--dir-layout] path : Set the path to the dir layout config file.\n"
+ " (takes the precedence over --root-dir option)\n"
"\n"
" -l [--log-prio] priority : Set the log priority.\n"
" (0-emergency, ..., 7-debug)\n"
" -o [--log-output] mode : Set the log output mode.\n"
" (0-none, 1-console only, 2-file only, 3-both)\n"
"\n"
+ " -v [--version] : Show the version.\n"
+ "\n"
" -h [--help] : Show the help.\n"
"\n");
}
const apr_getopt_option_t opt_option[] =
{
/* long-option, short-option, has-arg flag, description */
- { "root-dir", 'r', TRUE, "path to root dir" }, /* -r arg or --root-dir arg */
- { "log-prio", 'l', TRUE, "log priority" }, /* -l arg or --log-prio arg */
- { "log-output", 'o', TRUE, "log output mode" }, /* -o arg or --log-output arg */
- { "help", 'h', FALSE, "show help" }, /* -h or --help */
- { NULL, 0, 0, NULL }, /* end */
+ { "root-dir", 'r', TRUE, "path to root dir" }, /* -r arg or --root-dir arg */
+ { "dir-layout", 'c', TRUE, "path to dir layout conf" }, /* -c arg or --dir-layout arg */
+ { "log-prio", 'l', TRUE, "log priority" }, /* -l arg or --log-prio arg */
+ { "log-output", 'o', TRUE, "log output mode" }, /* -o arg or --log-output arg */
+ { "version", 'v', FALSE, "show version" }, /* -v or --version */
+ { "help", 'h', FALSE, "show help" }, /* -h or --help */
+ { NULL, 0, 0, NULL }, /* end */
};
- /* set the default options */
- m_Options.m_RootDirPath = "../";
- m_Options.m_LogPriority = NULL;
- m_Options.m_LogOutput = NULL;
-
rv = apr_getopt_init(&opt, pool , argc, argv);
if(rv != APR_SUCCESS)
return false;
case 'r':
m_Options.m_RootDirPath = optarg;
break;
+ case 'c':
+ m_Options.m_DirLayoutConf = optarg;
+ break;
case 'l':
if(optarg)
m_Options.m_LogPriority = optarg;
if(optarg)
m_Options.m_LogOutput = optarg;
break;
+ case 'v':
+ printf(UNI_VERSION_STRING);
+ return FALSE;
case 'h':
Usage();
return FALSE;
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: umcframework.cpp 1767 2010-08-23 19:10:22Z achaloyan $
+ * $Id: umcframework.cpp 2204 2014-10-31 01:01:42Z achaloyan@gmail.com $
*/
#include "umcframework.h"
apr_status_t rv;
const char* pFilePath;
- pFilePath = apr_psprintf(m_pPool,"%s/%s",m_pDirLayout->conf_dir_path,"umcscenarios.xml");
+ pFilePath = apt_dir_layout_path_compose(m_pDirLayout,APT_LAYOUT_CONF_DIR,"umcscenarios.xml",m_pPool);
+ if(!pFilePath)
+ {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Compose Config File Path");
+ return NULL;
+ }
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Open Config File [%s]",pFilePath);
rv = apr_file_open(&pFD,pFilePath,APR_READ|APR_BINARY,0,m_pPool);
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: umcscenario.cpp 1571 2010-03-07 20:33:39Z achaloyan $
+ * $Id: umcscenario.cpp 2232 2014-11-12 01:33:37Z achaloyan@gmail.com $
*/
#include <stdlib.h>
/* Load Child Elements */
for(pChildElem = pElem->first_child; pChildElem; pChildElem = pChildElem->next)
{
- LoadElement(pChildElem,pool);
+ if(!LoadElement(pChildElem,pool))
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Load Child Element %s",pChildElem->name);
}
return true;
}
{
const apr_xml_elem* pChildElem;
/* Load Child Elements */
- m_pCapabilities = (mpf_codec_capabilities_t*) apr_palloc(pool,sizeof(mpf_codec_capabilities_t*));
+ m_pCapabilities = (mpf_codec_capabilities_t*) apr_palloc(pool,sizeof(mpf_codec_capabilities_t));
mpf_codec_capabilities_init(m_pCapabilities,1,pool);
for(pChildElem = pElem->first_child; pChildElem; pChildElem = pChildElem->next)
{
return true;
}
-int UmcScenario::ParseRates(const char* pStr, apr_pool_t* pool) const
+int UmcScenario::ParseRates(const char* pStr, apr_pool_t* pool)
{
int rates = 0;
if(pStr)
return true;
}
-bool UmcScenario::IsElementEnabled(const apr_xml_elem* pElem) const
+bool UmcScenario::IsElementEnabled(const apr_xml_elem* pElem)
{
const apr_xml_attr* pAttr;
for(pAttr = pElem->attr; pAttr; pAttr = pAttr->next)
return true;
}
-const char* UmcScenario::LoadFileContent(const char* pFileName, apr_pool_t* pool) const
+const char* UmcScenario::LoadFileContent(const char* pFileName, apr_size_t& size, apr_pool_t* pool) const
{
if(!m_pDirLayout || !pFileName)
return NULL;
return NULL;
}
- apr_size_t size = (apr_size_t)finfo.size;
+ size = (apr_size_t)finfo.size;
char* pContent = (char*) apr_palloc(pool,size+1);
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Load File Content size [%"APR_SIZE_T_FMT" bytes] %s",size,pFilePath);
if(apr_file_read(pFile,pContent,&size) != APR_SUCCESS)
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: umcsession.cpp 1695 2010-05-19 18:56:15Z achaloyan $
+ * $Id: umcsession.cpp 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "umcsession.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: verifierscenario.cpp 1775 2010-08-26 18:23:38Z achaloyan $
+ * $Id: verifierscenario.cpp 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <stdlib.h>
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: verifiersession.cpp 1778 2010-08-27 17:34:52Z achaloyan $
+ * $Id: verifiersession.cpp 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "verifiersession.h"
ReadStream,
NULL,
NULL,
+ NULL,
NULL
};
/* create and send END-SESSION request */
mrcp_message_t* pMrcpMessage = CreateEndSessionRequest(pMrcpChannel);
- if(pMrcpMessage)
+ if(pVerifierChannel && pMrcpMessage)
{
SendMrcpRequest(pVerifierChannel->m_pMrcpChannel,pMrcpMessage);
}
bool VerifierSession::StartVerification(mrcp_channel_t* pMrcpChannel)
{
+ const mpf_codec_descriptor_t* pDescriptor = mrcp_application_source_descriptor_get(pMrcpChannel);
+ if(!pDescriptor)
+ {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Media Source Descriptor");
+ return Terminate();
+ }
+
VerifierChannel* pVerifierChannel = (VerifierChannel*) mrcp_application_channel_object_get(pMrcpChannel);
/* create and send Verification request */
mrcp_message_t* pMrcpMessage = CreateStartSessionRequest(pMrcpChannel);
SendMrcpRequest(pVerifierChannel->m_pMrcpChannel,pMrcpMessage);
}
- const mpf_codec_descriptor_t* pDescriptor = mrcp_application_source_descriptor_get(pMrcpChannel);
pVerifierChannel->m_pAudioIn = GetAudioIn(pDescriptor,GetSessionPool());
if(!pVerifierChannel->m_pAudioIn)
{
const char* pFileName = apr_psprintf(pool,"%s-%dkHz.pcm",
pVoiceprintIdentifier,
- pDescriptor ? pDescriptor->sampling_rate/1000 : 8);
+ pDescriptor->sampling_rate/1000);
apt_dir_layout_t* pDirLayout = pScenario->GetDirLayout();
const char* pFilePath = apt_datadir_filepath_get(pDirLayout,pFileName,pool);
if(!pFilePath)
-#include "uni_version.h"\r
-\r
-1 VERSIONINFO\r
- FILEVERSION UNI_VERSION_STRING_CSV,0\r
- PRODUCTVERSION UNI_VERSION_STRING_CSV,0\r
- FILEFLAGSMASK 0x3fL\r
-#if defined(_DEBUG)\r
- FILEFLAGS 0x01L\r
-#else\r
- FILEFLAGS 0x00L\r
-#endif\r
-#if defined(WINNT) || defined(WIN64)\r
- FILEOS 0x40004L\r
-#else\r
- FILEOS 0x4L\r
-#endif\r
- FILETYPE 0x2L\r
- FILESUBTYPE 0x0L\r
-BEGIN\r
- BLOCK "StringFileInfo"\r
- BEGIN\r
- BLOCK "040904b0"\r
- BEGIN\r
- VALUE "Comments", UNI_LICENSE "\0"\r
- VALUE "CompanyName", "UniMRCP\0"\r
- VALUE "FileDescription", "UniMRCP Client Application\0"\r
- VALUE "FileVersion", UNI_VERSION_STRING "\0"\r
- VALUE "InternalName", "umc" "\0"\r
- VALUE "LegalCopyright", UNI_COPYRIGHT "\0"\r
- VALUE "OriginalFilename", "umc.exe" "\0"\r
- VALUE "ProductName", "UniMRCP Project\0"\r
- VALUE "ProductVersion", UNI_VERSION_STRING "\0"\r
- END\r
- END\r
- BLOCK "VarFileInfo"\r
- BEGIN\r
- VALUE "Translation", 0x409, 1200\r
- END\r
-END\r
+#include "uni_version.h"
+
+1 VERSIONINFO
+ FILEVERSION UNI_VERSION_STRING_CSV,0
+ PRODUCTVERSION UNI_VERSION_STRING_CSV,0
+ FILEFLAGSMASK 0x3fL
+#if defined(_DEBUG)
+ FILEFLAGS 0x01L
+#else
+ FILEFLAGS 0x00L
+#endif
+#if defined(WINNT) || defined(WIN64)
+ FILEOS 0x40004L
+#else
+ FILEOS 0x4L
+#endif
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "Comments", UNI_LICENSE "\0"
+ VALUE "CompanyName", "UniMRCP\0"
+ VALUE "FileDescription", "UniMRCP Client Application\0"
+ VALUE "FileVersion", UNI_VERSION_STRING "\0"
+ VALUE "InternalName", "umc" "\0"
+ VALUE "LegalCopyright", UNI_COPYRIGHT "\0"
+ VALUE "OriginalFilename", "umc.exe" "\0"
+ VALUE "ProductName", "UniMRCP Project\0"
+ VALUE "ProductVersion", UNI_VERSION_STRING "\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{CD1C52C1-D8E1-4654-AE65-6CCAB38DE894}</ProjectGuid>
+ <RootNamespace>umc</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>$(UniMRCPClientLibs);%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>$(UniMRCPClientLibs);%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>$(UniMRCPClientLibs);%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>$(UniMRCPClientLibs);%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="src\dtmfscenario.cpp" />
+ <ClCompile Include="src\dtmfsession.cpp" />
+ <ClCompile Include="src\main.cpp" />
+ <ClCompile Include="src\recogscenario.cpp" />
+ <ClCompile Include="src\recogsession.cpp" />
+ <ClCompile Include="src\recorderscenario.cpp" />
+ <ClCompile Include="src\recordersession.cpp" />
+ <ClCompile Include="src\setparamscenario.cpp" />
+ <ClCompile Include="src\setparamsession.cpp" />
+ <ClCompile Include="src\synthscenario.cpp" />
+ <ClCompile Include="src\synthsession.cpp" />
+ <ClCompile Include="src\umcconsole.cpp" />
+ <ClCompile Include="src\umcframework.cpp" />
+ <ClCompile Include="src\umcscenario.cpp" />
+ <ClCompile Include="src\umcsession.cpp" />
+ <ClCompile Include="src\verifierscenario.cpp" />
+ <ClCompile Include="src\verifiersession.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="include\dtmfscenario.h" />
+ <ClInclude Include="include\dtmfsession.h" />
+ <ClInclude Include="include\recogscenario.h" />
+ <ClInclude Include="include\recogsession.h" />
+ <ClInclude Include="include\recorderscenario.h" />
+ <ClInclude Include="include\recordersession.h" />
+ <ClInclude Include="include\setparamscenario.h" />
+ <ClInclude Include="include\setparamsession.h" />
+ <ClInclude Include="include\synthscenario.h" />
+ <ClInclude Include="include\synthsession.h" />
+ <ClInclude Include="include\umcconsole.h" />
+ <ClInclude Include="include\umcframework.h" />
+ <ClInclude Include="include\umcscenario.h" />
+ <ClInclude Include="include\umcsession.h" />
+ <ClInclude Include="include\verifierscenario.h" />
+ <ClInclude Include="include\verifiersession.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="umc.rc">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\libunimrcp-client\libunimrcpclient.vcxproj">
+ <Project>{ee157390-1e85-416c-946e-620e32c9ad33}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="src">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\dtmfscenario.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\dtmfsession.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\main.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\recogscenario.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\recogsession.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\recorderscenario.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\recordersession.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\setparamscenario.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\setparamsession.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\synthscenario.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\synthsession.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\umcconsole.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\umcframework.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\umcscenario.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\umcsession.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\verifierscenario.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\verifiersession.cpp">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="include\dtmfscenario.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\dtmfsession.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\recogscenario.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\recogsession.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\recorderscenario.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\recordersession.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\setparamscenario.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\setparamsession.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\synthscenario.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\synthsession.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\umcconsole.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\umcframework.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\umcscenario.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\umcsession.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\verifierscenario.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\verifiersession.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="umc.rc" />
+ </ItemGroup>
+</Project>
\ No newline at end of file
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = -Iinclude \
- -I$(unimrcp_srcdir)/platforms/unimrcp-client/include \
- -I$(top_srcdir)/platforms/libunimrcp-client/include \
- -I$(top_srcdir)/libs/mrcp-client/include \
- -I$(top_srcdir)/libs/mrcp-signaling/include \
- -I$(top_srcdir)/libs/mrcpv2-transport/include \
- -I$(top_srcdir)/libs/mrcp/include \
- -I$(top_srcdir)/libs/mrcp/message/include \
- -I$(top_srcdir)/libs/mrcp/control/include \
- -I$(top_srcdir)/libs/mrcp/resources/include \
- -I$(top_srcdir)/libs/mpf/include \
- -I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir)/platforms/unimrcp-client/include \
+ $(UNIMRCP_CLIENTAPP_INCLUDES)
bin_PROGRAMS = unimrcpclient
+
unimrcpclient_SOURCES = src/main.c \
src/demo_framework.c \
src/demo_synth_application.c \
src/demo_bypass_application.c \
src/demo_discover_application.c \
src/demo_util.c
-unimrcpclient_LDADD = $(top_builddir)/platforms/libunimrcp-client/libunimrcpclient.la
+unimrcpclient_LDADD = $(UNIMRCP_CLIENTAPP_LIBS)
+unimrcpclient_LDFLAGS = $(UNIMRCP_CLIENTAPP_OPTS)
-if ISMAC
-unimrcpclient_LDFLAGS = -framework CoreFoundation -framework SystemConfiguration
-endif
+include $(top_srcdir)/build/rules/uniclientapp.am
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: demo_application.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: demo_application.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef DEMO_APPLICATION_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: demo_framework.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: demo_framework.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef DEMO_FRAMEWORK_H
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: demo_util.h 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: demo_util.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#ifndef DEMO_UTIL_H
/** Create demo MRCP message (RECOGNIZE request) */
mrcp_message_t* demo_recognize_message_create(mrcp_session_t *session, mrcp_channel_t *channel, const apt_dir_layout_t *dir_layout);
-/** Parse NLSML result */
-apt_bool_t demo_nlsml_result_parse(mrcp_message_t *message);
-
/** Create demo RTP termination descriptor */
mpf_rtp_termination_descriptor_t* demo_rtp_descriptor_create(apr_pool_t *pool);
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: demo_bypass_application.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: demo_bypass_application.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
/*
demo_application_on_session_terminate,
demo_application_on_channel_add,
demo_application_on_channel_remove,
- demo_application_on_message_receive
+ demo_application_on_message_receive,
+ NULL /* demo_application_on_terminate_event */,
+ NULL /* demo_application_on_resource_discover */
};
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: demo_discover_application.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: demo_discover_application.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
/*
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: demo_framework.c 1571 2010-03-07 20:33:39Z achaloyan $
+ * $Id: demo_framework.c 2233 2014-11-12 01:34:59Z achaloyan@gmail.com $
*/
#include <apr_hash.h>
framework_task_data_t *framework_task_data = (framework_task_data_t*)task_msg->data;
task_msg->type = TASK_MSG_USER;
task_msg->sub_type = DEMO_CONSOLE_MSG_ID;
- framework_task_data = (framework_task_data_t*) task_msg->data;
- strcpy(framework_task_data->app_name,app_name);
- strcpy(framework_task_data->profile_name,profile_name);
+ strncpy(framework_task_data->app_name,app_name,sizeof(framework_task_data->app_name)-1);
+ strncpy(framework_task_data->profile_name,profile_name,sizeof(framework_task_data->profile_name)-1);
framework_task_data->app_message = NULL;
framework_task_data->demo_application = NULL;
apt_task_msg_signal(task,task_msg);
framework_task_data_t *framework_task_data = (framework_task_data_t*)task_msg->data;
task_msg->type = TASK_MSG_USER;
task_msg->sub_type = DEMO_APPLICATION_MSG_ID;
- framework_task_data = (framework_task_data_t*) task_msg->data;
framework_task_data->app_message = app_message;
framework_task_data->demo_application = demo_application;
apt_task_msg_signal(task,task_msg);
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: demo_recog_application.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: demo_recog_application.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
/*
#include "mrcp_generic_header.h"
#include "mrcp_recog_header.h"
#include "mrcp_recog_resource.h"
+#include "apt_nlsml_doc.h"
#include "apt_log.h"
typedef struct recog_app_channel_t recog_app_channel_t;
recog_application_on_session_terminate,
recog_application_on_channel_add,
recog_application_on_channel_remove,
- recog_application_on_message_receive
+ recog_application_on_message_receive,
+ NULL /* recog_application_on_terminate_event */,
+ NULL /* recog_application_on_resource_discover */
};
/** Declaration of recognizer audio stream methods */
recog_app_stream_read,
NULL,
NULL,
+ NULL,
NULL
};
/** Handle the DEFINE-GRAMMAR responses */
static apt_bool_t recog_application_on_define_grammar(mrcp_application_t *application, mrcp_session_t *session, mrcp_channel_t *channel)
{
- recog_app_channel_t *recog_channel = mrcp_application_channel_object_get(channel);
mrcp_message_t *mrcp_message;
+ recog_app_channel_t *recog_channel = mrcp_application_channel_object_get(channel);
const apt_dir_layout_t *dir_layout = mrcp_application_dir_layout_get(application);
- apr_pool_t *pool = mrcp_application_session_pool_get(session);
+
+ const mpf_codec_descriptor_t *descriptor = mrcp_application_source_descriptor_get(channel);
+ if(!descriptor) {
+ /* terminate the demo */
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Media Source Descriptor");
+ return mrcp_application_session_terminate(session);
+ }
+
/* create and send RECOGNIZE request */
mrcp_message = demo_recognize_message_create(session,channel,dir_layout);
if(mrcp_message) {
mrcp_application_message_send(session,channel,mrcp_message);
}
+
if(recog_channel) {
- const mpf_codec_descriptor_t *descriptor = mrcp_application_source_descriptor_get(channel);
- char *file_name = apr_psprintf(pool,"one-%dkHz.pcm",
- descriptor ? descriptor->sampling_rate/1000 : 8);
+ apr_pool_t *pool = mrcp_application_session_pool_get(session);
+ char *file_name = apr_psprintf(pool,"one-%dkHz.pcm",descriptor->sampling_rate/1000);
char *file_path = apt_datadir_filepath_get(dir_layout,file_name,pool);
if(file_path) {
recog_channel->audio_in = fopen(file_path,"rb");
}
else if(message->start_line.message_type == MRCP_MESSAGE_TYPE_EVENT) {
if(message->start_line.method_id == RECOGNIZER_RECOGNITION_COMPLETE) {
- demo_nlsml_result_parse(message);
+ nlsml_result_t *result = nlsml_result_parse(message->body.buf, message->body.length, message->pool);
+ if(result) {
+ nlsml_result_trace(result, message->pool);
+ }
+
if(recog_channel) {
recog_channel->streaming = FALSE;
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: demo_synth_application.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: demo_synth_application.c 2193 2014-10-08 03:44:33Z achaloyan@gmail.com $
*/
/*
#include "mrcp_generic_header.h"
#include "mrcp_synth_header.h"
#include "mrcp_synth_resource.h"
+#include "apt_log.h"
typedef struct synth_app_channel_t synth_app_channel_t;
synth_application_on_session_terminate,
synth_application_on_channel_add,
synth_application_on_channel_remove,
- synth_application_on_message_receive
+ synth_application_on_message_receive,
+ NULL /* synth_application_on_terminate_event */,
+ NULL /* synth_application_on_resource_discover */
};
/** Declaration of synthesizer audio stream methods */
NULL,
synth_app_stream_open,
synth_app_stream_close,
- synth_app_stream_write
+ synth_app_stream_write,
+ NULL
};
/** Handle the responses sent to channel add requests */
static apt_bool_t synth_application_on_channel_add(mrcp_application_t *application, mrcp_session_t *session, mrcp_channel_t *channel, mrcp_sig_status_code_e status)
{
- synth_app_channel_t *synth_channel = mrcp_application_channel_object_get(channel);
- apr_pool_t *pool = mrcp_application_session_pool_get(session);
if(status == MRCP_SIG_STATUS_CODE_SUCCESS) {
mrcp_message_t *mrcp_message;
+ synth_app_channel_t *synth_channel = mrcp_application_channel_object_get(channel);
+ apr_pool_t *pool = mrcp_application_session_pool_get(session);
const apt_dir_layout_t *dir_layout = mrcp_application_dir_layout_get(application);
+ const mpf_codec_descriptor_t *descriptor = mrcp_application_sink_descriptor_get(channel);
+ if(!descriptor) {
+ /* terminate the demo */
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Media Sink Descriptor");
+ return mrcp_application_session_terminate(session);
+ }
+
/* create and send SPEAK request */
mrcp_message = demo_speak_message_create(session,channel,dir_layout);
if(mrcp_message) {
mrcp_application_message_send(session,channel,mrcp_message);
}
- if(synth_channel && session) {
+ if(synth_channel) {
const apt_str_t *id = mrcp_application_session_id_get(session);
- const mpf_codec_descriptor_t *descriptor = mrcp_application_sink_descriptor_get(channel);
char *file_name = apr_psprintf(pool,"synth-%dkHz-%s.pcm",
- descriptor ? descriptor->sampling_rate/1000 : 8,
- id->buf);
- char *file_path = apt_datadir_filepath_get(dir_layout,file_name,pool);
+ descriptor->sampling_rate/1000,
+ id->buf);
+ char *file_path = apt_vardir_filepath_get(dir_layout,file_name,pool);
if(file_path) {
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Open Speech Output File [%s] for Writing",file_path);
synth_channel->audio_out = fopen(file_path,"wb");
+ if(!synth_channel->audio_out) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Open Utterance Output File [%s] for Writing",file_path);
+ }
}
}
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: demo_util.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: demo_util.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "demo_util.h"
/* recognizer includes */
#include "mrcp_recog_header.h"
#include "mrcp_recog_resource.h"
-/* NLSML doc include */
-#include "apt_nlsml_doc.h"
/* logger include */
#include "apt_log.h"
return mrcp_message;
}
-/** Parse NLSML result */
-apt_bool_t demo_nlsml_result_parse(mrcp_message_t *message)
-{
- apr_xml_elem *interpret;
- apr_xml_elem *instance;
- apr_xml_elem *input;
- apr_xml_doc *doc = nlsml_doc_load(&message->body,message->pool);
- if(!doc) {
- return FALSE;
- }
-
- /* walk through interpreted results */
- interpret = nlsml_first_interpret_get(doc);
- for(; interpret; interpret = nlsml_next_interpret_get(interpret)) {
- /* get instance and input */
- nlsml_interpret_results_get(interpret,&instance,&input);
- if(instance) {
- /* process instance */
- if(instance->first_cdata.first) {
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Interpreted Instance [%s]",instance->first_cdata.first->text);
- }
- }
- if(input) {
- /* process input */
- if(input->first_cdata.first) {
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Interpreted Input [%s]",input->first_cdata.first->text);
- }
- }
- }
- return TRUE;
-}
-
/** Create demo RTP termination descriptor */
mpf_rtp_termination_descriptor_t* demo_rtp_descriptor_create(apr_pool_t *pool)
{
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: main.c 1785 2010-09-22 06:14:29Z achaloyan $
+ * $Id: main.c 2204 2014-10-31 01:01:42Z achaloyan@gmail.com $
*/
-#include <stdio.h>
#include <stdlib.h>
#include <apr_getopt.h>
#include <apr_file_info.h>
#include "demo_framework.h"
#include "apt_pool.h"
#include "apt_log.h"
+#include "uni_version.h"
typedef struct {
const char *root_dir_path;
+ const char *dir_layout_conf;
const char *log_priority;
const char *log_output;
} client_options_t;
{
apt_bool_t running = TRUE;
char cmdline[1024];
- int i;
+ apr_size_t i;
do {
printf(">");
memset(&cmdline, 0, sizeof(cmdline));
return TRUE;
}
-static void usage()
+static void usage(void)
{
printf(
+ "\n"
+ " * "UNI_COPYRIGHT"\n"
+ " *\n"
+ UNI_LICENSE"\n"
"\n"
"Usage:\n"
"\n"
"\n"
" Available options:\n"
"\n"
- " -r [--root-dir] path : Set the project root directory path.\n"
+ " -r [--root-dir] path : Set the path to the project root directory.\n"
+ "\n"
+ " -c [--dir-layout] path : Set the path to the dir layout config file.\n"
+ " (takes the precedence over --root-dir option)\n"
"\n"
" -l [--log-prio] priority : Set the log priority.\n"
" (0-emergency, ..., 7-debug)\n"
" -o [--log-output] mode : Set the log output mode.\n"
" (0-none, 1-console only, 2-file only, 3-both)\n"
"\n"
+ " -v [--version] : Show the version.\n"
+ "\n"
" -h [--help] : Show the help.\n"
"\n");
}
const apr_getopt_option_t opt_option[] = {
/* long-option, short-option, has-arg flag, description */
- { "root-dir", 'r', TRUE, "path to root dir" }, /* -r arg or --root-dir arg */
- { "log-prio", 'l', TRUE, "log priority" }, /* -l arg or --log-prio arg */
- { "log-output", 'o', TRUE, "log output mode" }, /* -o arg or --log-output arg */
- { "help", 'h', FALSE, "show help" }, /* -h or --help */
- { NULL, 0, 0, NULL }, /* end */
+ { "root-dir", 'r', TRUE, "path to root dir" }, /* -r arg or --root-dir arg */
+ { "dir-layout", 'c', TRUE, "path to dir layout conf" }, /* -c arg or --dir-layout arg */
+ { "log-prio", 'l', TRUE, "log priority" }, /* -l arg or --log-prio arg */
+ { "log-output", 'o', TRUE, "log output mode" }, /* -o arg or --log-output arg */
+ { "version", 'v', FALSE, "show version" }, /* -v or --version */
+ { "help", 'h', FALSE, "show help" }, /* -h or --help */
+ { NULL, 0, 0, NULL }, /* end */
};
rv = apr_getopt_init(&opt, pool , argc, argv);
return FALSE;
}
+ /* reset the options */
+ options->root_dir_path = NULL;
+ options->dir_layout_conf = NULL;
+ options->log_priority = NULL;
+ options->log_output = NULL;
+
while((rv = apr_getopt_long(opt, opt_option, &optch, &optarg)) == APR_SUCCESS) {
switch(optch) {
case 'r':
options->root_dir_path = optarg;
break;
+ case 'c':
+ options->dir_layout_conf = optarg;
+ break;
case 'l':
options->log_priority = optarg;
break;
case 'o':
options->log_output = optarg;
break;
+ case 'v':
+ printf(UNI_VERSION_STRING);
+ return FALSE;
case 'h':
usage();
return FALSE;
int main(int argc, const char * const *argv)
{
- apr_pool_t *pool = NULL;
+ apr_pool_t *pool;
client_options_t options;
- apt_dir_layout_t *dir_layout;
const char *log_conf_path;
demo_framework_t *framework;
+ apt_dir_layout_t *dir_layout = NULL;
/* APR global initialization */
if(apr_initialize() != APR_SUCCESS) {
return 0;
}
- /* set the default options */
- options.root_dir_path = "../";
- options.log_priority = NULL;
- options.log_output = NULL;
-
/* load options */
if(demo_framework_options_load(&options,argc,argv,pool) != TRUE) {
apr_pool_destroy(pool);
return 0;
}
- /* create the structure of default directories layout */
- dir_layout = apt_default_dir_layout_create(options.root_dir_path,pool);
+ if(options.dir_layout_conf) {
+ /* create and load directories layout from the configuration file */
+ dir_layout = apt_dir_layout_create(pool);
+ if(dir_layout)
+ apt_dir_layout_load(dir_layout,options.dir_layout_conf,pool);
+ }
+ else {
+ /* create default directories layout */
+ dir_layout = apt_default_dir_layout_create(options.root_dir_path,pool);
+ }
+
+ if(!dir_layout) {
+ printf("Failed to Create Directories Layout\n");
+ apr_pool_destroy(pool);
+ apr_terminate();
+ return 0;
+ }
/* get path to logger configuration file */
log_conf_path = apt_confdir_filepath_get(dir_layout,"logger.xml",pool);
if(apt_log_output_mode_check(APT_LOG_OUTPUT_FILE) == TRUE) {
/* open the log file */
- apt_log_file_open(dir_layout->log_dir_path,"unimrcpclient",MAX_LOG_FILE_SIZE,MAX_LOG_FILE_COUNT,FALSE,pool);
+ const char *log_dir_path = apt_dir_layout_path_get(dir_layout,APT_LAYOUT_LOG_DIR);
+ apt_log_file_open(log_dir_path,"unimrcpclient",MAX_LOG_FILE_SIZE,MAX_LOG_FILE_COUNT,FALSE,pool);
}
/* create demo framework */
+++ /dev/null
-<?xml version="1.0" encoding="windows-1251"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="unimrcpclient"\r
- ProjectGUID="{57FAF32E-49FD-491F-895D-132D0D5EFE0A}"\r
- RootNamespace="unimrcpclient"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- ConfigurationType="1"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpclient.vsprops"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="include"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="$(UniMRCPClientLibs)"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="1"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpclient.vsprops"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="include"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="$(UniMRCPClientLibs)"\r
- LinkTimeCodeGeneration="1"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- <File\r
- RelativePath=".\src\demo_bypass_application.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\demo_discover_application.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\demo_framework.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\demo_recog_application.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\demo_synth_application.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\demo_util.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\main.c"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\include\demo_application.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\demo_framework.h"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\include\demo_util.h"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
-#include "uni_version.h"\r
-\r
-1 VERSIONINFO\r
- FILEVERSION UNI_VERSION_STRING_CSV,0\r
- PRODUCTVERSION UNI_VERSION_STRING_CSV,0\r
- FILEFLAGSMASK 0x3fL\r
-#if defined(_DEBUG)\r
- FILEFLAGS 0x01L\r
-#else\r
- FILEFLAGS 0x00L\r
-#endif\r
-#if defined(WINNT) || defined(WIN64)\r
- FILEOS 0x40004L\r
-#else\r
- FILEOS 0x4L\r
-#endif\r
- FILETYPE 0x2L\r
- FILESUBTYPE 0x0L\r
-BEGIN\r
- BLOCK "StringFileInfo"\r
- BEGIN\r
- BLOCK "040904b0"\r
- BEGIN\r
- VALUE "Comments", UNI_LICENSE "\0"\r
- VALUE "CompanyName", "UniMRCP\0"\r
- VALUE "FileDescription", "UniMRCP Client Application\0"\r
- VALUE "FileVersion", UNI_VERSION_STRING "\0"\r
- VALUE "InternalName", "unimrcpclient" "\0"\r
- VALUE "LegalCopyright", UNI_COPYRIGHT "\0"\r
- VALUE "OriginalFilename", "unimrcpclient.exe" "\0"\r
- VALUE "ProductName", "UniMRCP Project\0"\r
- VALUE "ProductVersion", UNI_VERSION_STRING "\0"\r
- END\r
- END\r
- BLOCK "VarFileInfo"\r
- BEGIN\r
- VALUE "Translation", 0x409, 1200\r
- END\r
-END\r
+#include "uni_version.h"
+
+1 VERSIONINFO
+ FILEVERSION UNI_VERSION_STRING_CSV,0
+ PRODUCTVERSION UNI_VERSION_STRING_CSV,0
+ FILEFLAGSMASK 0x3fL
+#if defined(_DEBUG)
+ FILEFLAGS 0x01L
+#else
+ FILEFLAGS 0x00L
+#endif
+#if defined(WINNT) || defined(WIN64)
+ FILEOS 0x40004L
+#else
+ FILEOS 0x4L
+#endif
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "Comments", UNI_LICENSE "\0"
+ VALUE "CompanyName", "UniMRCP\0"
+ VALUE "FileDescription", "UniMRCP Client Application\0"
+ VALUE "FileVersion", UNI_VERSION_STRING "\0"
+ VALUE "InternalName", "unimrcpclient" "\0"
+ VALUE "LegalCopyright", UNI_COPYRIGHT "\0"
+ VALUE "OriginalFilename", "unimrcpclient.exe" "\0"
+ VALUE "ProductName", "UniMRCP Project\0"
+ VALUE "ProductVersion", UNI_VERSION_STRING "\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{57FAF32E-49FD-491F-895D-132D0D5EFE0A}</ProjectGuid>
+ <RootNamespace>unimrcpclient</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpclient.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>$(UniMRCPClientLibs);%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>$(UniMRCPClientLibs);%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>$(UniMRCPClientLibs);%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>$(UniMRCPClientLibs);%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="src\demo_bypass_application.c" />
+ <ClCompile Include="src\demo_discover_application.c" />
+ <ClCompile Include="src\demo_framework.c" />
+ <ClCompile Include="src\demo_recog_application.c" />
+ <ClCompile Include="src\demo_synth_application.c" />
+ <ClCompile Include="src\demo_util.c" />
+ <ClCompile Include="src\main.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="include\demo_application.h" />
+ <ClInclude Include="include\demo_framework.h" />
+ <ClInclude Include="include\demo_util.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="unimrcpclient.rc">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\libunimrcp-client\libunimrcpclient.vcxproj">
+ <Project>{ee157390-1e85-416c-946e-620e32c9ad33}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup>\r
- <Filter Include="include">\r
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="src">\r
- <UniqueIdentifier>{a92d3b8c-d54d-416c-b458-dc57ac24d2e9}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp_client_connection.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_connection.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_connection_types.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_control_descriptor.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_server_connection.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\mrcp_client_connection.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mrcp_connection.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mrcp_control_descriptor.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mrcp_server_connection.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="src">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\demo_bypass_application.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\demo_discover_application.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\demo_framework.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\demo_recog_application.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\demo_synth_application.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\demo_util.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\main.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="include\demo_application.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\demo_framework.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ <ClInclude Include="include\demo_util.h">
+ <Filter>include</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="unimrcpclient.rc" />
+ </ItemGroup>
</Project>
\ No newline at end of file
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = -Iinclude \
- -I$(top_srcdir)/platforms/libunimrcp-server/include \
- -I$(top_srcdir)/libs/mrcp-server/include \
- -I$(top_srcdir)/libs/mrcp-engine/include \
- -I$(top_srcdir)/libs/mrcp-signaling/include \
- -I$(top_srcdir)/libs/mrcpv2-transport/include \
- -I$(top_srcdir)/libs/mrcp/include \
- -I$(top_srcdir)/libs/mrcp/message/include \
- -I$(top_srcdir)/libs/mrcp/control/include \
- -I$(top_srcdir)/libs/mrcp/resources/include \
- -I$(top_srcdir)/libs/mpf/include \
- -I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir)/platforms/unimrcp-server/include \
+ $(UNIMRCP_SERVERAPP_INCLUDES)
bin_PROGRAMS = unimrcpserver
unimrcpserver_SOURCES = src/main.c src/uni_cmdline.c src/uni_daemon.c
-unimrcpserver_LDADD = $(top_builddir)/platforms/libunimrcp-server/libunimrcpserver.la
+unimrcpserver_LDADD = $(UNIMRCP_SERVERAPP_LIBS)
+unimrcpserver_LDFLAGS = $(UNIMRCP_SERVERAPP_OPTS)
-if ISMAC
-unimrcpserver_LDFLAGS = -framework CoreFoundation -framework SystemConfiguration
-endif
+include $(top_srcdir)/build/rules/uniserverapp.am
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: main.c 1785 2010-09-22 06:14:29Z achaloyan $
+ * $Id: main.c 2204 2014-10-31 01:01:42Z achaloyan@gmail.com $
*/
#include <stdlib.h>
#include "apt_pool.h"
#include "apt_dir_layout.h"
#include "apt_log.h"
+#include "uni_version.h"
typedef struct {
const char *root_dir_path;
+ const char *dir_layout_conf;
apt_bool_t foreground;
const char *log_priority;
const char *log_output;
+#ifdef WIN32
+ const char *svcname;
+#endif
} server_options_t;
#ifdef WIN32
-apt_bool_t uni_service_run(apt_dir_layout_t *dir_layout, apr_pool_t *pool);
+apt_bool_t uni_service_run(const char *name, apt_dir_layout_t *dir_layout, apr_pool_t *pool);
#else
apt_bool_t uni_daemon_run(apt_dir_layout_t *dir_layout, apr_pool_t *pool);
#endif
static void usage()
{
printf(
+ "\n"
+ " * "UNI_COPYRIGHT"\n"
+ " *\n"
+ UNI_LICENSE"\n"
"\n"
"Usage:\n"
"\n"
"\n"
" Available options:\n"
"\n"
- " -r [--root-dir] path : Set the project root directory path.\n"
+ " -r [--root-dir] path : Set the path to the project root directory.\n"
+ "\n"
+ " -c [--dir-layout] path : Set the path to the dir layout config file.\n"
+ " (takes the precedence over --root-dir option)\n"
"\n"
" -l [--log-prio] priority : Set the log priority.\n"
" (0-emergency, ..., 7-debug)\n"
" (0-none, 1-console only, 2-file only, 3-both)\n"
"\n"
#ifdef WIN32
- " -s [--service] : Run as the Windows service.\n"
+ " -s [--service] : Run as a Windows service.\n"
+ "\n"
+ " -n [--name] svcname : Set the service name (default: unimrcp)\n"
"\n"
#else
- " -d [--daemon] : Run as the daemon.\n"
+ " -d [--daemon] : Run as a daemon.\n"
"\n"
#endif
+ " -v [--version] : Show the version.\n"
+ "\n"
" -h [--help] : Show the help.\n"
"\n");
}
const apr_getopt_option_t opt_option[] = {
/* long-option, short-option, has-arg flag, description */
- { "root-dir", 'r', TRUE, "path to root dir" }, /* -r arg or --root-dir arg */
- { "log-prio", 'l', TRUE, "log priority" }, /* -l arg or --log-prio arg */
- { "log-output", 'o', TRUE, "log output mode" }, /* -o arg or --log-output arg */
+ { "root-dir", 'r', TRUE, "path to root dir" }, /* -r arg or --root-dir arg */
+ { "dir-layout", 'c', TRUE, "path to dir layout conf" }, /* -c arg or --dir-layout arg */
+ { "log-prio", 'l', TRUE, "log priority" }, /* -l arg or --log-prio arg */
+ { "log-output", 'o', TRUE, "log output mode" }, /* -o arg or --log-output arg */
#ifdef WIN32
- { "service", 's', FALSE, "run as service" }, /* -s or --service */
+ { "service", 's', FALSE, "run as service" }, /* -s or --service */
+ { "name", 'n', TRUE, "service name" }, /* -n or --name arg */
#else
- { "daemon", 'd', FALSE, "start as daemon" }, /* -d or --daemon */
+ { "daemon", 'd', FALSE, "start as daemon" }, /* -d or --daemon */
#endif
- { "help", 'h', FALSE, "show help" }, /* -h or --help */
- { NULL, 0, 0, NULL }, /* end */
+ { "version", 'v', FALSE, "show version" }, /* -v or --version */
+ { "help", 'h', FALSE, "show help" }, /* -h or --help */
+ { NULL, 0, 0, NULL }, /* end */
};
rv = apr_getopt_init(&opt, pool , argc, argv);
return FALSE;
}
+ /* reset the options */
+ options->root_dir_path = NULL;
+ options->dir_layout_conf = NULL;
+ options->foreground = TRUE;
+ options->log_priority = NULL;
+ options->log_output = NULL;
+#ifdef WIN32
+ options->svcname = NULL;
+#endif
+
while((rv = apr_getopt_long(opt, opt_option, &optch, &optarg)) == APR_SUCCESS) {
switch(optch) {
case 'r':
options->root_dir_path = optarg;
break;
+ case 'c':
+ options->dir_layout_conf = optarg;
+ break;
case 'l':
options->log_priority = optarg;
break;
case 's':
options->foreground = FALSE;
break;
+ case 'n':
+ options->svcname = optarg;
+ break;
#else
case 'd':
options->foreground = FALSE;
break;
#endif
+ case 'v':
+ printf(UNI_VERSION_STRING);
+ return FALSE;
case 'h':
usage();
return FALSE;
int main(int argc, const char * const *argv)
{
- apr_pool_t *pool = NULL;
+ apr_pool_t *pool;
server_options_t options;
- apt_dir_layout_t *dir_layout;
const char *log_conf_path;
+ apt_dir_layout_t *dir_layout = NULL;
/* APR global initialization */
if(apr_initialize() != APR_SUCCESS) {
return 0;
}
- /* set the default options */
- options.root_dir_path = "../";
- options.foreground = TRUE;
- options.log_priority = NULL;
- options.log_output = NULL;
-
/* load options */
if(options_load(&options,argc,argv,pool) != TRUE) {
apr_pool_destroy(pool);
return 0;
}
- /* create the structure of default directories layout */
- dir_layout = apt_default_dir_layout_create(options.root_dir_path,pool);
-
+ if(options.dir_layout_conf) {
+ /* create and load directories layout from the configuration file */
+ dir_layout = apt_dir_layout_create(pool);
+ if(dir_layout)
+ apt_dir_layout_load(dir_layout,options.dir_layout_conf,pool);
+ }
+ else {
+ /* create default directories layout */
+ dir_layout = apt_default_dir_layout_create(options.root_dir_path,pool);
+ }
+
+ if(!dir_layout) {
+ printf("Failed to Create Directories Layout\n");
+ apr_pool_destroy(pool);
+ apr_terminate();
+ return 0;
+ }
+
/* get path to logger configuration file */
log_conf_path = apt_confdir_filepath_get(dir_layout,"logger.xml",pool);
/* create and load singleton logger */
if(apt_log_output_mode_check(APT_LOG_OUTPUT_FILE) == TRUE) {
/* open the log file */
- apt_log_file_open(dir_layout->log_dir_path,"unimrcpserver",MAX_LOG_FILE_SIZE,MAX_LOG_FILE_COUNT,TRUE,pool);
+ const char *log_dir_path = apt_dir_layout_path_get(dir_layout,APT_LAYOUT_LOG_DIR);
+ apt_log_file_open(log_dir_path,"unimrcpserver",MAX_LOG_FILE_SIZE,MAX_LOG_FILE_COUNT,TRUE,pool);
}
if(options.foreground == TRUE) {
#ifdef WIN32
else {
/* run as windows service */
- uni_service_run(dir_layout,pool);
+ uni_service_run(options.svcname,dir_layout,pool);
}
#else
else {
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: uni_cmdline.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: uni_cmdline.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <stdio.h>
{
apt_bool_t running = TRUE;
char cmdline[1024];
- int i;
+ apr_size_t i;
mrcp_server_t *server;
/* start server */
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: uni_daemon.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: uni_daemon.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <apr_signal.h>
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: uni_service.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: uni_service.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <windows.h>
static mrcp_server_t *server = NULL;
static apt_dir_layout_t *service_dir_layout = NULL;
+static const char *svcname = NULL;
+
+/** Display error message with Windows error code and description */
+static void winerror(const char *file, int line, const char *msg)
+{
+ char buf[128];
+ DWORD err = GetLastError();
+ int ret = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL,
+ err,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+ buf, sizeof(buf), NULL);
+ apt_log(file, line, APT_PRIO_WARNING, "%s: %lu %.*s\n", msg, err, ret, buf);
+}
/** SCM state change handler */
static void WINAPI win_service_handler(DWORD control)
{
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Service Handler %d",control);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Service Handler 0x%02lx",control);
switch (control)
{
case SERVICE_CONTROL_INTERROGATE:
if(server) {
win_service_status.dwCurrentState = SERVICE_STOP_PENDING;
if(!SetServiceStatus(win_service_status_handle, &win_service_status)) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Set Service Status %d",GetLastError());
+ winerror(APT_LOG_MARK, "Failed to Set Service Status");
}
/* shutdown server */
}
if(!SetServiceStatus(win_service_status_handle, &win_service_status)) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Set Service Status %d",GetLastError());
+ winerror(APT_LOG_MARK, "Failed to Set Service Status");
}
}
win_service_status.dwCheckPoint = 0;
win_service_status.dwWaitHint = 0;
- win_service_status_handle = RegisterServiceCtrlHandler(WIN_SERVICE_NAME, win_service_handler);
+ win_service_status_handle = RegisterServiceCtrlHandler(svcname, win_service_handler);
if(win_service_status_handle == (SERVICE_STATUS_HANDLE)0) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Register Service Control Handler %d",GetLastError());
+ winerror(APT_LOG_MARK, "Failed to Register Service Control Handler");
return;
}
win_service_status.dwCurrentState = SERVICE_START_PENDING;
if(!SetServiceStatus(win_service_status_handle, &win_service_status)) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Set Service Status %d",GetLastError());
+ winerror(APT_LOG_MARK, "Failed to Set Service Status");
}
/* start server */
win_service_status.dwCurrentState = server ? SERVICE_RUNNING : SERVICE_STOPPED;
if(!SetServiceStatus(win_service_status_handle, &win_service_status)) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Set Service Status %d",GetLastError());
+ winerror(APT_LOG_MARK, "Failed to Set Service Status");
}
}
/** Run SCM service */
-apt_bool_t uni_service_run(apt_dir_layout_t *dir_layout, apr_pool_t *pool)
+apt_bool_t uni_service_run(const char *name, apt_dir_layout_t *dir_layout, apr_pool_t *pool)
{
- SERVICE_TABLE_ENTRY win_service_table[] = {
- { WIN_SERVICE_NAME, win_service_main },
- { NULL, NULL }
- };
+ SERVICE_TABLE_ENTRY win_service_table[2];
+ svcname = name ? name : WIN_SERVICE_NAME;
+ memset(&win_service_table, 0, sizeof(win_service_table));
+ win_service_table->lpServiceName = (char *) svcname;
+ win_service_table->lpServiceProc = win_service_main;
service_dir_layout = dir_layout;
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Run as Service");
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Run as Service %s",svcname);
if(!StartServiceCtrlDispatcher(win_service_table)) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Connect to SCM %d",GetLastError());
+ winerror(APT_LOG_MARK, "Failed to Connect to SCM");
}
return TRUE;
}
+++ /dev/null
-<?xml version="1.0" encoding="windows-1251"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="unimrcpserver"\r
- ProjectGUID="{592CF22D-3F8F-4A77-A174-130D77B7623B}"\r
- RootNamespace="unimrcpserver"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- ConfigurationType="1"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpserver.vsprops"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="$(UniMRCPServerLibs)"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="1"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpserver.vsprops"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="$(UniMRCPServerLibs)"\r
- LinkTimeCodeGeneration="1"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- <File\r
- RelativePath=".\src\main.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\uni_cmdline.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\uni_daemon.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\uni_service.c"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
-#include "uni_version.h"\r
-\r
-1 VERSIONINFO\r
- FILEVERSION UNI_VERSION_STRING_CSV,0\r
- PRODUCTVERSION UNI_VERSION_STRING_CSV,0\r
- FILEFLAGSMASK 0x3fL\r
-#if defined(_DEBUG)\r
- FILEFLAGS 0x01L\r
-#else\r
- FILEFLAGS 0x00L\r
-#endif\r
-#if defined(WINNT) || defined(WIN64)\r
- FILEOS 0x40004L\r
-#else\r
- FILEOS 0x4L\r
-#endif\r
- FILETYPE 0x2L\r
- FILESUBTYPE 0x0L\r
-BEGIN\r
- BLOCK "StringFileInfo"\r
- BEGIN\r
- BLOCK "040904b0"\r
- BEGIN\r
- VALUE "Comments", UNI_LICENSE "\0"\r
- VALUE "CompanyName", "UniMRCP\0"\r
- VALUE "FileDescription", "UniMRCP Server Application\0"\r
- VALUE "FileVersion", UNI_VERSION_STRING "\0"\r
- VALUE "InternalName", "unimrcpserver" "\0"\r
- VALUE "LegalCopyright", UNI_COPYRIGHT "\0"\r
- VALUE "OriginalFilename", "unimrcpserver.exe" "\0"\r
- VALUE "ProductName", "UniMRCP Project\0"\r
- VALUE "ProductVersion", UNI_VERSION_STRING "\0"\r
- END\r
- END\r
- BLOCK "VarFileInfo"\r
- BEGIN\r
- VALUE "Translation", 0x409, 1200\r
- END\r
-END\r
+#include "uni_version.h"
+
+1 VERSIONINFO
+ FILEVERSION UNI_VERSION_STRING_CSV,0
+ PRODUCTVERSION UNI_VERSION_STRING_CSV,0
+ FILEFLAGSMASK 0x3fL
+#if defined(_DEBUG)
+ FILEFLAGS 0x01L
+#else
+ FILEFLAGS 0x00L
+#endif
+#if defined(WINNT) || defined(WIN64)
+ FILEOS 0x40004L
+#else
+ FILEOS 0x4L
+#endif
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "Comments", UNI_LICENSE "\0"
+ VALUE "CompanyName", "UniMRCP\0"
+ VALUE "FileDescription", "UniMRCP Server Application\0"
+ VALUE "FileVersion", UNI_VERSION_STRING "\0"
+ VALUE "InternalName", "unimrcpserver" "\0"
+ VALUE "LegalCopyright", UNI_COPYRIGHT "\0"
+ VALUE "OriginalFilename", "unimrcpserver.exe" "\0"
+ VALUE "ProductName", "UniMRCP Project\0"
+ VALUE "ProductVersion", UNI_VERSION_STRING "\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{592CF22D-3F8F-4A77-A174-130D77B7623B}</ProjectGuid>
+ <RootNamespace>unimrcpserver</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpserver.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpserver.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpserver.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unimrcpserver.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Link>
+ <AdditionalDependencies>$(UniMRCPServerLibs);%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Link>
+ <AdditionalDependencies>$(UniMRCPServerLibs);%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>$(UniMRCPServerLibs);%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <Link>
+ <AdditionalDependencies>$(UniMRCPServerLibs);%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="src\main.c" />
+ <ClCompile Include="src\uni_cmdline.c" />
+ <ClCompile Include="src\uni_daemon.c" />
+ <ClCompile Include="src\uni_service.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="unimrcpserver.rc">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\libunimrcp-server\libunimrcpserver.vcxproj">
+ <Project>{c98af157-352e-4737-bd30-a24e2647f5ae}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup>\r
- <Filter Include="include">\r
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
- </Filter>\r
- <Filter Include="src">\r
- <UniqueIdentifier>{f87f8ada-12d1-412b-bd14-7e62df3f92a0}</UniqueIdentifier>\r
- <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
- </Filter>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp_unirtsp_client_agent.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_unirtsp_sdp.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- <ClInclude Include="include\mrcp_unirtsp_server_agent.h">\r
- <Filter>include</Filter>\r
- </ClInclude>\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\mrcp_unirtsp_client_agent.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mrcp_unirtsp_sdp.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- <ClCompile Include="src\mrcp_unirtsp_server_agent.c">\r
- <Filter>src</Filter>\r
- </ClCompile>\r
- </ItemGroup>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="src">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\main.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\uni_cmdline.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\uni_daemon.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\uni_service.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="unimrcpserver.rc" />
+ </ItemGroup>
</Project>
\ No newline at end of file
if RECORDER_PLUGIN
SUBDIRS += mrcp-recorder
endif
-
-if POCKETSPHINX_PLUGIN
-SUBDIRS += mrcp-pocketsphinx
-endif
-
-if FLITE_PLUGIN
-SUBDIRS += mrcp-flite
-endif
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = -Iinclude \
- -I$(top_srcdir)/libs/mrcp-engine/include \
- -I$(top_srcdir)/libs/mrcp/include \
- -I$(top_srcdir)/libs/mrcp/message/include \
- -I$(top_srcdir)/libs/mrcp/control/include \
- -I$(top_srcdir)/libs/mrcp/resources/include \
- -I$(top_srcdir)/libs/mpf/include \
- -I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+AM_CPPFLAGS = $(UNIMRCP_PLUGIN_INCLUDES)
plugin_LTLIBRARIES = demorecog.la
demorecog_la_SOURCES = src/demo_recog_engine.c
-demorecog_la_LDFLAGS = -module $(PLUGIN_LT_VERSION)
+demorecog_la_LDFLAGS = $(UNIMRCP_PLUGIN_OPTS)
+
+include $(top_srcdir)/build/rules/uniplugin.am
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="demorecog"\r
- ProjectGUID="{B495B6D9-AF84-479D-B30A-313C16EF8BFD}"\r
- RootNamespace="demorecog"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- ConfigurationType="2"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpplugin.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="include"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="2"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpplugin.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="include"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\src\demo_recog_engine.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>mrcpsignaling</ProjectName>\r
- <ProjectGuid>{12A49562-BAB9-43A3-A21D-15B60BBB4C31}</ProjectGuid>\r
- <RootNamespace>mrcpsignaling</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpsignaling.props" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp_session.h" />\r
- <ClInclude Include="include\mrcp_session_descriptor.h" />\r
- <ClInclude Include="include\mrcp_sig_agent.h" />\r
- <ClInclude Include="include\mrcp_sig_types.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\mrcp_session_descriptor.c" />\r
- <ClCompile Include="src\mrcp_sig_agent.c" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
-</Project>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{B495B6D9-AF84-479D-B30A-313C16EF8BFD}</ProjectGuid>
+ <RootNamespace>demorecog</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\uniplugin.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\uniplugin.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\uniplugin-x64.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\uniplugin-x64.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="src\demo_recog_engine.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\libs\mrcp-engine\mrcpengine.vcxproj">
+ <Project>{843425be-9a9a-44f4-a4e3-4b57d6abd53c}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{4c5e54ad-7563-43a7-8b11-5067a45289e9}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\demo_recog_engine.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: demo_recog_engine.c 1706 2010-05-23 14:11:11Z achaloyan $
+ * $Id: demo_recog_engine.c 2193 2014-10-08 03:44:33Z achaloyan@gmail.com $
*/
/*
NULL,
demo_recog_stream_open,
demo_recog_stream_close,
- demo_recog_stream_write
+ demo_recog_stream_write,
+ NULL
};
/** Declaration of demo recognizer engine */
/* process RECOGNIZE request */
mrcp_recog_header_t *recog_header;
demo_recog_channel_t *recog_channel = channel->method_obj;
+ const mpf_codec_descriptor_t *descriptor = mrcp_engine_sink_stream_codec_get(channel);
+
+ if(!descriptor) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Codec Descriptor "APT_SIDRES_FMT, MRCP_MESSAGE_SIDRES(request));
+ response->start_line.status_code = MRCP_STATUS_CODE_METHOD_FAILED;
+ return FALSE;
+ }
+
recog_channel->timers_started = TRUE;
/* get recognizer header */
if(!recog_channel->audio_out) {
const apt_dir_layout_t *dir_layout = channel->engine->dir_layout;
- const mpf_codec_descriptor_t *descriptor = mrcp_engine_sink_stream_codec_get(channel);
char *file_name = apr_psprintf(channel->pool,"utter-%dkHz-%s.pcm",
- descriptor ? descriptor->sampling_rate/1000 : 8,
- request->channel_id.session_id.buf);
- char *file_path = apt_datadir_filepath_get(dir_layout,file_name,channel->pool);
+ descriptor->sampling_rate/1000,
+ request->channel_id.session_id.buf);
+ char *file_path = apt_vardir_filepath_get(dir_layout,file_name,channel->pool);
if(file_path) {
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Open Utterance Output File [%s] for Writing",file_path);
recog_channel->audio_out = fopen(file_path,"wb");
+ if(!recog_channel->audio_out) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Open Utterance Output File [%s] for Writing",file_path);
+ }
}
}
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = -Iinclude \
- -I$(top_srcdir)/libs/mrcp-engine/include \
- -I$(top_srcdir)/libs/mrcp/include \
- -I$(top_srcdir)/libs/mrcp/message/include \
- -I$(top_srcdir)/libs/mrcp/control/include \
- -I$(top_srcdir)/libs/mrcp/resources/include \
- -I$(top_srcdir)/libs/mpf/include \
- -I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+AM_CPPFLAGS = $(UNIMRCP_PLUGIN_INCLUDES)
plugin_LTLIBRARIES = demosynth.la
demosynth_la_SOURCES = src/demo_synth_engine.c
-demosynth_la_LDFLAGS = -module $(PLUGIN_LT_VERSION)
+demosynth_la_LDFLAGS = $(UNIMRCP_PLUGIN_OPTS)
+
+include $(top_srcdir)/build/rules/uniplugin.am
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="demosynth"\r
- ProjectGUID="{92BFA534-C419-4EB2-AAA3-510653F38F08}"\r
- RootNamespace="demosynth"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- ConfigurationType="2"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpplugin.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="include"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="2"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpplugin.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="include"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\src\demo_synth_engine.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{92BFA534-C419-4EB2-AAA3-510653F38F08}</ProjectGuid>
+ <RootNamespace>demosynth</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\uniplugin.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\uniplugin.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\uniplugin-x64.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\uniplugin-x64.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="src\demo_synth_engine.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\libs\mrcp-engine\mrcpengine.vcxproj">
+ <Project>{843425be-9a9a-44f4-a4e3-4b57d6abd53c}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{c816d2c0-8f04-4474-ad43-cfac130a1a84}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\demo_synth_engine.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: demo_synth_engine.c 1706 2010-05-23 14:11:11Z achaloyan $
+ * $Id: demo_synth_engine.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
/*
demo_synth_stream_read,
NULL,
NULL,
+ NULL,
NULL
};
apr_size_t time_to_complete;
/** Is paused */
apt_bool_t paused;
- /** Speech source (used instead of actual synthesizing) */
+ /** Speech source (used instead of actual synthesis) */
FILE *audio_file;
};
{
char *file_path = NULL;
demo_synth_channel_t *synth_channel = channel->method_obj;
+ const mpf_codec_descriptor_t *descriptor = mrcp_engine_source_stream_codec_get(channel);
+
+ if(!descriptor) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Codec Descriptor "APT_SIDRES_FMT, MRCP_MESSAGE_SIDRES(request));
+ response->start_line.status_code = MRCP_STATUS_CODE_METHOD_FAILED;
+ return FALSE;
+ }
+
synth_channel->time_to_complete = 0;
if(channel->engine) {
- const mpf_codec_descriptor_t *descriptor = mrcp_engine_source_stream_codec_get(channel);
- char *file_name = apr_psprintf(channel->pool,"demo-%dkHz.pcm",
- descriptor ? descriptor->sampling_rate/1000 : 8);
+ char *file_name = apr_psprintf(channel->pool,"demo-%dkHz.pcm",descriptor->sampling_rate/1000);
file_path = apt_datadir_filepath_get(channel->engine->dir_layout,file_name,channel->pool);
}
if(file_path) {
}
}
}
-
+
response->start_line.request_state = MRCP_REQUEST_STATE_INPROGRESS;
/* send asynchronous response */
mrcp_engine_channel_message_send(channel,response);
/* check voice name header */
if(mrcp_resource_header_property_check(request,SYNTHESIZER_HEADER_VOICE_NAME) == TRUE) {
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Set Voice Name [%s]",
- req_synth_header->voice_param.name);
+ req_synth_header->voice_param.name.buf);
}
}
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = -Iinclude \
- -I$(top_srcdir)/libs/mrcp-engine/include \
- -I$(top_srcdir)/libs/mrcp/include \
- -I$(top_srcdir)/libs/mrcp/message/include \
- -I$(top_srcdir)/libs/mrcp/control/include \
- -I$(top_srcdir)/libs/mrcp/resources/include \
- -I$(top_srcdir)/libs/mpf/include \
- -I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+AM_CPPFLAGS = $(UNIMRCP_PLUGIN_INCLUDES)
plugin_LTLIBRARIES = demoverifier.la
demoverifier_la_SOURCES = src/demo_verifier_engine.c
-demoverifier_la_LDFLAGS = -module $(PLUGIN_LT_VERSION)
+demoverifier_la_LDFLAGS = $(UNIMRCP_PLUGIN_OPTS)
+
+include $(top_srcdir)/build/rules/uniplugin.am
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{F7563CAD-5C95-46E5-89B7-0953C6C6E746}</ProjectGuid>
+ <RootNamespace>demoverifier</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\uniplugin.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\uniplugin.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\uniplugin-x64.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\uniplugin-x64.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="src\demo_verifier_engine.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\libs\mrcp-engine\mrcpengine.vcxproj">
+ <Project>{843425be-9a9a-44f4-a4e3-4b57d6abd53c}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{42255732-d637-4aef-ab75-104eb723ff72}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\demo_verifier_engine.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: demo_verifier_engine.c 1776 2010-08-27 16:36:38Z achaloyan $
+ * $Id: demo_verifier_engine.c 2193 2014-10-08 03:44:33Z achaloyan@gmail.com $
*/
/*
NULL,
demo_verifier_stream_open,
demo_verifier_stream_close,
- demo_verifier_stream_write
+ demo_verifier_stream_write,
+ NULL
};
/** Declaration of demo verification engine */
/* process verify request */
mrcp_verifier_header_t *verifier_header;
demo_verifier_channel_t *verifier_channel = channel->method_obj;
+ const mpf_codec_descriptor_t *descriptor = mrcp_engine_sink_stream_codec_get(channel);
+
+ if(!descriptor) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Codec Descriptor "APT_SIDRES_FMT, MRCP_MESSAGE_SIDRES(request));
+ response->start_line.status_code = MRCP_STATUS_CODE_METHOD_FAILED;
+ return FALSE;
+ }
+
verifier_channel->timers_started = TRUE;
/* get verifier header */
if(!verifier_channel->audio_out) {
const apt_dir_layout_t *dir_layout = channel->engine->dir_layout;
- const mpf_codec_descriptor_t *descriptor = mrcp_engine_sink_stream_codec_get(channel);
char *file_name = apr_psprintf(channel->pool,"voiceprint-%dkHz-%s.pcm",
- descriptor ? descriptor->sampling_rate/1000 : 8,
- request->channel_id.session_id.buf);
- char *file_path = apt_datadir_filepath_get(dir_layout,file_name,channel->pool);
+ descriptor->sampling_rate/1000,
+ request->channel_id.session_id.buf);
+ char *file_path = apt_vardir_filepath_get(dir_layout,file_name,channel->pool);
if(file_path) {
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Open Utterance Output File [%s] for Writing",file_path);
verifier_channel->audio_out = fopen(file_path,"wb");
+ if(!verifier_channel->audio_out) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Open Utterance Output File [%s] for Writing",file_path);
+ }
}
}
+++ /dev/null
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = -Iinclude \
- -I$(top_srcdir)/libs/mrcp-engine/include \
- -I$(top_srcdir)/libs/mrcp/include \
- -I$(top_srcdir)/libs/mrcp/message/include \
- -I$(top_srcdir)/libs/mrcp/control/include \
- -I$(top_srcdir)/libs/mrcp/resources/include \
- -I$(top_srcdir)/libs/mpf/include \
- -I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) \
- $(UNIMRCP_APU_INCLUDES) \
- $(UNIMRCP_FLITE_INCLUDES)
-
-plugin_LTLIBRARIES = mrcpflite.la
-
-mrcpflite_la_SOURCES = src/mrcp_flite.c src/flite_voices.c
-mrcpflite_la_LDFLAGS = -module $(PLUGIN_LT_VERSION)
-mrcpflite_la_LIBADD = $(UNIMRCP_FLITE_LIBS) -lm
+++ /dev/null
-/*
- * Copyright 2008-2010 Arsen Chaloyan
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: flite_voices.h 1474 2010-02-07 20:51:47Z achaloyan $
- */
-
-#ifndef FLITE_VOICES_H
-#define FLITE_VOICES_H
-
-/**
- * @file flite_voices.h
- * @brief Flite Voices
- */
-
-#include <flite.h>
-#include <apr_hash.h>
-#include "mrcp_message.h"
-
-APT_BEGIN_EXTERN_C
-
-
-/** Opaque Flite voice declaration */
-typedef struct flite_voices_t flite_voices_t;
-
-/** Load Flite voices */
-flite_voices_t* flite_voices_load(apr_pool_t *pool);
-/** Unload Flite voices */
-void flite_voices_unload(flite_voices_t *voices);
-
-/** Get best matched voice */
-cst_voice* flite_voices_best_match_get(flite_voices_t *voices, mrcp_message_t *message);
-
-APT_END_EXTERN_C
-
-#endif /* FLITE_VOICES_H */
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="mrcpflite"\r
- ProjectGUID="{56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556}"\r
- RootNamespace="mrcpflite"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- ConfigurationType="2"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\flite.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpplugin.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="include"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="2"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\flite.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpplugin.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="include"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\include\flite_voices.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\src\flite_voices.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mrcp_flite.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="mrcpflite"
- ProjectGUID="{56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556}"
- RootNamespace="mrcpflite"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\uniplugin.vsprops;$(ProjectDir)..\..\build\vsprops\flite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="include"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\uniplugin.vsprops;$(ProjectDir)..\..\build\vsprops\flite.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="include"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\uniplugin-x64.vsprops;$(ProjectDir)..\..\build\vsprops\flite.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="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\uniplugin-x64.vsprops;$(ProjectDir)..\..\build\vsprops\flite.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="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="include"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\include\flite_voices.h"
- >
- </File>
- </Filter>
- <Filter
- Name="src"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- >
- <File
- RelativePath=".\src\flite_voices.c"
- >
- </File>
- <File
- RelativePath=".\src\mrcp_flite.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-/*
- * Copyright 2008-2010 Arsen Chaloyan
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: flite_voices.c 1474 2010-02-07 20:51:47Z achaloyan $
- */
-
-#include "flite_voices.h"
-#include "mrcp_synth_header.h"
-
-typedef struct flite_voice_t flite_voice_t;
-
-/** Declaration of flite voice */
-struct flite_voice_t {
- const char *name;
- cst_voice *self;
- cst_voice* (*register_voice)(void);
- void (*unregister_voice)(cst_voice *);
-};
-
-struct flite_voices_t {
- apr_hash_t *table;
- apr_pool_t *pool;
-};
-
-
-/* declarations for flite voices */
-cst_voice *register_cmu_us_awb(void);
-cst_voice *register_cmu_us_kal(void);
-cst_voice *register_cmu_us_rms(void);
-cst_voice *register_cmu_us_slt(void);
-void unregister_cmu_us_awb(cst_voice * v);
-void unregister_cmu_us_kal(cst_voice * v);
-void unregister_cmu_us_rms(cst_voice * v);
-void unregister_cmu_us_slt(cst_voice * v);
-
-
-static apt_bool_t flite_voices_init(flite_voices_t *voices, apr_pool_t *pool)
-{
- flite_voice_t *voice;
-
- voice = apr_palloc(pool,sizeof(flite_voice_t));
- voice->name = "awb";
- voice->self = NULL;
- voice->register_voice = register_cmu_us_awb;
- voice->unregister_voice = unregister_cmu_us_awb;
- apr_hash_set(voices->table,voice->name,APR_HASH_KEY_STRING,voice);
-
- voice = apr_palloc(pool,sizeof(flite_voice_t));
- voice->name = "kal";
- voice->self = NULL;
- voice->register_voice = register_cmu_us_kal;
- voice->unregister_voice = unregister_cmu_us_kal;
- apr_hash_set(voices->table,voice->name,APR_HASH_KEY_STRING,voice);
-
- voice = apr_palloc(pool,sizeof(flite_voice_t));
- voice->name = "rms";
- voice->self = NULL;
- voice->register_voice = register_cmu_us_rms;
- voice->unregister_voice = unregister_cmu_us_rms;
- apr_hash_set(voices->table,voice->name,APR_HASH_KEY_STRING,voice);
-
- voice = apr_palloc(pool,sizeof(flite_voice_t));
- voice->name = "slt";
- voice->self = NULL;
- voice->register_voice = register_cmu_us_slt;
- voice->unregister_voice = unregister_cmu_us_slt;
- apr_hash_set(voices->table,voice->name,APR_HASH_KEY_STRING,voice);
-
- return TRUE;
-}
-
-
-flite_voices_t* flite_voices_load(apr_pool_t *pool)
-{
- flite_voice_t *voice;
- apr_hash_index_t *it;
- void *val;
-
- flite_voices_t *voices = apr_palloc(pool,sizeof(flite_voices_t));
- voices->pool = pool;
- voices->table = apr_hash_make(pool);
-
- /* init voices */
- flite_voices_init(voices,pool);
-
- /* register voices */
- it = apr_hash_first(pool,voices->table);
- /* walk through the voices and register them */
- for(; it; it = apr_hash_next(it)) {
- apr_hash_this(it,NULL,NULL,&val);
- voice = val;
- if(voice) {
- voice->self = voice->register_voice();
- }
- }
-
- return voices;
-}
-
-void flite_voices_unload(flite_voices_t *voices)
-{
- flite_voice_t *voice;
- apr_hash_index_t *it;
- void *val;
-
- /* unregister voices */
- it = apr_hash_first(voices->pool,voices->table);
- /* walk through the voices and register them */
- for(; it; it = apr_hash_next(it)) {
- apr_hash_this(it,NULL,NULL,&val);
- voice = val;
- if(voice && voice->self) {
- voice->unregister_voice(voice->self);
- }
- }
-}
-
-cst_voice* flite_voices_best_match_get(flite_voices_t *voices, mrcp_message_t *message)
-{
- cst_voice *voice = NULL;
- const char *voice_name = NULL;
- mrcp_synth_header_t *synth_header = mrcp_resource_header_get(message);
- if(synth_header) {
- if(mrcp_resource_header_property_check(message,SYNTHESIZER_HEADER_VOICE_NAME) == TRUE) {
- voice_name = synth_header->voice_param.name.buf;
- }
- }
-
- if(voice_name) {
- /* get voice by name */
- flite_voice_t *flite_voice;
- flite_voice = apr_hash_get(voices->table,voice_name,APR_HASH_KEY_STRING);
- if(flite_voice) {
- voice = flite_voice->self;
- }
- }
-
- if(!voice) {
- /* still no voice found, get the default one */
- flite_voice_t *flite_voice = NULL;
- void *val;
- apr_hash_index_t *it = apr_hash_first(voices->pool,voices->table);
- apr_hash_this(it,NULL,NULL,&val);
- if(val) {
- flite_voice = val;
- voice = flite_voice->self;
- }
- }
- return voice;
-}
+++ /dev/null
-/*
- * Copyright 2008-2010 Arsen Chaloyan
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: mrcp_flite.c 1678 2010-05-01 18:54:07Z achaloyan $
- */
-
-/*
- * Mandatory rules concerning plugin implementation.
- * 1. Each plugin MUST implement a plugin/engine creator function
- * with the exact signature and name (the main entry point)
- * MRCP_PLUGIN_DECLARE(mrcp_engine_t*) mrcp_plugin_create(apr_pool_t *pool)
- * 2. Each plugin MUST declare its version number
- * MRCP_PLUGIN_VERSION_DECLARE
- * 3. One and only one response MUST be sent back to the received request.
- * 4. Methods (callbacks) of the MRCP engine channel MUST not block.
- * (asynchronous response can be sent from the context of other thread)
- * 5. Methods (callbacks) of the MPF engine stream MUST not block.
- */
-
-#include "flite_voices.h"
-#include "mrcp_synth_engine.h"
-#include "mpf_buffer.h"
-#include "apr_time.h"
-#include "apt_consumer_task.h"
-#include "apt_log.h"
-
-typedef struct flite_synth_engine_t flite_synth_engine_t;
-typedef struct flite_synth_channel_t flite_synth_channel_t;
-
-/** Declaration of synthesizer engine methods */
-static apt_bool_t flite_synth_engine_destroy(mrcp_engine_t *engine);
-static apt_bool_t flite_synth_engine_open(mrcp_engine_t *engine);
-static apt_bool_t flite_synth_engine_close(mrcp_engine_t *engine);
-static mrcp_engine_channel_t* flite_synth_engine_channel_create(mrcp_engine_t *engine, apr_pool_t *pool);
-
-static const struct mrcp_engine_method_vtable_t engine_vtable = {
- flite_synth_engine_destroy,
- flite_synth_engine_open,
- flite_synth_engine_close,
- flite_synth_engine_channel_create
-};
-
-/** Declaration of synthesizer channel methods */
-static apt_bool_t flite_synth_channel_destroy(mrcp_engine_channel_t *channel);
-static apt_bool_t flite_synth_channel_open(mrcp_engine_channel_t *channel);
-static apt_bool_t flite_synth_channel_close(mrcp_engine_channel_t *channel);
-static apt_bool_t flite_synth_channel_request_process(mrcp_engine_channel_t *channel, mrcp_message_t *request);
-
-/** flite channel methods for processing MRCP channel request **/
-static apt_bool_t flite_synth_channel_speak(mrcp_engine_channel_t *channel, mrcp_message_t *request, mrcp_message_t *response);
-static apt_bool_t flite_synth_channel_stop(mrcp_engine_channel_t *channel, mrcp_message_t *request, mrcp_message_t *response);
-static apt_bool_t flite_synth_channel_pause(mrcp_engine_channel_t *channel, mrcp_message_t *request, mrcp_message_t *response);
-static apt_bool_t flite_synth_channel_resume(mrcp_engine_channel_t *channel, mrcp_message_t *request, mrcp_message_t *response);
-
-static const struct mrcp_engine_channel_method_vtable_t channel_vtable = {
- flite_synth_channel_destroy,
- flite_synth_channel_open,
- flite_synth_channel_close,
- flite_synth_channel_request_process
-};
-
-/** Declaration of synthesizer audio stream methods */
-static apt_bool_t flite_synth_stream_read(mpf_audio_stream_t *stream, mpf_frame_t *frame);
-
-static const mpf_audio_stream_vtable_t audio_stream_vtable = {
- NULL,
- NULL,
- NULL,
- flite_synth_stream_read,
- NULL,
- NULL,
- NULL
-};
-
-/** Declaration of flite synthesizer engine */
-struct flite_synth_engine_t {
- /** Table of flite voices */
- flite_voices_t *voices;
- int iChannels;
-};
-
-/** Declaration of flite synthesizer channel */
-struct flite_synth_channel_t {
- flite_synth_engine_t *flite_engine; /* Back pointer to engine */
- mrcp_engine_channel_t *channel; /* Engine channel base */
- mrcp_message_t *speak_request; /* Active (in-progress) speak request */
- mrcp_message_t *speak_response;/* Pending speak response */
- mrcp_message_t *stop_response; /* Pending stop response */
- apt_bool_t synthesizing; /* Is synthesizer task processing speak request */
- apt_bool_t paused; /* Is paused */
- mpf_buffer_t *audio_buffer; /* Audio buffer */
- int iId; /* Synth channel simultaneous reference count */
- apr_pool_t *pool;
- apt_task_t *task;
- apt_task_msg_pool_t *msg_pool;
-};
-
-/** Declaration of flite synthesizer task message */
-struct flite_speak_msg_t {
- flite_synth_channel_t *channel;
- mrcp_message_t *request;
-};
-
-typedef struct flite_speak_msg_t flite_speak_msg_t;
-
-/* we have a special task for the actual synthesis -
- the task is created when a mrcp speak message is received */
-static apt_bool_t flite_speak(apt_task_t *task, apt_task_msg_t *msg);
-static void flite_on_start(apt_task_t *task);
-static void flite_on_terminate(apt_task_t *task);
-
-/** Declare this macro to set plugin version */
-MRCP_PLUGIN_VERSION_DECLARE
-
-/** Declare this macro to use log routine of the server where the plugin is loaded from */
-MRCP_PLUGIN_LOGGER_IMPLEMENT
-
-/** Create flite synthesizer engine */
-MRCP_PLUGIN_DECLARE(mrcp_engine_t*) mrcp_plugin_create(apr_pool_t *pool)
-{
- /* create flite engine */
- flite_synth_engine_t *flite_engine = (flite_synth_engine_t *) apr_palloc(pool,sizeof(flite_synth_engine_t));
- flite_engine->iChannels = 0;
-
- /* create engine base */
- return mrcp_engine_create(
- MRCP_SYNTHESIZER_RESOURCE, /* MRCP resource identifier */
- flite_engine, /* object to associate */
- &engine_vtable, /* virtual methods table of engine */
- pool); /* pool to allocate memory from */
-}
-
-/** Destroy synthesizer engine */
-static apt_bool_t flite_synth_engine_destroy(mrcp_engine_t *engine)
-{
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "flite_synth_engine_destroy");
- return TRUE;
-}
-
-/** Open synthesizer engine */
-static apt_bool_t flite_synth_engine_open(mrcp_engine_t *engine)
-{
- flite_synth_engine_t *flite_engine = (flite_synth_engine_t *) engine->obj;
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "flite_synth_engine_open");
-
- flite_init();
-
- flite_engine->voices = flite_voices_load(engine->pool);
-
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "flite init success");
- return mrcp_engine_open_respond(engine,TRUE);
-}
-
-/** Close synthesizer engine */
-static apt_bool_t flite_synth_engine_close(mrcp_engine_t *engine)
-{
- flite_synth_engine_t *flite_engine = (flite_synth_engine_t *) engine->obj;
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "flite_synth_engine_close");
-
- flite_voices_unload(flite_engine->voices);
-
- return mrcp_engine_close_respond(engine);
-}
-
-static apt_bool_t flite_synth_task_create(flite_synth_channel_t *synth_channel)
-{
- apt_task_msg_pool_t *msg_pool = apt_task_msg_pool_create_dynamic( sizeof(flite_speak_msg_t),synth_channel->pool);
- apt_task_vtable_t *task_vtable = 0;
- apt_consumer_task_t *consumer_task = 0;
-
- /* create task/thread to run flite synthesizer in */
- consumer_task = apt_consumer_task_create(synth_channel, msg_pool, synth_channel->pool);
- if(!consumer_task) {
- apt_log(APT_LOG_MARK,APT_PRIO_ERROR, "flite_synth_channel_speak failed to create flite speak task - channel:%d", synth_channel->iId);
- return FALSE;
- }
-
- task_vtable = apt_consumer_task_vtable_get(consumer_task);
- if(task_vtable) {
- task_vtable->process_msg = flite_speak;
- task_vtable->on_pre_run = flite_on_start;
- task_vtable->on_post_run = flite_on_terminate;
- }
- synth_channel->msg_pool = msg_pool;
- synth_channel->task = apt_consumer_task_base_get(consumer_task);
- if(synth_channel->task) {
- apt_task_name_set(synth_channel->task,"Flite Task");
- }
- return TRUE;
-}
-
-/** Create flite synthesizer channel derived from engine channel base */
-static mrcp_engine_channel_t* flite_synth_engine_channel_create(mrcp_engine_t *engine, apr_pool_t *pool)
-{
- mpf_stream_capabilities_t *capabilities;
- mpf_termination_t *termination;
-
- /* create flite synth channel */
- flite_synth_channel_t *synth_channel = (flite_synth_channel_t *) apr_palloc(pool,sizeof(flite_synth_channel_t));
-
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "flite_synth_engine_channel_create");
- synth_channel->flite_engine = (flite_synth_engine_t *) engine->obj;
- synth_channel->speak_request = NULL; // no active speak request in progress
- synth_channel->speak_response = NULL;
- synth_channel->stop_response = NULL;
- synth_channel->synthesizing = FALSE;
- synth_channel->paused = FALSE;
- synth_channel->pool = pool;
- synth_channel->audio_buffer = NULL;
- synth_channel->iId = 0;
- synth_channel->task = NULL;
- synth_channel->msg_pool = NULL;
- if(flite_synth_task_create(synth_channel) != TRUE) {
- apt_log(APT_LOG_MARK, APT_PRIO_WARNING, "flite_synth_task_create failed");
- return NULL;
- }
-
- capabilities = mpf_source_stream_capabilities_create(pool);
- mpf_codec_capabilities_add(
- &capabilities->codecs,
- MPF_SAMPLE_RATE_8000 | MPF_SAMPLE_RATE_16000,
- "LPCM");
-
- /* create media termination */
- termination = mrcp_engine_audio_termination_create(
- synth_channel, /* object to associate */
- &audio_stream_vtable, /* virtual methods table of audio stream */
- capabilities, /* stream capabilities */
- pool); /* pool to allocate memory from */
-
- /* create engine channel base */
- synth_channel->channel = mrcp_engine_channel_create(
- engine, /* engine */
- &channel_vtable, /* virtual methods table of engine channel */
- synth_channel, /* object to associate */
- termination, /* associated media termination */
- pool); /* pool to allocate memory from */
-
- if(!synth_channel->channel) {
- apt_log(APT_LOG_MARK, APT_PRIO_WARNING, "flite_synth_engine_channel_create failed");
- apt_task_destroy(synth_channel->task);
- return NULL;
- }
-
- synth_channel->audio_buffer = mpf_buffer_create(pool);
- synth_channel->iId = ++synth_channel->flite_engine->iChannels;
-
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "flite_synth_engine_channel_create created channel %d", synth_channel->iId);
- return synth_channel->channel;
-}
-
-/** Destroy engine channel */
-static apt_bool_t flite_synth_channel_destroy(mrcp_engine_channel_t *channel)
-{
- flite_synth_channel_t *synth_channel = (flite_synth_channel_t *) channel->method_obj;
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "flite_synth_channel_destroy - channel %d", synth_channel->iId);
- if(synth_channel->task) {
- apt_task_destroy(synth_channel->task);
- synth_channel->task = NULL;
- }
-
- synth_channel->flite_engine->iChannels--;
- return TRUE;
-}
-
-/** Open engine channel (asynchronous response MUST be sent)*/
-static apt_bool_t flite_synth_channel_open(mrcp_engine_channel_t *channel)
-{
- flite_synth_channel_t *synth_channel = (flite_synth_channel_t *) channel->method_obj;
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "flite_synth_channel_open - channel %d", synth_channel->iId);
-
- if(synth_channel->task) {
- if(apt_task_start(synth_channel->task) == TRUE) {
- /* async response will be sent */
- return TRUE;
- }
- else {
- apt_log(APT_LOG_MARK, APT_PRIO_WARNING, "Speak task start failed - channel %d", synth_channel->iId);
- }
- }
-
- return mrcp_engine_channel_open_respond(channel,FALSE);
-}
-
-/** Close engine channel (asynchronous response MUST be sent)*/
-static apt_bool_t flite_synth_channel_close(mrcp_engine_channel_t *channel)
-{
- flite_synth_channel_t *synth_channel = (flite_synth_channel_t *) channel->method_obj;
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "flite_synth_channel_close - channel %d", synth_channel->iId);
-
- if(synth_channel->task) {
- if(apt_task_terminate(synth_channel->task,FALSE) == TRUE) {
- /* async response will be sent */
- return TRUE;
- }
- else {
- apt_log(APT_LOG_MARK, APT_PRIO_WARNING, "Speak task terminate failed - channel %d", synth_channel->iId);
- }
- }
- return mrcp_engine_channel_close_respond(channel);
-}
-
-/** Process MRCP channel request (asynchronous response MUST be sent)*/
-static apt_bool_t flite_synth_channel_request_process(mrcp_engine_channel_t *channel, mrcp_message_t *request)
-{
- flite_synth_channel_t *synth_channel = (flite_synth_channel_t *) channel->method_obj;
- mrcp_message_t *response = mrcp_response_create(request,request->pool);
- apt_bool_t processed = FALSE;
-
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "flite_synth_channel_request_process - channel %d", synth_channel->iId);
-
- switch(request->start_line.method_id) {
- case SYNTHESIZER_SET_PARAMS:
- break;
- case SYNTHESIZER_GET_PARAMS:
- break;
- case SYNTHESIZER_SPEAK:
- processed = flite_synth_channel_speak(channel,request,response);
- break;
- case SYNTHESIZER_STOP:
- processed = flite_synth_channel_stop(channel,request,response);
- break;
- case SYNTHESIZER_PAUSE:
- processed = flite_synth_channel_pause(channel,request,response);
- break;
- case SYNTHESIZER_RESUME:
- processed = flite_synth_channel_resume(channel,request,response);
- break;
- case SYNTHESIZER_BARGE_IN_OCCURRED:
- processed = flite_synth_channel_stop(channel,request,response);
- break;
- case SYNTHESIZER_CONTROL:
- break;
- case SYNTHESIZER_DEFINE_LEXICON:
- break;
- default:
- break;
- }
- if(processed == FALSE) {
- /* send asynchronous response for not handled request */
- mrcp_engine_channel_message_send(channel,response);
- }
- return TRUE;
-}
-
-/** Process SPEAK request */
-static apt_bool_t synth_response_construct(mrcp_message_t *response, mrcp_status_code_e status_code, mrcp_synth_completion_cause_e completion_cause)
-{
- mrcp_synth_header_t *synth_header = mrcp_resource_header_prepare(response);
- if(!synth_header) {
- return FALSE;
- }
-
- response->start_line.status_code = status_code;
- synth_header->completion_cause = completion_cause;
- mrcp_resource_header_property_add(response,SYNTHESIZER_HEADER_COMPLETION_CAUSE);
- return TRUE;
-}
-
-/** Process SPEAK request */
-static apt_bool_t flite_synth_channel_speak(mrcp_engine_channel_t *channel, mrcp_message_t *request, mrcp_message_t *response)
-{
- mrcp_generic_header_t *generic_header;
- const char *content_type = NULL;
- flite_synth_channel_t *synth_channel = (flite_synth_channel_t *) channel->method_obj;
- apt_task_msg_t *msg = 0;
- flite_speak_msg_t *flite_msg = 0;
- apt_log(APT_LOG_MARK, APT_PRIO_INFO, "flite_synth_channel_speak - channel %d", synth_channel->iId);
-
- generic_header = mrcp_generic_header_get(request);
- if(generic_header) {
- /* content-type must be specified */
- if(mrcp_generic_header_property_check(request,GENERIC_HEADER_CONTENT_TYPE) == TRUE) {
- content_type = generic_header->content_type.buf;
- }
- }
- if(!content_type) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Missing Content-Type");
- synth_response_construct(response,MRCP_STATUS_CODE_MISSING_PARAM,SYNTHESIZER_COMPLETION_CAUSE_ERROR);
- return FALSE;
- }
-
- /* Flite currently supports only text/plain (no SSML) */
- if(strstr(content_type,"text") == NULL) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Not Supported Content-Type [%s]",content_type);
- synth_response_construct(response,MRCP_STATUS_CODE_UNSUPPORTED_PARAM_VALUE,SYNTHESIZER_COMPLETION_CAUSE_ERROR);
- return FALSE;
- }
-
- synth_channel->speak_request = request;
- synth_channel->speak_response = response;
-
- msg = apt_task_msg_acquire(synth_channel->msg_pool);
- msg->type = TASK_MSG_USER;
- flite_msg = (flite_speak_msg_t*) msg->data;
- flite_msg->channel = synth_channel;
- flite_msg->request = request;
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG, "Send signal to start speech synthesis - channel:%d", synth_channel->iId);
- if(apt_task_msg_signal(synth_channel->task,msg) != TRUE) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING, "Failed to send signal to start speech synthesis - channel:%d", synth_channel->iId);
- synth_channel->speak_request = NULL;
- synth_channel->speak_response = NULL;
- synth_response_construct(response,MRCP_STATUS_CODE_METHOD_FAILED,SYNTHESIZER_COMPLETION_CAUSE_ERROR);
- return FALSE;
- }
- return TRUE;
-}
-
-static apt_bool_t flite_speak(apt_task_t *task, apt_task_msg_t *msg)
-{
- flite_speak_msg_t *flite_msg = (flite_speak_msg_t*)msg->data;
- flite_synth_channel_t *synth_channel = (flite_synth_channel_t *) flite_msg->channel;
- cst_wave *wave = NULL;
- cst_voice *voice = NULL;
- apr_time_t start = 0;
- apr_time_t elapsed = 0;
- apr_time_t stamp = 0;
- apt_str_t *body;
- mrcp_message_t *response;
-
- apr_uint16_t rate = 8000;
- const mpf_codec_descriptor_t * descriptor = mrcp_engine_source_stream_codec_get(synth_channel->channel);
- if(descriptor) {
- rate = descriptor->sampling_rate;
- }
- body = &synth_channel->speak_request->body;
-
- response = synth_channel->speak_response;
- synth_channel->speak_response = NULL;
-
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "< flite_speak_msg_process speak - channel %d", synth_channel->iId);
-
- /* just sequential stuff */
- start = apr_time_now(); /* in microsec */
- if(!body->length) {
- synth_channel->speak_request = NULL;
- synth_response_construct(response,MRCP_STATUS_CODE_MISSING_PARAM,SYNTHESIZER_COMPLETION_CAUSE_ERROR);
- mrcp_engine_channel_message_send(synth_channel->channel,response);
- return FALSE;
- }
-
- voice = flite_voices_best_match_get(
- synth_channel->flite_engine->voices,
- synth_channel->speak_request);
- if(!voice) {
- /* error case: no voice found, appropriate respond must be sent */
- synth_channel->speak_request = NULL;
- synth_response_construct(response,MRCP_STATUS_CODE_METHOD_FAILED,SYNTHESIZER_COMPLETION_CAUSE_ERROR);
- mrcp_engine_channel_message_send(synth_channel->channel,response);
- return FALSE;
- }
-
- /*
- TODO
- create small units of text from synth_channel->speak_request->body.buf ( , . ? ! but ...
- synthesize small unit and store in audio_buffer
- check for stop
- pause resume state could improve performance
- you can "pause" generating new speech from a unit of text
- by checking the (decreasing) size of the audio_buffer
- no need to generate more speech samples than can be listened to...
- */
-
- /* send in-progress response and start synthesizing */
- response->start_line.request_state = MRCP_REQUEST_STATE_INPROGRESS;
- mrcp_engine_channel_message_send(synth_channel->channel,response);
-
- synth_channel->synthesizing = TRUE;
- wave = flite_text_to_wave(body->buf, voice);
- if(wave && cst_wave_num_samples(wave)) {
- int generated = (cst_wave_num_samples(wave)/cst_wave_sample_rate(wave)*1000);
- stamp = apr_time_now();
- elapsed = (stamp - start)/1000;
- apt_log(APT_LOG_MARK, APT_PRIO_INFO, "TTS (chan %d) took %"APR_TIME_T_FMT" to generate %d of speech (in millisec)", synth_channel->iId, elapsed, generated);
-
- if(rate != 16000) {
- cst_wave_resample(wave, rate);
- elapsed = (apr_time_now() - stamp)/1000;
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "TTS resampling to %d on (chan %d) took %"APR_TIME_T_FMT" millisec", rate, synth_channel->iId, elapsed);
- }
- mpf_buffer_audio_write(synth_channel->audio_buffer, cst_wave_samples(wave), cst_wave_num_samples(wave) * 2);
- delete_wave(wave);
- }
-
- /* this will notify the callback that feeds the client that synthesis is complete */
- mpf_buffer_event_write(synth_channel->audio_buffer, MEDIA_FRAME_TYPE_EVENT);
- synth_channel->synthesizing = FALSE;
-
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "> flite_speak_msg_process speak - end of TTS - %d", synth_channel->iId);
- return TRUE;
-}
-
-static APR_INLINE flite_synth_channel_t* flite_synth_channel_get(apt_task_t *task)
-{
- apt_consumer_task_t *consumer_task = apt_task_object_get(task);
- return apt_consumer_task_object_get(consumer_task);
-}
-
-static void flite_on_start(apt_task_t *task)
-{
- flite_synth_channel_t *synth_channel = flite_synth_channel_get(task);
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "Speak task started - channel %d", synth_channel->iId);
- mrcp_engine_channel_open_respond(synth_channel->channel,TRUE);
-}
-
-static void flite_on_terminate(apt_task_t *task)
-{
- flite_synth_channel_t *synth_channel = flite_synth_channel_get(task);
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "Speak task terminated - channel %d", synth_channel->iId);
- mrcp_engine_channel_close_respond(synth_channel->channel);
-}
-
-/** Process STOP request */
-static apt_bool_t flite_synth_channel_stop(mrcp_engine_channel_t *channel, mrcp_message_t *request, mrcp_message_t *response)
-{
- flite_synth_channel_t *synth_channel = (flite_synth_channel_t *) channel->method_obj;
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "flite_synth_channel_stop - channel %d", synth_channel->iId);
- /* store the request, make sure there is no more activity and only then send the response */
-
- synth_channel->stop_response = response;
- return TRUE;
-}
-
-/** Process PAUSE request */
-static apt_bool_t flite_synth_channel_pause(mrcp_engine_channel_t *channel, mrcp_message_t *request, mrcp_message_t *response)
-{
- flite_synth_channel_t *synth_channel = (flite_synth_channel_t *) channel->method_obj;
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "flite_synth_channel_pause - channel %d", synth_channel->iId);
-
- synth_channel->paused = TRUE;
- /* send asynchronous response */
- mrcp_engine_channel_message_send(channel,response);
- return TRUE;
-}
-
-/** Process RESUME request */
-static apt_bool_t flite_synth_channel_resume(mrcp_engine_channel_t *channel, mrcp_message_t *request, mrcp_message_t *response)
-{
- flite_synth_channel_t *synth_channel = (flite_synth_channel_t *) channel->method_obj;
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "flite_synth_channel_resume - channel %d", synth_channel->iId);
-
- synth_channel->paused = FALSE;
- /* send asynchronous response */
- mrcp_engine_channel_message_send(channel,response);
- return TRUE;
-}
-
-/** Raise SPEAK-COMPLETE event */
-static apt_bool_t flite_synth_speak_complete_raise(flite_synth_channel_t *synth_channel)
-{
- mrcp_message_t *message = 0;
- mrcp_synth_header_t * synth_header = 0;
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "flite_synth_speak_complete_raise - channel %d", synth_channel->iId);
-
- if (!synth_channel->speak_request) {
- return FALSE;
- }
-
- message = mrcp_event_create(
- synth_channel->speak_request,
- SYNTHESIZER_SPEAK_COMPLETE,
- synth_channel->speak_request->pool);
- if (!message) {
- return FALSE;
- }
-
- /* get/allocate synthesizer header */
- synth_header = (mrcp_synth_header_t *) mrcp_resource_header_prepare(message);
- if (synth_header) {
- /* set completion cause */
- synth_header->completion_cause = SYNTHESIZER_COMPLETION_CAUSE_NORMAL;
- mrcp_resource_header_property_add(message,SYNTHESIZER_HEADER_COMPLETION_CAUSE);
- }
- /* set request state */
- message->start_line.request_state = MRCP_REQUEST_STATE_COMPLETE;
-
- synth_channel->speak_request = NULL;
- /* send asynch event */
- return mrcp_engine_channel_message_send(synth_channel->channel,message);
-}
-
-/** Callback is called from MPF engine context to read/get new frame */
-static apt_bool_t flite_synth_stream_read(mpf_audio_stream_t *stream, mpf_frame_t *frame)
-{
- flite_synth_channel_t *synth_channel = (flite_synth_channel_t *) stream->obj;
- if(synth_channel->stop_response && synth_channel->synthesizing == FALSE) {
- /* send asynchronous response to STOP request */
- mrcp_message_t *stop_response = synth_channel->stop_response;
- synth_channel->stop_response = NULL;
- synth_channel->speak_request = NULL;
- synth_channel->paused = FALSE;
- mrcp_engine_channel_message_send(synth_channel->channel,stop_response);
- return TRUE;
- }
-
- /* check if there is active SPEAK request and it isn't in paused state */
- if(synth_channel->speak_request && synth_channel->paused == FALSE) {
- /* normal processing */
- mpf_buffer_frame_read(synth_channel->audio_buffer,frame);
-#if 0
- apt_log(APT_LOG_MARK, APT_PRIO_DEBUG, "flite_synth_stream_read - channel %d - size %d", synth_channel->iId, mpf_buffer_get_size(synth_channel->audio_buffer));
-#endif
-
- if((frame->type & MEDIA_FRAME_TYPE_EVENT) == MEDIA_FRAME_TYPE_EVENT) {
- frame->type &= ~MEDIA_FRAME_TYPE_EVENT;
- flite_synth_speak_complete_raise(synth_channel);
- }
- }
- return TRUE;
-}
+++ /dev/null
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = -Iinclude \
- -I$(top_srcdir)/libs/mrcp-engine/include \
- -I$(top_srcdir)/libs/mrcp/include \
- -I$(top_srcdir)/libs/mrcp/message/include \
- -I$(top_srcdir)/libs/mrcp/control/include \
- -I$(top_srcdir)/libs/mrcp/resources/include \
- -I$(top_srcdir)/libs/mpf/include \
- -I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) \
- $(UNIMRCP_APU_INCLUDES) \
- $(UNIMRCP_SPHINXBASE_INCLUDES) \
- $(UNIMRCP_POCKETSPHINX_INCLUDES)
-
-plugin_LTLIBRARIES = mrcppocketsphinx.la
-
-mrcppocketsphinx_la_SOURCES = src/mrcp_pocketsphinx.c \
- src/pocketsphinx_properties.c
-mrcppocketsphinx_la_LDFLAGS = -module $(PLUGIN_LT_VERSION)
-mrcppocketsphinx_la_LIBADD = $(UNIMRCP_POCKETSPHINX_LIBS) $(UNIMRCP_SPHINXBASE_LIBS) -lm
-
-
-dictionary:
- !(test -f $(UNIMRCP_POCKETSPHINX_MODELS)/lm/cmudict.0.6d) || \
- $(INSTALL) -m 644 $(UNIMRCP_POCKETSPHINX_MODELS)/lm/cmudict.0.6d $(datadir)/default.dic
-
-model:
- !(test -d $(UNIMRCP_POCKETSPHINX_MODELS)/hmm/wsj1/) || ($(mkinstalldirs) $(datadir)/wsj1; \
- $(INSTALL) -m 644 $(UNIMRCP_POCKETSPHINX_MODELS)/hmm/wsj1/* $(datadir)/wsj1)
-
-install-data-local:
- test -d $(confdir) || $(mkinstalldirs) $(confdir)
- test -f $(confdir)/pocketsphinx.xml || $(INSTALL) -m 644 conf/pocketsphinx.xml $(confdir)
- test -f $(datadir)/default.dic || $(MAKE) dictionary
- test -d $(datadir)/wsj1 || $(MAKE) model
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- PocketSphinx Document -->
-<pocketsphinx>
- <!-- Senstitivity level and timeout are used for voice activity (speech) detection
- reasonable values: level is in [2..250] range, timeout is in [100..500] msec range
- -->
- <sensitivity level="50" activity-timeout="300" inactivity-timeout="300"/>
-
- <!-- Default values for noinput and recognition timeout,
- these values can be overriden by client's requests
- -->
- <timers noinput-timeout="10000" recognition-timeout="15000"/>
-
-
- <!-- PocketSphinx related model and dictionary data.
- Default dir (dir="") is InstallDir/data
- -->
- <model dir="" narrowband="communicator" wideband="wsj1" dictionary="default.dic" preferred="narrowband"/>
- <!-- <model dir="/usr/local/freeswitch/grammar" narrowband="model/communicator" wideband="model/wsj1" dictionary="default.dic"/> -->
-
- <!-- Enable to save utterance.
- Default dir (dir="") is InstallDir/data
- -->
- <save-waveform dir="" enable="0"/>
-</pocketsphinx>
+++ /dev/null
-/*
- * Copyright 2008-2010 Arsen Chaloyan
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: pocketsphinx_properties.h 1743 2010-07-12 08:04:46Z achaloyan $
- */
-
-#ifndef POCKETSPHINX_PROPERTIES_H
-#define POCKETSPHINX_PROPERTIES_H
-
-/**
- * @file pocketsphinx_properties.h
- * @brief PocketSphinx Properties
- */
-
-#include "apt_dir_layout.h"
-
-APT_BEGIN_EXTERN_C
-
-/** Enumeration of PocketSphinx models */
-typedef enum {
- POCKETSPHINX_MODEL_NARROWBAND, /**< narrowband model */
- POCKETSPHINX_MODEL_WIDEBAND /**< wideband model */
-} pocketsphinx_model_e;
-
-/** Declaration of PocketSphinx properties */
-typedef struct pocketsphinx_properties_t pocketsphinx_properties_t;
-
-/** PocketSphinx properties */
-struct pocketsphinx_properties_t {
- /** Data directory */
- const char *data_dir;
- /** Path to dictionary file */
- const char *dictionary;
- /** Path to narrowband model */
- const char *model_8k;
- /** Path to wideband model */
- const char *model_16k;
- /** Preferred (default) model */
- pocketsphinx_model_e preferred_model;
-
- /** Sensitivity level */
- apr_size_t sensitivity_level;
- /** Activity timeout (timeout to be used to switch to the activity state) */
- apr_size_t activity_timeout;
- /** Inactivity timeout (timeout to be used to switch to the inactivity state) */
- apr_size_t inactivity_timeout;
-
- /** Noinput timeout */
- apr_size_t no_input_timeout;
- /** Recognition timeout */
- apr_size_t recognition_timeout;
- /** Partial result checking timeout */
- apr_size_t partial_result_timeout;
-
- /** Whether to save waveform or not */
- apt_bool_t save_waveform;
- /** Directory to save waveform in */
- const char *save_waveform_dir;
-};
-
-/** Load PocketSphinx properties */
-apt_bool_t pocketsphinx_properties_load(pocketsphinx_properties_t *properties,
- const char *file_path,
- const apt_dir_layout_t *dir_layout,
- apr_pool_t *pool);
-
-APT_END_EXTERN_C
-
-#endif /* POCKETSPHINX_PROPERTIES_H */
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="mrcppocketsphinx"\r
- ProjectGUID="{3C614AE8-B611-4D43-A9AF-1CAA440A9F69}"\r
- RootNamespace="mrcppocketsphinx"\r
- Keyword="Win32Proj"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- ConfigurationType="2"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\pocketsphinx.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpplugin.vsprops"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="include"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="2"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\pocketsphinx.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpplugin.vsprops"\r
- CharacterSet="1"\r
- WholeProgramOptimization="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- AdditionalIncludeDirectories="include"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- <File\r
- RelativePath=".\include\pocketsphinx_properties.h"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
- <File\r
- RelativePath=".\src\mrcp_pocketsphinx.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\pocketsphinx_properties.c"\r
- >\r
- </File>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
+++ /dev/null
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="mrcppocketsphinx"
- ProjectGUID="{3C614AE8-B611-4D43-A9AF-1CAA440A9F69}"
- RootNamespace="mrcppocketsphinx"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\uniplugin.vsprops;$(ProjectDir)..\..\build\vsprops\pocketsphinx.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="include"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\uniplugin.vsprops;$(ProjectDir)..\..\build\vsprops\pocketsphinx.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="include"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\uniplugin-x64.vsprops;$(ProjectDir)..\..\build\vsprops\pocketsphinx.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="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\uniplugin-x64.vsprops;$(ProjectDir)..\..\build\vsprops\pocketsphinx.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="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="include"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\include\pocketsphinx_properties.h"
- >
- </File>
- </Filter>
- <Filter
- Name="src"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- >
- <File
- RelativePath=".\src\mrcp_pocketsphinx.c"
- >
- </File>
- <File
- RelativePath=".\src\pocketsphinx_properties.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+++ /dev/null
-/*
- * Copyright 2008-2010 Arsen Chaloyan
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: mrcp_pocketsphinx.c 1787 2010-09-23 12:28:32Z achaloyan $
- */
-
-/*
- * Mandatory rules concerning plugin implementation.
- * 1. Each plugin MUST implement a plugin/engine creator function
- * with the exact signature and name (the main entry point)
- * MRCP_PLUGIN_DECLARE(mrcp_engine_t*) mrcp_plugin_create(apr_pool_t *pool)
- * 2. Each plugin MUST declare its version number
- * MRCP_PLUGIN_VERSION_DECLARE
- * 3. One and only one response MUST be sent back to the received request.
- * 4. Methods (callbacks) of the MRCP engine channel MUST not block.
- * (asynchronous response can be sent from the context of other thread)
- * 5. Methods (callbacks) of the MPF engine stream MUST not block.
- */
-
-#include <pocketsphinx.h>
-#include <apr_thread_cond.h>
-#include <apr_thread_proc.h>
-#include <apr_tables.h>
-#include <apr_file_io.h>
-#include "mrcp_recog_engine.h"
-#include "mpf_activity_detector.h"
-#include "pocketsphinx_properties.h"
-#include "apt_log.h"
-
-#define POCKETSPHINX_CONFFILE_NAME "pocketsphinx.xml"
-
-#define RECOGNIZER_SIDRES(recognizer) (recognizer)->channel->id.buf, "pocketsphinx"
-
-typedef struct pocketsphinx_engine_t pocketsphinx_engine_t;
-typedef struct pocketsphinx_recognizer_t pocketsphinx_recognizer_t;
-
-/** Methods of recognition engine */
-static apt_bool_t pocketsphinx_engine_destroy(mrcp_engine_t *engine);
-static apt_bool_t pocketsphinx_engine_open(mrcp_engine_t *engine);
-static apt_bool_t pocketsphinx_engine_close(mrcp_engine_t *engine);
-static mrcp_engine_channel_t* pocketsphinx_engine_recognizer_create(mrcp_engine_t *engine, apr_pool_t *pool);
-
-static const struct mrcp_engine_method_vtable_t engine_vtable = {
- pocketsphinx_engine_destroy,
- pocketsphinx_engine_open,
- pocketsphinx_engine_close,
- pocketsphinx_engine_recognizer_create
-};
-
-
-/** Methods of recognition channel (recognizer) */
-static apt_bool_t pocketsphinx_recognizer_destroy(mrcp_engine_channel_t *channel);
-static apt_bool_t pocketsphinx_recognizer_open(mrcp_engine_channel_t *channel);
-static apt_bool_t pocketsphinx_recognizer_close(mrcp_engine_channel_t *channel);
-static apt_bool_t pocketsphinx_recognizer_request_process(mrcp_engine_channel_t *channel, mrcp_message_t *request);
-
-static const struct mrcp_engine_channel_method_vtable_t channel_vtable = {
- pocketsphinx_recognizer_destroy,
- pocketsphinx_recognizer_open,
- pocketsphinx_recognizer_close,
- pocketsphinx_recognizer_request_process
-};
-
-/** Methods of audio stream to recognize */
-static apt_bool_t pocketsphinx_stream_write(mpf_audio_stream_t *stream, const mpf_frame_t *frame);
-
-static const mpf_audio_stream_vtable_t audio_stream_vtable = {
- NULL, /* destroy */
- NULL, /* open_rx */
- NULL, /* close_rx */
- NULL, /* read_frame */
- NULL, /* open_tx */
- NULL, /* close_tx */
- pocketsphinx_stream_write
-};
-
-/** Pocketsphinx engine (engine is an aggregation of recognizers) */
-struct pocketsphinx_engine_t {
- /* Engine base */
- mrcp_engine_t *base;
- /** Properties loaded from config file */
- pocketsphinx_properties_t properties;
-};
-
-/** Pocketsphinx channel (recognizer) */
-struct pocketsphinx_recognizer_t {
- /** Engine channel base */
- mrcp_engine_channel_t *channel;
-
- /** Actual recognizer object */
- ps_decoder_t *decoder;
- /** Configuration */
- cmd_ln_t *config;
- /** Recognizer properties coppied from default engine properties */
- pocketsphinx_properties_t properties;
- /** Whether input timer has been started or not */
- apt_bool_t is_input_timer_on;
- /** Noinput timeout */
- apr_size_t no_input_timeout;
- /** Whether recognition timer has been started or not */
- apt_bool_t is_recognition_timer_on;
- /** Recognition timeout */
- apr_size_t recognition_timeout;
- /** Timeout elapsed since the last partial result checking */
- apr_size_t partial_result_timeout;
- /** Last (partially) recognized result */
- const char *last_result;
- /** Active grammar identifier (content-id) */
- const char *grammar_id;
- /** Table of defined grammars (key=content-id, value=grammar-file-path) */
- apr_table_t *grammar_table;
- /** File to write waveform to if save_waveform is on */
- apr_file_t *waveform;
-
- /** Voice activity detector */
- mpf_activity_detector_t *detector;
-
- /** Thread to run recognition in */
- apr_thread_t *thread;
- /** Conditional wait object */
- apr_thread_cond_t *wait_object;
- /** Mutex of the wait object */
- apr_thread_mutex_t *mutex;
-
- /** Pending request from client stack to recognizer */
- mrcp_message_t *request;
- /** Pending event from mpf layer to recognizer */
- mrcp_message_t *complete_event;
- /** In-progress RECOGNIZE request */
- mrcp_message_t *inprogress_recog;
- /** Pending STOP response */
- mrcp_message_t *stop_response;
- /** Is recognition channel being closed */
- apt_bool_t close_requested;
- /** Flag to prevent race condition when checking if a message is present */
- apt_bool_t message_waiting;
-};
-
-static void* APR_THREAD_FUNC pocketsphinx_recognizer_run(apr_thread_t *thread, void *data);
-
-/** Declare this macro to set plugin version */
-MRCP_PLUGIN_VERSION_DECLARE
-
-/** Declare this macro to use log routine of the server, plugin is loaded from */
-MRCP_PLUGIN_LOGGER_IMPLEMENT
-
-/** Create pocketsphinx engine (engine is an aggregation of recognizers) */
-MRCP_PLUGIN_DECLARE(mrcp_engine_t*) mrcp_plugin_create(apr_pool_t *pool)
-{
- pocketsphinx_engine_t *engine = apr_palloc(pool,sizeof(pocketsphinx_engine_t));
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Create PocketSphinx Engine");
-
- /* create engine base */
- engine->base = mrcp_engine_create(
- MRCP_RECOGNIZER_RESOURCE, /* MRCP resource identifier */
- engine, /* object to associate */
- &engine_vtable, /* virtual methods table of engine */
- pool); /* pool to allocate memory from */
- return engine->base;
-}
-
-/** Destroy pocketsphinx engine */
-static apt_bool_t pocketsphinx_engine_destroy(mrcp_engine_t *engine_base)
-{
- return TRUE;
-}
-
-/** Open pocketsphinx engine */
-static apt_bool_t pocketsphinx_engine_open(mrcp_engine_t *engine_base)
-{
- pocketsphinx_engine_t *engine = engine_base->obj;
- const apt_dir_layout_t *dir_layout = engine_base->dir_layout;
-
- char *file_path = NULL;
- apr_filepath_merge(&file_path,dir_layout->conf_dir_path,POCKETSPHINX_CONFFILE_NAME,0,engine_base->pool);
-
- /* load properties */
- pocketsphinx_properties_load(&engine->properties,file_path,dir_layout,engine_base->pool);
- return mrcp_engine_open_respond(engine_base,TRUE);
-}
-
-/** Close pocketsphinx engine */
-static apt_bool_t pocketsphinx_engine_close(mrcp_engine_t *engine_base)
-{
- return mrcp_engine_close_respond(engine_base);
-}
-
-/** Create pocketsphinx recognizer */
-static mrcp_engine_channel_t* pocketsphinx_engine_recognizer_create(mrcp_engine_t *engine_base, apr_pool_t *pool)
-{
- mpf_stream_capabilities_t *capabilities;
- mpf_termination_t *termination;
- mrcp_engine_channel_t *channel;
- pocketsphinx_engine_t *engine = engine_base->obj;
-
- /* create pocketsphinx recognizer */
- pocketsphinx_recognizer_t *recognizer = apr_palloc(pool,sizeof(pocketsphinx_recognizer_t));
- recognizer->decoder = NULL;
- recognizer->config = NULL;
- recognizer->is_input_timer_on = FALSE;
- recognizer->no_input_timeout = 0;
- recognizer->is_recognition_timer_on = FALSE;
- recognizer->recognition_timeout = 0;
- recognizer->partial_result_timeout = 0;
- recognizer->last_result = NULL;
- recognizer->detector = NULL;
- recognizer->thread = NULL;
- recognizer->wait_object = NULL;
- recognizer->mutex = NULL;
- recognizer->request = NULL;
- recognizer->complete_event = NULL;
- recognizer->inprogress_recog = FALSE;
- recognizer->stop_response = NULL;
- recognizer->close_requested = FALSE;
- recognizer->grammar_id = NULL;
- recognizer->grammar_table = apr_table_make(pool,1);
- recognizer->waveform = NULL;
- recognizer->message_waiting = FALSE;
-
- /* copy default properties loaded from config */
- recognizer->properties = engine->properties;
-
- capabilities = mpf_sink_stream_capabilities_create(pool);
- mpf_codec_capabilities_add(
- &capabilities->codecs,
- MPF_SAMPLE_RATE_8000 | MPF_SAMPLE_RATE_16000,
- "LPCM");
-
- /* create media termination */
- termination = mrcp_engine_audio_termination_create(
- recognizer, /* object to associate */
- &audio_stream_vtable, /* virtual methods table of audio stream */
- capabilities, /* stream capabilities */
- pool); /* pool to allocate memory from */
-
- /* create engine channel base */
- channel = mrcp_engine_channel_create(
- engine_base, /* engine */
- &channel_vtable, /* virtual methods table of engine channel */
- recognizer, /* object to associate */
- termination, /* associated media termination */
- pool); /* pool to allocate memory from */
-
- apr_thread_mutex_create(&recognizer->mutex,APR_THREAD_MUTEX_DEFAULT,channel->pool);
- apr_thread_cond_create(&recognizer->wait_object,channel->pool);
-
- recognizer->channel = channel;
- return channel;
-}
-
-/** Destroy pocketsphinx recognizer */
-static apt_bool_t pocketsphinx_recognizer_destroy(mrcp_engine_channel_t *channel)
-{
- pocketsphinx_recognizer_t *recognizer = channel->method_obj;
- if(recognizer->mutex) {
- apr_thread_mutex_destroy(recognizer->mutex);
- recognizer->mutex = NULL;
- }
- if(recognizer->wait_object) {
- apr_thread_cond_destroy(recognizer->wait_object);
- recognizer->wait_object = NULL;
- }
- return TRUE;
-}
-
-/** Open pocketsphinx recognizer (asynchronous response MUST be sent) */
-static apt_bool_t pocketsphinx_recognizer_open(mrcp_engine_channel_t *channel)
-{
- apr_status_t rv;
- pocketsphinx_recognizer_t *recognizer = channel->method_obj;
-
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Open Channel "APT_SIDRES_FMT,RECOGNIZER_SIDRES(recognizer));
-
- /* Launch a thread to run recognition in */
- rv = apr_thread_create(&recognizer->thread,NULL,pocketsphinx_recognizer_run,recognizer,channel->pool);
- if(rv != APR_SUCCESS) {
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Failed to Launch Thread "APT_SIDRES_FMT,RECOGNIZER_SIDRES(recognizer));
- return mrcp_engine_channel_open_respond(channel,FALSE);
- }
-
- return TRUE;
-}
-
-/** Close pocketsphinx recognizer (asynchronous response MUST be sent)*/
-static apt_bool_t pocketsphinx_recognizer_close(mrcp_engine_channel_t *channel)
-{
- pocketsphinx_recognizer_t *recognizer = channel->method_obj;
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Close Channel "APT_SIDRES_FMT,RECOGNIZER_SIDRES(recognizer));
- if(recognizer->thread) {
- apr_status_t s;
- apr_thread_mutex_lock(recognizer->mutex);
-
- /* Signal recognition thread to terminate */
- recognizer->close_requested = TRUE;
- recognizer->message_waiting = TRUE;
- apr_thread_cond_signal(recognizer->wait_object);
-
- apr_thread_mutex_unlock(recognizer->mutex);
-
- /* Wait for thread to be finally terminated */
- apr_thread_join(&s,recognizer->thread);
- recognizer->thread = NULL;
- }
-
- return mrcp_engine_channel_close_respond(channel);
-}
-
-/** Process MRCP request (asynchronous response MUST be sent)*/
-static apt_bool_t pocketsphinx_recognizer_request_process(mrcp_engine_channel_t *channel, mrcp_message_t *request)
-{
- pocketsphinx_recognizer_t *recognizer = channel->method_obj;
-
- /* Store request and signal recognition thread to process the request */
- apr_thread_mutex_lock(recognizer->mutex);
- recognizer->request = request;
- recognizer->message_waiting = TRUE;
- apr_thread_cond_signal(recognizer->wait_object);
- apr_thread_mutex_unlock(recognizer->mutex);
- return TRUE;
-}
-
-/** Initialize pocketsphinx decoder [RECOG] */
-static apt_bool_t pocketsphinx_decoder_init(pocketsphinx_recognizer_t *recognizer, const char *grammar)
-{
- const mpf_codec_descriptor_t *descriptor = mrcp_engine_sink_stream_codec_get(recognizer->channel);
- const char *model = recognizer->properties.model_8k;
- const char *rate = "8000";
- if(descriptor && descriptor->sampling_rate == 16000) {
- model = recognizer->properties.model_16k;
- rate = "16000";
- }
-
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Init Config rate [%s] dictionary [%s] "APT_SIDRES_FMT,
- rate,
- recognizer->properties.dictionary,
- RECOGNIZER_SIDRES(recognizer));
- recognizer->config = cmd_ln_init(recognizer->config, ps_args(), FALSE,
- "-samprate", rate,
- "-hmm", model,
- "-jsgf", grammar,
- "-dict", recognizer->properties.dictionary,
- "-frate", "50",
- "-silprob", "0.005",
- NULL);
- if(!recognizer->config) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Init Config "APT_SIDRES_FMT,RECOGNIZER_SIDRES(recognizer));
- return FALSE;
- }
-
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Init Decoder "APT_SIDRES_FMT,RECOGNIZER_SIDRES(recognizer));
- if(recognizer->decoder) {
- if(ps_reinit(recognizer->decoder,recognizer->config) < 0) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Reinit Decoder "APT_SIDRES_FMT,RECOGNIZER_SIDRES(recognizer));
- return FALSE;
- }
- }
- else {
- recognizer->decoder = ps_init(recognizer->config);
- if(!recognizer->decoder) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Init Decoder "APT_SIDRES_FMT,RECOGNIZER_SIDRES(recognizer));
- return FALSE;
- }
- }
-
- if(!recognizer->detector) {
- recognizer->detector = mpf_activity_detector_create(recognizer->channel->pool);
- mpf_activity_detector_level_set(recognizer->detector,recognizer->properties.sensitivity_level);
- mpf_activity_detector_speech_timeout_set(recognizer->detector,recognizer->properties.activity_timeout);
- mpf_activity_detector_silence_timeout_set(recognizer->detector,recognizer->properties.inactivity_timeout);
- }
- return TRUE;
-}
-
-/** Build pocketsphinx recognized result [RECOG] */
-static apt_bool_t pocketsphinx_result_build(pocketsphinx_recognizer_t *recognizer, mrcp_message_t *message)
-{
- apt_str_t *body = &message->body;
- if(!recognizer->last_result || !recognizer->grammar_id) {
- return FALSE;
- }
-
- body->buf = apr_psprintf(message->pool,
- "<?xml version=\"1.0\"?>\n"
- "<result grammar=\"%s\">\n"
- " <interpretation grammar=\"%s\" confidence=\"%d\">\n"
- " <instance>%s</instance>\n"
- " <input mode=\"speech\">%s</input>\n"
- " </interpretation>\n"
- "</result>\n",
- recognizer->grammar_id,
- recognizer->grammar_id,
- 99,
- recognizer->last_result,
- recognizer->last_result);
- if(body->buf) {
- mrcp_generic_header_t *generic_header;
- generic_header = mrcp_generic_header_prepare(message);
- if(generic_header) {
- /* set content type */
- apt_string_assign(&generic_header->content_type,"application/x-nlsml",message->pool);
- mrcp_generic_header_property_add(message,GENERIC_HEADER_CONTENT_TYPE);
- }
-
- body->length = strlen(body->buf);
- }
- return TRUE;
-}
-
-/** Clear pocketsphinx grammars [RECOG] */
-static apt_bool_t pocketsphinx_grammars_clear(pocketsphinx_recognizer_t *recognizer)
-{
- const apr_array_header_t *tarr = apr_table_elts(recognizer->grammar_table);
- const apr_table_entry_t *telts = (const apr_table_entry_t*)tarr->elts;
- int i;
- for(i = 0; i < tarr->nelts; i++) {
- const char *grammar_file_path = telts[i].val;
- if(grammar_file_path) {
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Remove Grammar File [%s] "APT_SIDRES_FMT,
- grammar_file_path,RECOGNIZER_SIDRES(recognizer));
- apr_file_remove(grammar_file_path,recognizer->channel->pool);
- }
- }
- apr_table_clear(recognizer->grammar_table);
- return TRUE;
-}
-
-/** Load pocketsphinx grammar [RECOG] */
-static mrcp_status_code_e pocketsphinx_grammar_load(pocketsphinx_recognizer_t *recognizer, const char *content_id, const char *content_type, const apt_str_t *content)
-{
- /* load grammar */
- mrcp_engine_channel_t *channel = recognizer->channel;
- const apt_dir_layout_t *dir_layout = channel->engine->dir_layout;
- const char *grammar_file_path = NULL;
- const char *grammar_file_name = NULL;
- apr_file_t *fd = NULL;
- apr_status_t rv;
- apr_size_t size;
-
- /* only JSGF grammar is supported */
- if(strstr(content_type,"jsgf") == NULL) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Not Supported Content-Type [%s] "APT_SIDRES_FMT,
- content_type,RECOGNIZER_SIDRES(recognizer));
- return MRCP_STATUS_CODE_UNSUPPORTED_PARAM_VALUE;
- }
-
- grammar_file_name = apr_psprintf(channel->pool,"%s-%s.gram",channel->id.buf,content_id);
- grammar_file_path = apt_datadir_filepath_get(dir_layout,grammar_file_name,channel->pool);
-
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Create Grammar File [%s] "APT_SIDRES_FMT,
- grammar_file_path,RECOGNIZER_SIDRES(recognizer));
- rv = apr_file_open(&fd,grammar_file_path,APR_CREATE|APR_TRUNCATE|APR_WRITE|APR_BINARY,
- APR_OS_DEFAULT,channel->pool);
- if(rv != APR_SUCCESS) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Cannot Open Grammar File to Write [%s] "APT_SIDRES_FMT,
- grammar_file_path,RECOGNIZER_SIDRES(recognizer));
- return MRCP_STATUS_CODE_METHOD_FAILED;
- }
-
- size = content->length;
- apr_file_write(fd,content->buf,&size);
- apr_file_close(fd);
-
- /* init pocketsphinx decoder */
- if(pocketsphinx_decoder_init(recognizer,grammar_file_path) != TRUE) {
- apr_file_remove(grammar_file_path,channel->pool);
- return MRCP_STATUS_CODE_METHOD_FAILED;
- }
- recognizer->grammar_id = content_id;
- apr_table_setn(recognizer->grammar_table,content_id,grammar_file_path);
- return MRCP_STATUS_CODE_SUCCESS;
-}
-
-/** Unload pocketsphinx grammar [RECOG] */
-static mrcp_status_code_e pocketsphinx_grammar_unload(pocketsphinx_recognizer_t *recognizer, const char *content_id)
-{
- /* unload grammar */
- const char *grammar_file_path = apr_table_get(recognizer->grammar_table,content_id);
- if(!grammar_file_path) {
- return MRCP_STATUS_CODE_ILLEGAL_PARAM_VALUE;
- }
-
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Remove Grammar File [%s] "APT_SIDRES_FMT,
- grammar_file_path,RECOGNIZER_SIDRES(recognizer));
- apr_file_remove(grammar_file_path,recognizer->channel->pool);
- apr_table_unset(recognizer->grammar_table,content_id);
- return MRCP_STATUS_CODE_SUCCESS;
-}
-
-/** Process DEFINE-GRAMMAR request [RECOG] */
-static apt_bool_t pocketsphinx_define_grammar(pocketsphinx_recognizer_t *recognizer, mrcp_message_t *request, mrcp_message_t *response)
-{
- const char *content_type = NULL;
- const char *content_id = NULL;
- mrcp_engine_channel_t *channel = recognizer->channel;
-
- mrcp_generic_header_t *generic_header = mrcp_generic_header_get(request);
- mrcp_recog_header_t *recog_header = mrcp_resource_header_prepare(response);
- if(!generic_header || !recog_header) {
- return FALSE;
- }
-
- recog_header->completion_cause = RECOGNIZER_COMPLETION_CAUSE_SUCCESS;
- mrcp_resource_header_property_add(response,RECOGNIZER_HEADER_COMPLETION_CAUSE);
-
- /* content-id must be specified */
- if(mrcp_generic_header_property_check(request,GENERIC_HEADER_CONTENT_ID) == TRUE) {
- content_id = generic_header->content_id.buf;
- }
- if(!content_id) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Missing Content-Id "APT_SIDRES_FMT,RECOGNIZER_SIDRES(recognizer));
- response->start_line.status_code = MRCP_STATUS_CODE_MISSING_PARAM;
- recog_header->completion_cause = RECOGNIZER_COMPLETION_CAUSE_GRAM_LOAD_FAILURE;
- return FALSE;
- }
-
- if(mrcp_generic_header_property_check(request,GENERIC_HEADER_CONTENT_LENGTH) == TRUE &&
- generic_header->content_length) {
- /* content-type must be specified */
- if(mrcp_generic_header_property_check(request,GENERIC_HEADER_CONTENT_TYPE) == TRUE) {
- content_type = generic_header->content_type.buf;
- }
-
- if(!content_type) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Missing Content-Type "APT_SIDRES_FMT,RECOGNIZER_SIDRES(recognizer));
- response->start_line.status_code = MRCP_STATUS_CODE_MISSING_PARAM;
- recog_header->completion_cause = RECOGNIZER_COMPLETION_CAUSE_GRAM_LOAD_FAILURE;
- return FALSE;
- }
-
- response->start_line.status_code = pocketsphinx_grammar_load(recognizer,content_id,content_type,&request->body);
- if(response->start_line.status_code != MRCP_STATUS_CODE_SUCCESS) {
- recog_header->completion_cause = RECOGNIZER_COMPLETION_CAUSE_GRAM_LOAD_FAILURE;
- return FALSE;
- }
- }
- else {
- response->start_line.status_code = pocketsphinx_grammar_unload(recognizer,content_id);
- if(response->start_line.status_code != MRCP_STATUS_CODE_SUCCESS) {
- recog_header->completion_cause = RECOGNIZER_COMPLETION_CAUSE_GRAM_LOAD_FAILURE;
- return FALSE;
- }
- }
-
- /* send asynchronous response */
- mrcp_engine_channel_message_send(channel,response);
- return TRUE;
-}
-
-/** Process RECOGNIZE request [RECOG] */
-static apt_bool_t pocketsphinx_recognize(pocketsphinx_recognizer_t *recognizer, mrcp_message_t *request, mrcp_message_t *response)
-{
- const char *content_type = NULL;
- mrcp_engine_channel_t *channel = recognizer->channel;
- mrcp_recog_header_t *request_recog_header;
- mrcp_recog_header_t *response_recog_header = mrcp_resource_header_prepare(response);
- mrcp_generic_header_t *generic_header = mrcp_generic_header_get(request);
- if(!generic_header || !response_recog_header) {
- return FALSE;
- }
-
- /* content-type must be specified */
- if(mrcp_generic_header_property_check(request,GENERIC_HEADER_CONTENT_TYPE) == TRUE) {
- content_type = generic_header->content_type.buf;
- }
- if(!content_type) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Missing Content-Type "APT_SIDRES_FMT,RECOGNIZER_SIDRES(recognizer));
- response->start_line.status_code = MRCP_STATUS_CODE_MISSING_PARAM;
- response_recog_header->completion_cause = RECOGNIZER_COMPLETION_CAUSE_GRAM_LOAD_FAILURE;
- return FALSE;
- }
-
- if(strcmp(content_type,"text/uri-list") == 0) {
- /* assume the uri-list contains last defined (active) grammar for now */
- }
- else {
- const char *content_id = NULL;
- /* content-id must be specified */
- if(mrcp_generic_header_property_check(request,GENERIC_HEADER_CONTENT_ID) == TRUE) {
- content_id = generic_header->content_id.buf;
- }
- if(!content_id) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Missing Content-Id "APT_SIDRES_FMT,RECOGNIZER_SIDRES(recognizer));
- response->start_line.status_code = MRCP_STATUS_CODE_MISSING_PARAM;
- response_recog_header->completion_cause = RECOGNIZER_COMPLETION_CAUSE_GRAM_LOAD_FAILURE;
- return FALSE;
- }
-
- response->start_line.status_code = pocketsphinx_grammar_load(recognizer,content_id,content_type,&request->body);
- if(response->start_line.status_code != MRCP_STATUS_CODE_SUCCESS) {
- response_recog_header->completion_cause = RECOGNIZER_COMPLETION_CAUSE_GRAM_LOAD_FAILURE;
- return FALSE;
- }
- }
-
- if(!recognizer->decoder || ps_start_utt(recognizer->decoder, NULL) < 0) {
- response->start_line.status_code = MRCP_STATUS_CODE_METHOD_FAILED;
- response_recog_header->completion_cause = RECOGNIZER_COMPLETION_CAUSE_ERROR;
- mrcp_resource_header_property_add(response,RECOGNIZER_HEADER_COMPLETION_CAUSE);
- return FALSE;
- }
-
- recognizer->is_input_timer_on = TRUE;
- recognizer->is_recognition_timer_on = FALSE;
- /* get recognizer header */
- request_recog_header = mrcp_resource_header_get(request);
- if(request_recog_header) {
- if(mrcp_resource_header_property_check(request,RECOGNIZER_HEADER_START_INPUT_TIMERS) == TRUE) {
- recognizer->is_input_timer_on = request_recog_header->start_input_timers;
- }
- if(mrcp_resource_header_property_check(request,RECOGNIZER_HEADER_NO_INPUT_TIMEOUT) == TRUE) {
- recognizer->properties.no_input_timeout = request_recog_header->no_input_timeout;
- }
- if(mrcp_resource_header_property_check(request,RECOGNIZER_HEADER_RECOGNITION_TIMEOUT) == TRUE) {
- recognizer->properties.recognition_timeout = request_recog_header->recognition_timeout;
- }
- if(mrcp_resource_header_property_check(request,RECOGNIZER_HEADER_SAVE_WAVEFORM) == TRUE) {
- recognizer->properties.save_waveform = request_recog_header->save_waveform;
- }
- }
-
- /* check if waveform (utterance) should be saved */
- if(recognizer->properties.save_waveform == TRUE) {
- apr_status_t rv;
- const char *waveform_file_name = apr_psprintf(channel->pool,"utter-%s-%"MRCP_REQUEST_ID_FMT".pcm",
- channel->id.buf,
- request->start_line.request_id);
- char *waveform_file_path = NULL;
- apr_filepath_merge(&waveform_file_path,recognizer->properties.save_waveform_dir,
- waveform_file_name,0,channel->pool);
-
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Open Waveform File [%s] "APT_SIDRES_FMT,
- waveform_file_path,RECOGNIZER_SIDRES(recognizer));
- rv = apr_file_open(&recognizer->waveform,waveform_file_path,APR_CREATE|APR_TRUNCATE|APR_WRITE|APR_BINARY,
- APR_OS_DEFAULT,channel->pool);
- if(rv != APR_SUCCESS) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Cannot Open Waveform File to Write [%s] "APT_SIDRES_FMT,
- waveform_file_path,RECOGNIZER_SIDRES(recognizer));
- }
- }
-
- response->start_line.request_state = MRCP_REQUEST_STATE_INPROGRESS;
- /* send asynchronous response */
- mrcp_engine_channel_message_send(channel,response);
-
- /* reset */
- mpf_activity_detector_reset(recognizer->detector);
- recognizer->no_input_timeout = 0;
- recognizer->recognition_timeout = 0;
- recognizer->partial_result_timeout = 0;
- recognizer->last_result = NULL;
- recognizer->complete_event = NULL;
-
- recognizer->inprogress_recog = request;
- return TRUE;
-}
-
-/** Process GET-RESULT request [RECOG] */
-static apt_bool_t pocketsphinx_get_result(pocketsphinx_recognizer_t *recognizer, mrcp_message_t *request, mrcp_message_t *response)
-{
- if(pocketsphinx_result_build(recognizer,response) != TRUE) {
- response->start_line.status_code = MRCP_STATUS_CODE_METHOD_FAILED;
- }
-
- /* send asynchronous response */
- mrcp_engine_channel_message_send(recognizer->channel,response);
- return TRUE;
-}
-
-/** Process START-INPUT-TIMERS request [RECOG] */
-static apt_bool_t pocketsphinx_start_input_timers(pocketsphinx_recognizer_t *recognizer, mrcp_message_t *request, mrcp_message_t *response)
-{
- recognizer->is_input_timer_on = TRUE;
-
- /* send asynchronous response */
- mrcp_engine_channel_message_send(recognizer->channel,response);
- return TRUE;
-}
-
-
-/** Process STOP request [RECOG] */
-static apt_bool_t pocketsphinx_stop(pocketsphinx_recognizer_t *recognizer, mrcp_message_t *request, mrcp_message_t *response)
-{
- if(recognizer->inprogress_recog) {
- /* store pending STOP response for further processing */
- recognizer->stop_response = response;
- return TRUE;
- }
-
- /* send asynchronous response */
- mrcp_engine_channel_message_send(recognizer->channel,response);
- return TRUE;
-}
-
-/** Process RECOGNITION-COMPLETE event [RECOG] */
-static apt_bool_t pocketsphinx_recognition_complete(pocketsphinx_recognizer_t *recognizer, mrcp_message_t *complete_event)
-{
- mrcp_recog_header_t *recog_header;
- if(!recognizer->inprogress_recog) {
- /* false event */
- return FALSE;
- }
-
- recognizer->inprogress_recog = NULL;
- ps_end_utt(recognizer->decoder);
-
- if(recognizer->waveform) {
- apr_file_close(recognizer->waveform);
- recognizer->waveform = NULL;
- }
-
- if(recognizer->stop_response) {
- /* recognition has been stopped, send STOP response instead */
- mrcp_message_t *response = recognizer->stop_response;
- recognizer->stop_response = NULL;
- if(recognizer->close_requested == FALSE) {
- mrcp_engine_channel_message_send(recognizer->channel,response);
- }
- return TRUE;
- }
-
- recog_header = mrcp_resource_header_get(complete_event);
- if(recog_header->completion_cause == RECOGNIZER_COMPLETION_CAUSE_SUCCESS ||
- recog_header->completion_cause == RECOGNIZER_COMPLETION_CAUSE_RECOGNITION_TIMEOUT) {
- int32 score;
- char const *hyp;
- char const *uttid;
-
- hyp = ps_get_hyp(recognizer->decoder, &score, &uttid);
- if(hyp && strlen(hyp) > 0) {
- int32 prob;
- recognizer->last_result = apr_pstrdup(recognizer->channel->pool,hyp);
- prob = ps_get_prob(recognizer->decoder, &uttid);
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Get Recognition Final Result [%s] Prob [%d] Score [%d] "APT_SIDRES_FMT,
- hyp,prob,score,RECOGNIZER_SIDRES(recognizer));
- if(pocketsphinx_result_build(recognizer,complete_event) == TRUE) {
- if(recognizer->channel->mrcp_version == MRCP_VERSION_2 &&
- recog_header->completion_cause == RECOGNIZER_COMPLETION_CAUSE_RECOGNITION_TIMEOUT) {
- /* rewrite completion cause for MRCPv2 */
- recog_header->completion_cause = RECOGNIZER_COMPLETION_CAUSE_TOO_MUCH_SPEECH_TIMEOUT;
- }
- }
- else {
- recog_header->completion_cause = RECOGNIZER_COMPLETION_CAUSE_ERROR;
- }
- }
- else {
- recog_header->completion_cause = RECOGNIZER_COMPLETION_CAUSE_NO_MATCH;
- }
- }
-
- /* send asynchronous event */
- mrcp_engine_channel_message_send(recognizer->channel,complete_event);
- return TRUE;
-}
-
-/** Dispatch MRCP request [RECOG] */
-static apt_bool_t pocketsphinx_request_dispatch(pocketsphinx_recognizer_t *recognizer, mrcp_message_t *request)
-{
- apt_bool_t processed = FALSE;
- mrcp_message_t *response = mrcp_response_create(request,request->pool);
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Dispatch Request %s "APT_SIDRES_FMT,
- request->start_line.method_name.buf,
- RECOGNIZER_SIDRES(recognizer));
- switch(request->start_line.method_id) {
- case RECOGNIZER_SET_PARAMS:
- break;
- case RECOGNIZER_GET_PARAMS:
- break;
- case RECOGNIZER_DEFINE_GRAMMAR:
- processed = pocketsphinx_define_grammar(recognizer,request,response);
- break;
- case RECOGNIZER_RECOGNIZE:
- processed = pocketsphinx_recognize(recognizer,request,response);
- break;
- case RECOGNIZER_GET_RESULT:
- processed = pocketsphinx_get_result(recognizer,request,response);
- break;
- case RECOGNIZER_START_INPUT_TIMERS:
- processed = pocketsphinx_start_input_timers(recognizer,request,response);
- break;
- case RECOGNIZER_STOP:
- processed = pocketsphinx_stop(recognizer,request,response);
- break;
- default:
- break;
- }
- if(processed == FALSE) {
- /* send asynchronous response for non handled request */
- mrcp_engine_channel_message_send(recognizer->channel,response);
- }
- return TRUE;
-}
-
-
-/** Recognition thread [RECOG] */
-static void* APR_THREAD_FUNC pocketsphinx_recognizer_run(apr_thread_t *thread, void *data)
-{
- pocketsphinx_recognizer_t *recognizer = data;
-
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Run Recognition Thread "APT_SIDRES_FMT, RECOGNIZER_SIDRES(recognizer));
- /** Send response to channel_open request */
- mrcp_engine_channel_open_respond(recognizer->channel,TRUE);
-
- do {
- apr_thread_mutex_lock(recognizer->mutex);
- /** Wait for MRCP requests */
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Wait for incoming messages "APT_SIDRES_FMT, RECOGNIZER_SIDRES(recognizer));
- if (!recognizer->message_waiting) {
- apr_thread_cond_wait(recognizer->wait_object,recognizer->mutex);
- }
- recognizer->message_waiting = FALSE;
-
- if(recognizer->request) {
- /* store request message and further dispatch it */
- mrcp_message_t *request = recognizer->request;
- recognizer->request = NULL;
- pocketsphinx_request_dispatch(recognizer,request);
- }
- if(recognizer->complete_event) {
- /* end of input detected, get recognition result and raise recognition complete event */
- pocketsphinx_recognition_complete(recognizer,recognizer->complete_event);
- }
- apr_thread_mutex_unlock(recognizer->mutex);
- }
- while(recognizer->close_requested == FALSE);
-
- /** Clear all the defined grammars */
- pocketsphinx_grammars_clear(recognizer);
-
- if(recognizer->decoder) {
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Free Decoder "APT_SIDRES_FMT, RECOGNIZER_SIDRES(recognizer));
- /** Free pocketsphinx decoder */
- ps_free(recognizer->decoder);
- recognizer->decoder = NULL;
- }
-
- /** Exit thread */
- apr_thread_exit(thread,APR_SUCCESS);
- return NULL;
-}
-
-
-
-/* Start of input (utterance) [MPF] */
-static apt_bool_t pocketsphinx_start_of_input(pocketsphinx_recognizer_t *recognizer)
-{
- /* create START-OF-INPUT event */
- mrcp_message_t *message = mrcp_event_create(
- recognizer->inprogress_recog,
- RECOGNIZER_START_OF_INPUT,
- recognizer->inprogress_recog->pool);
- if(!message) {
- return FALSE;
- }
-
- /* start recognition timer */
- recognizer->is_recognition_timer_on = TRUE;
-
- /* set request state */
- message->start_line.request_state = MRCP_REQUEST_STATE_INPROGRESS;
- /* send asynchronous event */
- return mrcp_engine_channel_message_send(recognizer->channel,message);
-}
-
-/* End of input (utterance) [MPF] */
-static apt_bool_t pocketsphinx_end_of_input(pocketsphinx_recognizer_t *recognizer, mrcp_recog_completion_cause_e cause)
-{
- mrcp_recog_header_t *recog_header;
- /* create RECOGNITION-COMPLETE event */
- mrcp_message_t *message = mrcp_event_create(
- recognizer->inprogress_recog,
- RECOGNIZER_RECOGNITION_COMPLETE,
- recognizer->inprogress_recog->pool);
- if(!message) {
- return FALSE;
- }
-
- /* get/allocate recognizer header */
- recog_header = mrcp_resource_header_prepare(message);
- if(recog_header) {
- /* set completion cause */
- recog_header->completion_cause = cause;
- mrcp_resource_header_property_add(message,RECOGNIZER_HEADER_COMPLETION_CAUSE);
- }
- /* set request state */
- message->start_line.request_state = MRCP_REQUEST_STATE_COMPLETE;
-
- /* signal recognition thread first */
- apr_thread_mutex_lock(recognizer->mutex);
- recognizer->complete_event = message;
- recognizer->message_waiting = TRUE;
- apr_thread_cond_signal(recognizer->wait_object);
- apr_thread_mutex_unlock(recognizer->mutex);
- return TRUE;
-}
-
-/* Process audio frame [MPF] */
-static apt_bool_t pocketsphinx_stream_write(mpf_audio_stream_t *stream, const mpf_frame_t *frame)
-{
- pocketsphinx_recognizer_t *recognizer = stream->obj;
-
- /* check whether recognition has been started and not completed yet */
- if(recognizer->inprogress_recog && !recognizer->complete_event) {
- mpf_detector_event_e det_event;
-
- /* first check if STOP has been requested */
- if(recognizer->stop_response) {
- /* recognition has been stopped -> acknowledge with complete-event */
- pocketsphinx_end_of_input(recognizer,RECOGNIZER_COMPLETION_CAUSE_SUCCESS);
- return TRUE;
- }
-
- if(recognizer->waveform) {
- /* write utterance to file */
- apr_size_t size = frame->codec_frame.size;
- apr_file_write(recognizer->waveform,frame->codec_frame.buffer,&size);
- }
-
- if(ps_process_raw(
- recognizer->decoder,
- (const int16 *)frame->codec_frame.buffer,
- frame->codec_frame.size / sizeof(int16),
- FALSE,
- FALSE) < 0) {
-
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Process Raw Data "APT_SIDRES_FMT,
- RECOGNIZER_SIDRES(recognizer));
- }
-
- recognizer->partial_result_timeout += CODEC_FRAME_TIME_BASE;
- if(recognizer->partial_result_timeout == recognizer->properties.partial_result_timeout) {
- int32 score;
- char const *hyp;
- char const *uttid;
-
- recognizer->partial_result_timeout = 0;
- hyp = ps_get_hyp(recognizer->decoder, &score, &uttid);
- if(hyp && strlen(hyp) > 0) {
- if(recognizer->last_result == NULL || 0 != strcmp(recognizer->last_result, hyp)) {
- recognizer->last_result = apr_pstrdup(recognizer->channel->pool,hyp);
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Get Recognition Partial Result [%s] Score [%d] "APT_SIDRES_FMT,
- hyp,score,RECOGNIZER_SIDRES(recognizer));
-
- /* reset input timer as we have partial match now */
- if(score != 0 && recognizer->is_input_timer_on) {
- recognizer->is_input_timer_on = FALSE;
- }
- }
- }
- }
-
- if(recognizer->is_input_timer_on == TRUE) {
- recognizer->no_input_timeout += CODEC_FRAME_TIME_BASE;
- if(recognizer->no_input_timeout == recognizer->properties.no_input_timeout) {
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Noinput Timeout Elapsed "APT_SIDRES_FMT,
- RECOGNIZER_SIDRES(recognizer));
- pocketsphinx_end_of_input(recognizer,RECOGNIZER_COMPLETION_CAUSE_NO_INPUT_TIMEOUT);
- return TRUE;
- }
- }
-
- if(recognizer->is_recognition_timer_on == TRUE) {
- recognizer->recognition_timeout += CODEC_FRAME_TIME_BASE;
- if(recognizer->recognition_timeout == recognizer->properties.recognition_timeout) {
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Recognition Timeout Elapsed "APT_SIDRES_FMT,
- RECOGNIZER_SIDRES(recognizer));
- pocketsphinx_end_of_input(recognizer,RECOGNIZER_COMPLETION_CAUSE_RECOGNITION_TIMEOUT);
- return TRUE;
- }
- }
-
- det_event = mpf_activity_detector_process(recognizer->detector,frame);
- switch(det_event) {
- case MPF_DETECTOR_EVENT_ACTIVITY:
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Detected Voice Activity "APT_SIDRES_FMT,
- RECOGNIZER_SIDRES(recognizer));
- pocketsphinx_start_of_input(recognizer);
- break;
- case MPF_DETECTOR_EVENT_INACTIVITY:
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Detected Voice Inactivity "APT_SIDRES_FMT,
- RECOGNIZER_SIDRES(recognizer));
- pocketsphinx_end_of_input(recognizer,RECOGNIZER_COMPLETION_CAUSE_SUCCESS);
- break;
- default:
- break;
- }
- }
-
- return TRUE;
-}
+++ /dev/null
-/*
- * Copyright 2008-2010 Arsen Chaloyan
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Id: pocketsphinx_properties.c 1743 2010-07-12 08:04:46Z achaloyan $
- */
-
-#include <stdlib.h>
-#include <apr_xml.h>
-#include "pocketsphinx_properties.h"
-#include "apt_log.h"
-
-static const apr_xml_elem* pocketsphinx_document_load(const char *file_path, apr_pool_t *pool)
-{
- apr_xml_parser *parser = NULL;
- apr_xml_doc *doc = NULL;
- const apr_xml_elem *root;
- apr_file_t *fd = NULL;
- apr_status_t rv;
-
- apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Open PocketSphinx Config File [%s]",file_path);
- rv = apr_file_open(&fd,file_path,APR_READ|APR_BINARY,0,pool);
- if(rv != APR_SUCCESS) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Open PocketSphinx Config File [%s]",file_path);
- return FALSE;
- }
-
- rv = apr_xml_parse_file(pool,&parser,&doc,fd,2000);
- if(rv != APR_SUCCESS) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Parse PocketSphinx Config File [%s]",file_path);
- apr_file_close(fd);
- return FALSE;
- }
-
- root = doc->root;
- if(!root || strcasecmp(root->name,"pocketsphinx") != 0) {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Document <%s>",root->name);
- apr_file_close(fd);
- return FALSE;
- }
-
- apr_file_close(fd);
- return root;
-}
-
-static apt_bool_t sensitivity_properties_load(pocketsphinx_properties_t *properties, const apr_xml_elem *elem, apr_pool_t *pool)
-{
- const apr_xml_attr *attr;
- for(attr = elem->attr; attr; attr = attr->next) {
- if(strcasecmp(attr->name,"level") == 0) {
- properties->sensitivity_level = atol(attr->value);
- }
- else if(strcasecmp(attr->name,"activity-timeout") == 0) {
- properties->activity_timeout = atol(attr->value);
- }
- else if(strcasecmp(attr->name,"inactivity-timeout") == 0) {
- properties->inactivity_timeout = atol(attr->value);
- }
- else {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Attribute <%s>",attr->name);
- }
- }
- return TRUE;
-}
-
-static apt_bool_t timer_properties_load(pocketsphinx_properties_t *properties, const apr_xml_elem *elem, apr_pool_t *pool)
-{
- const apr_xml_attr *attr;
- for(attr = elem->attr; attr; attr = attr->next) {
- if(strcasecmp(attr->name,"noinput-timeout") == 0) {
- properties->no_input_timeout = atol(attr->value);
- }
- else if(strcasecmp(attr->name,"recognition-timeout") == 0) {
- properties->recognition_timeout = atol(attr->value);
- }
- else {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Attribute <%s>",attr->name);
- }
- }
- return TRUE;
-}
-
-static apt_bool_t model_properties_load(pocketsphinx_properties_t *properties, const apr_xml_elem *elem, apr_pool_t *pool)
-{
- const apr_xml_attr *attr;
- for(attr = elem->attr; attr; attr = attr->next) {
- if(strcasecmp(attr->name,"dir") == 0) {
- properties->data_dir = apr_pstrdup(pool,attr->value);
- }
- else if(strcasecmp(attr->name,"narrowband") == 0) {
- properties->model_8k = apr_pstrdup(pool,attr->value);
- }
- else if(strcasecmp(attr->name,"wideband") == 0) {
- properties->model_16k = apr_pstrdup(pool,attr->value);
- }
- else if(strcasecmp(attr->name,"dictionary") == 0) {
- properties->dictionary = apr_pstrdup(pool,attr->value);
- }
- else if(strcasecmp(attr->name,"preferred") == 0) {
- if(strcasecmp(attr->value,"narrowband") == 0) {
- properties->preferred_model = POCKETSPHINX_MODEL_NARROWBAND;
- }
- else if(strcasecmp(attr->value,"wideband") == 0) {
- properties->preferred_model = POCKETSPHINX_MODEL_WIDEBAND;
- }
- }
- else {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Attribute <%s>",attr->name);
- }
- }
- return TRUE;
-}
-
-static apt_bool_t save_waveform_properties_load(pocketsphinx_properties_t *properties, const apr_xml_elem *elem, apr_pool_t *pool)
-{
- const apr_xml_attr *attr;
- for(attr = elem->attr; attr; attr = attr->next) {
- if(strcasecmp(attr->name,"dir") == 0) {
- properties->save_waveform_dir = apr_pstrdup(pool,attr->value);
- }
- else if(strcasecmp(attr->name,"enable") == 0) {
- properties->save_waveform = atoi(attr->value);
- }
- else {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Attribute <%s>",attr->name);
- }
- }
- return TRUE;
-}
-
-apt_bool_t pocketsphinx_properties_load(pocketsphinx_properties_t *properties,
- const char *file_path,
- const apt_dir_layout_t *dir_layout,
- apr_pool_t *pool)
-{
- const apr_xml_elem *elem;
- const apr_xml_elem *root;
- char *path = NULL;
-
- /* reset or set default properties */
- properties->data_dir = NULL;
- properties->dictionary = NULL;
- properties->model_8k = NULL;
- properties->model_16k = NULL;
- properties->preferred_model = POCKETSPHINX_MODEL_NARROWBAND;
-
- properties->no_input_timeout = 10000;
- properties->recognition_timeout = 15000;
- properties->partial_result_timeout = 100;
-
- properties->save_waveform = TRUE;
- properties->save_waveform_dir = NULL;
-
- root = pocketsphinx_document_load(file_path,pool);
- if(root) {
- for(elem = root->first_child; elem; elem = elem->next) {
- if(strcasecmp(elem->name,"sensitivity") == 0) {
- sensitivity_properties_load(properties,elem,pool);
- }
- else if(strcasecmp(elem->name,"timers") == 0) {
- timer_properties_load(properties,elem,pool);
- }
- else if(strcasecmp(elem->name,"model") == 0) {
- model_properties_load(properties,elem,pool);
- }
- else if(strcasecmp(elem->name,"save-waveform") == 0) {
- save_waveform_properties_load(properties,elem,pool);
- }
- else {
- apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Unknown Element <%s>",elem->name);
- }
- }
- }
-
- /* verify loaded properties */
- if(!properties->data_dir || *properties->data_dir == '\0') {
- properties->data_dir = dir_layout->data_dir_path;
- }
- if(!properties->save_waveform_dir || *properties->save_waveform_dir == '\0') {
- properties->save_waveform_dir = dir_layout->data_dir_path;
- }
-
- if(!properties->dictionary) {
- properties->dictionary = "default.dic";
- }
- if(!properties->model_8k) {
- properties->model_8k = "communicator";
- }
- if(!properties->model_16k) {
- properties->model_16k = "wsj1";
- }
-
- if(apr_filepath_merge(&path,properties->data_dir,properties->dictionary,0,pool) == APR_SUCCESS) {
- properties->dictionary = path;
- }
- if(apr_filepath_merge(&path,properties->data_dir,properties->model_8k,0,pool) == APR_SUCCESS) {
- properties->model_8k = path;
- }
- if(apr_filepath_merge(&path,properties->data_dir,properties->model_16k,0,pool) == APR_SUCCESS) {
- properties->model_16k = path;
- }
-
- return TRUE;
-}
-MAINTAINERCLEANFILES = Makefile.in
-
-AM_CPPFLAGS = -Iinclude \
- -I$(top_srcdir)/libs/mrcp-engine/include \
- -I$(top_srcdir)/libs/mrcp/include \
- -I$(top_srcdir)/libs/mrcp/message/include \
- -I$(top_srcdir)/libs/mrcp/control/include \
- -I$(top_srcdir)/libs/mrcp/resources/include \
- -I$(top_srcdir)/libs/mpf/include \
- -I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+AM_CPPFLAGS = $(UNIMRCP_PLUGIN_INCLUDES)
plugin_LTLIBRARIES = mrcprecorder.la
mrcprecorder_la_SOURCES = src/mrcp_recorder_engine.c
-mrcprecorder_la_LDFLAGS = -module $(PLUGIN_LT_VERSION)
+mrcprecorder_la_LDFLAGS = $(UNIMRCP_PLUGIN_OPTS)
+
+include $(top_srcdir)/build/rules/uniplugin.am
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}</ProjectGuid>
+ <RootNamespace>mrcprecorder</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\uniplugin.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\uniplugin.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\uniplugin-x64.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\uniplugin-x64.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalIncludeDirectories>include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="src\mrcp_recorder_engine.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\libs\mrcp-engine\mrcpengine.vcxproj">
+ <Project>{843425be-9a9a-44f4-a4e3-4b57d6abd53c}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="src">
+ <UniqueIdentifier>{b1d2c804-b3bb-4413-8d11-7ff67d4e874c}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\mrcp_recorder_engine.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mrcp_recorder_engine.c 1706 2010-05-23 14:11:11Z achaloyan $
+ * $Id: mrcp_recorder_engine.c 2193 2014-10-08 03:44:33Z achaloyan@gmail.com $
*/
/*
NULL,
recorder_stream_open,
recorder_stream_close,
- recorder_stream_write
+ recorder_stream_write,
+ NULL
};
/** Declaration of recorder channel */
/** Open file to record */
static apt_bool_t recorder_file_open(recorder_channel_t *recorder_channel, mrcp_message_t *request)
{
+ char *file_path;
+ char *file_name;
mrcp_engine_channel_t *channel = recorder_channel->channel;
const apt_dir_layout_t *dir_layout = channel->engine->dir_layout;
const mpf_codec_descriptor_t *descriptor = mrcp_engine_sink_stream_codec_get(channel);
- char *file_name = apr_psprintf(channel->pool,"rec-%dkHz-%s-%"MRCP_REQUEST_ID_FMT".pcm",
- descriptor ? descriptor->sampling_rate/1000 : 8,
+
+ if(!descriptor) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Codec Descriptor "APT_SIDRES_FMT, MRCP_MESSAGE_SIDRES(request));
+ return FALSE;
+ }
+
+ file_name = apr_psprintf(channel->pool,"rec-%dkHz-%s-%"MRCP_REQUEST_ID_FMT".pcm",
+ descriptor->sampling_rate/1000,
request->channel_id.session_id.buf,
request->start_line.request_id);
- char *file_path = apt_datadir_filepath_get(dir_layout,file_name,channel->pool);
+ file_path = apt_vardir_filepath_get(dir_layout,file_name,channel->pool);
if(!file_path) {
return FALSE;
}
recorder_channel->audio_out = NULL;
}
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Open Utterance Output File [%s] for Writing",file_path);
recorder_channel->audio_out = fopen(file_path,"wb");
if(!recorder_channel->audio_out) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Open Utterance Output File [%s] for Writing",file_path);
return FALSE;
}
MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = -I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+ $(UNIMRCP_APR_INCLUDES)
noinst_PROGRAMS = apttest
apttest_LDADD = $(top_builddir)/libs/apr-toolkit/libaprtoolkit.la \
- $(UNIMRCP_APR_LIBS) $(UNIMRCP_APU_LIBS)
+ $(UNIMRCP_APR_LIBS)
apttest_SOURCES = src/main.c \
src/task_suite.c \
src/consumer_task_suite.c \
+++ /dev/null
-<?xml version="1.0" encoding="windows-1251"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="apttest"\r
- ProjectGUID="{429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}"\r
- RootNamespace="apttest"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- ConfigurationType="1"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="aprtoolkit.lib libaprutil-1.lib libapr-1.lib"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="1"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="aprtoolkit.lib libaprutil-1.lib libapr-1.lib"\r
- LinkTimeCodeGeneration="1"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- <File\r
- RelativePath=".\src\consumer_task_suite.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\main.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\multipart_suite.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\task_suite.c"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}</ProjectGuid>
+ <RootNamespace>apttest</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\apt.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\apt.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\apt.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\apt.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Link>
+ <AdditionalDependencies>aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Link>
+ <AdditionalDependencies>aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <Link>
+ <AdditionalDependencies>aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="src\consumer_task_suite.c" />
+ <ClCompile Include="src\main.c" />
+ <ClCompile Include="src\multipart_suite.c" />
+ <ClCompile Include="src\task_suite.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\libs\apr-toolkit\aprtoolkit.vcxproj">
+ <Project>{13deeca0-bdd4-4744-a1a2-8eb0a44df3d2}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="src">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\consumer_task_suite.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\main.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\multipart_suite.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\task_suite.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: consumer_task_suite.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: consumer_task_suite.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <apr_time.h>
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: main.c 1539 2010-02-22 19:49:33Z achaloyan $
+ * $Id: main.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "apt_test_suite.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: multipart_suite.c 1673 2010-04-28 20:45:47Z achaloyan $
+ * $Id: multipart_suite.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "apt_test_suite.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: task_suite.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: task_suite.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "apt_test_suite.h"
AM_CPPFLAGS = -I$(top_srcdir)/libs/mpf/include \
-I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+ $(UNIMRCP_APR_INCLUDES)
noinst_PROGRAMS = mpftest
mpftest_LDADD = $(top_builddir)/libs/mpf/libmpf.la \
$(top_builddir)/libs/apr-toolkit/libaprtoolkit.la \
- $(UNIMRCP_APR_LIBS) $(UNIMRCP_APU_LIBS)
+ $(UNIMRCP_APR_LIBS)
mpftest_SOURCES = src/main.c \
src/mpf_suite.c
+++ /dev/null
-<?xml version="1.0" encoding="windows-1251"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="mpftest"\r
- ProjectGUID="{DCF01B1C-5268-44F3-9130-D647FABFB663}"\r
- RootNamespace="mpftest"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- ConfigurationType="1"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mpf.vsprops"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="mpf.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib ws2_32.lib winmm.lib"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="1"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mpf.vsprops"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="mpf.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib ws2_32.lib winmm.lib "\r
- LinkTimeCodeGeneration="1"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- <File\r
- RelativePath=".\src\main.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\mpf_suite.c"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{DCF01B1C-5268-44F3-9130-D647FABFB663}</ProjectGuid>
+ <RootNamespace>mpftest</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mpf.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mpf.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mpf.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mpf.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Link>
+ <AdditionalDependencies>mpf.lib;aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;ws2_32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Link>
+ <AdditionalDependencies>mpf.lib;aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;ws2_32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>mpf.lib;aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;ws2_32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <Link>
+ <AdditionalDependencies>mpf.lib;aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;ws2_32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="src\main.c" />
+ <ClCompile Include="src\mpf_suite.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\libs\mpf\mpf.vcxproj">
+ <Project>{b5a00bfa-6083-4fae-a097-71642d6473b5}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="src">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\main.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mpf_suite.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: main.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: main.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "apt_test_suite.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: mpf_suite.c 1700 2010-05-21 18:56:06Z achaloyan $
+ * $Id: mpf_suite.c 2214 2014-11-06 03:05:51Z achaloyan@gmail.com $
*/
#include <apr_thread_cond.h>
#include "apt_test_suite.h"
+#include "apt_pool.h"
+#include "apt_consumer_task.h"
+#include "apt_dir_layout.h"
+#include "apt_log.h"
#include "mpf_engine.h"
#include "mpf_rtp_termination_factory.h"
#include "mpf_file_termination_factory.h"
#include "mpf_audio_file_descriptor.h"
#include "mpf_rtp_descriptor.h"
-#include "apt_pool.h"
-#include "apt_consumer_task.h"
-#include "apt_log.h"
+#include "mpf_codec_manager.h"
typedef struct mpf_suite_session_t mpf_suite_session_t;
-typedef struct mpf_suite_engine_t mpf_suite_engine_t;
-
+typedef struct mpf_suite_agent_t mpf_suite_agent_t;
/** Test suite session */
struct mpf_suite_session_t {
/** Media context associated with the session */
mpf_context_t *context;
/** The first termination in the context */
- mpf_termination_t *termination1;
+ mpf_termination_t *file_termination;
/** The second termination in the context */
- mpf_termination_t *termination2;
- /** RTP or file termination mode */
- apt_bool_t rtp_mode;
+ mpf_termination_t *rtp_termination;
};
-/** Test suite engine */
-struct mpf_suite_engine_t {
- /** The main task of the test engine, which sends messages to MPF engine and
+/** Test suite agent */
+struct mpf_suite_agent_t {
+ /** Directory layout */
+ apt_dir_layout_t *dir_layout;
+ /** The main task of the test agent, which sends messages to MPF engine and
* processes responses and events sent back from MPF engine */
apt_consumer_task_t *consumer_task;
/** MPF engine */
mpf_termination_factory_t *rtp_termination_factory;
/** File termination factory */
mpf_termination_factory_t *file_termination_factory;
+ /* Configuration of RTP termination factory */
+ mpf_rtp_config_t *rtp_config;
+ /* RTP stream settings */
+ mpf_rtp_settings_t *rtp_settings;
+
+ /** RTP receiver -> File */
+ mpf_suite_session_t *rx_session;
+ /** File -> RTP transmitter */
+ mpf_suite_session_t *tx_session;
/** Wait object, which is signalled to indicate shutdown */
apr_thread_cond_t *wait_object;
static void mpf_suite_on_terminate_complete(apt_task_t *task);
static apt_bool_t mpf_suite_task_msg_process(apt_task_t *task, apt_task_msg_t *msg);
-static mpf_audio_file_descriptor_t* mpf_file_reader_descriptor_create(mpf_suite_session_t *session);
-static mpf_audio_file_descriptor_t* mpf_file_writer_descriptor_create(mpf_suite_session_t *session);
-static mpf_rtp_stream_descriptor_t* mpf_rtp_local_descriptor_create(mpf_suite_session_t *session);
-static mpf_rtp_stream_descriptor_t* mpf_rtp_remote_descriptor_create(mpf_suite_session_t *session);
+static mpf_audio_file_descriptor_t* mpf_file_reader_descriptor_create(const mpf_suite_agent_t *agent, const mpf_suite_session_t *session);
+static mpf_audio_file_descriptor_t* mpf_file_writer_descriptor_create(const mpf_suite_agent_t *agent, const mpf_suite_session_t *session);
+static mpf_rtp_stream_descriptor_t* mpf_rtp_rx_local_descriptor_create(const mpf_suite_agent_t *agent, const mpf_suite_session_t *session);
+static mpf_rtp_stream_descriptor_t* mpf_rtp_rx_remote_descriptor_create(const mpf_suite_agent_t *agent, const mpf_suite_session_t *session);
+static mpf_rtp_stream_descriptor_t* mpf_rtp_tx_local_descriptor_create(const mpf_suite_agent_t *agent, const mpf_suite_session_t *session);
+static mpf_rtp_stream_descriptor_t* mpf_rtp_tx_remote_descriptor_create(const mpf_suite_agent_t *agent, const mpf_suite_session_t *session);
/** Create MPF test suite */
/** Run MPF test suite */
static apt_bool_t mpf_test_run(apt_test_suite_t *suite, int argc, const char * const *argv)
{
- mpf_suite_engine_t *suite_engine;
+ mpf_suite_agent_t *agent;
mpf_codec_manager_t *codec_manager;
- mpf_rtp_config_t *config;
+ mpf_rtp_config_t *rtp_config;
+ mpf_rtp_settings_t *rtp_settings;
mpf_engine_t *engine;
apt_task_t *task;
apt_task_vtable_t *vtable;
apt_task_msg_pool_t *msg_pool;
- suite_engine = apr_palloc(suite->pool,sizeof(mpf_suite_engine_t));
+ agent = apr_palloc(suite->pool,sizeof(mpf_suite_agent_t));
+ agent->dir_layout = apt_default_dir_layout_create(NULL,suite->pool);
engine = mpf_engine_create("MPF-Engine",suite->pool);
if(!engine) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create MPF Engine");
return FALSE;
}
+
codec_manager = mpf_engine_codec_manager_create(suite->pool);
- if(codec_manager) {
- mpf_engine_codec_manager_register(engine,codec_manager);
+ if(!codec_manager) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create Codec Manager");
+ return FALSE;
}
- suite_engine->engine = engine;
+
+ mpf_engine_codec_manager_register(engine,codec_manager);
+ agent->engine = engine;
+
+ rtp_config = mpf_rtp_config_alloc(suite->pool);
+ apt_string_set(&rtp_config->ip,"127.0.0.1");
+ rtp_config->rtp_port_min = 5000;
+ rtp_config->rtp_port_max = 6000;
- config = mpf_rtp_config_alloc(suite->pool);
- apt_string_set(&config->ip,"127.0.0.1");
- config->rtp_port_min = 5000;
- config->rtp_port_min = 6000;
- suite_engine->rtp_termination_factory = mpf_rtp_termination_factory_create(config,suite->pool);
- suite_engine->file_termination_factory = mpf_file_termination_factory_create(suite->pool);
+ agent->rtp_config = rtp_config;
+
+ rtp_settings = mpf_rtp_settings_alloc(suite->pool);
+ rtp_settings->ptime = 20;
+ rtp_settings->jb_config.adaptive = 1;
+ rtp_settings->jb_config.time_skew_detection = 1;
+ rtp_settings->jb_config.min_playout_delay = 0;
+ rtp_settings->jb_config.initial_playout_delay = 50;
+ rtp_settings->jb_config.max_playout_delay = 800;
+ mpf_codec_manager_codec_list_load(codec_manager,&rtp_settings->codec_list,"PCMU",suite->pool);
+
+ agent->rtp_settings = rtp_settings;
+
+ agent->rtp_termination_factory = mpf_rtp_termination_factory_create(rtp_config,suite->pool);
+ agent->file_termination_factory = mpf_file_termination_factory_create(suite->pool);
+
+ agent->rx_session = NULL;
+ agent->tx_session = NULL;
msg_pool = apt_task_msg_pool_create_dynamic(sizeof(mpf_message_t),suite->pool);
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Create Consumer Task");
- suite_engine->consumer_task = apt_consumer_task_create(suite_engine,msg_pool,suite->pool);
- if(!suite_engine->consumer_task) {
+ agent->consumer_task = apt_consumer_task_create(agent,msg_pool,suite->pool);
+ if(!agent->consumer_task) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create Consumer Task");
return FALSE;
}
- task = apt_consumer_task_base_get(suite_engine->consumer_task);
+ task = apt_consumer_task_base_get(agent->consumer_task);
+ apt_task_name_set(task,"MPF-Tester");
vtable = apt_task_vtable_get(task);
if(vtable) {
vtable->process_msg = mpf_suite_task_msg_process;
apt_task_add(task,mpf_task_get(engine));
- apr_thread_mutex_create(&suite_engine->wait_object_mutex,APR_THREAD_MUTEX_UNNESTED,suite->pool);
- apr_thread_cond_create(&suite_engine->wait_object,suite->pool);
+ apr_thread_mutex_create(&agent->wait_object_mutex,APR_THREAD_MUTEX_UNNESTED,suite->pool);
+ apr_thread_cond_create(&agent->wait_object,suite->pool);
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Start Task");
if(apt_task_start(task) == FALSE) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Start Task");
apt_task_destroy(task);
return FALSE;
}
- apr_thread_mutex_lock(suite_engine->wait_object_mutex);
- apr_thread_cond_wait(suite_engine->wait_object,suite_engine->wait_object_mutex);
- apr_thread_mutex_unlock(suite_engine->wait_object_mutex);
+ apr_thread_mutex_lock(agent->wait_object_mutex);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Wait for Task to Complete");
+ apr_thread_cond_wait(agent->wait_object,agent->wait_object_mutex);
+ apr_thread_mutex_unlock(agent->wait_object_mutex);
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Terminate Task [wait till complete]");
apt_task_terminate(task,TRUE);
apt_log(APT_LOG_MARK,APT_PRIO_NOTICE,"Destroy Task");
apt_task_destroy(task);
- apr_thread_cond_destroy(suite_engine->wait_object);
- apr_thread_mutex_destroy(suite_engine->wait_object_mutex);
+ apr_thread_cond_destroy(agent->wait_object);
+ apr_thread_mutex_destroy(agent->wait_object_mutex);
return TRUE;
}
-/** Start execution of MPF test suite scenario */
-static void mpf_suite_on_start_complete(apt_task_t *task)
+static mpf_suite_session_t* mpf_suite_rx_session_create(const mpf_suite_agent_t *agent)
{
- mpf_suite_session_t *session;
- apt_task_t *consumer_task;
- mpf_suite_engine_t *suite_engine;
mpf_task_msg_t *task_msg = NULL;
void *descriptor;
- apr_pool_t *pool = NULL;
+ apr_pool_t *pool;
+ mpf_suite_session_t *session;
- consumer_task = apt_task_object_get(task);
- suite_engine = apt_task_object_get(consumer_task);
+ pool = apt_pool_create();
+ session = apr_palloc(pool,sizeof(mpf_suite_session_t));
+ session->pool = pool;
+ session->context = NULL;
+ session->file_termination = NULL;
+ session->rtp_termination = NULL;
+
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Create MPF Context [Rx]");
+ session->context = mpf_engine_context_create(agent->engine,NULL,session,2,pool);
+
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Create Termination [RTP Rx]");
+ session->rtp_termination = mpf_termination_create(agent->rtp_termination_factory,session,session->pool);
+
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Add Termination [RTP Rx]");
+ descriptor = mpf_rtp_rx_local_descriptor_create(agent,session);
+ mpf_engine_termination_message_add(
+ agent->engine,
+ MPF_ADD_TERMINATION,session->context,session->rtp_termination,descriptor,
+ &task_msg);
+
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Create Termination [File Writer]");
+ session->file_termination = mpf_termination_create(agent->file_termination_factory,session,session->pool);
+
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Add Termination [File Writer]");
+ descriptor = mpf_file_writer_descriptor_create(agent,session);
+ mpf_engine_termination_message_add(
+ agent->engine,
+ MPF_ADD_TERMINATION,session->context,session->file_termination,descriptor,
+ &task_msg);
+
+ mpf_engine_message_send(agent->engine,&task_msg);
+ return session;
+}
+
+static mpf_suite_session_t* mpf_suite_tx_session_create(const mpf_suite_agent_t *agent)
+{
+ mpf_task_msg_t *task_msg = NULL;
+ void *descriptor;
+ apr_pool_t *pool;
+ mpf_suite_session_t *session;
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"On MPF Suite Start");
pool = apt_pool_create();
session = apr_palloc(pool,sizeof(mpf_suite_session_t));
session->pool = pool;
session->context = NULL;
- session->termination1 = NULL;
- session->termination2 = NULL;
- session->rtp_mode = TRUE;
+ session->file_termination = NULL;
+ session->rtp_termination = NULL;
+
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Create MPF Context [Tx]");
+ session->context = mpf_engine_context_create(agent->engine,NULL,session,2,pool);
+
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Create Termination [File Reader]");
+ session->file_termination = mpf_termination_create(agent->file_termination_factory,session,session->pool);
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Create MPF Context");
- session->context = mpf_engine_context_create(suite_engine->engine,NULL,session,2,pool);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Add Termination [File Reader]");
+ descriptor = mpf_file_reader_descriptor_create(agent,session);
+ mpf_engine_termination_message_add(
+ agent->engine,
+ MPF_ADD_TERMINATION,session->context,session->file_termination,descriptor,
+ &task_msg);
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Create Termination [1]");
- session->termination1 = mpf_termination_create(suite_engine->file_termination_factory,session,session->pool);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Create Termination [RTP Tx]");
+ session->rtp_termination = mpf_termination_create(agent->rtp_termination_factory,session,session->pool);
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Add Termination [1]");
- descriptor = mpf_file_reader_descriptor_create(session);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Add Termination [RTP Tx]");
+ descriptor = mpf_rtp_tx_local_descriptor_create(agent,session);
mpf_engine_termination_message_add(
- suite_engine->engine,
- MPF_ADD_TERMINATION,session->context,session->termination1,descriptor,
+ agent->engine,
+ MPF_ADD_TERMINATION,session->context,session->rtp_termination,descriptor,
&task_msg);
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Create Termination [2]");
- if(session->rtp_mode == TRUE) {
- session->termination2 = mpf_termination_create(suite_engine->rtp_termination_factory,session,session->pool);
+ mpf_engine_message_send(agent->engine,&task_msg);
+ return session;
+}
+
+static void mpf_suite_session_destroy(mpf_suite_agent_t *agent, mpf_suite_session_t* session)
+{
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Destroy MPF Context");
+ mpf_engine_context_destroy(session->context);
+ session->context = NULL;
+
+ if(agent->rx_session == session) {
+ agent->rx_session = NULL;
}
- else {
- session->termination2 = mpf_termination_create(suite_engine->file_termination_factory,session,session->pool);
+ else if(agent->tx_session == session) {
+ agent->tx_session = NULL;
}
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Add Termination [2]");
- descriptor = NULL;
- if(session->rtp_mode == TRUE) {
- descriptor = mpf_rtp_local_descriptor_create(session);
- }
- else {
- descriptor = mpf_file_writer_descriptor_create(session);
+ apr_pool_destroy(session->pool);
+
+ if(!agent->tx_session && !agent->rx_session) {
+ apr_thread_mutex_lock(agent->wait_object_mutex);
+ apr_thread_cond_signal(agent->wait_object);
+ apr_thread_mutex_unlock(agent->wait_object_mutex);
}
+}
- mpf_engine_termination_message_add(
- suite_engine->engine,
- MPF_ADD_TERMINATION,session->context,session->termination2,descriptor,
- &task_msg);
+/** Start execution of MPF test suite scenario */
+static void mpf_suite_on_start_complete(apt_task_t *task)
+{
+ apt_consumer_task_t *consumer_task;
+ mpf_suite_agent_t *agent;
+
+ consumer_task = apt_task_object_get(task);
+ agent = apt_consumer_task_object_get(consumer_task);
- mpf_engine_message_send(suite_engine->engine,&task_msg);
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"On MPF Suite Start");
+
+ agent->rx_session = mpf_suite_rx_session_create(agent);
+ agent->tx_session = mpf_suite_tx_session_create(agent);
}
/** Execution of MPF test suite scenario is terminated */
}
/** Process MPF response */
-static apt_bool_t mpf_suite_response_process(mpf_suite_engine_t *suite_engine, const mpf_message_t *mpf_message)
+static apt_bool_t mpf_suite_response_process(mpf_suite_agent_t *agent, const mpf_message_t *mpf_message)
{
mpf_task_msg_t *task_msg = NULL;
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Process MPF Response");
if(mpf_message->termination) {
mpf_suite_session_t *session;
session = mpf_termination_object_get(mpf_message->termination);
- if(session->termination2 == mpf_message->termination && session->rtp_mode == TRUE) {
- void *descriptor = mpf_rtp_remote_descriptor_create(session);
- mpf_engine_termination_message_add(
- suite_engine->engine,
- MPF_MODIFY_TERMINATION,session->context,session->termination2,descriptor,
- &task_msg);
+ if(session->rtp_termination == mpf_message->termination) {
+ mpf_rtp_stream_descriptor_t *descriptor = NULL;
+ if(session == agent->rx_session) {
+ descriptor = mpf_rtp_rx_remote_descriptor_create(agent,session);
+ }
+ if(session == agent->tx_session) {
+ descriptor = mpf_rtp_tx_remote_descriptor_create(agent,session);
+ }
+
+ if(descriptor) {
+ mpf_engine_termination_message_add(
+ agent->engine,
+ MPF_MODIFY_TERMINATION,session->context,session->rtp_termination,descriptor,
+ &task_msg);
+ }
+
+ mpf_engine_assoc_message_add(
+ agent->engine,
+ MPF_ADD_ASSOCIATION,session->context,session->file_termination,session->rtp_termination,
+ &task_msg);
+
+ mpf_engine_topology_message_add(
+ agent->engine,
+ MPF_APPLY_TOPOLOGY,session->context,
+ &task_msg);
}
}
}
if(mpf_message->termination) {
mpf_suite_session_t *session;
session = mpf_termination_object_get(mpf_message->termination);
- if(session->termination1 == mpf_message->termination) {
- session->termination1 = NULL;
+ if(session->file_termination == mpf_message->termination) {
+ session->file_termination = NULL;
}
- if(session->termination2 == mpf_message->termination) {
- session->termination2 = NULL;
+ else if(session->rtp_termination == mpf_message->termination) {
+ session->rtp_termination = NULL;
}
mpf_termination_destroy(mpf_message->termination);
- if(!session->termination1 && !session->termination2) {
- mpf_engine_context_destroy(session->context);
- session->context = NULL;
- apr_pool_destroy(session->pool);
-
- apr_thread_mutex_lock(suite_engine->wait_object_mutex);
- apr_thread_cond_signal(suite_engine->wait_object);
- apr_thread_mutex_unlock(suite_engine->wait_object_mutex);
+ if(!session->file_termination && !session->rtp_termination) {
+ mpf_suite_session_destroy(agent,session);
}
}
}
- return mpf_engine_message_send(suite_engine->engine,&task_msg);
+ return mpf_engine_message_send(agent->engine,&task_msg);
}
/** Process MPF event */
-static apt_bool_t mpf_suite_event_process(mpf_suite_engine_t *suite_engine, const mpf_message_t *mpf_message)
+static apt_bool_t mpf_suite_event_process(mpf_suite_agent_t *agent, const mpf_message_t *mpf_message)
{
mpf_task_msg_t *task_msg = NULL;
mpf_suite_session_t *session;
apt_log(APT_LOG_MARK,APT_PRIO_DEBUG,"Process MPF Event");
if(mpf_message->termination) {
session = mpf_termination_object_get(mpf_message->termination);
- if(session->termination1) {
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Subtract Termination [1]");
+ /* first destroy existing topology */
+ mpf_engine_topology_message_add(
+ agent->engine,
+ MPF_DESTROY_TOPOLOGY,session->context,
+ &task_msg);
+
+ if(session->file_termination) {
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Subtract Termination [File]");
mpf_engine_termination_message_add(
- suite_engine->engine,
- MPF_SUBTRACT_TERMINATION,session->context,session->termination1,NULL,
+ agent->engine,
+ MPF_SUBTRACT_TERMINATION,session->context,session->file_termination,NULL,
&task_msg);
}
- if(session->termination2) {
- apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Subtract Termination [2]");
+ if(session->rtp_termination) {
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Subtract Termination [RTP]");
mpf_engine_termination_message_add(
- suite_engine->engine,
- MPF_SUBTRACT_TERMINATION,session->context,session->termination2,NULL,
+ agent->engine,
+ MPF_SUBTRACT_TERMINATION,session->context,session->rtp_termination,NULL,
&task_msg);
}
}
- return mpf_engine_message_send(suite_engine->engine,&task_msg);
+ return mpf_engine_message_send(agent->engine,&task_msg);
}
/** Process task messages */
{
apr_size_t i;
const mpf_message_t *mpf_message;
- apt_task_t *consumer_task = apt_task_object_get(task);
- mpf_suite_engine_t *suite_engine = apt_task_object_get(consumer_task);
+ apt_consumer_task_t *consumer_task = apt_task_object_get(task);
+ mpf_suite_agent_t *agent = apt_consumer_task_object_get(consumer_task);
const mpf_message_container_t *container = (const mpf_message_container_t*) msg->data;
for(i=0; i<container->count; i++) {
mpf_message = &container->messages[i];
if(mpf_message->message_type == MPF_MESSAGE_TYPE_RESPONSE) {
- mpf_suite_response_process(suite_engine,mpf_message);
+ mpf_suite_response_process(agent,mpf_message);
}
else {
- mpf_suite_event_process(suite_engine,mpf_message);
+ mpf_suite_event_process(agent,mpf_message);
}
}
return TRUE;
}
-/** Create sample file reader descriptor */
-static mpf_audio_file_descriptor_t* mpf_file_reader_descriptor_create(mpf_suite_session_t *session)
+/** Create file reader descriptor */
+static mpf_audio_file_descriptor_t* mpf_file_reader_descriptor_create(const mpf_suite_agent_t *agent, const mpf_suite_session_t *session)
{
+ const char *file_path = apt_datadir_filepath_get(agent->dir_layout,"demo-8kHz.pcm",session->pool);
mpf_audio_file_descriptor_t *descriptor = apr_palloc(session->pool,sizeof(mpf_audio_file_descriptor_t));
descriptor->mask = FILE_READER;
- descriptor->read_handle = fopen("demo.pcm","rb");
+ descriptor->read_handle = NULL;
descriptor->write_handle = NULL;
descriptor->codec_descriptor = mpf_codec_lpcm_descriptor_create(8000,1,session->pool);
+ if(file_path) {
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Open File [%s] for Reading",file_path);
+ descriptor->read_handle = fopen(file_path,"rb");
+ if(!descriptor->read_handle) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Open File [%s]",file_path);
+ }
+ }
return descriptor;
}
-/** Create sample file writer descriptor */
-static mpf_audio_file_descriptor_t* mpf_file_writer_descriptor_create(mpf_suite_session_t *session)
+/** Create file writer descriptor */
+static mpf_audio_file_descriptor_t* mpf_file_writer_descriptor_create(const mpf_suite_agent_t *agent, const mpf_suite_session_t *session)
{
+ const char *file_path = apt_vardir_filepath_get(agent->dir_layout,"output-8kHz.pcm",session->pool);
mpf_audio_file_descriptor_t *descriptor = apr_palloc(session->pool,sizeof(mpf_audio_file_descriptor_t));
descriptor->mask = FILE_WRITER;
- descriptor->max_write_size = 500000; /* 500Kb */
- descriptor->write_handle = fopen("demo_out.pcm","wb");
+ descriptor->max_write_size = 500000; /* ~500Kb */
+ descriptor->write_handle = NULL;
descriptor->read_handle = NULL;
descriptor->codec_descriptor = mpf_codec_lpcm_descriptor_create(8000,1,session->pool);
+ if(file_path) {
+ apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Open File [%s] for Writing",file_path);
+ descriptor->write_handle = fopen(file_path,"wb");
+ if(!descriptor->write_handle) {
+ apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Open File [%s] for Writing",file_path);
+ }
+ }
return descriptor;
}
-/** Create sample RTP local descriptor */
-static mpf_rtp_stream_descriptor_t* mpf_rtp_local_descriptor_create(mpf_suite_session_t *session)
+/** Create RTP rx local descriptor */
+static mpf_rtp_stream_descriptor_t* mpf_rtp_rx_local_descriptor_create(const mpf_suite_agent_t *agent, const mpf_suite_session_t *session)
{
- mpf_rtp_stream_descriptor_t *descriptor = apr_palloc(session->pool,sizeof(mpf_rtp_stream_descriptor_t));
- mpf_rtp_stream_descriptor_init(descriptor);
- descriptor->local = apr_palloc(session->pool,sizeof(mpf_rtp_media_descriptor_t));
- mpf_rtp_media_descriptor_init(descriptor->local);
- descriptor->local->direction = STREAM_DIRECTION_NONE;
- apt_string_set(&descriptor->local->ip,"127.0.0.1");
- descriptor->local->port = 5000;
- return descriptor;
+ mpf_rtp_media_descriptor_t *media_descriptor;
+ mpf_rtp_stream_descriptor_t *stream_descriptor;
+
+ media_descriptor = apr_palloc(session->pool,sizeof(mpf_rtp_media_descriptor_t));
+ mpf_rtp_media_descriptor_init(media_descriptor);
+ media_descriptor->state = MPF_MEDIA_ENABLED;
+ media_descriptor->direction = STREAM_DIRECTION_RECEIVE;
+ apt_string_set(&media_descriptor->ip,"127.0.0.1");
+ media_descriptor->port = 5000;
+
+ stream_descriptor = apr_palloc(session->pool,sizeof(mpf_rtp_stream_descriptor_t));
+ mpf_rtp_stream_descriptor_init(stream_descriptor);
+ stream_descriptor->local = media_descriptor;
+ stream_descriptor->settings = agent->rtp_settings;
+ return stream_descriptor;
}
-/** Create sample RTP remote descriptor */
-static mpf_rtp_stream_descriptor_t* mpf_rtp_remote_descriptor_create(mpf_suite_session_t *session)
+/** Create RTP rx remote descriptor */
+static mpf_rtp_stream_descriptor_t* mpf_rtp_rx_remote_descriptor_create(const mpf_suite_agent_t *agent, const mpf_suite_session_t *session)
{
mpf_codec_list_t *codec_list;
mpf_codec_descriptor_t *codec_descriptor;
- mpf_rtp_stream_descriptor_t *descriptor = apr_palloc(session->pool,sizeof(mpf_rtp_stream_descriptor_t));
- mpf_rtp_stream_descriptor_init(descriptor);
- descriptor->remote = apr_palloc(session->pool,sizeof(mpf_rtp_media_descriptor_t));
- mpf_rtp_media_descriptor_init(descriptor->remote);
- descriptor->remote->direction = STREAM_DIRECTION_DUPLEX;
- apt_string_set(&descriptor->remote->ip,"127.0.0.1");
- descriptor->remote->port = 5002;
- codec_list = &descriptor->remote->codec_list;
- mpf_codec_list_init(codec_list,2,session->pool);
+ mpf_rtp_media_descriptor_t *media_descriptor;
+ mpf_rtp_stream_descriptor_t *stream_descriptor;
+
+ media_descriptor = apr_palloc(session->pool,sizeof(mpf_rtp_media_descriptor_t));
+ mpf_rtp_media_descriptor_init(media_descriptor);
+ media_descriptor->state = MPF_MEDIA_ENABLED;
+ media_descriptor->direction = STREAM_DIRECTION_SEND;
+ apt_string_set(&media_descriptor->ip,"127.0.0.1");
+ media_descriptor->port = 5002;
+ codec_list = &media_descriptor->codec_list;
+ mpf_codec_list_init(codec_list,1,session->pool);
codec_descriptor = mpf_codec_list_add(codec_list);
if(codec_descriptor) {
codec_descriptor->payload_type = 0;
+ apt_string_set(&codec_descriptor->name,"PCMU");
+ codec_descriptor->sampling_rate = 8000;
+ codec_descriptor->channel_count = 1;
}
+
+ stream_descriptor = apr_palloc(session->pool,sizeof(mpf_rtp_stream_descriptor_t));
+ mpf_rtp_stream_descriptor_init(stream_descriptor);
+ stream_descriptor->remote = media_descriptor;
+ stream_descriptor->settings = agent->rtp_settings;
+ return stream_descriptor;
+}
+
+/** Create RTP tx local descriptor */
+static mpf_rtp_stream_descriptor_t* mpf_rtp_tx_local_descriptor_create(const mpf_suite_agent_t *agent, const mpf_suite_session_t *session)
+{
+ mpf_rtp_media_descriptor_t *media_descriptor;
+ mpf_rtp_stream_descriptor_t *stream_descriptor;
+
+ media_descriptor = apr_palloc(session->pool,sizeof(mpf_rtp_media_descriptor_t));
+ mpf_rtp_media_descriptor_init(media_descriptor);
+ media_descriptor->state = MPF_MEDIA_ENABLED;
+ media_descriptor->direction = STREAM_DIRECTION_SEND;
+ apt_string_set(&media_descriptor->ip,"127.0.0.1");
+ media_descriptor->port = 5002;
+
+ stream_descriptor = apr_palloc(session->pool,sizeof(mpf_rtp_stream_descriptor_t));
+ mpf_rtp_stream_descriptor_init(stream_descriptor);
+ stream_descriptor->local = media_descriptor;
+ stream_descriptor->settings = agent->rtp_settings;
+ return stream_descriptor;
+}
+
+/** Create RTP tx remote descriptor */
+static mpf_rtp_stream_descriptor_t* mpf_rtp_tx_remote_descriptor_create(const mpf_suite_agent_t *agent, const mpf_suite_session_t *session)
+{
+ mpf_codec_list_t *codec_list;
+ mpf_codec_descriptor_t *codec_descriptor;
+ mpf_rtp_media_descriptor_t *media_descriptor;
+ mpf_rtp_stream_descriptor_t *stream_descriptor;
+
+ media_descriptor = apr_palloc(session->pool,sizeof(mpf_rtp_media_descriptor_t));
+ mpf_rtp_media_descriptor_init(media_descriptor);
+ media_descriptor->state = MPF_MEDIA_ENABLED;
+ media_descriptor->direction = STREAM_DIRECTION_RECEIVE;
+ apt_string_set(&media_descriptor->ip,"127.0.0.1");
+ media_descriptor->port = 5000;
+ codec_list = &media_descriptor->codec_list;
+ mpf_codec_list_init(codec_list,1,session->pool);
codec_descriptor = mpf_codec_list_add(codec_list);
if(codec_descriptor) {
- codec_descriptor->payload_type = 96;
+ codec_descriptor->payload_type = 0;
apt_string_set(&codec_descriptor->name,"PCMU");
- codec_descriptor->sampling_rate = 16000;
+ codec_descriptor->sampling_rate = 8000;
codec_descriptor->channel_count = 1;
}
- return descriptor;
+ stream_descriptor = apr_palloc(session->pool,sizeof(mpf_rtp_stream_descriptor_t));
+ mpf_rtp_stream_descriptor_init(stream_descriptor);
+ stream_descriptor->remote = media_descriptor;
+ stream_descriptor->settings = agent->rtp_settings;
+ return stream_descriptor;
}
-I$(top_srcdir)/libs/mrcp/control/include \
-I$(top_srcdir)/libs/mrcp/resources/include \
-I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+ $(UNIMRCP_APR_INCLUDES)
noinst_PROGRAMS = mrcptest
mrcptest_LDADD = $(top_builddir)/libs/mrcp/libmrcp.la \
$(top_builddir)/libs/apr-toolkit/libaprtoolkit.la \
- $(UNIMRCP_APR_LIBS) $(UNIMRCP_APU_LIBS)
+ $(UNIMRCP_APR_LIBS)
mrcptest_SOURCES = src/main.c \
src/parse_gen_suite.c \
src/set_get_suite.c \
+++ /dev/null
-<?xml version="1.0" encoding="windows-1251"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="mrcptest"\r
- ProjectGUID="{3CA97077-6210-4362-998A-D15A35EEAA08}"\r
- RootNamespace="mrcptest"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- ConfigurationType="1"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\mrcp.vsprops"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="mrcp.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="1"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcp.vsprops"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="mrcp.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib"\r
- LinkTimeCodeGeneration="1"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- <File\r
- RelativePath=".\src\main.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\parse_gen_suite.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\set_get_suite.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\transparent_set_get_suite.c"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{3CA97077-6210-4362-998A-D15A35EEAA08}</ProjectGuid>
+ <RootNamespace>mrcptest</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcp.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcp.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcp.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\mrcp.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Link>
+ <AdditionalDependencies>mrcp.lib;aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Link>
+ <AdditionalDependencies>mrcp.lib;aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>mrcp.lib;aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <Link>
+ <AdditionalDependencies>mrcp.lib;aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="src\main.c" />
+ <ClCompile Include="src\parse_gen_suite.c" />
+ <ClCompile Include="src\set_get_suite.c" />
+ <ClCompile Include="src\transparent_set_get_suite.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\libs\mrcp\mrcp.vcxproj">
+ <Project>{1c320193-46a6-4b34-9c56-8ab584fc1b56}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="src">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\main.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\parse_gen_suite.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\set_get_suite.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\transparent_set_get_suite.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: main.c 1637 2010-04-03 18:29:24Z achaloyan $
+ * $Id: main.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "apt_test_suite.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: parse_gen_suite.c 1667 2010-04-25 07:04:31Z achaloyan $
+ * $Id: parse_gen_suite.c 2215 2014-11-06 03:07:23Z achaloyan@gmail.com $
*/
#include <apr_file_info.h>
rv = apr_dir_read(&finfo,APR_FINFO_DIRENT,dir);
if(rv == APR_SUCCESS) {
if(finfo.filetype == APR_REG && finfo.name) {
+ int ch;
char *file_path;
- apr_filepath_merge(&file_path,dir_name,finfo.name,0,suite->pool);
+ apr_filepath_merge(&file_path,dir_name,finfo.name,APR_FILEPATH_NATIVE,suite->pool);
test_file_process(suite,factory,version,file_path);
printf("\nPress ENTER to continue\n");
- getchar();
+ do {ch = getchar(); } while ((ch != '\n') && (ch != EOF));
}
}
}
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: set_get_suite.c 1637 2010-04-03 18:29:24Z achaloyan $
+ * $Id: set_get_suite.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "apt_test_suite.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: transparent_set_get_suite.c 1637 2010-04-03 18:29:24Z achaloyan $
+ * $Id: transparent_set_get_suite.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "apt_test_suite.h"
AM_CPPFLAGS = -I$(top_srcdir)/libs/uni-rtsp/include \
-I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+ $(UNIMRCP_APR_INCLUDES)
noinst_PROGRAMS = rtsptest
rtsptest_LDADD = $(top_builddir)/libs/uni-rtsp/libunirtsp.la \
$(top_builddir)/libs/apr-toolkit/libaprtoolkit.la \
- $(UNIMRCP_APR_LIBS) $(UNIMRCP_APU_LIBS)
+ $(UNIMRCP_APR_LIBS)
rtsptest_SOURCES = src/main.c \
src/parse_gen_suite.c
+++ /dev/null
-<?xml version="1.0" encoding="windows-1251"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="rtsptest"\r
- ProjectGUID="{17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}"\r
- RootNamespace="rtsptest"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- ConfigurationType="1"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="unirtsp.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="1"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="unirtsp.lib aprtoolkit.lib libaprutil-1.lib libapr-1.lib"\r
- LinkTimeCodeGeneration="1"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- <File\r
- RelativePath=".\src\main.c"\r
- >\r
- </File>\r
- <File\r
- RelativePath=".\src\parse_gen_suite.c"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="Debug|Win32">\r
- <Configuration>Debug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Debug|x64">\r
- <Configuration>Debug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|Win32">\r
- <Configuration>Release</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="Release|x64">\r
- <Configuration>Release</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>mrcpclient</ProjectName>\r
- <ProjectGuid>{72782932-37CC-46AE-8C7F-9A7B1A6EE108}</ProjectGuid>\r
- <RootNamespace>mrcpclient</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <WholeProgramOptimization>true</WholeProgramOptimization>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
- <ConfigurationType>StaticLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v110</PlatformToolset>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpclient.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpclient.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unirelease.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpclient.props" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\unidebug.props" />\r
- <Import Project="$(ProjectDir)..\..\build\vsprops\mrcpclient.props" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PlatformName)\$(Configuration)\</IntDir>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PlatformName)\$(Configuration)\</IntDir>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <PreprocessorDefinitions>APT_STATIC_LIB;MPF_STATIC_LIB;MRCP_STATIC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <ClInclude Include="include\mrcp_application.h" />\r
- <ClInclude Include="include\mrcp_client.h" />\r
- <ClInclude Include="include\mrcp_client_session.h" />\r
- <ClInclude Include="include\mrcp_client_types.h" />\r
- </ItemGroup>\r
- <ItemGroup>\r
- <ClCompile Include="src\mrcp_application.c" />\r
- <ClCompile Include="src\mrcp_client.c" />\r
- <ClCompile Include="src\mrcp_client_session.c" />\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
-</Project>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}</ProjectGuid>
+ <RootNamespace>rtsptest</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirtsp.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirtsp.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirtsp.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirtsp.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Link>
+ <AdditionalDependencies>unirtsp.lib;aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Link>
+ <AdditionalDependencies>unirtsp.lib;aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>unirtsp.lib;aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <Link>
+ <AdditionalDependencies>unirtsp.lib;aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="src\main.c" />
+ <ClCompile Include="src\parse_gen_suite.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\libs\uni-rtsp\unirtsp.vcxproj">
+ <Project>{504b3154-7a4f-459d-9877-b951021c3f1f}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="src">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\main.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ <ClCompile Include="src\parse_gen_suite.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: main.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: main.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include "apt_test_suite.h"
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: parse_gen_suite.c 1667 2010-04-25 07:04:31Z achaloyan $
+ * $Id: parse_gen_suite.c 2240 2014-11-13 01:18:47Z achaloyan@gmail.com $
*/
#include <apr_file_info.h>
rv = apr_dir_read(&finfo,APR_FINFO_DIRENT,dir);
if(rv == APR_SUCCESS) {
if(finfo.filetype == APR_REG && finfo.name) {
+ int ch;
char *file_path;
- apr_filepath_merge(&file_path,dir_name,finfo.name,0,suite->pool);
+ apr_filepath_merge(&file_path,dir_name,finfo.name,APR_FILEPATH_NATIVE,suite->pool);
test_file_process(suite,file_path);
printf("\nPress ENTER to continue\n");
- getchar();
+ do {ch = getchar(); } while ((ch != '\n') && (ch != EOF));
}
}
}
MAINTAINERCLEANFILES = Makefile.in
-AM_CPPFLAGS = -I$(top_srcdir)/libs/apr-toolkit/include \
- $(UNIMRCP_APR_INCLUDES) $(UNIMRCP_APU_INCLUDES)
+AM_CPPFLAGS = -I$(top_srcdir)/libs/apr-toolkit/include \
+ $(UNIMRCP_APR_INCLUDES)
noinst_PROGRAMS = strtablegen
strtablegen_LDADD = $(top_builddir)/libs/apr-toolkit/libaprtoolkit.la \
- $(UNIMRCP_APR_LIBS) $(UNIMRCP_APU_LIBS)
+ $(UNIMRCP_APR_LIBS)
strtablegen_SOURCES = src/main.c
/*
- * Copyright 2008-2010 Arsen Chaloyan
+ * Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
*
- * $Id: main.c 1474 2010-02-07 20:51:47Z achaloyan $
+ * $Id: main.c 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
*/
#include <stdio.h>
+++ /dev/null
-<?xml version="1.0" encoding="windows-1251"?>\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="9.00"\r
- Name="strtablegen"\r
- ProjectGUID="{79EF9F1D-E211-4ED1-91D2-FC935AB3A872}"\r
- RootNamespace="strtablegen"\r
- TargetFrameworkVersion="131072"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\r
- </Platforms>\r
- <ToolFiles>\r
- </ToolFiles>\r
- <Configurations>\r
- <Configuration\r
- Name="Debug|Win32"\r
- ConfigurationType="1"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="aprtoolkit.lib libaprutil-1.lib libapr-1.lib"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- ConfigurationType="1"\r
- InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCMIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="aprtoolkit.lib libaprutil-1.lib libapr-1.lib"\r
- LinkTimeCodeGeneration="1"\r
- RandomizedBaseAddress="1"\r
- DataExecutionPrevention="0"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCManifestTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- </References>\r
- <Files>\r
- <Filter\r
- Name="src"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- >\r
- <File\r
- RelativePath=".\src\main.c"\r
- >\r
- </File>\r
- </Filter>\r
- <Filter\r
- Name="include"\r
- Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
- >\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- </Globals>\r
-</VisualStudioProject>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{79EF9F1D-E211-4ED1-91D2-FC935AB3A872}</ProjectGuid>
+ <RootNamespace>strtablegen</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\apt.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\apt.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unirelease.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\apt.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(ProjectDir)..\..\build\props\unidebug.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\unibin-x64.props" />
+ <Import Project="$(ProjectDir)..\..\build\props\apt.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Link>
+ <AdditionalDependencies>aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Link>
+ <AdditionalDependencies>aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <Link>
+ <AdditionalDependencies>aprtoolkit.lib;libaprutil-1.lib;libapr-1.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="src\main.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\libs\apr-toolkit\aprtoolkit.vcxproj">
+ <Project>{13deeca0-bdd4-4744-a1a2-8eb0a44df3d2}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="src">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="include">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\main.c">
+ <Filter>src</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libs", "libs", "{5377DC3A-DB96-4819-8AAF-2A75F3A69119}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "modules", "modules", "{493A1DB9-6E7C-48C7-93B5-F75C3C25B9DF}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "platforms", "platforms", "{8E282AE2-038C-49FE-AC67-BC9615AFD800}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "plugins", "plugins", "{09BABD45-8F30-4F99-B8B8-8DD78F6804DB}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{AC4356E8-48A1-4D2D-AFB1-11CF30B974CD}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{62083CC3-13BF-49EA-BFE8-4C9337C0D82C}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "conf", "conf", "{9155EBB8-E7DD-49AE-A86A-7B90B9F09888}"
+ ProjectSection(SolutionItems) = preProject
+ conf\logger.xml = conf\logger.xml
+ conf\unimrcpclient.xml = conf\unimrcpclient.xml
+ conf\unimrcpclient.xsd = conf\unimrcpclient.xsd
+ conf\unimrcpserver.xml = conf\unimrcpserver.xml
+ conf\unimrcpserver.xsd = conf\unimrcpserver.xsd
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "client-profiles", "client-profiles", "{F2D6C1AF-0C05-4695-84AF-15A2F92F9899}"
+ ProjectSection(SolutionItems) = preProject
+ conf\client-profiles\lumenvox.xml = conf\client-profiles\lumenvox.xml
+ conf\client-profiles\nuance.xml = conf\client-profiles\nuance.xml
+ conf\client-profiles\unimrcp.xml = conf\client-profiles\unimrcp.xml
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unimrcpserver", "platforms\unimrcp-server\unimrcpserver.vcxproj", "{592CF22D-3F8F-4A77-A174-130D77B7623B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aprtoolkit", "libs\apr-toolkit\aprtoolkit.vcxproj", "{13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mpf", "libs\mpf\mpf.vcxproj", "{B5A00BFA-6083-4FAE-A097-71642D6473B5}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcp", "libs\mrcp\mrcp.vcxproj", "{1C320193-46A6-4B34-9C56-8AB584FC1B56}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpsignaling", "libs\mrcp-signaling\mrcpsignaling.vcxproj", "{12A49562-BAB9-43A3-A21D-15B60BBB4C31}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpserver", "libs\mrcp-server\mrcpserver.vcxproj", "{18B1F35A-10F8-4287-9B37-2D10501B0B38}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunimrcpserver", "platforms\libunimrcp-server\libunimrcpserver.vcxproj", "{C98AF157-352E-4737-BD30-A24E2647F5AE}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpsofiasip", "modules\mrcp-sofiasip\mrcpsofiasip.vcxproj", "{746F3632-5BB2-4570-9453-31D6D58A7D8E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpclient", "libs\mrcp-client\mrcpclient.vcxproj", "{72782932-37CC-46AE-8C7F-9A7B1A6EE108}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunimrcpclient", "platforms\libunimrcp-client\libunimrcpclient.vcxproj", "{EE157390-1E85-416C-946E-620E32C9AD33}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unimrcpclient", "platforms\unimrcp-client\unimrcpclient.vcxproj", "{57FAF32E-49FD-491F-895D-132D0D5EFE0A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpv2transport", "libs\mrcpv2-transport\mrcpv2transport.vcxproj", "{A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpengine", "libs\mrcp-engine\mrcpengine.vcxproj", "{843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demosynth", "plugins\demo-synth\demosynth.vcxproj", "{92BFA534-C419-4EB2-AAA3-510653F38F08}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demorecog", "plugins\demo-recog\demorecog.vcxproj", "{B495B6D9-AF84-479D-B30A-313C16EF8BFD}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strtablegen", "tests\strtablegen\strtablegen.vcxproj", "{79EF9F1D-E211-4ED1-91D2-FC935AB3A872}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "apttest", "tests\apttest\apttest.vcxproj", "{429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mpftest", "tests\mpftest\mpftest.vcxproj", "{DCF01B1C-5268-44F3-9130-D647FABFB663}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcptest", "tests\mrcptest\mrcptest.vcxproj", "{3CA97077-6210-4362-998A-D15A35EEAA08}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unirtsp", "libs\uni-rtsp\unirtsp.vcxproj", "{504B3154-7A4F-459D-9877-B951021C3F1F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rtsptest", "tests\rtsptest\rtsptest.vcxproj", "{17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpunirtsp", "modules\mrcp-unirtsp\mrcpunirtsp.vcxproj", "{DEB01ACB-D65F-4A62-AED9-58C1054499E9}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "prepare", "build\tools\prepare.vcxproj", "{01D63BF5-7798-4746-852A-4B45229BB735}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unimrcpservice", "build\tools\unimrcpservice.vcxproj", "{4714EF49-BFD5-4B22-95F7-95A07F1EAC25}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asrclient", "platforms\asr-client\asrclient.vcxproj", "{6B83AC6D-01CE-4E1C-81CE-02AD8116C684}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libasrclient", "platforms\libasr-client\libasrclient.vcxproj", "{272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "umc", "platforms\umc\umc.vcxproj", "{CD1C52C1-D8E1-4654-AE65-6CCAB38DE894}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcprecorder", "plugins\mrcp-recorder\mrcprecorder.vcxproj", "{5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demoverifier", "plugins\demo-verifier\demoverifier.vcxproj", "{F7563CAD-5C95-46E5-89B7-0953C6C6E746}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {592CF22D-3F8F-4A77-A174-130D77B7623B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {592CF22D-3F8F-4A77-A174-130D77B7623B}.Debug|Win32.Build.0 = Debug|Win32
+ {592CF22D-3F8F-4A77-A174-130D77B7623B}.Debug|x64.ActiveCfg = Debug|x64
+ {592CF22D-3F8F-4A77-A174-130D77B7623B}.Debug|x64.Build.0 = Debug|x64
+ {592CF22D-3F8F-4A77-A174-130D77B7623B}.Release|Win32.ActiveCfg = Release|Win32
+ {592CF22D-3F8F-4A77-A174-130D77B7623B}.Release|Win32.Build.0 = Release|Win32
+ {592CF22D-3F8F-4A77-A174-130D77B7623B}.Release|x64.ActiveCfg = Release|x64
+ {592CF22D-3F8F-4A77-A174-130D77B7623B}.Release|x64.Build.0 = Release|x64
+ {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Debug|Win32.ActiveCfg = Debug|Win32
+ {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Debug|Win32.Build.0 = Debug|Win32
+ {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Debug|x64.ActiveCfg = Debug|x64
+ {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Debug|x64.Build.0 = Debug|x64
+ {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Release|Win32.ActiveCfg = Release|Win32
+ {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Release|Win32.Build.0 = Release|Win32
+ {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Release|x64.ActiveCfg = Release|x64
+ {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Release|x64.Build.0 = Release|x64
+ {B5A00BFA-6083-4FAE-A097-71642D6473B5}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B5A00BFA-6083-4FAE-A097-71642D6473B5}.Debug|Win32.Build.0 = Debug|Win32
+ {B5A00BFA-6083-4FAE-A097-71642D6473B5}.Debug|x64.ActiveCfg = Debug|x64
+ {B5A00BFA-6083-4FAE-A097-71642D6473B5}.Debug|x64.Build.0 = Debug|x64
+ {B5A00BFA-6083-4FAE-A097-71642D6473B5}.Release|Win32.ActiveCfg = Release|Win32
+ {B5A00BFA-6083-4FAE-A097-71642D6473B5}.Release|Win32.Build.0 = Release|Win32
+ {B5A00BFA-6083-4FAE-A097-71642D6473B5}.Release|x64.ActiveCfg = Release|x64
+ {B5A00BFA-6083-4FAE-A097-71642D6473B5}.Release|x64.Build.0 = Release|x64
+ {1C320193-46A6-4B34-9C56-8AB584FC1B56}.Debug|Win32.ActiveCfg = Debug|Win32
+ {1C320193-46A6-4B34-9C56-8AB584FC1B56}.Debug|Win32.Build.0 = Debug|Win32
+ {1C320193-46A6-4B34-9C56-8AB584FC1B56}.Debug|x64.ActiveCfg = Debug|x64
+ {1C320193-46A6-4B34-9C56-8AB584FC1B56}.Debug|x64.Build.0 = Debug|x64
+ {1C320193-46A6-4B34-9C56-8AB584FC1B56}.Release|Win32.ActiveCfg = Release|Win32
+ {1C320193-46A6-4B34-9C56-8AB584FC1B56}.Release|Win32.Build.0 = Release|Win32
+ {1C320193-46A6-4B34-9C56-8AB584FC1B56}.Release|x64.ActiveCfg = Release|x64
+ {1C320193-46A6-4B34-9C56-8AB584FC1B56}.Release|x64.Build.0 = Release|x64
+ {12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Debug|Win32.ActiveCfg = Debug|Win32
+ {12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Debug|Win32.Build.0 = Debug|Win32
+ {12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Debug|x64.ActiveCfg = Debug|x64
+ {12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Debug|x64.Build.0 = Debug|x64
+ {12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Release|Win32.ActiveCfg = Release|Win32
+ {12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Release|Win32.Build.0 = Release|Win32
+ {12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Release|x64.ActiveCfg = Release|x64
+ {12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Release|x64.Build.0 = Release|x64
+ {18B1F35A-10F8-4287-9B37-2D10501B0B38}.Debug|Win32.ActiveCfg = Debug|Win32
+ {18B1F35A-10F8-4287-9B37-2D10501B0B38}.Debug|Win32.Build.0 = Debug|Win32
+ {18B1F35A-10F8-4287-9B37-2D10501B0B38}.Debug|x64.ActiveCfg = Debug|x64
+ {18B1F35A-10F8-4287-9B37-2D10501B0B38}.Debug|x64.Build.0 = Debug|x64
+ {18B1F35A-10F8-4287-9B37-2D10501B0B38}.Release|Win32.ActiveCfg = Release|Win32
+ {18B1F35A-10F8-4287-9B37-2D10501B0B38}.Release|Win32.Build.0 = Release|Win32
+ {18B1F35A-10F8-4287-9B37-2D10501B0B38}.Release|x64.ActiveCfg = Release|x64
+ {18B1F35A-10F8-4287-9B37-2D10501B0B38}.Release|x64.Build.0 = Release|x64
+ {C98AF157-352E-4737-BD30-A24E2647F5AE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C98AF157-352E-4737-BD30-A24E2647F5AE}.Debug|Win32.Build.0 = Debug|Win32
+ {C98AF157-352E-4737-BD30-A24E2647F5AE}.Debug|x64.ActiveCfg = Debug|x64
+ {C98AF157-352E-4737-BD30-A24E2647F5AE}.Debug|x64.Build.0 = Debug|x64
+ {C98AF157-352E-4737-BD30-A24E2647F5AE}.Release|Win32.ActiveCfg = Release|Win32
+ {C98AF157-352E-4737-BD30-A24E2647F5AE}.Release|Win32.Build.0 = Release|Win32
+ {C98AF157-352E-4737-BD30-A24E2647F5AE}.Release|x64.ActiveCfg = Release|x64
+ {C98AF157-352E-4737-BD30-A24E2647F5AE}.Release|x64.Build.0 = Release|x64
+ {746F3632-5BB2-4570-9453-31D6D58A7D8E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {746F3632-5BB2-4570-9453-31D6D58A7D8E}.Debug|Win32.Build.0 = Debug|Win32
+ {746F3632-5BB2-4570-9453-31D6D58A7D8E}.Debug|x64.ActiveCfg = Debug|x64
+ {746F3632-5BB2-4570-9453-31D6D58A7D8E}.Debug|x64.Build.0 = Debug|x64
+ {746F3632-5BB2-4570-9453-31D6D58A7D8E}.Release|Win32.ActiveCfg = Release|Win32
+ {746F3632-5BB2-4570-9453-31D6D58A7D8E}.Release|Win32.Build.0 = Release|Win32
+ {746F3632-5BB2-4570-9453-31D6D58A7D8E}.Release|x64.ActiveCfg = Release|x64
+ {746F3632-5BB2-4570-9453-31D6D58A7D8E}.Release|x64.Build.0 = Release|x64
+ {72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Debug|Win32.ActiveCfg = Debug|Win32
+ {72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Debug|Win32.Build.0 = Debug|Win32
+ {72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Debug|x64.ActiveCfg = Debug|x64
+ {72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Debug|x64.Build.0 = Debug|x64
+ {72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Release|Win32.ActiveCfg = Release|Win32
+ {72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Release|Win32.Build.0 = Release|Win32
+ {72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Release|x64.ActiveCfg = Release|x64
+ {72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Release|x64.Build.0 = Release|x64
+ {EE157390-1E85-416C-946E-620E32C9AD33}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE157390-1E85-416C-946E-620E32C9AD33}.Debug|Win32.Build.0 = Debug|Win32
+ {EE157390-1E85-416C-946E-620E32C9AD33}.Debug|x64.ActiveCfg = Debug|x64
+ {EE157390-1E85-416C-946E-620E32C9AD33}.Debug|x64.Build.0 = Debug|x64
+ {EE157390-1E85-416C-946E-620E32C9AD33}.Release|Win32.ActiveCfg = Release|Win32
+ {EE157390-1E85-416C-946E-620E32C9AD33}.Release|Win32.Build.0 = Release|Win32
+ {EE157390-1E85-416C-946E-620E32C9AD33}.Release|x64.ActiveCfg = Release|x64
+ {EE157390-1E85-416C-946E-620E32C9AD33}.Release|x64.Build.0 = Release|x64
+ {57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Debug|Win32.Build.0 = Debug|Win32
+ {57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Debug|x64.ActiveCfg = Debug|x64
+ {57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Debug|x64.Build.0 = Debug|x64
+ {57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Release|Win32.ActiveCfg = Release|Win32
+ {57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Release|Win32.Build.0 = Release|Win32
+ {57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Release|x64.ActiveCfg = Release|x64
+ {57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Release|x64.Build.0 = Release|x64
+ {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Debug|Win32.Build.0 = Debug|Win32
+ {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Debug|x64.ActiveCfg = Debug|x64
+ {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Debug|x64.Build.0 = Debug|x64
+ {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Release|Win32.ActiveCfg = Release|Win32
+ {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Release|Win32.Build.0 = Release|Win32
+ {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Release|x64.ActiveCfg = Release|x64
+ {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Release|x64.Build.0 = Release|x64
+ {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Debug|Win32.Build.0 = Debug|Win32
+ {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Debug|x64.ActiveCfg = Debug|x64
+ {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Debug|x64.Build.0 = Debug|x64
+ {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Release|Win32.ActiveCfg = Release|Win32
+ {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Release|Win32.Build.0 = Release|Win32
+ {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Release|x64.ActiveCfg = Release|x64
+ {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Release|x64.Build.0 = Release|x64
+ {92BFA534-C419-4EB2-AAA3-510653F38F08}.Debug|Win32.ActiveCfg = Debug|Win32
+ {92BFA534-C419-4EB2-AAA3-510653F38F08}.Debug|Win32.Build.0 = Debug|Win32
+ {92BFA534-C419-4EB2-AAA3-510653F38F08}.Debug|x64.ActiveCfg = Debug|x64
+ {92BFA534-C419-4EB2-AAA3-510653F38F08}.Debug|x64.Build.0 = Debug|x64
+ {92BFA534-C419-4EB2-AAA3-510653F38F08}.Release|Win32.ActiveCfg = Release|Win32
+ {92BFA534-C419-4EB2-AAA3-510653F38F08}.Release|Win32.Build.0 = Release|Win32
+ {92BFA534-C419-4EB2-AAA3-510653F38F08}.Release|x64.ActiveCfg = Release|x64
+ {92BFA534-C419-4EB2-AAA3-510653F38F08}.Release|x64.Build.0 = Release|x64
+ {B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Debug|Win32.Build.0 = Debug|Win32
+ {B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Debug|x64.ActiveCfg = Debug|x64
+ {B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Debug|x64.Build.0 = Debug|x64
+ {B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Release|Win32.ActiveCfg = Release|Win32
+ {B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Release|Win32.Build.0 = Release|Win32
+ {B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Release|x64.ActiveCfg = Release|x64
+ {B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Release|x64.Build.0 = Release|x64
+ {79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Debug|Win32.ActiveCfg = Debug|Win32
+ {79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Debug|Win32.Build.0 = Debug|Win32
+ {79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Debug|x64.ActiveCfg = Debug|x64
+ {79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Debug|x64.Build.0 = Debug|x64
+ {79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Release|Win32.ActiveCfg = Release|Win32
+ {79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Release|Win32.Build.0 = Release|Win32
+ {79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Release|x64.ActiveCfg = Release|x64
+ {79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Release|x64.Build.0 = Release|x64
+ {429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Debug|Win32.ActiveCfg = Debug|Win32
+ {429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Debug|Win32.Build.0 = Debug|Win32
+ {429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Debug|x64.ActiveCfg = Debug|x64
+ {429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Debug|x64.Build.0 = Debug|x64
+ {429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Release|Win32.ActiveCfg = Release|Win32
+ {429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Release|Win32.Build.0 = Release|Win32
+ {429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Release|x64.ActiveCfg = Release|x64
+ {429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Release|x64.Build.0 = Release|x64
+ {DCF01B1C-5268-44F3-9130-D647FABFB663}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DCF01B1C-5268-44F3-9130-D647FABFB663}.Debug|Win32.Build.0 = Debug|Win32
+ {DCF01B1C-5268-44F3-9130-D647FABFB663}.Debug|x64.ActiveCfg = Debug|x64
+ {DCF01B1C-5268-44F3-9130-D647FABFB663}.Debug|x64.Build.0 = Debug|x64
+ {DCF01B1C-5268-44F3-9130-D647FABFB663}.Release|Win32.ActiveCfg = Release|Win32
+ {DCF01B1C-5268-44F3-9130-D647FABFB663}.Release|Win32.Build.0 = Release|Win32
+ {DCF01B1C-5268-44F3-9130-D647FABFB663}.Release|x64.ActiveCfg = Release|x64
+ {DCF01B1C-5268-44F3-9130-D647FABFB663}.Release|x64.Build.0 = Release|x64
+ {3CA97077-6210-4362-998A-D15A35EEAA08}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3CA97077-6210-4362-998A-D15A35EEAA08}.Debug|Win32.Build.0 = Debug|Win32
+ {3CA97077-6210-4362-998A-D15A35EEAA08}.Debug|x64.ActiveCfg = Debug|x64
+ {3CA97077-6210-4362-998A-D15A35EEAA08}.Debug|x64.Build.0 = Debug|x64
+ {3CA97077-6210-4362-998A-D15A35EEAA08}.Release|Win32.ActiveCfg = Release|Win32
+ {3CA97077-6210-4362-998A-D15A35EEAA08}.Release|Win32.Build.0 = Release|Win32
+ {3CA97077-6210-4362-998A-D15A35EEAA08}.Release|x64.ActiveCfg = Release|x64
+ {3CA97077-6210-4362-998A-D15A35EEAA08}.Release|x64.Build.0 = Release|x64
+ {504B3154-7A4F-459D-9877-B951021C3F1F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {504B3154-7A4F-459D-9877-B951021C3F1F}.Debug|Win32.Build.0 = Debug|Win32
+ {504B3154-7A4F-459D-9877-B951021C3F1F}.Debug|x64.ActiveCfg = Debug|x64
+ {504B3154-7A4F-459D-9877-B951021C3F1F}.Debug|x64.Build.0 = Debug|x64
+ {504B3154-7A4F-459D-9877-B951021C3F1F}.Release|Win32.ActiveCfg = Release|Win32
+ {504B3154-7A4F-459D-9877-B951021C3F1F}.Release|Win32.Build.0 = Release|Win32
+ {504B3154-7A4F-459D-9877-B951021C3F1F}.Release|x64.ActiveCfg = Release|x64
+ {504B3154-7A4F-459D-9877-B951021C3F1F}.Release|x64.Build.0 = Release|x64
+ {17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Debug|Win32.ActiveCfg = Debug|Win32
+ {17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Debug|Win32.Build.0 = Debug|Win32
+ {17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Debug|x64.ActiveCfg = Debug|x64
+ {17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Debug|x64.Build.0 = Debug|x64
+ {17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Release|Win32.ActiveCfg = Release|Win32
+ {17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Release|Win32.Build.0 = Release|Win32
+ {17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Release|x64.ActiveCfg = Release|x64
+ {17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Release|x64.Build.0 = Release|x64
+ {DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Debug|Win32.Build.0 = Debug|Win32
+ {DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Debug|x64.ActiveCfg = Debug|x64
+ {DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Debug|x64.Build.0 = Debug|x64
+ {DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Release|Win32.ActiveCfg = Release|Win32
+ {DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Release|Win32.Build.0 = Release|Win32
+ {DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Release|x64.ActiveCfg = Release|x64
+ {DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Release|x64.Build.0 = Release|x64
+ {01D63BF5-7798-4746-852A-4B45229BB735}.Debug|Win32.ActiveCfg = Debug|Win32
+ {01D63BF5-7798-4746-852A-4B45229BB735}.Debug|x64.ActiveCfg = Debug|x64
+ {01D63BF5-7798-4746-852A-4B45229BB735}.Release|Win32.ActiveCfg = Release|Win32
+ {01D63BF5-7798-4746-852A-4B45229BB735}.Release|x64.ActiveCfg = Release|x64
+ {4714EF49-BFD5-4B22-95F7-95A07F1EAC25}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4714EF49-BFD5-4B22-95F7-95A07F1EAC25}.Debug|x64.ActiveCfg = Debug|x64
+ {4714EF49-BFD5-4B22-95F7-95A07F1EAC25}.Release|Win32.ActiveCfg = Release|Win32
+ {4714EF49-BFD5-4B22-95F7-95A07F1EAC25}.Release|x64.ActiveCfg = Release|x64
+ {6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Debug|Win32.Build.0 = Debug|Win32
+ {6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Debug|x64.ActiveCfg = Debug|x64
+ {6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Debug|x64.Build.0 = Debug|x64
+ {6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Release|Win32.ActiveCfg = Release|Win32
+ {6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Release|Win32.Build.0 = Release|Win32
+ {6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Release|x64.ActiveCfg = Release|x64
+ {6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Release|x64.Build.0 = Release|x64
+ {272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}.Debug|Win32.Build.0 = Debug|Win32
+ {272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}.Debug|x64.ActiveCfg = Debug|x64
+ {272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}.Debug|x64.Build.0 = Debug|x64
+ {272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}.Release|Win32.ActiveCfg = Release|Win32
+ {272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}.Release|Win32.Build.0 = Release|Win32
+ {272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}.Release|x64.ActiveCfg = Release|x64
+ {272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}.Release|x64.Build.0 = Release|x64
+ {CD1C52C1-D8E1-4654-AE65-6CCAB38DE894}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CD1C52C1-D8E1-4654-AE65-6CCAB38DE894}.Debug|Win32.Build.0 = Debug|Win32
+ {CD1C52C1-D8E1-4654-AE65-6CCAB38DE894}.Debug|x64.ActiveCfg = Debug|x64
+ {CD1C52C1-D8E1-4654-AE65-6CCAB38DE894}.Debug|x64.Build.0 = Debug|x64
+ {CD1C52C1-D8E1-4654-AE65-6CCAB38DE894}.Release|Win32.ActiveCfg = Release|Win32
+ {CD1C52C1-D8E1-4654-AE65-6CCAB38DE894}.Release|Win32.Build.0 = Release|Win32
+ {CD1C52C1-D8E1-4654-AE65-6CCAB38DE894}.Release|x64.ActiveCfg = Release|x64
+ {CD1C52C1-D8E1-4654-AE65-6CCAB38DE894}.Release|x64.Build.0 = Release|x64
+ {5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Debug|Win32.Build.0 = Debug|Win32
+ {5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Debug|x64.ActiveCfg = Debug|x64
+ {5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Debug|x64.Build.0 = Debug|x64
+ {5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Release|Win32.ActiveCfg = Release|Win32
+ {5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Release|Win32.Build.0 = Release|Win32
+ {5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Release|x64.ActiveCfg = Release|x64
+ {5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Release|x64.Build.0 = Release|x64
+ {F7563CAD-5C95-46E5-89B7-0953C6C6E746}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F7563CAD-5C95-46E5-89B7-0953C6C6E746}.Debug|Win32.Build.0 = Debug|Win32
+ {F7563CAD-5C95-46E5-89B7-0953C6C6E746}.Debug|x64.ActiveCfg = Debug|x64
+ {F7563CAD-5C95-46E5-89B7-0953C6C6E746}.Debug|x64.Build.0 = Debug|x64
+ {F7563CAD-5C95-46E5-89B7-0953C6C6E746}.Release|Win32.ActiveCfg = Release|Win32
+ {F7563CAD-5C95-46E5-89B7-0953C6C6E746}.Release|Win32.Build.0 = Release|Win32
+ {F7563CAD-5C95-46E5-89B7-0953C6C6E746}.Release|x64.ActiveCfg = Release|x64
+ {F7563CAD-5C95-46E5-89B7-0953C6C6E746}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2} = {5377DC3A-DB96-4819-8AAF-2A75F3A69119}
+ {B5A00BFA-6083-4FAE-A097-71642D6473B5} = {5377DC3A-DB96-4819-8AAF-2A75F3A69119}
+ {1C320193-46A6-4B34-9C56-8AB584FC1B56} = {5377DC3A-DB96-4819-8AAF-2A75F3A69119}
+ {12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {5377DC3A-DB96-4819-8AAF-2A75F3A69119}
+ {18B1F35A-10F8-4287-9B37-2D10501B0B38} = {5377DC3A-DB96-4819-8AAF-2A75F3A69119}
+ {72782932-37CC-46AE-8C7F-9A7B1A6EE108} = {5377DC3A-DB96-4819-8AAF-2A75F3A69119}
+ {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA} = {5377DC3A-DB96-4819-8AAF-2A75F3A69119}
+ {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C} = {5377DC3A-DB96-4819-8AAF-2A75F3A69119}
+ {504B3154-7A4F-459D-9877-B951021C3F1F} = {5377DC3A-DB96-4819-8AAF-2A75F3A69119}
+ {746F3632-5BB2-4570-9453-31D6D58A7D8E} = {493A1DB9-6E7C-48C7-93B5-F75C3C25B9DF}
+ {DEB01ACB-D65F-4A62-AED9-58C1054499E9} = {493A1DB9-6E7C-48C7-93B5-F75C3C25B9DF}
+ {592CF22D-3F8F-4A77-A174-130D77B7623B} = {8E282AE2-038C-49FE-AC67-BC9615AFD800}
+ {C98AF157-352E-4737-BD30-A24E2647F5AE} = {8E282AE2-038C-49FE-AC67-BC9615AFD800}
+ {EE157390-1E85-416C-946E-620E32C9AD33} = {8E282AE2-038C-49FE-AC67-BC9615AFD800}
+ {57FAF32E-49FD-491F-895D-132D0D5EFE0A} = {8E282AE2-038C-49FE-AC67-BC9615AFD800}
+ {6B83AC6D-01CE-4E1C-81CE-02AD8116C684} = {8E282AE2-038C-49FE-AC67-BC9615AFD800}
+ {272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3} = {8E282AE2-038C-49FE-AC67-BC9615AFD800}
+ {CD1C52C1-D8E1-4654-AE65-6CCAB38DE894} = {8E282AE2-038C-49FE-AC67-BC9615AFD800}
+ {92BFA534-C419-4EB2-AAA3-510653F38F08} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}
+ {B495B6D9-AF84-479D-B30A-313C16EF8BFD} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}
+ {5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}
+ {F7563CAD-5C95-46E5-89B7-0953C6C6E746} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}
+ {79EF9F1D-E211-4ED1-91D2-FC935AB3A872} = {AC4356E8-48A1-4D2D-AFB1-11CF30B974CD}
+ {429C907B-97D1-4B2D-9B0E-A14A5BFDAD15} = {AC4356E8-48A1-4D2D-AFB1-11CF30B974CD}
+ {DCF01B1C-5268-44F3-9130-D647FABFB663} = {AC4356E8-48A1-4D2D-AFB1-11CF30B974CD}
+ {3CA97077-6210-4362-998A-D15A35EEAA08} = {AC4356E8-48A1-4D2D-AFB1-11CF30B974CD}
+ {17A33F3F-BAF5-403F-8EF4-FECDA7D9A335} = {AC4356E8-48A1-4D2D-AFB1-11CF30B974CD}
+ {01D63BF5-7798-4746-852A-4B45229BB735} = {62083CC3-13BF-49EA-BFE8-4C9337C0D82C}
+ {4714EF49-BFD5-4B22-95F7-95A07F1EAC25} = {62083CC3-13BF-49EA-BFE8-4C9337C0D82C}
+ {F2D6C1AF-0C05-4695-84AF-15A2F92F9899} = {9155EBB8-E7DD-49AE-A86A-7B90B9F09888}
+ EndGlobalSection
+EndGlobal
+++ /dev/null
-Microsoft Visual Studio Solution File, Format Version 10.00\r
-# Visual Studio 2008\r
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libs", "libs", "{5377DC3A-DB96-4819-8AAF-2A75F3A69119}"\r
-EndProject\r
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "modules", "modules", "{493A1DB9-6E7C-48C7-93B5-F75C3C25B9DF}"\r
-EndProject\r
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "platforms", "platforms", "{8E282AE2-038C-49FE-AC67-BC9615AFD800}"\r
-EndProject\r
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "plugins", "plugins", "{09BABD45-8F30-4F99-B8B8-8DD78F6804DB}"\r
-EndProject\r
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{AC4356E8-48A1-4D2D-AFB1-11CF30B974CD}"\r
-EndProject\r
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{62083CC3-13BF-49EA-BFE8-4C9337C0D82C}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unimrcpserver", "platforms\unimrcp-server\unimrcpserver.2008.vcproj", "{592CF22D-3F8F-4A77-A174-130D77B7623B}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {C98AF157-352E-4737-BD30-A24E2647F5AE} = {C98AF157-352E-4737-BD30-A24E2647F5AE}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aprtoolkit", "libs\apr-toolkit\aprtoolkit.2008.vcproj", "{13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mpf", "libs\mpf\mpf.2008.vcproj", "{B5A00BFA-6083-4FAE-A097-71642D6473B5}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2} = {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcp", "libs\mrcp\mrcp.2008.vcproj", "{1C320193-46A6-4B34-9C56-8AB584FC1B56}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpsignaling", "libs\mrcp-signaling\mrcpsignaling.2008.vcproj", "{12A49562-BAB9-43A3-A21D-15B60BBB4C31}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {1C320193-46A6-4B34-9C56-8AB584FC1B56} = {1C320193-46A6-4B34-9C56-8AB584FC1B56}\r
- {B5A00BFA-6083-4FAE-A097-71642D6473B5} = {B5A00BFA-6083-4FAE-A097-71642D6473B5}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpserver", "libs\mrcp-server\mrcpserver.2008.vcproj", "{18B1F35A-10F8-4287-9B37-2D10501B0B38}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA} = {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}\r
- {12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {12A49562-BAB9-43A3-A21D-15B60BBB4C31}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunimrcpserver", "platforms\libunimrcp-server\libunimrcpserver.2008.vcproj", "{C98AF157-352E-4737-BD30-A24E2647F5AE}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {746F3632-5BB2-4570-9453-31D6D58A7D8E} = {746F3632-5BB2-4570-9453-31D6D58A7D8E}\r
- {18B1F35A-10F8-4287-9B37-2D10501B0B38} = {18B1F35A-10F8-4287-9B37-2D10501B0B38}\r
- {DEB01ACB-D65F-4A62-AED9-58C1054499E9} = {DEB01ACB-D65F-4A62-AED9-58C1054499E9}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpsofiasip", "modules\mrcp-sofiasip\mrcpsofiasip.2008.vcproj", "{746F3632-5BB2-4570-9453-31D6D58A7D8E}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA} = {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}\r
- {12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {12A49562-BAB9-43A3-A21D-15B60BBB4C31}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpclient", "libs\mrcp-client\mrcpclient.2008.vcproj", "{72782932-37CC-46AE-8C7F-9A7B1A6EE108}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {12A49562-BAB9-43A3-A21D-15B60BBB4C31}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunimrcpclient", "platforms\libunimrcp-client\libunimrcpclient.2008.vcproj", "{EE157390-1E85-416C-946E-620E32C9AD33}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {72782932-37CC-46AE-8C7F-9A7B1A6EE108} = {72782932-37CC-46AE-8C7F-9A7B1A6EE108}\r
- {746F3632-5BB2-4570-9453-31D6D58A7D8E} = {746F3632-5BB2-4570-9453-31D6D58A7D8E}\r
- {DEB01ACB-D65F-4A62-AED9-58C1054499E9} = {DEB01ACB-D65F-4A62-AED9-58C1054499E9}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unimrcpclient", "platforms\unimrcp-client\unimrcpclient.2008.vcproj", "{57FAF32E-49FD-491F-895D-132D0D5EFE0A}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {EE157390-1E85-416C-946E-620E32C9AD33} = {EE157390-1E85-416C-946E-620E32C9AD33}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpv2transport", "libs\mrcpv2-transport\mrcpv2transport.2008.vcproj", "{A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {1C320193-46A6-4B34-9C56-8AB584FC1B56} = {1C320193-46A6-4B34-9C56-8AB584FC1B56}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpengine", "libs\mrcp-engine\mrcpengine.2008.vcproj", "{843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {1C320193-46A6-4B34-9C56-8AB584FC1B56} = {1C320193-46A6-4B34-9C56-8AB584FC1B56}\r
- {B5A00BFA-6083-4FAE-A097-71642D6473B5} = {B5A00BFA-6083-4FAE-A097-71642D6473B5}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demosynth", "plugins\demo-synth\demosynth.2008.vcproj", "{92BFA534-C419-4EB2-AAA3-510653F38F08}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C} = {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demorecog", "plugins\demo-recog\demorecog.2008.vcproj", "{B495B6D9-AF84-479D-B30A-313C16EF8BFD}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C} = {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strtablegen", "tests\strtablegen\strtablegen.2008.vcproj", "{79EF9F1D-E211-4ED1-91D2-FC935AB3A872}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2} = {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "apttest", "tests\apttest\apttest.2008.vcproj", "{429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2} = {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mpftest", "tests\mpftest\mpftest.2008.vcproj", "{DCF01B1C-5268-44F3-9130-D647FABFB663}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {B5A00BFA-6083-4FAE-A097-71642D6473B5} = {B5A00BFA-6083-4FAE-A097-71642D6473B5}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcptest", "tests\mrcptest\mrcptest.2008.vcproj", "{3CA97077-6210-4362-998A-D15A35EEAA08}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {1C320193-46A6-4B34-9C56-8AB584FC1B56} = {1C320193-46A6-4B34-9C56-8AB584FC1B56}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpcepstral", "plugins\mrcp-cepstral\mrcpcepstral.2008.vcproj", "{729EF28E-38C9-40DE-A138-87785F021411}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C} = {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unirtsp", "libs\uni-rtsp\unirtsp.2008.vcproj", "{504B3154-7A4F-459D-9877-B951021C3F1F}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2} = {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rtsptest", "tests\rtsptest\rtsptest.2008.vcproj", "{17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {504B3154-7A4F-459D-9877-B951021C3F1F} = {504B3154-7A4F-459D-9877-B951021C3F1F}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpunirtsp", "modules\mrcp-unirtsp\mrcpunirtsp.2008.vcproj", "{DEB01ACB-D65F-4A62-AED9-58C1054499E9}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {504B3154-7A4F-459D-9877-B951021C3F1F} = {504B3154-7A4F-459D-9877-B951021C3F1F}\r
- {12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {12A49562-BAB9-43A3-A21D-15B60BBB4C31}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "prepare", "build\tools\prepare.2008.vcproj", "{01D63BF5-7798-4746-852A-4B45229BB735}"\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unimrcpservice", "build\tools\unimrcpservice.2008.vcproj", "{4714EF49-BFD5-4B22-95F7-95A07F1EAC25}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2} = {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcppocketsphinx", "plugins\mrcp-pocketsphinx\mrcppocketsphinx.2008.vcproj", "{3C614AE8-B611-4D43-A9AF-1CAA440A9F69}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C} = {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpflite", "plugins\mrcp-flite\mrcpflite.2008.vcproj", "{56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556}"\r
- ProjectSection(ProjectDependencies) = postProject\r
- {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C} = {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}\r
- EndProjectSection\r
-EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "preparesphinx", "build\tools\preparesphinx.2008.vcproj", "{71D62A04-8EF6-4C6B-AC12-0C15A875E53A}"\r
-EndProject\r
-Global\r
- GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
- Debug|Win32 = Debug|Win32\r
- Release|Win32 = Release|Win32\r
- EndGlobalSection\r
- GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
- {592CF22D-3F8F-4A77-A174-130D77B7623B}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {592CF22D-3F8F-4A77-A174-130D77B7623B}.Debug|Win32.Build.0 = Debug|Win32\r
- {592CF22D-3F8F-4A77-A174-130D77B7623B}.Release|Win32.ActiveCfg = Release|Win32\r
- {592CF22D-3F8F-4A77-A174-130D77B7623B}.Release|Win32.Build.0 = Release|Win32\r
- {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Debug|Win32.Build.0 = Debug|Win32\r
- {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Release|Win32.ActiveCfg = Release|Win32\r
- {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}.Release|Win32.Build.0 = Release|Win32\r
- {B5A00BFA-6083-4FAE-A097-71642D6473B5}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {B5A00BFA-6083-4FAE-A097-71642D6473B5}.Debug|Win32.Build.0 = Debug|Win32\r
- {B5A00BFA-6083-4FAE-A097-71642D6473B5}.Release|Win32.ActiveCfg = Release|Win32\r
- {B5A00BFA-6083-4FAE-A097-71642D6473B5}.Release|Win32.Build.0 = Release|Win32\r
- {1C320193-46A6-4B34-9C56-8AB584FC1B56}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {1C320193-46A6-4B34-9C56-8AB584FC1B56}.Debug|Win32.Build.0 = Debug|Win32\r
- {1C320193-46A6-4B34-9C56-8AB584FC1B56}.Release|Win32.ActiveCfg = Release|Win32\r
- {1C320193-46A6-4B34-9C56-8AB584FC1B56}.Release|Win32.Build.0 = Release|Win32\r
- {12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Debug|Win32.Build.0 = Debug|Win32\r
- {12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Release|Win32.ActiveCfg = Release|Win32\r
- {12A49562-BAB9-43A3-A21D-15B60BBB4C31}.Release|Win32.Build.0 = Release|Win32\r
- {18B1F35A-10F8-4287-9B37-2D10501B0B38}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {18B1F35A-10F8-4287-9B37-2D10501B0B38}.Debug|Win32.Build.0 = Debug|Win32\r
- {18B1F35A-10F8-4287-9B37-2D10501B0B38}.Release|Win32.ActiveCfg = Release|Win32\r
- {18B1F35A-10F8-4287-9B37-2D10501B0B38}.Release|Win32.Build.0 = Release|Win32\r
- {C98AF157-352E-4737-BD30-A24E2647F5AE}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {C98AF157-352E-4737-BD30-A24E2647F5AE}.Debug|Win32.Build.0 = Debug|Win32\r
- {C98AF157-352E-4737-BD30-A24E2647F5AE}.Release|Win32.ActiveCfg = Release|Win32\r
- {C98AF157-352E-4737-BD30-A24E2647F5AE}.Release|Win32.Build.0 = Release|Win32\r
- {746F3632-5BB2-4570-9453-31D6D58A7D8E}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {746F3632-5BB2-4570-9453-31D6D58A7D8E}.Debug|Win32.Build.0 = Debug|Win32\r
- {746F3632-5BB2-4570-9453-31D6D58A7D8E}.Release|Win32.ActiveCfg = Release|Win32\r
- {746F3632-5BB2-4570-9453-31D6D58A7D8E}.Release|Win32.Build.0 = Release|Win32\r
- {72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Debug|Win32.Build.0 = Debug|Win32\r
- {72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Release|Win32.ActiveCfg = Release|Win32\r
- {72782932-37CC-46AE-8C7F-9A7B1A6EE108}.Release|Win32.Build.0 = Release|Win32\r
- {EE157390-1E85-416C-946E-620E32C9AD33}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {EE157390-1E85-416C-946E-620E32C9AD33}.Debug|Win32.Build.0 = Debug|Win32\r
- {EE157390-1E85-416C-946E-620E32C9AD33}.Release|Win32.ActiveCfg = Release|Win32\r
- {EE157390-1E85-416C-946E-620E32C9AD33}.Release|Win32.Build.0 = Release|Win32\r
- {57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Debug|Win32.Build.0 = Debug|Win32\r
- {57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Release|Win32.ActiveCfg = Release|Win32\r
- {57FAF32E-49FD-491F-895D-132D0D5EFE0A}.Release|Win32.Build.0 = Release|Win32\r
- {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Debug|Win32.Build.0 = Debug|Win32\r
- {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Release|Win32.ActiveCfg = Release|Win32\r
- {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}.Release|Win32.Build.0 = Release|Win32\r
- {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Debug|Win32.Build.0 = Debug|Win32\r
- {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Release|Win32.ActiveCfg = Release|Win32\r
- {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}.Release|Win32.Build.0 = Release|Win32\r
- {92BFA534-C419-4EB2-AAA3-510653F38F08}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {92BFA534-C419-4EB2-AAA3-510653F38F08}.Debug|Win32.Build.0 = Debug|Win32\r
- {92BFA534-C419-4EB2-AAA3-510653F38F08}.Release|Win32.ActiveCfg = Release|Win32\r
- {92BFA534-C419-4EB2-AAA3-510653F38F08}.Release|Win32.Build.0 = Release|Win32\r
- {B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Debug|Win32.Build.0 = Debug|Win32\r
- {B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Release|Win32.ActiveCfg = Release|Win32\r
- {B495B6D9-AF84-479D-B30A-313C16EF8BFD}.Release|Win32.Build.0 = Release|Win32\r
- {79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Debug|Win32.Build.0 = Debug|Win32\r
- {79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Release|Win32.ActiveCfg = Release|Win32\r
- {79EF9F1D-E211-4ED1-91D2-FC935AB3A872}.Release|Win32.Build.0 = Release|Win32\r
- {429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Debug|Win32.Build.0 = Debug|Win32\r
- {429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Release|Win32.ActiveCfg = Release|Win32\r
- {429C907B-97D1-4B2D-9B0E-A14A5BFDAD15}.Release|Win32.Build.0 = Release|Win32\r
- {DCF01B1C-5268-44F3-9130-D647FABFB663}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {DCF01B1C-5268-44F3-9130-D647FABFB663}.Debug|Win32.Build.0 = Debug|Win32\r
- {DCF01B1C-5268-44F3-9130-D647FABFB663}.Release|Win32.ActiveCfg = Release|Win32\r
- {DCF01B1C-5268-44F3-9130-D647FABFB663}.Release|Win32.Build.0 = Release|Win32\r
- {3CA97077-6210-4362-998A-D15A35EEAA08}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {3CA97077-6210-4362-998A-D15A35EEAA08}.Debug|Win32.Build.0 = Debug|Win32\r
- {3CA97077-6210-4362-998A-D15A35EEAA08}.Release|Win32.ActiveCfg = Release|Win32\r
- {3CA97077-6210-4362-998A-D15A35EEAA08}.Release|Win32.Build.0 = Release|Win32\r
- {729EF28E-38C9-40DE-A138-87785F021411}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {729EF28E-38C9-40DE-A138-87785F021411}.Release|Win32.ActiveCfg = Release|Win32\r
- {504B3154-7A4F-459D-9877-B951021C3F1F}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {504B3154-7A4F-459D-9877-B951021C3F1F}.Debug|Win32.Build.0 = Debug|Win32\r
- {504B3154-7A4F-459D-9877-B951021C3F1F}.Release|Win32.ActiveCfg = Release|Win32\r
- {504B3154-7A4F-459D-9877-B951021C3F1F}.Release|Win32.Build.0 = Release|Win32\r
- {17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Debug|Win32.Build.0 = Debug|Win32\r
- {17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Release|Win32.ActiveCfg = Release|Win32\r
- {17A33F3F-BAF5-403F-8EF4-FECDA7D9A335}.Release|Win32.Build.0 = Release|Win32\r
- {DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Debug|Win32.Build.0 = Debug|Win32\r
- {DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Release|Win32.ActiveCfg = Release|Win32\r
- {DEB01ACB-D65F-4A62-AED9-58C1054499E9}.Release|Win32.Build.0 = Release|Win32\r
- {01D63BF5-7798-4746-852A-4B45229BB735}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {01D63BF5-7798-4746-852A-4B45229BB735}.Release|Win32.ActiveCfg = Release|Win32\r
- {4714EF49-BFD5-4B22-95F7-95A07F1EAC25}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {4714EF49-BFD5-4B22-95F7-95A07F1EAC25}.Release|Win32.ActiveCfg = Release|Win32\r
- {3C614AE8-B611-4D43-A9AF-1CAA440A9F69}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {3C614AE8-B611-4D43-A9AF-1CAA440A9F69}.Release|Win32.ActiveCfg = Release|Win32\r
- {56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556}.Release|Win32.ActiveCfg = Release|Win32\r
- {71D62A04-8EF6-4C6B-AC12-0C15A875E53A}.Debug|Win32.ActiveCfg = Debug|Win32\r
- {71D62A04-8EF6-4C6B-AC12-0C15A875E53A}.Release|Win32.ActiveCfg = Release|Win32\r
- EndGlobalSection\r
- GlobalSection(SolutionProperties) = preSolution\r
- HideSolutionNode = FALSE\r
- EndGlobalSection\r
- GlobalSection(NestedProjects) = preSolution\r
- {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2} = {5377DC3A-DB96-4819-8AAF-2A75F3A69119}\r
- {B5A00BFA-6083-4FAE-A097-71642D6473B5} = {5377DC3A-DB96-4819-8AAF-2A75F3A69119}\r
- {1C320193-46A6-4B34-9C56-8AB584FC1B56} = {5377DC3A-DB96-4819-8AAF-2A75F3A69119}\r
- {12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {5377DC3A-DB96-4819-8AAF-2A75F3A69119}\r
- {18B1F35A-10F8-4287-9B37-2D10501B0B38} = {5377DC3A-DB96-4819-8AAF-2A75F3A69119}\r
- {72782932-37CC-46AE-8C7F-9A7B1A6EE108} = {5377DC3A-DB96-4819-8AAF-2A75F3A69119}\r
- {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA} = {5377DC3A-DB96-4819-8AAF-2A75F3A69119}\r
- {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C} = {5377DC3A-DB96-4819-8AAF-2A75F3A69119}\r
- {504B3154-7A4F-459D-9877-B951021C3F1F} = {5377DC3A-DB96-4819-8AAF-2A75F3A69119}\r
- {746F3632-5BB2-4570-9453-31D6D58A7D8E} = {493A1DB9-6E7C-48C7-93B5-F75C3C25B9DF}\r
- {DEB01ACB-D65F-4A62-AED9-58C1054499E9} = {493A1DB9-6E7C-48C7-93B5-F75C3C25B9DF}\r
- {592CF22D-3F8F-4A77-A174-130D77B7623B} = {8E282AE2-038C-49FE-AC67-BC9615AFD800}\r
- {C98AF157-352E-4737-BD30-A24E2647F5AE} = {8E282AE2-038C-49FE-AC67-BC9615AFD800}\r
- {EE157390-1E85-416C-946E-620E32C9AD33} = {8E282AE2-038C-49FE-AC67-BC9615AFD800}\r
- {57FAF32E-49FD-491F-895D-132D0D5EFE0A} = {8E282AE2-038C-49FE-AC67-BC9615AFD800}\r
- {92BFA534-C419-4EB2-AAA3-510653F38F08} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}\r
- {B495B6D9-AF84-479D-B30A-313C16EF8BFD} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}\r
- {729EF28E-38C9-40DE-A138-87785F021411} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}\r
- {3C614AE8-B611-4D43-A9AF-1CAA440A9F69} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}\r
- {56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}\r
- {79EF9F1D-E211-4ED1-91D2-FC935AB3A872} = {AC4356E8-48A1-4D2D-AFB1-11CF30B974CD}\r
- {429C907B-97D1-4B2D-9B0E-A14A5BFDAD15} = {AC4356E8-48A1-4D2D-AFB1-11CF30B974CD}\r
- {DCF01B1C-5268-44F3-9130-D647FABFB663} = {AC4356E8-48A1-4D2D-AFB1-11CF30B974CD}\r
- {3CA97077-6210-4362-998A-D15A35EEAA08} = {AC4356E8-48A1-4D2D-AFB1-11CF30B974CD}\r
- {17A33F3F-BAF5-403F-8EF4-FECDA7D9A335} = {AC4356E8-48A1-4D2D-AFB1-11CF30B974CD}\r
- {01D63BF5-7798-4746-852A-4B45229BB735} = {62083CC3-13BF-49EA-BFE8-4C9337C0D82C}\r
- {4714EF49-BFD5-4B22-95F7-95A07F1EAC25} = {62083CC3-13BF-49EA-BFE8-4C9337C0D82C}\r
- {71D62A04-8EF6-4C6B-AC12-0C15A875E53A} = {62083CC3-13BF-49EA-BFE8-4C9337C0D82C}\r
- EndGlobalSection\r
-EndGlobal\r
ProjectSection(ProjectDependencies) = postProject
{12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {12A49562-BAB9-43A3-A21D-15B60BBB4C31}
{A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA} = {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}
+ {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C} = {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunimrcpserver", "platforms\libunimrcp-server\libunimrcpserver.vcproj", "{C98AF157-352E-4737-BD30-A24E2647F5AE}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpclient", "libs\mrcp-client\mrcpclient.vcproj", "{72782932-37CC-46AE-8C7F-9A7B1A6EE108}"
ProjectSection(ProjectDependencies) = postProject
{12A49562-BAB9-43A3-A21D-15B60BBB4C31} = {12A49562-BAB9-43A3-A21D-15B60BBB4C31}
+ {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA} = {A9EDAC04-6A5F-4BA7-BC0D-CCE7B255B6EA}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunimrcpclient", "platforms\libunimrcp-client\libunimrcpclient.vcproj", "{EE157390-1E85-416C-946E-620E32C9AD33}"
{13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2} = {13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcppocketsphinx", "plugins\mrcp-pocketsphinx\mrcppocketsphinx.vcproj", "{3C614AE8-B611-4D43-A9AF-1CAA440A9F69}"
- ProjectSection(ProjectDependencies) = postProject
- {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C} = {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpflite", "plugins\mrcp-flite\mrcpflite.vcproj", "{56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556}"
- ProjectSection(ProjectDependencies) = postProject
- {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C} = {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "preparesphinx", "build\tools\preparesphinx.vcproj", "{71D62A04-8EF6-4C6B-AC12-0C15A875E53A}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asrclient", "platforms\asr-client\asrclient.vcproj", "{6B83AC6D-01CE-4E1C-81CE-02AD8116C684}"
ProjectSection(ProjectDependencies) = postProject
{272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3} = {272FAFA8-2B2F-4716-B95F-3B37CF2E0CB3}
conf\client-profiles\unimrcp.xml = conf\client-profiles\unimrcp.xml
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "svnrev", "build\svnrev\svnrev.vcproj", "{49AAB3FE-63D3-41CA-B92B-65828B79902B}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demoverifier", "plugins\demo-verifier\demoverifier.vcproj", "{F7563CAD-5C95-46E5-89B7-0953C6C6E746}"
ProjectSection(ProjectDependencies) = postProject
{843425BE-9A9A-44F4-A4E3-4B57D6ABD53C} = {843425BE-9A9A-44F4-A4E3-4B57D6ABD53C}
{4714EF49-BFD5-4B22-95F7-95A07F1EAC25}.Debug|x64.ActiveCfg = Debug|x64
{4714EF49-BFD5-4B22-95F7-95A07F1EAC25}.Release|Win32.ActiveCfg = Release|Win32
{4714EF49-BFD5-4B22-95F7-95A07F1EAC25}.Release|x64.ActiveCfg = Release|x64
- {3C614AE8-B611-4D43-A9AF-1CAA440A9F69}.Debug|Win32.ActiveCfg = Debug|Win32
- {3C614AE8-B611-4D43-A9AF-1CAA440A9F69}.Debug|x64.ActiveCfg = Debug|x64
- {3C614AE8-B611-4D43-A9AF-1CAA440A9F69}.Release|Win32.ActiveCfg = Release|Win32
- {3C614AE8-B611-4D43-A9AF-1CAA440A9F69}.Release|x64.ActiveCfg = Release|x64
- {56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556}.Debug|Win32.ActiveCfg = Debug|Win32
- {56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556}.Debug|x64.ActiveCfg = Debug|x64
- {56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556}.Release|Win32.ActiveCfg = Release|Win32
- {56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556}.Release|x64.ActiveCfg = Release|x64
- {71D62A04-8EF6-4C6B-AC12-0C15A875E53A}.Debug|Win32.ActiveCfg = Debug|Win32
- {71D62A04-8EF6-4C6B-AC12-0C15A875E53A}.Debug|x64.ActiveCfg = Debug|x64
- {71D62A04-8EF6-4C6B-AC12-0C15A875E53A}.Release|Win32.ActiveCfg = Release|Win32
- {71D62A04-8EF6-4C6B-AC12-0C15A875E53A}.Release|x64.ActiveCfg = Release|x64
{6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Debug|Win32.ActiveCfg = Debug|Win32
{6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Debug|Win32.Build.0 = Debug|Win32
{6B83AC6D-01CE-4E1C-81CE-02AD8116C684}.Debug|x64.ActiveCfg = Debug|x64
{5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Release|Win32.Build.0 = Release|Win32
{5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Release|x64.ActiveCfg = Release|x64
{5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2}.Release|x64.Build.0 = Release|x64
- {49AAB3FE-63D3-41CA-B92B-65828B79902B}.Debug|Win32.ActiveCfg = Debug|Win32
- {49AAB3FE-63D3-41CA-B92B-65828B79902B}.Debug|x64.ActiveCfg = Debug|x64
- {49AAB3FE-63D3-41CA-B92B-65828B79902B}.Release|Win32.ActiveCfg = Release|Win32
- {49AAB3FE-63D3-41CA-B92B-65828B79902B}.Release|x64.ActiveCfg = Release|x64
{F7563CAD-5C95-46E5-89B7-0953C6C6E746}.Debug|Win32.ActiveCfg = Debug|Win32
{F7563CAD-5C95-46E5-89B7-0953C6C6E746}.Debug|Win32.Build.0 = Debug|Win32
- {F7563CAD-5C95-46E5-89B7-0953C6C6E746}.Debug|x64.ActiveCfg = Debug|Win32
+ {F7563CAD-5C95-46E5-89B7-0953C6C6E746}.Debug|x64.ActiveCfg = Debug|x64
+ {F7563CAD-5C95-46E5-89B7-0953C6C6E746}.Debug|x64.Build.0 = Debug|x64
{F7563CAD-5C95-46E5-89B7-0953C6C6E746}.Release|Win32.ActiveCfg = Release|Win32
{F7563CAD-5C95-46E5-89B7-0953C6C6E746}.Release|Win32.Build.0 = Release|Win32
- {F7563CAD-5C95-46E5-89B7-0953C6C6E746}.Release|x64.ActiveCfg = Release|Win32
+ {F7563CAD-5C95-46E5-89B7-0953C6C6E746}.Release|x64.ActiveCfg = Release|x64
+ {F7563CAD-5C95-46E5-89B7-0953C6C6E746}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
{CD1C52C1-D8E1-4654-AE65-6CCAB38DE894} = {8E282AE2-038C-49FE-AC67-BC9615AFD800}
{92BFA534-C419-4EB2-AAA3-510653F38F08} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}
{B495B6D9-AF84-479D-B30A-313C16EF8BFD} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}
- {3C614AE8-B611-4D43-A9AF-1CAA440A9F69} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}
- {56F6FB96-2BC7-4CAE-A8BF-6A0FAEC90556} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}
{5AFB8B04-AEB9-408C-B53E-AFBC44B5F3F2} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}
{F7563CAD-5C95-46E5-89B7-0953C6C6E746} = {09BABD45-8F30-4F99-B8B8-8DD78F6804DB}
{79EF9F1D-E211-4ED1-91D2-FC935AB3A872} = {AC4356E8-48A1-4D2D-AFB1-11CF30B974CD}
{17A33F3F-BAF5-403F-8EF4-FECDA7D9A335} = {AC4356E8-48A1-4D2D-AFB1-11CF30B974CD}
{01D63BF5-7798-4746-852A-4B45229BB735} = {62083CC3-13BF-49EA-BFE8-4C9337C0D82C}
{4714EF49-BFD5-4B22-95F7-95A07F1EAC25} = {62083CC3-13BF-49EA-BFE8-4C9337C0D82C}
- {71D62A04-8EF6-4C6B-AC12-0C15A875E53A} = {62083CC3-13BF-49EA-BFE8-4C9337C0D82C}
- {49AAB3FE-63D3-41CA-B92B-65828B79902B} = {62083CC3-13BF-49EA-BFE8-4C9337C0D82C}
{F2D6C1AF-0C05-4695-84AF-15A2F92F9899} = {9155EBB8-E7DD-49AE-A86A-7B90B9F09888}
EndGlobalSection
EndGlobal
char *unimrcp_max_connection_count;
/** request-timeout config */
char *unimrcp_request_timeout;
+ /** rx-buffer-size */
+ char *unimrcp_rx_buffer_size;
+ /** tx-buffer-size */
+ char *unimrcp_tx_buffer_size;
/** offer-new-connection config */
char *unimrcp_offer_new_connection;
/** default-tts-profile config */
"Fire profile events (true|false)"),
SWITCH_CONFIG_ITEM_STRING_STRDUP("request-timeout", CONFIG_REQUIRED, &globals.unimrcp_request_timeout, "10000", "",
"Maximum time to wait for server response to a request"),
+ SWITCH_CONFIG_ITEM_STRING_STRDUP("connection-rx-buffer-size", 0, &globals.unimrcp_rx_buffer_size, "1024", "",
+ "Maximum time to wait for server response to a request"),
+ SWITCH_CONFIG_ITEM_STRING_STRDUP("connection-tx-buffer-size", 0, &globals.unimrcp_tx_buffer_size, "1024", "",
+ "Maximum time to wait for server response to a request"),
SWITCH_CONFIG_ITEM_END()
};
switch_size_t waiting;
/** name of this queue (for logging) */
char *name;
+ /** optional session uuid associated with this queue (for logging) */
+ char *session_uuid;
};
typedef struct audio_queue audio_queue_t;
-static switch_status_t audio_queue_create(audio_queue_t ** queue, const char *name, switch_memory_pool_t *pool);
+static switch_status_t audio_queue_create(audio_queue_t ** queue, const char *name, const char *session_uuid, switch_memory_pool_t *pool);
static switch_status_t audio_queue_write(audio_queue_t *queue, void *data, switch_size_t *data_len);
static switch_status_t audio_queue_read(audio_queue_t *queue, void *data, switch_size_t *data_len, int block);
static switch_status_t audio_queue_clear(audio_queue_t *queue);
struct speech_channel {
/** the name of this channel (for logging) */
char *name;
+ /** optional session associated w/ this channel */
+ char *session_uuid;
/** The profile used by this channel */
profile_t *profile;
/** type of channel */
mrcp_sig_status_code_e status);
/* speech_channel funcs */
-static switch_status_t speech_channel_create(speech_channel_t ** schannel, const char *name, speech_channel_type_t type, mod_unimrcp_application_t *app,
+static switch_status_t speech_channel_create(speech_channel_t ** schannel, const char *name, const char *session_uuid, speech_channel_type_t type, mod_unimrcp_application_t *app,
uint16_t rate, switch_memory_pool_t *pool);
static mpf_termination_t *speech_channel_create_mpf_termination(speech_channel_t *schannel);
static switch_status_t speech_channel_open(speech_channel_t *schannel, profile_t *profile);
*
* @param audio_queue the created queue
* @param name the name of this queue (for logging)
+ * @param session_uuid optional session associated with this channel
* @param pool memory pool to allocate queue from
* @return SWITCH_STATUS_SUCCESS if successful. SWITCH_STATUS_FALSE if unable to allocate queue
*/
-static switch_status_t audio_queue_create(audio_queue_t ** audio_queue, const char *name, switch_memory_pool_t *pool)
+static switch_status_t audio_queue_create(audio_queue_t ** audio_queue, const char *name, const char *session_uuid, switch_memory_pool_t *pool)
{
switch_status_t status = SWITCH_STATUS_SUCCESS;
audio_queue_t *laudio_queue = NULL;
int flags;
#endif
char *lname = "";
+ char *lsession_uuid = NULL;
*audio_queue = NULL;
+ lname = zstr(name) ? "" : switch_core_strdup(pool, name);
+ lsession_uuid = zstr(session_uuid) ? NULL : switch_core_strdup(pool, session_uuid);
+
if (zstr(name)) {
lname = "";
} else {
}
if ((laudio_queue = (audio_queue_t *) switch_core_alloc(pool, sizeof(audio_queue_t))) == NULL) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) unable to create audio queue\n", lname);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(lsession_uuid), SWITCH_LOG_ERROR, "(%s) unable to create audio queue\n", lname);
status = SWITCH_STATUS_FALSE;
goto done;
}
laudio_queue->name = lname;
+ laudio_queue->session_uuid = lsession_uuid;
if (switch_buffer_create(pool, &laudio_queue->buffer, AUDIO_QUEUE_SIZE) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) unable to create audio queue buffer\n", laudio_queue->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(lsession_uuid), SWITCH_LOG_ERROR, "(%s) unable to create audio queue buffer\n", laudio_queue->name);
status = SWITCH_STATUS_FALSE;
goto done;
}
if (switch_mutex_init(&laudio_queue->mutex, SWITCH_MUTEX_UNNESTED, pool) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) unable to create audio queue mutex\n", laudio_queue->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(lsession_uuid), SWITCH_LOG_ERROR, "(%s) unable to create audio queue mutex\n", laudio_queue->name);
status = SWITCH_STATUS_FALSE;
goto done;
}
if (switch_thread_cond_create(&laudio_queue->cond, pool) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) unable to create audio queue condition variable\n", laudio_queue->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(lsession_uuid), SWITCH_LOG_ERROR, "(%s) unable to create audio queue condition variable\n", laudio_queue->name);
status = SWITCH_STATUS_FALSE;
goto done;
}
flags = SWITCH_FOPEN_CREATE | SWITCH_FOPEN_WRITE | SWITCH_FOPEN_TRUNCATE | SWITCH_FOPEN_BINARY;
strcpy(laudio_queue->file_read_name, "/tmp/mod_unimrcp_rx_XXXXXX");
if (switch_file_mktemp(&laudio_queue->file_read, laudio_queue->file_read_name, flags, pool) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) unable to create audio queue read file\n", laudio_queue->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(laudio_queue->session_uuid), SWITCH_LOG_ERROR, "(%s) unable to create audio queue read file\n", laudio_queue->name);
laudio_queue->file_read = NULL;
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) queue rx saved to %s\n", laudio_queue->name, laudio_queue->file_read_name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(laudio_queue->session_uuid), SWITCH_LOG_DEBUG, "(%s) queue rx saved to %s\n", laudio_queue->name, laudio_queue->file_read_name);
}
strcpy(laudio_queue->file_write_name, "/tmp/mod_unimrcp_tx_XXXXXX");
if (switch_file_mktemp(&laudio_queue->file_write, laudio_queue->file_write_name, flags, pool) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) unable to create audio queue write file\n", laudio_queue->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(laudio_queue->session_uuid), SWITCH_LOG_ERROR, "(%s) unable to create audio queue write file\n", laudio_queue->name);
laudio_queue->file_write = NULL;
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) queue tx saved to %s\n", laudio_queue->name, laudio_queue->file_write_name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(laudio_queue->session_uuid), SWITCH_LOG_DEBUG, "(%s) queue tx saved to %s\n", laudio_queue->name, laudio_queue->file_write_name);
}
#endif
laudio_queue->read_bytes = 0;
laudio_queue->waiting = 0;
*audio_queue = laudio_queue;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) audio queue created\n", laudio_queue->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(laudio_queue->session_uuid), SWITCH_LOG_DEBUG, "(%s) audio queue created\n", laudio_queue->name);
done:
if (switch_buffer_write(queue->buffer, data, *data_len) > 0) {
queue->write_bytes = queue->write_bytes + *data_len;
#ifdef MOD_UNIMRCP_DEBUG_AUDIO_QUEUE
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) audio queue write total = %ld\trequested = %ld\n", queue->name, queue->write_bytes,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(queue->session_uuid), SWITCH_LOG_DEBUG, "(%s) audio queue write total = %ld\trequested = %ld\n", queue->name, queue->write_bytes,
*data_len);
#endif
if (queue->waiting <= switch_buffer_inuse(queue->buffer)) {
}
} else {
*data_len = 0;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) audio queue overflow!\n", queue->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(queue->session_uuid), SWITCH_LOG_DEBUG, "(%s) audio queue overflow!\n", queue->name);
status = SWITCH_STATUS_FALSE;
}
*data_len = switch_buffer_read(queue->buffer, data, requested);
queue->read_bytes = queue->read_bytes + *data_len;
#ifdef MOD_UNIMRCP_DEBUG_AUDIO_QUEUE
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) audio queue read total = %ld\tread = %ld\trequested = %ld\n", queue->name,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(queue->session_uuid), SWITCH_LOG_DEBUG, "(%s) audio queue read total = %ld\tread = %ld\trequested = %ld\n", queue->name,
queue->read_bytes, *data_len, requested);
if (queue->file_read) {
switch_file_write(queue->file_read, data, &len);
queue->file_write = NULL;
}
#endif
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) audio queue destroyed\n", name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(queue->session_uuid), SWITCH_LOG_DEBUG, "(%s) audio queue destroyed\n", name);
}
return SWITCH_STATUS_SUCCESS;
}
*
* @param schannel the created channel
* @param name the name of the channel
+ * @param session_uuid optional session associated with this channel
* @param type the type of channel to create
* @param app the application
* @param rate the rate to use
* @param pool the memory pool to use
* @return SWITCH_STATUS_SUCCESS if successful. SWITCH_STATUS_FALSE if the channel cannot be allocated.
*/
-static switch_status_t speech_channel_create(speech_channel_t ** schannel, const char *name, speech_channel_type_t type, mod_unimrcp_application_t *app,
+static switch_status_t speech_channel_create(speech_channel_t ** schannel, const char *name, const char *session_uuid, speech_channel_type_t type, mod_unimrcp_application_t *app,
uint16_t rate, switch_memory_pool_t *pool)
{
switch_status_t status = SWITCH_STATUS_SUCCESS;
if (switch_mutex_init(&schan->mutex, SWITCH_MUTEX_UNNESTED, pool) != SWITCH_STATUS_SUCCESS ||
switch_thread_cond_create(&schan->cond, pool) != SWITCH_STATUS_SUCCESS ||
- audio_queue_create(&schan->audio_queue, name, pool) != SWITCH_STATUS_SUCCESS) {
+ audio_queue_create(&schan->audio_queue, name, session_uuid, pool) != SWITCH_STATUS_SUCCESS) {
status = SWITCH_STATUS_FALSE;
goto done;
}
switch_core_hash_init(&schan->params);
schan->data = NULL;
- if (zstr(name)) {
- schan->name = "";
- } else {
- schan->name = switch_core_strdup(pool, name);
- }
+ schan->name = zstr(name) ? "" : switch_core_strdup(pool, name);
+ schan->session_uuid = zstr(session_uuid) ? NULL : switch_core_strdup(pool, session_uuid);
+
*schannel = schan;
done:
int warned = 0;
mrcp_application_session_terminate(schannel->unimrcp_session);
/* wait forever for session to terminate. Log WARNING if this starts taking too long */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) Waiting for MRCP session to terminate\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) Waiting for MRCP session to terminate\n", schannel->name);
while (schannel->state != SPEECH_CHANNEL_CLOSED) {
if (switch_thread_cond_timedwait(schannel->cond, schannel->mutex, SPEECH_CHANNEL_TIMEOUT_USEC) == SWITCH_STATUS_TIMEOUT && !warned) {
warned = 1;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) MRCP session has not terminated after %d ms\n", schannel->name, SPEECH_CHANNEL_TIMEOUT_USEC / (1000));
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) MRCP session has not terminated after %d ms\n", schannel->name, SPEECH_CHANNEL_TIMEOUT_USEC / (1000));
}
}
}
/* create MRCP session */
if ((schannel->unimrcp_session = mrcp_application_session_create(schannel->application->app, profile->name, schannel)) == NULL) {
/* profile doesn't exist? */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Unable to create session with %s\n", schannel->name, profile->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) Unable to create session with %s\n", schannel->name, profile->name);
status = SWITCH_STATUS_RESTART;
goto done;
}
+ mrcp_application_session_name_set(schannel->unimrcp_session, schannel->name);
/* create audio termination and add to channel */
if ((termination = speech_channel_create_mpf_termination(schannel)) == NULL) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Unable to create termination with %s\n", schannel->name, profile->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) Unable to create termination with %s\n", schannel->name, profile->name);
mrcp_application_session_destroy(schannel->unimrcp_session);
status = SWITCH_STATUS_FALSE;
goto done;
resource_type = MRCP_RECOGNIZER_RESOURCE;
}
if ((schannel->unimrcp_channel = mrcp_application_channel_create(schannel->unimrcp_session, resource_type, termination, NULL, schannel)) == NULL) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Unable to create channel with %s\n", schannel->name, profile->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) Unable to create channel with %s\n", schannel->name, profile->name);
mrcp_application_session_destroy(schannel->unimrcp_session);
status = SWITCH_STATUS_FALSE;
goto done;
/* add channel to session... this establishes the connection to the MRCP server */
if (mrcp_application_channel_add(schannel->unimrcp_session, schannel->unimrcp_channel) != TRUE) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Unable to add channel to session with %s\n", schannel->name, profile->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) Unable to add channel to session with %s\n", schannel->name, profile->name);
mrcp_application_session_destroy(schannel->unimrcp_session);
status = SWITCH_STATUS_FALSE;
goto done;
while (schannel->state == SPEECH_CHANNEL_CLOSED) {
if (switch_thread_cond_timedwait(schannel->cond, schannel->mutex, SPEECH_CHANNEL_TIMEOUT_USEC) == SWITCH_STATUS_TIMEOUT && !warned) {
warned = 1;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) MRCP session has not opened after %d ms\n", schannel->name, SPEECH_CHANNEL_TIMEOUT_USEC / (1000));
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) MRCP session has not opened after %d ms\n", schannel->name, SPEECH_CHANNEL_TIMEOUT_USEC / (1000));
}
}
if (schannel->state == SPEECH_CHANNEL_READY) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) channel is ready\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) channel is ready\n", schannel->name);
} else if (schannel->state == SPEECH_CHANNEL_CLOSED) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Timed out waiting for channel to be ready\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) Timed out waiting for channel to be ready\n", schannel->name);
/* can't retry */
status = SWITCH_STATUS_FALSE;
} else if (schannel->state == SPEECH_CHANNEL_ERROR) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) Terminating MRCP session\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) Terminating MRCP session\n", schannel->name);
if (!mrcp_application_session_terminate(schannel->unimrcp_session)) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) Unable to terminate application session\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) Unable to terminate application session\n", schannel->name);
status = SWITCH_STATUS_FALSE;
goto done;
}
while (schannel->state == SPEECH_CHANNEL_ERROR) {
if (switch_thread_cond_timedwait(schannel->cond, schannel->mutex, SPEECH_CHANNEL_TIMEOUT_USEC) == SWITCH_STATUS_TIMEOUT && !warned) {
warned = 1;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) MRCP session has not cleaned up after %d ms\n", schannel->name, SPEECH_CHANNEL_TIMEOUT_USEC / (1000));
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) MRCP session has not cleaned up after %d ms\n", schannel->name, SPEECH_CHANNEL_TIMEOUT_USEC / (1000));
}
}
if (schannel->state != SPEECH_CHANNEL_CLOSED) {
mrcp_message = mrcp_application_message_create(schannel->unimrcp_session, schannel->unimrcp_channel, SYNTHESIZER_SPEAK);
if (mrcp_message == NULL) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Failed to create SPEAK message\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) Failed to create SPEAK message\n", schannel->name);
status = SWITCH_STATUS_FALSE;
goto done;
}
while (schannel->state == SPEECH_CHANNEL_READY) {
if (switch_thread_cond_timedwait(schannel->cond, schannel->mutex, SPEECH_CHANNEL_TIMEOUT_USEC) == SWITCH_STATUS_TIMEOUT && !warned) {
warned = 1;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) SPEAK IN-PROGRESS not received after %d ms\n", schannel->name, SPEECH_CHANNEL_TIMEOUT_USEC / (1000));
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) SPEAK IN-PROGRESS not received after %d ms\n", schannel->name, SPEECH_CHANNEL_TIMEOUT_USEC / (1000));
}
}
if (schannel->state != SPEECH_CHANNEL_PROCESSING) {
if (!zstr(param_name) && !zstr(param_val)) {
unimrcp_param_id_t *id = (unimrcp_param_id_t *) switch_core_hash_find(schannel->application->param_id_map, param_name);
if (id) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) %s: %s\n", schannel->name, param_name, param_val);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) %s: %s\n", schannel->name, param_name, param_val);
synth_channel_set_header(schannel, id->id, param_val, msg, synth_hdr);
} else {
apt_str_t apt_param_name = { 0 };
apt_str_t apt_param_val = { 0 };
/* this is probably a vendor-specific MRCP param */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) (vendor-specific value) %s: %s\n", schannel->name, param_name, param_val);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) (vendor-specific value) %s: %s\n", schannel->name, param_name, param_val);
apt_string_set(&apt_param_name, param_name); /* copy isn't necessary since apt_pair_array_append will do it */
apt_string_set(&apt_param_val, param_val);
if (!gen_hdr->vendor_specific_params) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) creating vendor specific pair array\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) creating vendor specific pair array\n", schannel->name);
gen_hdr->vendor_specific_params = apt_pair_array_create(10, msg->pool);
}
apt_pair_array_append(gen_hdr->vendor_specific_params, &apt_param_name, &apt_param_val, msg->pool);
} else if (!strcasecmp("neutral", val)) {
synth_hdr->voice_param.gender = VOICE_GENDER_NEUTRAL;
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) ignoring invalid voice gender, %s\n", schannel->name, val);
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) ignoring invalid voice gender, %s\n", schannel->name, val);
break;
}
mrcp_resource_header_property_add(msg, SYNTHESIZER_HEADER_VOICE_GENDER);
synth_hdr->voice_param.age = age;
mrcp_resource_header_property_add(msg, SYNTHESIZER_HEADER_VOICE_AGE);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) ignoring invalid voice age, %s\n", schannel->name, val);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) ignoring invalid voice age, %s\n", schannel->name, val);
}
break;
}
synth_hdr->voice_param.variant = variant;
mrcp_resource_header_property_add(msg, SYNTHESIZER_HEADER_VOICE_VARIANT);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) ignoring invalid voice variant, %s\n", schannel->name, val);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) ignoring invalid voice variant, %s\n", schannel->name, val);
}
break;
}
synth_hdr->prosody_param.volume.type = PROSODY_VOLUME_TYPE_LABEL;
synth_hdr->prosody_param.volume.value.label = PROSODY_VOLUME_DEFAULT;
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) ignoring invalid prosody volume, %s\n", schannel->name, val);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) ignoring invalid prosody volume, %s\n", schannel->name, val);
break;
}
mrcp_resource_header_property_add(msg, SYNTHESIZER_HEADER_PROSODY_VOLUME);
synth_hdr->prosody_param.rate.type = PROSODY_RATE_TYPE_LABEL;
synth_hdr->prosody_param.rate.value.label = PROSODY_RATE_DEFAULT;
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) ignoring invalid prosody rate, %s\n", schannel->name, val);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) ignoring invalid prosody rate, %s\n", schannel->name, val);
break;
}
mrcp_resource_header_property_add(msg, SYNTHESIZER_HEADER_PROSODY_RATE);
case SYNTHESIZER_HEADER_LOAD_LEXICON:
case SYNTHESIZER_HEADER_LEXICON_SEARCH_ORDER:
default:
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) unsupported SYNTHESIZER_HEADER type\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) unsupported SYNTHESIZER_HEADER type\n", schannel->name);
}
return SWITCH_STATUS_SUCCESS;
} else {
method = RECOGNIZER_STOP;
}
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) Stopping %s\n", schannel->name, speech_channel_type_to_string(schannel->type));
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) Stopping %s\n", schannel->name, speech_channel_type_to_string(schannel->type));
/* Send STOP to MRCP server */
mrcp_message = mrcp_application_message_create(schannel->unimrcp_session, schannel->unimrcp_channel, method);
if (mrcp_message == NULL) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Failed to create STOP message\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) Failed to create STOP message\n", schannel->name);
status = SWITCH_STATUS_FALSE;
goto done;
}
while (schannel->state == SPEECH_CHANNEL_PROCESSING) {
if (switch_thread_cond_timedwait(schannel->cond, schannel->mutex, SPEECH_CHANNEL_TIMEOUT_USEC) == SWITCH_STATUS_TIMEOUT && !warned) {
warned = 1;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) STOP has not COMPLETED after %d ms.\n", schannel->name, SPEECH_CHANNEL_TIMEOUT_USEC / (1000));
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) STOP has not COMPLETED after %d ms.\n", schannel->name, SPEECH_CHANNEL_TIMEOUT_USEC / (1000));
}
}
if (schannel->state == SPEECH_CHANNEL_ERROR) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Channel error\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) Channel error\n", schannel->name);
schannel->state = SPEECH_CHANNEL_ERROR;
status = SWITCH_STATUS_FALSE;
goto done;
}
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) %s stopped\n", schannel->name, speech_channel_type_to_string(schannel->type));
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) %s stopped\n", schannel->name, speech_channel_type_to_string(schannel->type));
} else if (schannel->state == SPEECH_CHANNEL_DONE) {
speech_channel_set_state_unlocked(schannel, SPEECH_CHANNEL_READY);
}
p = switch_core_strdup(schannel->memory_pool, param);
}
v = switch_core_strdup(schannel->memory_pool, val);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) param = %s, val = %s\n", schannel->name, p, v);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) param = %s, val = %s\n", schannel->name, p, v);
switch_core_hash_insert(schannel->params, p, v);
}
switch_mutex_unlock(schannel->mutex);
audio_queue_signal(schannel->audio_queue);
}
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) %s ==> %s\n", schannel->name, speech_channel_state_to_string(schannel->state),
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) %s ==> %s\n", schannel->name, speech_channel_state_to_string(schannel->state),
speech_channel_state_to_string(state));
schannel->state = state;
switch_thread_cond_signal(schannel->cond);
profile_t *profile = NULL;
int speech_channel_number = get_next_speech_channel_number();
char *name = NULL;
+ char *session_uuid = NULL;
switch_hash_index_t *hi = NULL;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO,
- "speech_handle: name = %s, rate = %d, speed = %d, samples = %d, voice = %s, engine = %s, param = %s\n", sh->name, sh->rate,
- sh->speed, sh->samples, sh->voice, sh->engine, sh->param);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "voice = %s, rate = %d\n", voice_name, rate);
-
/* Name the channel */
if (profile_name && strchr(profile_name, ':')) {
/* Profile has session name appended to it. Pick it out */
profile_name = switch_core_strdup(sh->memory_pool, profile_name);
- name = strchr(profile_name, ':');
- *name = '\0';
- name++;
- name = switch_core_sprintf(sh->memory_pool, "%s TTS-%d", name, speech_channel_number);
+ session_uuid = strchr(profile_name, ':');
+ *session_uuid = '\0';
+ session_uuid++;
+ session_uuid = switch_core_strdup(sh->memory_pool, session_uuid);
} else {
- name = switch_core_sprintf(sh->memory_pool, "TTS-%d", speech_channel_number);
+ /* check if session is associated w/ this memory pool */
+ switch_core_session_t *session = switch_core_memory_pool_get_data(sh->memory_pool, "__session");
+ if (session) {
+ session_uuid = switch_core_session_get_uuid(session);
+ }
}
+ name = switch_core_sprintf(sh->memory_pool, "TTS-%d", speech_channel_number);
+
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(session_uuid), SWITCH_LOG_INFO,
+ "speech_handle: name = %s, rate = %d, speed = %d, samples = %d, voice = %s, engine = %s, param = %s\n", sh->name, sh->rate,
+ sh->speed, sh->samples, sh->voice, sh->engine, sh->param);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(session_uuid), SWITCH_LOG_INFO, "voice = %s, rate = %d\n", voice_name, rate);
/* Allocate the channel */
- if (speech_channel_create(&schannel, name, SPEECH_CHANNEL_SYNTHESIZER, &globals.synth, (uint16_t) rate, sh->memory_pool) != SWITCH_STATUS_SUCCESS) {
+ if (speech_channel_create(&schannel, name, session_uuid, SPEECH_CHANNEL_SYNTHESIZER, &globals.synth, (uint16_t) rate, sh->memory_pool) != SWITCH_STATUS_SUCCESS) {
status = SWITCH_STATUS_FALSE;
goto done;
}
}
profile = (profile_t *) switch_core_hash_find(globals.profiles, profile_name);
if (!profile) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Can't find profile, %s\n", name, profile_name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(session_uuid), SWITCH_LOG_ERROR, "(%s) Can't find profile, %s\n", name, profile_name);
status = SWITCH_STATUS_FALSE;
goto done;
}
/* pad data, if not enough read */
if (bytes_read < *datalen) {
#ifdef MOD_UNIMRCP_DEBUG_AUDIO_QUEUE
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) adding %ld bytes of padding\n", schannel->name, *datalen - bytes_read);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) adding %ld bytes of padding\n", schannel->name, *datalen - bytes_read);
#endif
memset((uint8_t *) data + bytes_read, schannel->silence, *datalen - bytes_read);
}
{
speech_channel_t *schannel = (speech_channel_t *) mrcp_application_session_object_get(session);
switch_event_t *event = NULL;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) Destroying MRCP session\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) Destroying MRCP session\n", schannel->name);
mrcp_application_session_destroy(session);
/* notify of channel close */
if (descriptor->name.length) {
strncpy(codec_name, descriptor->name.buf, sizeof(codec_name) - 1 );
}
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) %s channel is ready, codec = %s, sample rate = %d\n", schannel->name,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) %s channel is ready, codec = %s, sample rate = %d\n", schannel->name,
speech_channel_type_to_string(schannel->type), codec_name, schannel->rate);
speech_channel_set_state(schannel, SPEECH_CHANNEL_READY);
error:
if (schannel) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) %s channel error!\n", schannel->name,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) %s channel error!\n", schannel->name,
speech_channel_type_to_string(schannel->type));
speech_channel_set_state(schannel, SPEECH_CHANNEL_ERROR);
} else {
mrcp_sig_status_code_e status)
{
speech_channel_t *schannel = (speech_channel_t *) mrcp_application_channel_object_get(channel);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "(%s) %s channel is removed\n", schannel->name, speech_channel_type_to_string(schannel->type));
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_INFO, "(%s) %s channel is removed\n", schannel->name, speech_channel_type_to_string(schannel->type));
schannel->unimrcp_channel = NULL;
if (session) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) Terminating MRCP session\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) Terminating MRCP session\n", schannel->name);
mrcp_application_session_terminate(session);
}
/* received the response to SPEAK request */
if (message->start_line.request_state == MRCP_REQUEST_STATE_INPROGRESS) {
/* waiting for SPEAK-COMPLETE event */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) REQUEST IN PROGRESS\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) REQUEST IN PROGRESS\n", schannel->name);
speech_channel_set_state(schannel, SPEECH_CHANNEL_PROCESSING);
} else {
/* received unexpected request_state */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) unexpected SPEAK response, request_state = %d\n", schannel->name,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) unexpected SPEAK response, request_state = %d\n", schannel->name,
message->start_line.request_state);
speech_channel_set_state(schannel, SPEECH_CHANNEL_ERROR);
}
/* received response to the STOP request */
if (message->start_line.request_state == MRCP_REQUEST_STATE_COMPLETE) {
/* got COMPLETE */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) COMPLETE\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) COMPLETE\n", schannel->name);
speech_channel_set_state(schannel, SPEECH_CHANNEL_DONE);
} else {
/* received unexpected request state */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) unexpected STOP response, request_state = %d\n", schannel->name,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) unexpected STOP response, request_state = %d\n", schannel->name,
message->start_line.request_state);
speech_channel_set_state(schannel, SPEECH_CHANNEL_ERROR);
}
} else {
/* received unexpected response */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) unexpected response, method_id = %d\n", schannel->name,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) unexpected response, method_id = %d\n", schannel->name,
(int) message->start_line.method_id);
speech_channel_set_state(schannel, SPEECH_CHANNEL_ERROR);
}
/* received MRCP event */
if (message->start_line.method_id == SYNTHESIZER_SPEAK_COMPLETE) {
/* got SPEAK-COMPLETE */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) SPEAK-COMPLETE\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) SPEAK-COMPLETE\n", schannel->name);
speech_channel_set_state(schannel, SPEECH_CHANNEL_DONE);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) unexpected event, method_id = %d\n", schannel->name,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) unexpected event, method_id = %d\n", schannel->name,
(int) message->start_line.method_id);
speech_channel_set_state(schannel, SPEECH_CHANNEL_ERROR);
}
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) unexpected message type, message_type = %d\n", schannel->name,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) unexpected message type, message_type = %d\n", schannel->name,
message->start_line.message_type);
speech_channel_set_state(schannel, SPEECH_CHANNEL_ERROR);
}
switch_core_hash_this(egk, (void *) &key, NULL, (void *) &grammar);
if (grammar->type != GRAMMAR_TYPE_URI && grammar_uri_count != 1) {
no_grammar_alone:
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Grammar '%s' can only be used alone (not a URI list)\n", schannel->name, key);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) Grammar '%s' can only be used alone (not a URI list)\n", schannel->name, key);
status = SWITCH_STATUS_FALSE;
switch_safe_free(egk);
goto done;
switch (grammar_uri_count) {
case 0:
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) No grammar specified\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) No grammar specified\n", schannel->name);
status = SWITCH_STATUS_FALSE;
goto done;
case 1:
while (schannel->state == SPEECH_CHANNEL_READY) {
if (switch_thread_cond_timedwait(schannel->cond, schannel->mutex, SPEECH_CHANNEL_TIMEOUT_USEC) == SWITCH_STATUS_TIMEOUT && !warned) {
warned = 1;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) IN-PROGRESS not received for RECOGNIZE after %d ms.\n", schannel->name, SPEECH_CHANNEL_TIMEOUT_USEC / (1000));
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) IN-PROGRESS not received for RECOGNIZE after %d ms.\n", schannel->name, SPEECH_CHANNEL_TIMEOUT_USEC / (1000));
}
}
if (schannel->state != SPEECH_CHANNEL_PROCESSING) {
grammar_t *g = NULL;
char *ldata = NULL;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) Loading grammar %s, data = %s\n", schannel->name, name, data);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) Loading grammar %s, data = %s\n", schannel->name, name, data);
switch_mutex_lock(schannel->mutex);
if (schannel->state != SPEECH_CHANNEL_READY) {
while (schannel->state == SPEECH_CHANNEL_PROCESSING) {
if (switch_thread_cond_timedwait(schannel->cond, schannel->mutex, SPEECH_CHANNEL_TIMEOUT_USEC) == SWITCH_STATUS_TIMEOUT && !warned) {
warned = 1;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) DEFINE-GRAMMAR not COMPLETED after %d ms.\n", schannel->name, SPEECH_CHANNEL_TIMEOUT_USEC / (1000));
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) DEFINE-GRAMMAR not COMPLETED after %d ms.\n", schannel->name, SPEECH_CHANNEL_TIMEOUT_USEC / (1000));
}
}
if (schannel->state != SPEECH_CHANNEL_READY) {
status = SWITCH_STATUS_FALSE;
} else {
recognizer_data_t *r = (recognizer_data_t *) schannel->data;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) Unloading grammar %s\n", schannel->name, grammar_name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) Unloading grammar %s\n", schannel->name, grammar_name);
switch_core_hash_delete(r->enabled_grammars, grammar_name);
switch_core_hash_delete(r->grammars, grammar_name);
}
grammar = (grammar_t *) switch_core_hash_find(r->grammars, grammar_name);
if (grammar == NULL)
{
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Undefined grammar, %s\n", schannel->name, grammar_name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) Undefined grammar, %s\n", schannel->name, grammar_name);
status = SWITCH_STATUS_FALSE;
}
else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) Enabling grammar %s\n", schannel->name, grammar_name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) Enabling grammar %s\n", schannel->name, grammar_name);
switch_core_hash_insert(r->enabled_grammars, grammar_name, grammar);
}
}
status = SWITCH_STATUS_FALSE;
} else {
recognizer_data_t *r = (recognizer_data_t *) schannel->data;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) Disabling grammar %s\n", schannel->name, grammar_name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) Disabling grammar %s\n", schannel->name, grammar_name);
switch_core_hash_delete(r->enabled_grammars, grammar_name);
}
switch_status_t status = SWITCH_STATUS_SUCCESS;
recognizer_data_t *r = (recognizer_data_t *) schannel->data;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) Disabling all grammars\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) Disabling all grammars\n", schannel->name);
switch_core_hash_destroy(&r->enabled_grammars);
switch_core_hash_init(&r->enabled_grammars);
switch_mutex_lock(schannel->mutex);
r = (recognizer_data_t *) schannel->data;
if (!zstr(r->result)) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) SUCCESS, have result\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) SUCCESS, have result\n", schannel->name);
} else if (r->start_of_input == START_OF_INPUT_RECEIVED) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) SUCCESS, start of input\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) SUCCESS, start of input\n", schannel->name);
} else {
status = SWITCH_STATUS_FALSE;
}
if (schannel->state == SPEECH_CHANNEL_PROCESSING && !r->timers_started && !r->start_of_input) {
mrcp_message_t *mrcp_message;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) Starting input timers\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) Starting input timers\n", schannel->name);
/* Send START-INPUT-TIMERS to MRCP server */
mrcp_message = mrcp_application_message_create(schannel->unimrcp_session, schannel->unimrcp_channel, RECOGNIZER_START_INPUT_TIMERS);
if (mrcp_message == NULL) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Failed to create START-INPUT-TIMERS message\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) Failed to create START-INPUT-TIMERS message\n", schannel->name);
status = SWITCH_STATUS_FALSE;
goto done;
}
switch_mutex_lock(schannel->mutex);
r = (recognizer_data_t *) schannel->data;
r->start_of_input = START_OF_INPUT_RECEIVED;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) start of input\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) start of input\n", schannel->name);
switch_mutex_unlock(schannel->mutex);
return status;
}
switch_mutex_lock(schannel->mutex);
r = (recognizer_data_t *) schannel->data;
if (!zstr(r->result)) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) result is already set\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) result is already set\n", schannel->name);
status = SWITCH_STATUS_FALSE;
goto done;
}
if (zstr(result)) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) result is NULL\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) result is NULL\n", schannel->name);
status = SWITCH_STATUS_FALSE;
goto done;
}
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) result:\n\n%s\n", schannel->name, result);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) result:\n\n%s\n", schannel->name, result);
r->result = switch_core_strdup(schannel->memory_pool, result);
done:
r = (recognizer_data_t *) schannel->data;
if (r->result_headers) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) result headers are already set\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) result headers are already set\n", schannel->name);
status = SWITCH_STATUS_FALSE;
goto done;
}
if (!recog_hdr) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) result headers are NULL\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) result headers are NULL\n", schannel->name);
status = SWITCH_STATUS_FALSE;
goto done;
}
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) ASR adding result headers\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) ASR adding result headers\n", schannel->name);
if ((status = switch_event_create(&r->result_headers, SWITCH_EVENT_CLONE)) == SWITCH_STATUS_SUCCESS) {
switch_mutex_lock(schannel->mutex);
if (!zstr(r->result)) {
*result = strdup(r->result);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) result:\n\n%s\n", schannel->name, *result ? *result : "");
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) result:\n\n%s\n", schannel->name, *result ? *result : "");
r->result = NULL;
r->start_of_input = START_OF_INPUT_REPORTED;
} else if (r->start_of_input == START_OF_INPUT_RECEIVED) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) start of input\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) start of input\n", schannel->name);
status = SWITCH_STATUS_BREAK;
r->start_of_input = START_OF_INPUT_REPORTED;
} else {
if (!zstr(param_name) && !zstr(param_val)) {
unimrcp_param_id_t *id = (unimrcp_param_id_t *) switch_core_hash_find(schannel->application->param_id_map, param_name);
if (id) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) \"%s\": \"%s\"\n", schannel->name, param_name, param_val);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) \"%s\": \"%s\"\n", schannel->name, param_name, param_val);
recog_channel_set_header(schannel, id->id, param_val, msg, recog_hdr);
} else if (!strcasecmp(param_name, "define-grammar")) {
// This parameter is used internally only, not in MRCP headers
/* this is probably a vendor-specific MRCP param */
apt_str_t apt_param_name = { 0 };
apt_str_t apt_param_val = { 0 };
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) (vendor-specific value) %s: %s\n", schannel->name, param_name, param_val);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) (vendor-specific value) %s: %s\n", schannel->name, param_name, param_val);
apt_string_set(&apt_param_name, param_name); /* copy isn't necessary since apt_pair_array_append will do it */
apt_string_set(&apt_param_val, param_val);
if (!gen_hdr->vendor_specific_params) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) creating vendor specific pair array\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) creating vendor specific pair array\n", schannel->name);
gen_hdr->vendor_specific_params = apt_pair_array_create(10, msg->pool);
}
apt_pair_array_append(gen_hdr->vendor_specific_params, &apt_param_name, &apt_param_val, msg->pool);
recog_hdr->n_best_list_length = n_best_list_length;
mrcp_resource_header_property_add(msg, RECOGNIZER_HEADER_N_BEST_LIST_LENGTH);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) Ignoring invalid n best list length, \"%s\"\n", schannel->name, val);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) Ignoring invalid n best list length, \"%s\"\n", schannel->name, val);
}
break;
}
recog_hdr->no_input_timeout = no_input_timeout;
mrcp_resource_header_property_add(msg, RECOGNIZER_HEADER_NO_INPUT_TIMEOUT);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) Ignoring invalid no input timeout, \"%s\"\n", schannel->name, val);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) Ignoring invalid no input timeout, \"%s\"\n", schannel->name, val);
}
break;
}
recog_hdr->recognition_timeout = recognition_timeout;
mrcp_resource_header_property_add(msg, RECOGNIZER_HEADER_RECOGNITION_TIMEOUT);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) Ignoring invalid recognition timeout, \"%s\"\n", schannel->name, val);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) Ignoring invalid recognition timeout, \"%s\"\n", schannel->name, val);
}
break;
}
recog_hdr->speech_complete_timeout = speech_complete_timeout;
mrcp_resource_header_property_add(msg, RECOGNIZER_HEADER_SPEECH_COMPLETE_TIMEOUT);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) Ignoring invalid speech complete timeout, \"%s\"\n", schannel->name, val);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) Ignoring invalid speech complete timeout, \"%s\"\n", schannel->name, val);
}
break;
}
recog_hdr->speech_incomplete_timeout = speech_incomplete_timeout;
mrcp_resource_header_property_add(msg, RECOGNIZER_HEADER_SPEECH_INCOMPLETE_TIMEOUT);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) Ignoring invalid speech incomplete timeout, \"%s\"\n", schannel->name,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) Ignoring invalid speech incomplete timeout, \"%s\"\n", schannel->name,
val);
}
break;
recog_hdr->dtmf_interdigit_timeout = dtmf_interdigit_timeout;
mrcp_resource_header_property_add(msg, RECOGNIZER_HEADER_DTMF_INTERDIGIT_TIMEOUT);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) Ignoring invalid dtmf interdigit timeout, \"%s\"\n", schannel->name, val);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) Ignoring invalid dtmf interdigit timeout, \"%s\"\n", schannel->name, val);
}
break;
}
recog_hdr->dtmf_term_timeout = dtmf_term_timeout;
mrcp_resource_header_property_add(msg, RECOGNIZER_HEADER_DTMF_TERM_TIMEOUT);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) Ignoring invalid dtmf term timeout, \"%s\"\n", schannel->name, val);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) Ignoring invalid dtmf term timeout, \"%s\"\n", schannel->name, val);
}
break;
}
recog_hdr->dtmf_term_char = *val;
mrcp_resource_header_property_add(msg, RECOGNIZER_HEADER_DTMF_TERM_CHAR);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) Ignoring invalid dtmf term char, \"%s\"\n", schannel->name, val);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) Ignoring invalid dtmf term char, \"%s\"\n", schannel->name, val);
}
break;
recog_hdr->hotword_max_duration = hotword_max_duration;
mrcp_resource_header_property_add(msg, RECOGNIZER_HEADER_HOTWORD_MAX_DURATION);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) Ignoring invalid hotword max duration, \"%s\"\n", schannel->name, val);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) Ignoring invalid hotword max duration, \"%s\"\n", schannel->name, val);
}
break;
}
recog_hdr->hotword_min_duration = hotword_min_duration;
mrcp_resource_header_property_add(msg, RECOGNIZER_HEADER_HOTWORD_MIN_DURATION);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) Ignoring invalid hotword min duration, \"%s\"\n", schannel->name, val);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) Ignoring invalid hotword min duration, \"%s\"\n", schannel->name, val);
}
break;
}
case RECOGNIZER_HEADER_VER_BUFFER_UTTERANCE:
default:
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "(%s) unsupported RECOGNIZER header\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) unsupported RECOGNIZER header\n", schannel->name);
}
return status;
profile_t *profile = NULL;
recognizer_data_t *r = NULL;
switch_hash_index_t *hi = NULL;
-
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "asr_handle: name = %s, codec = %s, rate = %d, grammar = %s, param = %s\n",
- ah->name, ah->codec, ah->rate, ah->grammar, ah->param);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "codec = %s, rate = %d, dest = %s\n", codec, rate, dest);
+ char *session_uuid = NULL;
/* Name the channel */
if (profile_name && strchr(profile_name, ':')) {
/* Profile has session name appended to it. Pick it out */
profile_name = switch_core_strdup(ah->memory_pool, profile_name);
- name = strchr(profile_name, ':');
- *name = '\0';
- name++;
- name = switch_core_sprintf(ah->memory_pool, "%s ASR-%d", name, speech_channel_number);
+ session_uuid = strchr(profile_name, ':');
+ *session_uuid = '\0';
+ session_uuid++;
+ session_uuid = switch_core_strdup(ah->memory_pool, session_uuid);
} else {
- name = switch_core_sprintf(ah->memory_pool, "ASR-%d", speech_channel_number);
+ /* check if session is associated w/ this memory pool */
+ switch_core_session_t *session = switch_core_memory_pool_get_data(ah->memory_pool, "__session");
+ if (session) {
+ session_uuid = switch_core_session_get_uuid(session);
+ }
}
+ name = switch_core_sprintf(ah->memory_pool, "ASR-%d", speech_channel_number);
+
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(session_uuid), SWITCH_LOG_INFO, "asr_handle: name = %s, codec = %s, rate = %d, grammar = %s, param = %s\n",
+ ah->name, ah->codec, ah->rate, ah->grammar, ah->param);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(session_uuid), SWITCH_LOG_INFO, "codec = %s, rate = %d, dest = %s\n", codec, rate, dest);
/* Allocate the channel */
- if (speech_channel_create(&schannel, name, SPEECH_CHANNEL_RECOGNIZER, &globals.recog, (uint16_t) rate, ah->memory_pool) != SWITCH_STATUS_SUCCESS) {
+ if (speech_channel_create(&schannel, name, session_uuid, SPEECH_CHANNEL_RECOGNIZER, &globals.recog, (uint16_t) rate, ah->memory_pool) != SWITCH_STATUS_SUCCESS) {
status = SWITCH_STATUS_FALSE;
goto done;
}
}
profile = (profile_t *) switch_core_hash_find(globals.profiles, profile_name);
if (!profile) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Can't find profile, %s\n", name, profile_name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(session_uuid), SWITCH_LOG_ERROR, "(%s) Can't find profile, %s\n", name, profile_name);
status = SWITCH_STATUS_FALSE;
goto done;
}
grammar_type_t type = GRAMMAR_TYPE_UNKNOWN;
char *filename = NULL;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) grammar = %s, name = %s\n", schannel->name, grammar, name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) grammar = %s, name = %s\n", schannel->name, grammar, name);
grammar = skip_initial_whitespace(grammar);
if (zstr(grammar)) {
/* figure out what type of grammar this is */
if (text_starts_with(grammar, HTTP_ID) || text_starts_with(grammar, FILE_ID) || text_starts_with(grammar, SESSION_ID)
|| text_starts_with(grammar, BUILTIN_ID)) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) Grammar is URI\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) Grammar is URI\n", schannel->name);
type = GRAMMAR_TYPE_URI;
grammar_data = grammar;
} else if (text_starts_with(grammar, INLINE_ID)) {
} else {
/* grammar points to file containing the grammar text. We assume the MRCP server can't get to this file
* so read the data from the file and cache it */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) Grammar is inside file\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) Grammar is inside file\n", schannel->name);
if (switch_is_file_path(grammar)) {
filename = switch_mprintf("%s.gram", grammar);
} else {
}
grammar_data = NULL;
if (switch_file_open(&grammar_file, filename, SWITCH_FOPEN_READ, 0, schannel->memory_pool) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Could not read grammar file: %s\n", schannel->name, filename);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) Could not read grammar file: %s\n", schannel->name, filename);
status = SWITCH_STATUS_FALSE;
goto done;
}
grammar_file_size = switch_file_get_size(grammar_file);
if (grammar_file_size == 0) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Grammar file is empty: %s\n", schannel->name, filename);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) Grammar file is empty: %s\n", schannel->name, filename);
status = SWITCH_STATUS_FALSE;
goto done;
}
grammar_file_data = (char *) switch_core_alloc(schannel->memory_pool, grammar_file_size + 1);
to_read = grammar_file_size;
if (switch_file_read(grammar_file, grammar_file_data, &to_read) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Grammar file read error: %s\n", schannel->name, filename);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) Grammar file read error: %s\n", schannel->name, filename);
status = SWITCH_STATUS_FALSE;
goto done;
}
if (to_read != grammar_file_size) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Could not read entire grammar file: %s\n", schannel->name, filename);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) Could not read entire grammar file: %s\n", schannel->name, filename);
status = SWITCH_STATUS_FALSE;
goto done;
}
} else if (text_starts_with(grammar_data, JSGF_ID)) {
type = GRAMMAR_TYPE_JSGF;
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) unable to determine grammar type: %s\n", schannel->name, grammar_data);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) unable to determine grammar type: %s\n", schannel->name, grammar_data);
status = SWITCH_STATUS_FALSE;
goto done;
}
}
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) grammar is %s\n", schannel->name, grammar_type_to_mime(type, schannel->profile));
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) grammar is %s\n", schannel->name, grammar_type_to_mime(type, schannel->profile));
/* load the grammar */
if (recog_channel_load_grammar(schannel, name, type, grammar_data) != SWITCH_STATUS_SUCCESS) {
if (!r->dtmf_generator) {
if (!r->unimrcp_stream) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Cannot queue DTMF: No UniMRCP stream object open\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) Cannot queue DTMF: No UniMRCP stream object open\n", schannel->name);
return SWITCH_STATUS_FALSE;
}
r->dtmf_generator = mpf_dtmf_generator_create(r->unimrcp_stream, schannel->unimrcp_session->pool);
if (!r->dtmf_generator) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Cannot queue DTMF: Failed to create DTMF generator\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_ERROR, "(%s) Cannot queue DTMF: Failed to create DTMF generator\n", schannel->name);
return SWITCH_STATUS_FALSE;
}
}
digits[0] = dtmf->digit;
digits[1] = '\0';
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) Queued DTMF: %s\n", schannel->name, digits);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) Queued DTMF: %s\n", schannel->name, digits);
mpf_dtmf_generator_enqueue(r->dtmf_generator, digits);
r->dtmf_generator_active = 1;
/* received the response to RECOGNIZE request */
if (message->start_line.request_state == MRCP_REQUEST_STATE_INPROGRESS) {
/* RECOGNIZE in progress */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) RECOGNIZE IN PROGRESS\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) RECOGNIZE IN PROGRESS\n", schannel->name);
speech_channel_set_state(schannel, SPEECH_CHANNEL_PROCESSING);
} else if (message->start_line.request_state == MRCP_REQUEST_STATE_COMPLETE) {
/* RECOGNIZE failed to start */
if (!recog_hdr || recog_hdr->completion_cause == RECOGNIZER_COMPLETION_CAUSE_UNKNOWN) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) RECOGNIZE failed: status = %d\n", schannel->name,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) RECOGNIZE failed: status = %d\n", schannel->name,
message->start_line.status_code);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) RECOGNIZE failed: status = %d, completion-cause = %03d\n",
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) RECOGNIZE failed: status = %d, completion-cause = %03d\n",
schannel->name, message->start_line.status_code, recog_hdr->completion_cause);
}
speech_channel_set_state(schannel, SPEECH_CHANNEL_ERROR);
} else if (message->start_line.request_state == MRCP_REQUEST_STATE_PENDING) {
/* RECOGNIZE is queued */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) RECOGNIZE PENDING\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) RECOGNIZE PENDING\n", schannel->name);
} else {
/* received unexpected request_state */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) unexpected RECOGNIZE request state: %d\n", schannel->name,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) unexpected RECOGNIZE request state: %d\n", schannel->name,
message->start_line.request_state);
speech_channel_set_state(schannel, SPEECH_CHANNEL_ERROR);
}
/* received response to the STOP request */
if (message->start_line.request_state == MRCP_REQUEST_STATE_COMPLETE) {
/* got COMPLETE */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) RECOGNIZE STOPPED\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) RECOGNIZE STOPPED\n", schannel->name);
speech_channel_set_state(schannel, SPEECH_CHANNEL_READY);
} else {
/* received unexpected request state */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) unexpected STOP request state: %d\n", schannel->name,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) unexpected STOP request state: %d\n", schannel->name,
message->start_line.request_state);
speech_channel_set_state(schannel, SPEECH_CHANNEL_ERROR);
}
/* received response to START-INPUT-TIMERS request */
if (message->start_line.request_state == MRCP_REQUEST_STATE_COMPLETE) {
if (message->start_line.status_code >= 200 && message->start_line.status_code <= 299) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) timers started\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) timers started\n", schannel->name);
recog_channel_set_timers_started(schannel);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) timers failed to start, status code = %d\n", schannel->name,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) timers failed to start, status code = %d\n", schannel->name,
message->start_line.status_code);
}
}
/* received response to DEFINE-GRAMMAR request */
if (message->start_line.request_state == MRCP_REQUEST_STATE_COMPLETE) {
if (message->start_line.status_code >= 200 && message->start_line.status_code <= 299) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) grammar loaded\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) grammar loaded\n", schannel->name);
speech_channel_set_state(schannel, SPEECH_CHANNEL_READY);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) grammar failed to load, status code = %d\n", schannel->name,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) grammar failed to load, status code = %d\n", schannel->name,
message->start_line.status_code);
speech_channel_set_state(schannel, SPEECH_CHANNEL_ERROR);
}
}
} else {
/* received unexpected response */
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) unexpected response, method_id = %d\n", schannel->name,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) unexpected response, method_id = %d\n", schannel->name,
(int) message->start_line.method_id);
speech_channel_set_state(schannel, SPEECH_CHANNEL_ERROR);
}
} else if (message->start_line.message_type == MRCP_MESSAGE_TYPE_EVENT) {
/* received MRCP event */
if (message->start_line.method_id == RECOGNIZER_RECOGNITION_COMPLETE) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) RECOGNITION COMPLETE, Completion-Cause: %03d\n", schannel->name,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) RECOGNITION COMPLETE, Completion-Cause: %03d\n", schannel->name,
recog_hdr->completion_cause);
if (message->body.length > 0) {
if (message->body.buf[message->body.length - 1] == '\0') {
}
} else {
char *completion_cause = switch_mprintf("Completion-Cause: %03d", recog_hdr->completion_cause);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) No result\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) No result\n", schannel->name);
recog_channel_set_result_headers(schannel, recog_hdr);
recog_channel_set_results(schannel, completion_cause);
switch_safe_free(completion_cause);
}
speech_channel_set_state(schannel, SPEECH_CHANNEL_READY);
} else if (message->start_line.method_id == RECOGNIZER_START_OF_INPUT) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) START OF INPUT\n", schannel->name);
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) START OF INPUT\n", schannel->name);
recog_channel_set_start_of_input(schannel);
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) unexpected event, method_id = %d\n", schannel->name,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) unexpected event, method_id = %d\n", schannel->name,
(int) message->start_line.method_id);
speech_channel_set_state(schannel, SPEECH_CHANNEL_ERROR);
}
} else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) unexpected message type, message_type = %d\n", schannel->name,
+ switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_DEBUG, "(%s) unexpected message type, message_type = %d\n", schannel->name,
message->start_line.message_type);
speech_channel_set_state(schannel, SPEECH_CHANNEL_ERROR);
}
}
client = mrcp_client_create(dir_layout);
if (!client) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Failed to create MRCP client\n");
goto done;
}
pool = mrcp_client_memory_pool_get(client);
if (!pool) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Failed to get MRCP client memory pool\n");
client = NULL;
goto done;
}
/* load the synthesizer and recognizer resources */
resource_loader = mrcp_resource_loader_create(FALSE, pool);
- if (resource_loader) {
+ if (!resource_loader) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Failed to create MRCP resource loader\n");
+ client = NULL;
+ goto done;
+ } else {
apt_str_t synth_resource;
apt_str_t recog_resource;
apt_string_set(&synth_resource, "speechsynth");
mrcp_resource_load(resource_loader, &recog_resource);
resource_factory = mrcp_resource_factory_get(resource_loader);
mrcp_client_resource_factory_register(client, resource_factory);
- } else {
- client = NULL;
- goto done;
}
codec_manager = mpf_engine_codec_manager_create(pool);
- if (codec_manager) {
- mrcp_client_codec_manager_register(client, codec_manager);
+ if (!codec_manager) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Failed to create MPF codec manager\n");
+ client = NULL;
+ goto done;
+ }
+ if (!mrcp_client_codec_manager_register(client, codec_manager)) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Failed to create register MRCP client codec manager\n");
+ client = NULL;
+ goto done;
}
- /* set up MRCPv2 connection agent that will be shared with all profiles */
+ /* set up MRCP connection agent that will be shared with all profiles */
if (!zstr(globals.unimrcp_max_connection_count)) {
max_connection_count = atoi(globals.unimrcp_max_connection_count);
}
offer_new_connection = strcasecmp("true", globals.unimrcp_offer_new_connection);
}
connection_agent = mrcp_client_connection_agent_create("MRCPv2ConnectionAgent", max_connection_count, offer_new_connection, pool);
- if (connection_agent) {
- if (!zstr(globals.unimrcp_request_timeout)) {
- apr_size_t request_timeout = (apr_size_t)atol(globals.unimrcp_request_timeout);
- if (request_timeout > 0) {
- mrcp_client_connection_timeout_set(connection_agent, request_timeout);
- }
+ if (!connection_agent) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Failed to create MRCP connection agent\n");
+ client = NULL;
+ goto done;
+ }
+ if (!zstr(globals.unimrcp_rx_buffer_size)) {
+ apr_size_t rx_buffer_size = (apr_size_t)atol(globals.unimrcp_rx_buffer_size);
+ if (rx_buffer_size > 0) {
+ mrcp_client_connection_rx_size_set(connection_agent, rx_buffer_size);
+ }
+ }
+ if (!zstr(globals.unimrcp_tx_buffer_size)) {
+ apr_size_t tx_buffer_size = (apr_size_t)atol(globals.unimrcp_tx_buffer_size);
+ if (tx_buffer_size > 0) {
+ mrcp_client_connection_tx_size_set(connection_agent, tx_buffer_size);
}
- mrcp_client_connection_agent_register(client, connection_agent);
+ }
+ if (!zstr(globals.unimrcp_request_timeout)) {
+ apr_size_t request_timeout = (apr_size_t)atol(globals.unimrcp_request_timeout);
+ if (request_timeout > 0) {
+ mrcp_client_connection_timeout_set(connection_agent, request_timeout);
+ }
+ }
+ if (!mrcp_client_connection_agent_register(client, connection_agent)) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Failed to create register MRCP connection agent\n");
+ client = NULL;
+ goto done;
}
/* Set up the media engine that will be shared with all profiles */
media_engine = mpf_engine_create("MediaEngine", pool);
- if (media_engine) {
- mrcp_client_media_engine_register(client, media_engine);
+ if (!media_engine) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Failed to create MPF media engine\n");
+ client = NULL;
+ goto done;
+ }
+ if (!mpf_engine_scheduler_rate_set(media_engine, 1)) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Failed to set MPF engine scheduler rate\n");
+ client = NULL;
+ goto done;
+ }
+ if (!mrcp_client_media_engine_register(client, media_engine)) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Failed to register MPF media engine\n");
+ client = NULL;
+ goto done;
}
/* configure the client profiles */
mrcp_sig_settings_t *sig_settings = mrcp_signaling_settings_alloc(pool);
profile_t *mod_profile = NULL;
switch_xml_t default_params = NULL;
+ mrcp_connection_agent_t *v2_profile_connection_agent = NULL;
/* get profile attributes */
const char *name = apr_pstrdup(pool, switch_xml_attr(profile, "name"));
rtsp_client_config_t *config = mrcp_unirtsp_client_config_alloc(pool);
config->origin = DEFAULT_SDP_ORIGIN;
sig_settings->resource_location = DEFAULT_RESOURCE_LOCATION;
+ v2_profile_connection_agent = NULL;
if (!zstr(globals.unimrcp_request_timeout)) {
apr_size_t request_timeout = (apr_size_t)atol(globals.unimrcp_request_timeout);
if (!process_mrcpv1_config(config, sig_settings, param_name, param_value, pool) &&
!process_rtp_config(client, rtp_config, rtp_settings, param_name, param_value, pool) &&
!process_profile_config(mod_profile, param_name, param_value, mod_pool)) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unknown param %s\n", param_name);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Ignoring unknown param %s\n", param_name);
}
}
agent = mrcp_unirtsp_client_agent_create(name, config, pool);
+ if (!agent) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to create MRCP RTSP client agent\n");
+ client = NULL;
+ goto done;
+ }
} else if (strcmp("2", version) == 0) {
/* MRCPv2 configuration */
mrcp_sofia_client_config_t *config = mrcp_sofiasip_client_config_alloc(pool);
config->ext_ip = NULL;
config->user_agent_name = DEFAULT_SOFIASIP_UA_NAME;
config->origin = DEFAULT_SDP_ORIGIN;
+ v2_profile_connection_agent = connection_agent;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Loading MRCPv2 profile: %s\n", name);
for (param = switch_xml_child(profile, "param"); param; param = switch_xml_next(param)) {
const char *param_name = switch_xml_attr(param, "name");
if (!process_mrcpv2_config(config, sig_settings, param_name, param_value, pool) &&
!process_rtp_config(client, rtp_config, rtp_settings, param_name, param_value, pool) &&
!process_profile_config(mod_profile, param_name, param_value, mod_pool)) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unknown param %s\n", param_name);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Ignoring unknown param %s\n", param_name);
}
}
agent = mrcp_sofiasip_client_agent_create(name, config, pool);
+ if (!agent) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to create MRCP SIP client agent\n");
+ client = NULL;
+ goto done;
+ }
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "version must be either \"1\" or \"2\"\n");
client = NULL;
}
termination_factory = mpf_rtp_termination_factory_create(rtp_config, pool);
- if (termination_factory) {
- mrcp_client_rtp_factory_register(client, termination_factory, name);
- }
- if (agent) {
- mrcp_client_signaling_agent_register(client, agent);
+ if (!termination_factory) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to create RTP termination factory\n");
+ client = NULL;
+ goto done;
}
+ mrcp_client_rtp_factory_register(client, termination_factory, name);
+ mrcp_client_rtp_settings_register(client, rtp_settings, "RTP-Settings");
+ mrcp_client_signaling_settings_register(client, sig_settings, "Signaling-Settings");
+ mrcp_client_signaling_agent_register(client, agent);
/* create the profile and register it */
- mprofile = mrcp_client_profile_create(NULL, agent, connection_agent, media_engine, termination_factory, rtp_settings, sig_settings, pool);
- if (mprofile) {
- mrcp_client_profile_register(client, mprofile, name);
+ mprofile = mrcp_client_profile_create(NULL, agent, v2_profile_connection_agent, media_engine, termination_factory, rtp_settings, sig_settings, pool);
+ if (!mprofile) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to create MRCP client profile\n");
+ client = NULL;
+ goto done;
}
+ mrcp_client_profile_register(client, mprofile, name);
}
}