Update to latest UniMRCP version. MRCP requests can no timeout if there is no server response.

This commit is contained in:
Christopher Rienzo committed 2011-06-16 16:25:00 +00:00
1 parent 0555b702db
commit 17099473a3
441 files changed
+17430 -17071

No files matched your search

+7 -5
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: main.c 1541 2010-02-22 20:20:10Z achaloyan $
*/
#include <stdio.h>
@@ -44,7 +46,7 @@ static void* APR_THREAD_FUNC asr_session_run(apr_thread_t *thread, void *data)
asr_params_t *params = data;
asr_session_t *session = asr_session_create(params->engine,params->profile);
if(session) {
const char *result = asr_session_recognize(session,params->grammar_file,params->input_file);
const char *result = asr_session_file_recognize(session,params->grammar_file,params->input_file);
if(result) {
printf("Recog Result [%s]",result);
}
@@ -87,7 +89,7 @@ static apt_bool_t asr_session_launch(asr_engine_t *engine, const char *grammar_f
params->profile = apr_pstrdup(pool,profile);
}
else {
params->profile = "MRCPv2-Default";
params->profile = "uni2";
}
/* Launch a thread to run demo ASR session in */
@@ -126,11 +128,11 @@ static apt_bool_t cmdline_process(asr_engine_t *engine, char *cmdline)
"\n- run [grammar_file] [audio_input_file] [profile_name] (run demo asr client)\n"
" grammar_file is the name of grammar file, (path is relative to data dir)\n"
" audio_input_file is the name of audio file, (path is relative to data dir)\n"
" profile_name is one of 'MRCPv2-Default', 'MRCPv1-Default', ...\n"
" profile_name is one of 'uni2', 'uni1', ...\n"
"\n examples: \n"
" run\n"
" run grammar.xml one.pcm\n"
" run grammar.xml one.pcm MRCPv1-Default\n"
" run grammar.xml one.pcm uni1\n"
"\n- loglevel [level] (set loglevel, one of 0,1...7)\n"
"\n- quit, exit\n");
}
@@ -1,5 +1,5 @@
/*
* Copyright 2009 Arsen Chaloyan
* Copyright 2009-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.
@@ -12,10 +12,12 @@
* 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: asr_engine.h 1566 2010-03-06 16:45:05Z achaloyan $
*/
#ifndef __ASR_ENGINE_H__
#define __ASR_ENGINE_H__
#ifndef ASR_ENGINE_H
#define ASR_ENGINE_H
/**
* @file asr_engine.h
@@ -75,13 +77,42 @@ ASR_CLIENT_DECLARE(apt_bool_t) asr_engine_destroy(asr_engine_t *engine);
ASR_CLIENT_DECLARE(asr_session_t*) asr_session_create(asr_engine_t *engine, const char *profile);
/**
* Initiate recognition.
* Initiate recognition based on specified grammar and input file.
* @param session the session to run recognition in the scope of
* @param grammar_file the name of the grammar file to use (path is relative to data dir)
* @param input_file the name of the audio input file to use (path is relative to data dir)
* @return the recognition result (input element of NLSML content)
*/
ASR_CLIENT_DECLARE(const char*) asr_session_recognize(asr_session_t *session, const char *grammar_file, const char *input_file);
ASR_CLIENT_DECLARE(const char*) asr_session_file_recognize(
asr_session_t *session,
const char *grammar_file,
const char *input_file);
/**
* Initiate recognition based on specified grammar and input stream.
* @param session the session to run recognition in the scope of
* @param grammar_file the name of the grammar file to use (path is relative to data dir)
* @param callback the callback to be called to get input media frames
* @param obj the object to pass to the callback
* @return the recognition result (input element of NLSML content)
*
* @remark Audio data should be streamed through
* asr_session_stream_write() function calls.
*/
ASR_CLIENT_DECLARE(const char*) asr_session_stream_recognize(
asr_session_t *session,
const char *grammar_file);
/**
* Write audio data to recognize.
* @param session the session to write audio data for
* @param data the audio data
* @param size the size of data
*/
ASR_CLIENT_DECLARE(apt_bool_t) asr_session_stream_write(
asr_session_t *session,
char *data,
int size);
/**
* Destroy ASR session.
@@ -99,4 +130,4 @@ ASR_CLIENT_DECLARE(apt_bool_t) asr_engine_log_priority_set(apt_log_priority_e lo
APT_END_EXTERN_C
#endif /*__ASR_ENGINE_H__*/
#endif /* ASR_ENGINE_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2009 Arsen Chaloyan
* Copyright 2009-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.
@@ -12,6 +12,8 @@
* 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: asr_engine.c 1785 2010-09-22 06:14:29Z achaloyan $
*/
#include <stdlib.h>
@@ -20,14 +22,16 @@
#include <apr_thread_cond.h>
#include <apr_thread_proc.h>
/* common includes */
/* Common includes */
#include "unimrcp_client.h"
#include "mrcp_application.h"
#include "mrcp_message.h"
#include "mrcp_generic_header.h"
/* recognizer includes */
/* Recognizer includes */
#include "mrcp_recog_header.h"
#include "mrcp_recog_resource.h"
/* MPF includes */
#include <mpf_frame_buffer.h>
/* APT includes */
#include "apt_nlsml_doc.h"
#include "apt_log.h"
@@ -35,6 +39,11 @@
#include "asr_engine.h"
typedef enum {
INPUT_MODE_NONE,
INPUT_MODE_FILE,
INPUT_MODE_STREAM
} input_mode_e;
/** ASR engine on top of UniMRCP client stack */
struct asr_engine_t {
@@ -50,23 +59,27 @@ struct asr_engine_t {
/** ASR session on top of UniMRCP session/channel */
struct asr_session_t {
/** Back pointer to engine */
asr_engine_t *engine;
asr_engine_t *engine;
/** MRCP session */
mrcp_session_t *mrcp_session;
mrcp_session_t *mrcp_session;
/** MRCP channel */
mrcp_channel_t *mrcp_channel;
mrcp_channel_t *mrcp_channel;
/** RECOGNITION-COMPLETE message */
mrcp_message_t *recog_complete;
mrcp_message_t *recog_complete;
/** File to read audio stream from */
FILE *audio_in;
/** Input mode (either file or stream) */
input_mode_e input_mode;
/** File to read media frames from */
FILE *audio_in;
/* Buffer of media frames */
mpf_frame_buffer_t *media_buffer;
/** Streaming is in-progress */
apt_bool_t streaming;
apt_bool_t streaming;
/** Conditional wait object */
apr_thread_cond_t *wait_object;
apr_thread_cond_t *wait_object;
/** Mutex of the wait object */
apr_thread_mutex_t *mutex;
apr_thread_mutex_t *mutex;
/** Message sent from client stack */
const mrcp_app_message_t *app_message;
@@ -114,7 +127,7 @@ ASR_CLIENT_DECLARE(asr_engine_t*) asr_engine_create(
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,pool);
apt_log_file_open(dir_layout->log_dir_path,"unimrcpclient",MAX_LOG_FILE_SIZE,MAX_LOG_FILE_COUNT,FALSE,pool);
}
engine = apr_palloc(pool,sizeof(asr_engine_t));
@@ -204,12 +217,12 @@ static apt_bool_t asr_session_destroy_ex(asr_session_t *asr_session, apt_bool_t
apr_thread_cond_destroy(asr_session->wait_object);
asr_session->wait_object = NULL;
}
if(asr_session->mrcp_session) {
mrcp_application_session_destroy(asr_session->mrcp_session);
asr_session->mrcp_session = NULL;
if(asr_session->media_buffer) {
mpf_frame_buffer_destroy(asr_session->media_buffer);
asr_session->media_buffer = NULL;
}
free(asr_session);
return TRUE;
return mrcp_application_session_destroy(asr_session->mrcp_session);
}
/** Open audio input file */
@@ -241,14 +254,21 @@ static apt_bool_t asr_stream_read(mpf_audio_stream_t *stream, mpf_frame_t *frame
{
asr_session_t *asr_session = stream->obj;
if(asr_session && asr_session->streaming == TRUE) {
if(asr_session->audio_in) {
if(fread(frame->codec_frame.buffer,1,frame->codec_frame.size,asr_session->audio_in) == frame->codec_frame.size) {
/* normal read */
frame->type |= MEDIA_FRAME_TYPE_AUDIO;
if(asr_session->input_mode == INPUT_MODE_FILE) {
if(asr_session->audio_in) {
if(fread(frame->codec_frame.buffer,1,frame->codec_frame.size,asr_session->audio_in) == frame->codec_frame.size) {
/* normal read */
frame->type |= MEDIA_FRAME_TYPE_AUDIO;
}
else {
/* file is over */
asr_session->streaming = FALSE;
}
}
else {
/* file is over */
asr_session->streaming = FALSE;
}
if(asr_session->input_mode == INPUT_MODE_STREAM) {
if(asr_session->media_buffer) {
mpf_frame_buffer_read(asr_session->media_buffer,frame);
}
}
}
@@ -415,6 +435,11 @@ static apt_bool_t mrcp_response_check(const mrcp_app_message_t *app_message, mrc
if(!mrcp_message || mrcp_message->start_line.message_type != MRCP_MESSAGE_TYPE_RESPONSE ) {
return FALSE;
}
if(mrcp_message->start_line.status_code != MRCP_STATUS_CODE_SUCCESS &&
mrcp_message->start_line.status_code != MRCP_STATUS_CODE_SUCCESS_WITH_IGNORE) {
return FALSE;
}
return (mrcp_message->start_line.request_state == state) ? TRUE : FALSE;
}
@@ -440,23 +465,33 @@ ASR_CLIENT_DECLARE(asr_session_t*) asr_session_create(asr_engine_t *engine, cons
mrcp_session_t *session;
const mrcp_app_message_t *app_message;
apr_pool_t *pool;
asr_session_t *asr_session = malloc(sizeof(asr_session_t));
asr_session_t *asr_session;
mpf_stream_capabilities_t *capabilities;
/* create session */
session = mrcp_application_session_create(engine->mrcp_app,profile,asr_session);
session = mrcp_application_session_create(engine->mrcp_app,profile,NULL);
if(!session) {
free(asr_session);
return NULL;
}
pool = mrcp_application_session_pool_get(session);
asr_session = apr_palloc(pool,sizeof(asr_session_t));
mrcp_application_session_object_set(session,asr_session);
termination = mrcp_application_source_termination_create(
/* create source stream capabilities */
capabilities = mpf_source_stream_capabilities_create(pool);
/* add codec capabilities (Linear PCM) */
mpf_codec_capabilities_add(
&capabilities->codecs,
MPF_SAMPLE_RATE_8000,
"LPCM");
termination = mrcp_application_audio_termination_create(
session, /* session, termination belongs to */
&audio_stream_vtable, /* virtual methods table of audio stream */
NULL, /* codec descriptor of audio stream (NULL by default) */
asr_session); /* object to associate */
capabilities, /* capabilities of audio stream */
asr_session); /* object to associate */
channel = mrcp_application_channel_create(
session, /* session, channel belongs to */
MRCP_RECOGNIZER_RESOURCE, /* MRCP resource identifier */
@@ -466,7 +501,6 @@ ASR_CLIENT_DECLARE(asr_session_t*) asr_session_create(asr_engine_t *engine, cons
if(!channel) {
mrcp_application_session_destroy(session);
free(asr_session);
return NULL;
}
@@ -474,8 +508,10 @@ ASR_CLIENT_DECLARE(asr_session_t*) asr_session_create(asr_engine_t *engine, cons
asr_session->mrcp_session = session;
asr_session->mrcp_channel = channel;
asr_session->recog_complete = NULL;
asr_session->input_mode = INPUT_MODE_NONE;
asr_session->streaming = FALSE;
asr_session->audio_in = NULL;
asr_session->media_buffer = NULL;
asr_session->mutex = NULL;
asr_session->wait_object = NULL;
asr_session->app_message = NULL;
@@ -484,6 +520,9 @@ ASR_CLIENT_DECLARE(asr_session_t*) asr_session_create(asr_engine_t *engine, cons
apr_thread_mutex_create(&asr_session->mutex,APR_THREAD_MUTEX_DEFAULT,pool);
apr_thread_cond_create(&asr_session->wait_object,pool);
/* Create media buffer */
asr_session->media_buffer = mpf_frame_buffer_create(160,20,pool);
/* Send add channel request and wait for the response */
apr_thread_mutex_lock(asr_session->mutex);
app_message = NULL;
@@ -501,8 +540,11 @@ ASR_CLIENT_DECLARE(asr_session_t*) asr_session_create(asr_engine_t *engine, cons
return asr_session;
}
/** Initiate recognition */
ASR_CLIENT_DECLARE(const char*) asr_session_recognize(asr_session_t *asr_session, const char *grammar_file, const char *input_file)
/** Initiate recognition based on specified grammar and input file */
ASR_CLIENT_DECLARE(const char*) asr_session_file_recognize(
asr_session_t *asr_session,
const char *grammar_file,
const char *input_file)
{
const mrcp_app_message_t *app_message;
mrcp_message_t *mrcp_message;
@@ -551,6 +593,7 @@ ASR_CLIENT_DECLARE(const char*) asr_session_recognize(asr_session_t *asr_session
}
/* Open input file and start streaming */
asr_session->input_mode = INPUT_MODE_FILE;
if(asr_input_file_open(asr_session,input_file) == FALSE) {
return NULL;
}
@@ -579,6 +622,106 @@ ASR_CLIENT_DECLARE(const char*) asr_session_recognize(asr_session_t *asr_session
return nlsml_input_get(asr_session->recog_complete);
}
/** Initiate recognition based on specified grammar and input stream */
ASR_CLIENT_DECLARE(const char*) asr_session_stream_recognize(
asr_session_t *asr_session,
const char *grammar_file)
{
const mrcp_app_message_t *app_message;
mrcp_message_t *mrcp_message;
app_message = NULL;
mrcp_message = define_grammar_message_create(asr_session,grammar_file);
if(!mrcp_message) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create DEFINE-GRAMMAR Request");
return NULL;
}
/* Send DEFINE-GRAMMAR request and wait for the response */
apr_thread_mutex_lock(asr_session->mutex);
if(mrcp_application_message_send(asr_session->mrcp_session,asr_session->mrcp_channel,mrcp_message) == TRUE) {
apr_thread_cond_wait(asr_session->wait_object,asr_session->mutex);
app_message = asr_session->app_message;
asr_session->app_message = NULL;
}
apr_thread_mutex_unlock(asr_session->mutex);
if(mrcp_response_check(app_message,MRCP_REQUEST_STATE_COMPLETE) == FALSE) {
return NULL;
}
/* Reset prev recog result (if any) */
asr_session->recog_complete = NULL;
app_message = NULL;
mrcp_message = recognize_message_create(asr_session);
if(!mrcp_message) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Create RECOGNIZE Request");
return NULL;
}
/* Send RECOGNIZE request and wait for the response */
apr_thread_mutex_lock(asr_session->mutex);
if(mrcp_application_message_send(asr_session->mrcp_session,asr_session->mrcp_channel,mrcp_message) == TRUE) {
apr_thread_cond_wait(asr_session->wait_object,asr_session->mutex);
app_message = asr_session->app_message;
asr_session->app_message = NULL;
}
apr_thread_mutex_unlock(asr_session->mutex);
if(mrcp_response_check(app_message,MRCP_REQUEST_STATE_INPROGRESS) == FALSE) {
return NULL;
}
/* Reset media buffer */
mpf_frame_buffer_restart(asr_session->media_buffer);
/* Set input mode and start streaming */
asr_session->input_mode = INPUT_MODE_STREAM;
asr_session->streaming = TRUE;
/* Wait for events either START-OF-INPUT or RECOGNITION-COMPLETE */
do {
apr_thread_mutex_lock(asr_session->mutex);
app_message = NULL;
if(apr_thread_cond_timedwait(asr_session->wait_object,asr_session->mutex, 60 * 1000000) != APR_SUCCESS) {
apr_thread_mutex_unlock(asr_session->mutex);
return NULL;
}
app_message = asr_session->app_message;
asr_session->app_message = NULL;
apr_thread_mutex_unlock(asr_session->mutex);
mrcp_message = mrcp_event_get(app_message);
if(mrcp_message && mrcp_message->start_line.method_id == RECOGNIZER_RECOGNITION_COMPLETE) {
asr_session->recog_complete = mrcp_message;
}
}
while(!asr_session->recog_complete);
/* Get results */
return nlsml_input_get(asr_session->recog_complete);
}
/** Write audio frame to recognize */
ASR_CLIENT_DECLARE(apt_bool_t) asr_session_stream_write(
asr_session_t *asr_session,
char *data,
int size)
{
mpf_frame_t frame;
frame.type = MEDIA_FRAME_TYPE_AUDIO;
frame.marker = MPF_MARKER_NONE;
frame.codec_frame.buffer = data;
frame.codec_frame.size = size;
if(mpf_frame_buffer_write(asr_session->media_buffer,&frame) != TRUE) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Write Audio [%d]",size);
return FALSE;
}
return TRUE;
}
/** Destroy ASR session */
ASR_CLIENT_DECLARE(apt_bool_t) asr_session_destroy(asr_session_t *asr_session)
{
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: unimrcp_client.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __UNIMRCP_CLIENT_H__
#define __UNIMRCP_CLIENT_H__
#ifndef UNIMRCP_CLIENT_H
#define UNIMRCP_CLIENT_H
/**
* @file unimrcp_client.h
@@ -35,4 +37,4 @@ MRCP_DECLARE(mrcp_client_t*) unimrcp_client_create(apt_dir_layout_t *dir_layout)
APT_END_EXTERN_C
#endif /*__UNIMRCP_CLIENT_H__*/
#endif /* UNIMRCP_CLIENT_H */
@@ -1,156 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="libunimrcpclient"
ProjectGUID="{EE157390-1E85-416C-946E-620E32C9AD33}"
RootNamespace="libunimrcpclient"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpclient.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(ProjectRootDir)modules\mrcp-sofiasip\include&quot;;&quot;$(ProjectRootDir)modules\mrcp-unirtsp\include&quot;"
/>
<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\unimrcpclient.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(ProjectRootDir)modules\mrcp-sofiasip\include&quot;;&quot;$(ProjectRootDir)modules\mrcp-unirtsp\include&quot;"
/>
<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="include"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\build\uni_version.h"
>
</File>
<File
RelativePath=".\include\unimrcp_client.h"
>
</File>
</Filter>
<Filter
Name="src"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
>
<File
RelativePath=".\src\unimrcp_client.c"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
@@ -244,6 +244,10 @@
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\build\uni_revision.h"
>
</File>
<File
RelativePath="..\..\build\uni_version.h"
>
File diff suppressed because it is too large. Load diff
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: unimrcp_server.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __UNIMRCP_SERVER_H__
#define __UNIMRCP_SERVER_H__
#ifndef UNIMRCP_SERVER_H
#define UNIMRCP_SERVER_H
/**
* @file unimrcp_server.h
@@ -40,4 +42,4 @@ MRCP_DECLARE(apt_bool_t) unimrcp_server_shutdown(mrcp_server_t *server);
APT_END_EXTERN_C
#endif /*__UNIMRCP_SERVER_H__*/
#endif /* UNIMRCP_SERVER_H */
@@ -1,156 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="libunimrcpserver"
ProjectGUID="{C98AF157-352E-4737-BD30-A24E2647F5AE}"
RootNamespace="libunimrcpserver"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpserver.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(ProjectRootDir)modules\mrcp-sofiasip\include&quot;;&quot;$(ProjectRootDir)modules\mrcp-unirtsp\include&quot;"
/>
<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\unimrcpserver.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(ProjectRootDir)modules\mrcp-sofiasip\include&quot;;&quot;$(ProjectRootDir)modules\mrcp-unirtsp\include&quot;"
/>
<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="include"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\build\uni_version.h"
>
</File>
<File
RelativePath=".\include\unimrcp_server.h"
>
</File>
</Filter>
<Filter
Name="src"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
>
<File
RelativePath=".\src\unimrcp_server.c"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
@@ -244,6 +244,10 @@
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\build\uni_revision.h"
>
</File>
<File
RelativePath="..\..\build\uni_version.h"
>
File diff suppressed because it is too large. Load diff
+4 -1
View File
@@ -28,7 +28,10 @@ umc_SOURCES = src/main.cpp \
src/dtmfscenario.cpp \
src/dtmfsession.cpp \
src/setparamscenario.cpp \
src/setparamsession.cpp
src/setparamsession.cpp \
src/verifierscenario.cpp \
src/verifiersession.cpp
umc_LDADD = $(top_builddir)/platforms/libunimrcp-client/libunimrcpclient.la
if ISMAC
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: dtmfscenario.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __DTMF_SCENARIO_H__
#define __DTMF_SCENARIO_H__
#ifndef DTMF_SCENARIO_H
#define DTMF_SCENARIO_H
/**
* @file dtmfscenario.h
@@ -72,4 +74,4 @@ inline const char* DtmfScenario::GetDigits() const
}
#endif /*__DTMF_SCENARIO_H__*/
#endif /* DTMF_SCENARIO_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: dtmfsession.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __DTMF_SESSION_H__
#define __DTMF_SESSION_H__
#ifndef DTMF_SESSION_H
#define DTMF_SESSION_H
/**
* @file dtmfsession.h
@@ -65,4 +67,4 @@ inline const DtmfScenario* DtmfSession::GetScenario() const
return (DtmfScenario*)m_pScenario;
}
#endif /*__DTMF_SESSION_H__*/
#endif /* DTMF_SESSION_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: recogscenario.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __RECOG_SCENARIO_H__
#define __RECOG_SCENARIO_H__
#ifndef RECOG_SCENARIO_H
#define RECOG_SCENARIO_H
/**
* @file recogscenario.h
@@ -85,4 +87,4 @@ inline bool RecogScenario::IsRecognizeEnabled() const
return m_Recognize;
}
#endif /*__RECOG_SCENARIO_H__*/
#endif /* RECOG_SCENARIO_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: recogsession.h 1587 2010-03-12 19:40:02Z achaloyan $
*/
#ifndef __RECOG_SESSION_H__
#define __RECOG_SESSION_H__
#ifndef RECOG_SESSION_H
#define RECOG_SESSION_H
/**
* @file recogsession.h
@@ -37,6 +39,7 @@ public:
protected:
/* ============================ MANIPULATORS =============================== */
virtual bool Start();
virtual bool Stop();
RecogChannel* CreateRecogChannel();
bool StartRecognition(mrcp_channel_t* pMrcpChannel);
@@ -69,4 +72,4 @@ inline const RecogScenario* RecogSession::GetScenario() const
return (RecogScenario*)m_pScenario;
}
#endif /*__RECOG_SESSION_H__*/
#endif /* RECOG_SESSION_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: recorderscenario.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __RECORDER_SCENARIO_H__
#define __RECORDER_SCENARIO_H__
#ifndef RECORDER_SCENARIO_H
#define RECORDER_SCENARIO_H
/**
* @file recorderscenario.h
@@ -63,4 +65,4 @@ inline bool RecorderScenario::IsRecordEnabled() const
return m_Record;
}
#endif /*__RECORDER_SCENARIO_H__*/
#endif /* RECORDER_SCENARIO_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: recordersession.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __RECORDER_SESSION_H__
#define __RECORDER_SESSION_H__
#ifndef RECORDER_SESSION_H
#define RECORDER_SESSION_H
/**
* @file recordersession.h
@@ -65,4 +67,4 @@ inline const RecorderScenario* RecorderSession::GetScenario() const
return (RecorderScenario*)m_pScenario;
}
#endif /*__RECORDER_SESSION_H__*/
#endif /* RECORDER_SESSION_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: setparamscenario.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __SETPARAM_SCENARIO_H__
#define __SETPARAM_SCENARIO_H__
#ifndef SETPARAM_SCENARIO_H
#define SETPARAM_SCENARIO_H
/**
* @file setaparamscenario.h
@@ -44,4 +46,4 @@ protected:
/* ============================ INLINE METHODS ============================= */
#endif /*__SETPARAM_SCENARIO_H__*/
#endif /* SETPARAM_SCENARIO_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: setparamsession.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __SETPARAM_SESSION_H__
#define __SETPARAM_SESSION_H__
#ifndef SETPARAM_SESSION_H
#define SETPARAM_SESSION_H
/**
* @file setparamsession.h
@@ -73,4 +75,4 @@ inline const SetParamScenario* SetParamSession::GetScenario() const
return (SetParamScenario*)m_pScenario;
}
#endif /*__SETPARAM_SESSION_H__*/
#endif /* SETPARAM_SESSION_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: synthscenario.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __SYNTH_SCENARIO_H__
#define __SYNTH_SCENARIO_H__
#ifndef SYNTH_SCENARIO_H
#define SYNTH_SCENARIO_H
/**
* @file synthscenario.h
@@ -71,4 +73,4 @@ inline bool SynthScenario::IsSpeakEnabled() const
return m_Speak;
}
#endif /*__SYNTH_SCENARIO_H__*/
#endif /* SYNTH_SCENARIO_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: synthsession.h 1586 2010-03-12 19:39:02Z achaloyan $
*/
#ifndef __SYNTH_SESSION_H__
#define __SYNTH_SESSION_H__
#ifndef SYNTH_SESSION_H
#define SYNTH_SESSION_H
/**
* @file synthsession.h
@@ -37,6 +39,7 @@ public:
protected:
/* ============================ MANIPULATORS =============================== */
virtual bool Start();
virtual bool Stop();
SynthChannel* CreateSynthChannel();
@@ -50,7 +53,7 @@ protected:
/* ============================ ACCESSORS ================================== */
const SynthScenario* GetScenario() const;
private:
/* ============================ DATA ======================================= */
SynthChannel* m_pSynthChannel;
@@ -63,4 +66,4 @@ inline const SynthScenario* SynthSession::GetScenario() const
return (SynthScenario*)m_pScenario;
}
#endif /*__SYNTH_SESSION_H__*/
#endif /* SYNTH_SESSION_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: umcconsole.h 1525 2010-02-16 14:58:56Z achaloyan $
*/
#ifndef __UMC_CONSOLE_H__
#define __UMC_CONSOLE_H__
#ifndef UMC_CONSOLE_H
#define UMC_CONSOLE_H
/**
* @file umcconsole.h
@@ -47,12 +49,12 @@ private:
struct UmcOptions
{
const char* m_RootDirPath;
apt_log_priority_e m_LogPriority;
apt_log_output_e m_LogOutput;
const char* m_LogPriority;
const char* m_LogOutput;
};
UmcOptions m_Options;
UmcFramework* m_pFramework;
};
#endif /*__UMC_CONSOLE_H__*/
#endif /* UMC_CONSOLE_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: umcframework.h 1585 2010-03-12 19:12:05Z achaloyan $
*/
#ifndef __UMC_FRAMEWORK_H__
#define __UMC_FRAMEWORK_H__
#ifndef UMC_FRAMEWORK_H
#define UMC_FRAMEWORK_H
/**
* @file umcframework.h
@@ -42,6 +44,7 @@ public:
void Destroy();
void RunSession(const char* pScenarioName, const char* pProfileName);
void StopSession(const char* id);
void KillSession(const char* id);
void ShowScenarios();
@@ -61,6 +64,7 @@ protected:
void DestroyScenarios();
bool ProcessRunRequest(const char* pScenarioName, const char* pProfileName);
void ProcessStopRequest(const char* id);
void ProcessKillRequest(const char* id);
void ProcessShowScenarios();
void ProcessShowSessions();
@@ -89,4 +93,4 @@ private:
apr_hash_t* m_pSessionTable;
};
#endif /*__UMC_FRAMEWORK_H__*/
#endif /* UMC_FRAMEWORK_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: umcscenario.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __UMC_SCENARIO_H__
#define __UMC_SCENARIO_H__
#ifndef UMC_SCENARIO_H
#define UMC_SCENARIO_H
/**
* @file umcscenario.h
@@ -117,4 +119,4 @@ inline bool UmcScenario::IsDiscoveryEnabled() const
}
#endif /*__UMC_SCENARIO_H__*/
#endif /* UMC_SCENARIO_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: umcsession.h 1585 2010-03-12 19:12:05Z achaloyan $
*/
#ifndef __UMC_SESSION_H__
#define __UMC_SESSION_H__
#ifndef UMC_SESSION_H
#define UMC_SESSION_H
/**
* @file umcsession.h
@@ -35,6 +37,7 @@ public:
/* ============================ MANIPULATORS =============================== */
virtual bool Run();
virtual bool Stop();
virtual bool Terminate();
void SetMrcpProfile(const char* pMrcpProfile);
@@ -82,6 +85,7 @@ protected:
/* ============================ ACCESSORS ================================== */
apr_pool_t* GetSessionPool() const;
const char* GetMrcpSessionId() const;
mrcp_message_t* GetMrcpMessage() const;
/* ============================ DATA ======================================= */
const UmcScenario* m_pScenario;
@@ -92,6 +96,7 @@ private:
/* ============================ DATA ======================================= */
mrcp_application_t* m_pMrcpApplication;
mrcp_session_t* m_pMrcpSession;
mrcp_message_t* m_pMrcpMessage; /* last message sent */
bool m_Running;
bool m_Terminating;
};
@@ -118,4 +123,9 @@ inline void UmcSession::SetMrcpProfile(const char* pMrcpProfile)
m_pMrcpProfile = pMrcpProfile;
}
#endif /*__UMC_SESSION_H__*/
inline mrcp_message_t* UmcSession::GetMrcpMessage() const
{
return m_pMrcpMessage;
}
#endif /* UMC_SESSION_H */
@@ -0,0 +1,75 @@
/*
* 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: verifierscenario.h 1775 2010-08-26 18:23:38Z achaloyan $
*/
#ifndef VERIFIER_SCENARIO_H
#define VERIFIER_SCENARIO_H
/**
* @file verifierscenario.h
* @brief Verifier Scenario
*/
#include "umcscenario.h"
class VerifierScenario : public UmcScenario
{
public:
/* ============================ CREATORS =================================== */
VerifierScenario();
virtual ~VerifierScenario();
/* ============================ MANIPULATORS =============================== */
virtual void Destroy();
virtual UmcSession* CreateSession();
/* ============================ ACCESSORS ================================== */
const char* GetRepositoryURI() const;
const char* GetVerificationMode() const;
const char* GetVoiceprintIdentifier() const;
/* ============================ INQUIRIES ================================== */
protected:
/* ============================ MANIPULATORS =============================== */
virtual bool LoadElement(const apr_xml_elem* pElem, apr_pool_t* pool);
bool LoadVerify(const apr_xml_elem* pElem, apr_pool_t* pool);
/* ============================ DATA ======================================= */
const char* m_RepositoryURI;
const char* m_VerificationMode;
const char* m_VoiceprintIdentifier;
};
/* ============================ INLINE METHODS ============================= */
inline const char* VerifierScenario::GetRepositoryURI() const
{
return m_RepositoryURI;
}
inline const char* VerifierScenario::GetVerificationMode() const
{
return m_VerificationMode;
}
inline const char* VerifierScenario::GetVoiceprintIdentifier() const
{
return m_VoiceprintIdentifier;
}
#endif /* VERIFIER_SCENARIO_H */
@@ -0,0 +1,74 @@
/*
* 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: verifiersession.h 1776 2010-08-27 16:36:38Z achaloyan $
*/
#ifndef VERIFIER_SESSION_H
#define VERIFIER_SESSION_H
/**
* @file verifiersession.h
* @brief Verifier Session
*/
#include "umcsession.h"
class VerifierScenario;
struct VerifierChannel;
class VerifierSession : public UmcSession
{
public:
/* ============================ CREATORS =================================== */
VerifierSession(const VerifierScenario* pScenario);
virtual ~VerifierSession();
protected:
/* ============================ MANIPULATORS =============================== */
virtual bool Start();
virtual bool Stop();
VerifierChannel* CreateVerifierChannel();
bool StartVerification(mrcp_channel_t* pMrcpChannel);
mrcp_message_t* CreateStartSessionRequest(mrcp_channel_t* pMrcpChannel);
mrcp_message_t* CreateEndSessionRequest(mrcp_channel_t* pMrcpChannel);
mrcp_message_t* CreateVerificationRequest(mrcp_channel_t* pMrcpChannel);
FILE* GetAudioIn(const mpf_codec_descriptor_t* pDescriptor, apr_pool_t* pool) const;
/* ============================ HANDLERS =================================== */
virtual bool OnSessionTerminate(mrcp_sig_status_code_e status);
virtual bool OnChannelAdd(mrcp_channel_t* channel, mrcp_sig_status_code_e status);
virtual bool OnMessageReceive(mrcp_channel_t* channel, mrcp_message_t* message);
/* ============================ ACCESSORS ================================== */
const VerifierScenario* GetScenario() const;
private:
/* ============================ DATA ======================================= */
VerifierChannel* m_pVerifierChannel;
const char* m_ContentId;
};
/* ============================ INLINE METHODS ============================= */
inline const VerifierScenario* VerifierSession::GetScenario() const
{
return (VerifierScenario*)m_pScenario;
}
#endif /* VERIFIER_SESSION_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: dtmfscenario.cpp 1474 2010-02-07 20:51:47Z achaloyan $
*/
#include <stdlib.h>
+9 -13
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: dtmfsession.cpp 1780 2010-09-01 05:59:32Z achaloyan $
*/
#include "dtmfsession.h"
@@ -30,8 +32,6 @@ struct RecogChannel
mrcp_channel_t* m_pMrcpChannel;
/** DTMF generator */
mpf_dtmf_generator_t* m_pDtmfGenerator;
/** Audio stream */
mpf_audio_stream_t* m_pStream;
/** Streaming is in-progress */
bool m_Streaming;
};
@@ -79,13 +79,6 @@ bool DtmfSession::OnSessionTerminate(mrcp_sig_status_code_e status)
return UmcSession::OnSessionTerminate(status);
}
static apt_bool_t OpenStream(mpf_audio_stream_t* pStream, mpf_codec_t *codec)
{
RecogChannel* pRecogChannel = (RecogChannel*) pStream->obj;
pRecogChannel->m_pStream = pStream;
return TRUE;
}
static apt_bool_t ReadStream(mpf_audio_stream_t* pStream, mpf_frame_t* pFrame)
{
RecogChannel* pRecogChannel = (RecogChannel*) pStream->obj;
@@ -110,7 +103,6 @@ RecogChannel* DtmfSession::CreateRecogChannel()
RecogChannel *pRecogChannel = new RecogChannel;
pRecogChannel->m_pMrcpChannel = NULL;
pRecogChannel->m_pDtmfGenerator = NULL;
pRecogChannel->m_pStream = NULL;
pRecogChannel->m_Streaming = false;
/* create source stream capabilities */
@@ -120,7 +112,7 @@ RecogChannel* DtmfSession::CreateRecogChannel()
static const mpf_audio_stream_vtable_t audio_stream_vtable =
{
NULL,
OpenStream,
NULL,
NULL,
ReadStream,
NULL,
@@ -162,7 +154,11 @@ bool DtmfSession::OnChannelAdd(mrcp_channel_t* pMrcpChannel, mrcp_sig_status_cod
RecogChannel* pRecogChannel = (RecogChannel*) mrcp_application_channel_object_get(pMrcpChannel);
if(pRecogChannel)
{
pRecogChannel->m_pDtmfGenerator = mpf_dtmf_generator_create(pRecogChannel->m_pStream,GetSessionPool());
const mpf_audio_stream_t* pStream = mrcp_application_audio_stream_get(pMrcpChannel);
if(pStream)
{
pRecogChannel->m_pDtmfGenerator = mpf_dtmf_generator_create(pStream,GetSessionPool());
}
}
return StartRecognition(pMrcpChannel);
+3 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: main.cpp 1474 2010-02-07 20:51:47Z achaloyan $
*/
#include "umcconsole.h"
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: recogscenario.cpp 1474 2010-02-07 20:51:47Z achaloyan $
*/
#include <stdlib.h>
+53 -10
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: recogsession.cpp 1587 2010-03-12 19:40:02Z achaloyan $
*/
#include "recogsession.h"
@@ -27,12 +29,21 @@ struct RecogChannel
{
/** MRCP control channel */
mrcp_channel_t* m_pMrcpChannel;
/** IN-PROGRESS RECOGNIZE request */
mrcp_message_t* m_pRecogRequest;
/** Streaming is in-progress */
bool m_Streaming;
/** File to read audio stream from */
FILE* m_pAudioIn;
/** Estimated time to complete (used if no audio_in available) */
apr_size_t m_TimeToComplete;
RecogChannel() :
m_pMrcpChannel(NULL),
m_pRecogRequest(NULL),
m_Streaming(false),
m_pAudioIn(NULL),
m_TimeToComplete(0) {}
};
RecogSession::RecogSession(const RecogScenario* pScenario) :
@@ -67,6 +78,37 @@ bool RecogSession::Start()
return true;
}
bool RecogSession::Stop()
{
if(!UmcSession::Stop())
return false;
if(!m_pRecogChannel)
return false;
mrcp_message_t* pStopMessage = CreateMrcpMessage(m_pRecogChannel->m_pMrcpChannel,RECOGNIZER_STOP);
if(!pStopMessage)
return false;
if(m_pRecogChannel->m_pRecogRequest)
{
mrcp_generic_header_t* pGenericHeader;
/* get/allocate generic header */
pGenericHeader = (mrcp_generic_header_t*) mrcp_generic_header_prepare(pStopMessage);
if(pGenericHeader)
{
pGenericHeader->active_request_id_list.count = 1;
pGenericHeader->active_request_id_list.ids[0] =
m_pRecogChannel->m_pRecogRequest->start_line.request_id;
mrcp_generic_header_property_add(pStopMessage,GENERIC_HEADER_ACTIVE_REQUEST_ID_LIST);
}
m_pRecogChannel->m_pRecogRequest = NULL;
}
return SendMrcpRequest(m_pRecogChannel->m_pMrcpChannel,pStopMessage);
}
bool RecogSession::OnSessionTerminate(mrcp_sig_status_code_e status)
{
if(m_pRecogChannel)
@@ -128,11 +170,7 @@ RecogChannel* RecogSession::CreateRecogChannel()
apr_pool_t* pool = GetSessionPool();
/* create channel */
RecogChannel *pRecogChannel = new RecogChannel;
pRecogChannel->m_pMrcpChannel = NULL;
pRecogChannel->m_Streaming = false;
pRecogChannel->m_pAudioIn = NULL;
pRecogChannel->m_TimeToComplete = 0;
RecogChannel* pRecogChannel = new RecogChannel;
/* create source stream capabilities */
pCapabilities = mpf_source_stream_capabilities_create(pool);
@@ -218,11 +256,13 @@ bool RecogSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_message_t
/* received the response to RECOGNIZE request */
if(pMrcpMessage->start_line.request_state == MRCP_REQUEST_STATE_INPROGRESS)
{
RecogChannel* pRecogChannel = (RecogChannel*) mrcp_application_channel_object_get(pMrcpChannel);
if(pRecogChannel)
pRecogChannel->m_pRecogRequest = GetMrcpMessage();
/* start to stream the speech to recognize */
if(pRecogChannel)
{
pRecogChannel->m_Streaming = true;
}
}
else
{
@@ -241,9 +281,12 @@ bool RecogSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_message_t
{
ParseNLSMLResult(pMrcpMessage);
if(pRecogChannel)
{
pRecogChannel->m_Streaming = false;
}
RecogChannel* pRecogChannel = (RecogChannel*) mrcp_application_channel_object_get(pMrcpChannel);
if(pRecogChannel)
pRecogChannel->m_pRecogRequest = NULL;
Terminate();
}
else if(pMrcpMessage->start_line.method_id == RECOGNIZER_START_OF_INPUT)
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: recorderscenario.cpp 1474 2010-02-07 20:51:47Z achaloyan $
*/
#include <stdlib.h>
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: recordersession.cpp 1474 2010-02-07 20:51:47Z achaloyan $
*/
#include "recordersession.h"
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: setparamscenario.cpp 1474 2010-02-07 20:51:47Z achaloyan $
*/
#include "setparamscenario.h"
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: setparamsession.cpp 1474 2010-02-07 20:51:47Z achaloyan $
*/
#include "setparamsession.h"
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: synthscenario.cpp 1474 2010-02-07 20:51:47Z achaloyan $
*/
#include <stdlib.h>
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: synthsession.cpp 1586 2010-03-12 19:39:02Z achaloyan $
*/
#include "synthsession.h"
@@ -23,9 +25,14 @@
struct SynthChannel
{
/** MRCP channel */
mrcp_channel_t* m_pMrcpChannel;
/** IN-PROGRESS SPEAK request */
mrcp_message_t* m_pSpeakRequest;
/** File to write audio stream to */
FILE* m_pAudioOut;
SynthChannel() : m_pMrcpChannel(NULL), m_pSpeakRequest(NULL), m_pAudioOut(NULL) {}
};
SynthSession::SynthSession(const SynthScenario* pScenario) :
@@ -58,6 +65,37 @@ bool SynthSession::Start()
return true;
}
bool SynthSession::Stop()
{
if(!UmcSession::Stop())
return false;
if(!m_pSynthChannel)
return false;
mrcp_message_t* pStopMessage = CreateMrcpMessage(m_pSynthChannel->m_pMrcpChannel,SYNTHESIZER_STOP);
if(!pStopMessage)
return false;
if(m_pSynthChannel->m_pSpeakRequest)
{
mrcp_generic_header_t* pGenericHeader;
/* get/allocate generic header */
pGenericHeader = (mrcp_generic_header_t*) mrcp_generic_header_prepare(pStopMessage);
if(pGenericHeader)
{
pGenericHeader->active_request_id_list.count = 1;
pGenericHeader->active_request_id_list.ids[0] =
m_pSynthChannel->m_pSpeakRequest->start_line.request_id;
mrcp_generic_header_property_add(pStopMessage,GENERIC_HEADER_ACTIVE_REQUEST_ID_LIST);
}
m_pSynthChannel->m_pSpeakRequest = NULL;
}
return SendMrcpRequest(m_pSynthChannel->m_pMrcpChannel,pStopMessage);
}
bool SynthSession::OnSessionTerminate(mrcp_sig_status_code_e status)
{
if(m_pSynthChannel)
@@ -93,8 +131,7 @@ SynthChannel* SynthSession::CreateSynthChannel()
apr_pool_t* pool = GetSessionPool();
/* create channel */
SynthChannel *pSynthChannel = new SynthChannel;
pSynthChannel->m_pMrcpChannel = NULL;
SynthChannel* pSynthChannel = new SynthChannel;
/* create sink stream capabilities */
pCapabilities = mpf_sink_stream_capabilities_create(pool);
@@ -128,7 +165,6 @@ SynthChannel* SynthSession::CreateSynthChannel()
}
pSynthChannel->m_pMrcpChannel = pChannel;
pSynthChannel->m_pAudioOut = NULL;
return pSynthChannel;
}
@@ -169,6 +205,10 @@ bool SynthSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_message_t
/* received the response to SPEAK request */
if(pMrcpMessage->start_line.request_state == MRCP_REQUEST_STATE_INPROGRESS)
{
SynthChannel* pSynthChannel = (SynthChannel*) mrcp_application_channel_object_get(pMrcpChannel);
if(pSynthChannel)
pSynthChannel->m_pSpeakRequest = GetMrcpMessage();
/* waiting for SPEAK-COMPLETE event */
}
else
@@ -187,6 +227,9 @@ bool SynthSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_message_t
/* received MRCP event */
if(pMrcpMessage->start_line.method_id == SYNTHESIZER_SPEAK_COMPLETE)
{
SynthChannel* pSynthChannel = (SynthChannel*) mrcp_application_channel_object_get(pMrcpChannel);
if(pSynthChannel)
pSynthChannel->m_pSpeakRequest = NULL;
/* received SPEAK-COMPLETE event, terminate the session */
Terminate();
}
+38 -17
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: umcconsole.cpp 1785 2010-09-22 06:14:29Z achaloyan $
*/
#include <stdio.h>
@@ -37,6 +39,7 @@ bool UmcConsole::Run(int argc, const char * const *argv)
{
apr_pool_t* pool = NULL;
apt_dir_layout_t* pDirLayout = NULL;
const char *logConfPath;
/* APR global initialization */
if(apr_initialize() != APR_SUCCESS)
@@ -63,13 +66,27 @@ bool UmcConsole::Run(int argc, const char * const *argv)
/* create the structure of default directories layout */
pDirLayout = apt_default_dir_layout_create(m_Options.m_RootDirPath,pool);
/* create singleton logger */
apt_log_instance_create(m_Options.m_LogOutput,m_Options.m_LogPriority,pool);
if((m_Options.m_LogOutput & APT_LOG_OUTPUT_FILE) == APT_LOG_OUTPUT_FILE)
/* get path to logger configuration file */
logConfPath = apt_confdir_filepath_get(pDirLayout,"logger.xml",pool);
/* create and load singleton logger */
apt_log_instance_load(logConfPath,pool);
if(m_Options.m_LogPriority)
{
/* override the log priority, if specified in command line */
apt_log_priority_set((apt_log_priority_e)atoi(m_Options.m_LogPriority));
}
if(m_Options.m_LogOutput)
{
/* override the log output mode, if specified in command line */
apt_log_output_mode_set((apt_log_output_e)atoi(m_Options.m_LogOutput));
}
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,pool);
apt_log_file_open(pDirLayout->log_dir_path,"unimrcpclient",MAX_LOG_FILE_SIZE,MAX_LOG_FILE_COUNT,FALSE,pool);
}
/* create demo framework */
@@ -105,7 +122,7 @@ bool UmcConsole::ProcessCmdLine(char* pCmdLine)
const char* pProfileName = apr_strtok(NULL, " ", &last);
if(!pProfileName)
{
pProfileName = "MRCPv2-Default";
pProfileName = "uni2";
}
m_pFramework->RunSession(pScenarioName,pProfileName);
}
@@ -118,6 +135,14 @@ bool UmcConsole::ProcessCmdLine(char* pCmdLine)
m_pFramework->KillSession(pID);
}
}
else if(strcasecmp(name,"stop") == 0)
{
char* pID = apr_strtok(NULL, " ", &last);
if(pID)
{
m_pFramework->StopSession(pID);
}
}
else if(strcasecmp(name,"show") == 0)
{
char* pWhat = apr_strtok(NULL, " ", &last);
@@ -146,12 +171,12 @@ bool UmcConsole::ProcessCmdLine(char* pCmdLine)
printf("usage:\n"
"\n- run [scenario] [profile] (run new session)\n"
" scenario is one of 'synth', 'recog', ... (use 'show scenarios')\n"
" profile is one of 'MRCPv2-Default', 'MRCPv1-Default', ... (see unimrcpclient.xml)\n"
" profile is one of 'uni2', 'uni1', ... (see unimrcpclient.xml)\n"
"\n examples: \n"
" run synth\n"
" run recog\n"
" run synth MRCPv1-Default\n"
" run recog MRCPv1-Default\n"
" run synth uni1\n"
" run recog uni1\n"
"\n- kill [id] (kill session)\n"
" id is a session identifier: 1, 2, ... (use 'show sessions')\n"
"\n example: \n"
@@ -238,8 +263,8 @@ bool UmcConsole::LoadOptions(int argc, const char * const *argv, apr_pool_t *poo
/* set the default options */
m_Options.m_RootDirPath = "../";
m_Options.m_LogPriority = APT_PRIO_INFO;
m_Options.m_LogOutput = APT_LOG_OUTPUT_CONSOLE;
m_Options.m_LogPriority = NULL;
m_Options.m_LogOutput = NULL;
rv = apr_getopt_init(&opt, pool , argc, argv);
if(rv != APR_SUCCESS)
@@ -254,15 +279,11 @@ bool UmcConsole::LoadOptions(int argc, const char * const *argv, apr_pool_t *poo
break;
case 'l':
if(optarg)
{
m_Options.m_LogPriority = (apt_log_priority_e) atoi(optarg);
}
m_Options.m_LogPriority = optarg;
break;
case 'o':
if(optarg)
{
m_Options.m_LogOutput = (apt_log_output_e) atoi(optarg);
}
m_Options.m_LogOutput = optarg;
break;
case 'h':
Usage();
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: umcframework.cpp 1767 2010-08-23 19:10:22Z achaloyan $
*/
#include "umcframework.h"
@@ -21,6 +23,7 @@
#include "recorderscenario.h"
#include "dtmfscenario.h"
#include "setparamscenario.h"
#include "verifierscenario.h"
#include "unimrcp_client.h"
#include "apt_log.h"
@@ -36,6 +39,7 @@ enum UmcTaskMsgType
{
UMC_TASK_CLIENT_MSG,
UMC_TASK_RUN_SESSION_MSG,
UMC_TASK_STOP_SESSION_MSG,
UMC_TASK_KILL_SESSION_MSG,
UMC_TASK_SHOW_SCENARIOS_MSG,
UMC_TASK_SHOW_SESSIONS_MSG
@@ -134,7 +138,7 @@ bool UmcFramework::CreateTask()
return false;
pTask = apt_consumer_task_base_get(m_pTask);
apt_task_name_set(pTask,"Framework Task");
apt_task_name_set(pTask,"Framework Agent");
pVtable = apt_consumer_task_vtable_get(m_pTask);
if(pVtable)
{
@@ -175,6 +179,8 @@ UmcScenario* UmcFramework::CreateScenario(const char* pType)
return new DtmfScenario();
else if(strcasecmp(pType,"Params") == 0)
return new SetParamScenario();
else if(strcasecmp(pType,"Verifier") == 0)
return new VerifierScenario();
}
return NULL;
}
@@ -335,6 +341,24 @@ bool UmcFramework::ProcessRunRequest(const char* pScenarioName, const char* pPro
return true;
}
void UmcFramework::ProcessStopRequest(const char* id)
{
UmcSession* pSession;
void* pVal;
apr_hash_index_t* it = apr_hash_first(m_pPool,m_pSessionTable);
for(; it; it = apr_hash_next(it))
{
apr_hash_this(it,NULL,NULL,&pVal);
pSession = (UmcSession*) pVal;
if(pSession && strcasecmp(pSession->GetId(),id) == 0)
{
/* stop in-progress request */
pSession->Stop();
return;
}
}
}
void UmcFramework::ProcessKillRequest(const char* id)
{
UmcSession* pSession;
@@ -346,7 +370,7 @@ void UmcFramework::ProcessKillRequest(const char* id)
pSession = (UmcSession*) pVal;
if(pSession && strcasecmp(pSession->GetId(),id) == 0)
{
/* first, terminate session */
/* terminate session */
pSession->Terminate();
return;
}
@@ -403,6 +427,22 @@ void UmcFramework::RunSession(const char* pScenarioName, const char* pProfileNam
apt_task_msg_signal(pTask,pTaskMsg);
}
void UmcFramework::StopSession(const char* id)
{
apt_task_t* pTask = apt_consumer_task_base_get(m_pTask);
apt_task_msg_t* pTaskMsg = apt_task_msg_get(pTask);
if(!pTaskMsg)
return;
pTaskMsg->type = TASK_MSG_USER;
pTaskMsg->sub_type = UMC_TASK_STOP_SESSION_MSG;
UmcTaskMsg* pUmcMsg = (UmcTaskMsg*) pTaskMsg->data;
strncpy(pUmcMsg->m_SessionId,id,sizeof(pUmcMsg->m_SessionId)-1);
pUmcMsg->m_pAppMessage = NULL;
apt_task_msg_signal(pTask,pTaskMsg);
}
void UmcFramework::KillSession(const char* id)
{
apt_task_t* pTask = apt_consumer_task_base_get(m_pTask);
@@ -562,6 +602,11 @@ apt_bool_t UmcProcessMsg(apt_task_t *pTask, apt_task_msg_t *pMsg)
pFramework->ProcessRunRequest(pUmcMsg->m_ScenarioName,pUmcMsg->m_ProfileName);
break;
}
case UMC_TASK_STOP_SESSION_MSG:
{
pFramework->ProcessStopRequest(pUmcMsg->m_SessionId);
break;
}
case UMC_TASK_KILL_SESSION_MSG:
{
pFramework->ProcessKillRequest(pUmcMsg->m_SessionId);
+30 -10
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,14 +12,17 @@
* 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: umcscenario.cpp 1571 2010-03-07 20:33:39Z achaloyan $
*/
#include <stdlib.h>
#include "umcscenario.h"
#include "apt_log.h"
UmcScenario::UmcScenario() :
m_pName(NULL),
m_pMrcpProfile("MRCPv2-Default"),
m_pMrcpProfile("uni2"),
m_pDirLayout(NULL),
m_ResourceDiscovery(false),
m_pCapabilities(NULL),
@@ -200,14 +203,31 @@ const char* UmcScenario::LoadFileContent(const char* pFileName, apr_pool_t* pool
if(!pFilePath)
return NULL;
FILE* pFile = fopen(pFilePath,"r");
if(!pFile)
apr_file_t *pFile;
if(apr_file_open(&pFile,pFilePath,APR_FOPEN_READ|APR_FOPEN_BINARY,0,pool) != APR_SUCCESS)
{
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Open File %s",pFilePath);
return NULL;
}
char text[1024];
apr_size_t size;
size = fread(text,1,sizeof(text)-1,pFile);
text[size] = '\0';
fclose(pFile);
return apr_pstrdup(pool,text);
apr_finfo_t finfo;
if(apr_file_info_get(&finfo,APR_FINFO_SIZE,pFile) != APR_SUCCESS)
{
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get File Info %s",pFilePath);
apr_file_close(pFile);
return NULL;
}
apr_size_t 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)
{
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Read Content %s",pFilePath);
apr_file_close(pFile);
return NULL;
}
pContent[size] = '\0';
apr_file_close(pFile);
return pContent;
}
+28 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,16 +12,20 @@
* 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: umcsession.cpp 1695 2010-05-19 18:56:15Z achaloyan $
*/
#include "umcsession.h"
#include "umcscenario.h"
#include "mrcp_message.h"
UmcSession::UmcSession(const UmcScenario* pScenario) :
m_pScenario(pScenario),
m_pMrcpProfile(NULL),
m_pMrcpApplication(NULL),
m_pMrcpSession(NULL),
m_pMrcpMessage(NULL),
m_Running(false),
m_Terminating(false)
{
@@ -69,6 +73,14 @@ bool UmcSession::Run()
return ret;
}
bool UmcSession::Stop()
{
if(m_Terminating)
return false;
return true;
}
bool UmcSession::Terminate()
{
if(m_Terminating)
@@ -105,7 +117,17 @@ bool UmcSession::OnChannelRemove(mrcp_channel_t *channel, mrcp_sig_status_code_e
bool UmcSession::OnMessageReceive(mrcp_channel_t *channel, mrcp_message_t *message)
{
return m_Running;
if(!m_Running)
return false;
if(!m_pMrcpMessage)
return false;
/* match request identifiers */
if(m_pMrcpMessage->start_line.request_id != message->start_line.request_id)
return false;
return true;
}
bool UmcSession::OnTerminateEvent(mrcp_channel_t *channel)
@@ -129,6 +151,9 @@ bool UmcSession::OnResourceDiscover(mrcp_session_descriptor_t* descriptor, mrcp_
bool UmcSession::CreateMrcpSession(const char* pProfileName)
{
m_pMrcpSession = mrcp_application_session_create(m_pMrcpApplication,pProfileName,this);
char name[32];
apr_snprintf(name,sizeof(name),"umc-%s",m_Id);
mrcp_application_session_name_set(m_pMrcpSession,name);
return (m_pMrcpSession != NULL);
}
@@ -163,6 +188,7 @@ bool UmcSession::SendMrcpRequest(mrcp_channel_t* pMrcpChannel, mrcp_message_t* p
if(!m_Running)
return false;
m_pMrcpMessage = pMrcpMessage;
return (mrcp_application_message_send(m_pMrcpSession,pMrcpChannel,pMrcpMessage) == TRUE);
}
@@ -0,0 +1,82 @@
/*
* 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: verifierscenario.cpp 1775 2010-08-26 18:23:38Z achaloyan $
*/
#include <stdlib.h>
#include "verifierscenario.h"
#include "verifiersession.h"
#include "mrcp_message.h"
#include "mrcp_generic_header.h"
#include "mrcp_recog_header.h"
#include "mrcp_recog_resource.h"
#include "apt_log.h"
VerifierScenario::VerifierScenario() :
m_RepositoryURI(NULL),
m_VerificationMode(NULL),
m_VoiceprintIdentifier(NULL)
{
}
VerifierScenario::~VerifierScenario()
{
}
void VerifierScenario::Destroy()
{
}
bool VerifierScenario::LoadElement(const apr_xml_elem* pElem, apr_pool_t* pool)
{
if(UmcScenario::LoadElement(pElem,pool))
return true;
if(strcasecmp(pElem->name,"verify") == 0)
{
LoadVerify(pElem,pool);
return true;
}
return false;
}
bool VerifierScenario::LoadVerify(const apr_xml_elem* pElem, apr_pool_t* pool)
{
const apr_xml_attr* pAttr;
for(pAttr = pElem->attr; pAttr; pAttr = pAttr->next)
{
if(strcasecmp(pAttr->name,"repository-uri") == 0)
{
m_RepositoryURI = pAttr->value;
}
else if(strcasecmp(pAttr->name,"verification-mode") == 0)
{
m_VerificationMode = pAttr->value;
}
else if(strcasecmp(pAttr->name,"voiceprint-identifier") == 0)
{
m_VoiceprintIdentifier = pAttr->value;
}
}
return true;
}
UmcSession* VerifierScenario::CreateSession()
{
return new VerifierSession(this);
}
@@ -0,0 +1,389 @@
/*
* 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: verifiersession.cpp 1778 2010-08-27 17:34:52Z achaloyan $
*/
#include "verifiersession.h"
#include "verifierscenario.h"
#include "mrcp_message.h"
#include "mrcp_generic_header.h"
#include "mrcp_verifier_header.h"
#include "mrcp_verifier_resource.h"
#include "apt_nlsml_doc.h"
#include "apt_log.h"
struct VerifierChannel
{
/** MRCP control channel */
mrcp_channel_t* m_pMrcpChannel;
/** IN-PROGRESS VERIFY request */
mrcp_message_t* m_pVerificationRequest;
/** Streaming is in-progress */
bool m_Streaming;
/** File to read audio stream from */
FILE* m_pAudioIn;
/** Estimated time to complete (used if no audio_in available) */
apr_size_t m_TimeToComplete;
VerifierChannel() :
m_pMrcpChannel(NULL),
m_pVerificationRequest(NULL),
m_Streaming(false),
m_pAudioIn(NULL),
m_TimeToComplete(0) {}
};
VerifierSession::VerifierSession(const VerifierScenario* pScenario) :
UmcSession(pScenario),
m_pVerifierChannel(NULL),
m_ContentId("request1@form-level")
{
}
VerifierSession::~VerifierSession()
{
}
bool VerifierSession::Start()
{
/* create channel and associate all the required data */
m_pVerifierChannel = CreateVerifierChannel();
if(!m_pVerifierChannel)
return false;
/* add channel to session (send asynchronous request) */
if(!AddMrcpChannel(m_pVerifierChannel->m_pMrcpChannel))
{
delete m_pVerifierChannel;
m_pVerifierChannel = NULL;
return false;
}
return true;
}
bool VerifierSession::Stop()
{
if(!UmcSession::Stop())
return false;
if(!m_pVerifierChannel)
return false;
mrcp_message_t* pStopMessage = CreateMrcpMessage(m_pVerifierChannel->m_pMrcpChannel,VERIFIER_STOP);
if(!pStopMessage)
return false;
return SendMrcpRequest(m_pVerifierChannel->m_pMrcpChannel,pStopMessage);
}
bool VerifierSession::OnSessionTerminate(mrcp_sig_status_code_e status)
{
if(m_pVerifierChannel)
{
FILE* pAudioIn = m_pVerifierChannel->m_pAudioIn;
if(pAudioIn)
{
m_pVerifierChannel->m_pAudioIn = NULL;
fclose(pAudioIn);
}
delete m_pVerifierChannel;
m_pVerifierChannel = NULL;
}
return UmcSession::OnSessionTerminate(status);
}
static apt_bool_t ReadStream(mpf_audio_stream_t* pStream, mpf_frame_t* pFrame)
{
VerifierChannel* pVerifierChannel = (VerifierChannel*) pStream->obj;
if(pVerifierChannel && pVerifierChannel->m_Streaming)
{
if(pVerifierChannel->m_pAudioIn)
{
if(fread(pFrame->codec_frame.buffer,1,pFrame->codec_frame.size,pVerifierChannel->m_pAudioIn) == pFrame->codec_frame.size)
{
/* normal read */
pFrame->type |= MEDIA_FRAME_TYPE_AUDIO;
}
else
{
/* file is over */
pVerifierChannel->m_Streaming = false;
}
}
else
{
/* fill with silence in case no file available */
if(pVerifierChannel->m_TimeToComplete >= CODEC_FRAME_TIME_BASE)
{
pFrame->type |= MEDIA_FRAME_TYPE_AUDIO;
memset(pFrame->codec_frame.buffer,0,pFrame->codec_frame.size);
pVerifierChannel->m_TimeToComplete -= CODEC_FRAME_TIME_BASE;
}
else
{
pVerifierChannel->m_Streaming = false;
}
}
}
return TRUE;
}
VerifierChannel* VerifierSession::CreateVerifierChannel()
{
mrcp_channel_t* pChannel;
mpf_termination_t* pTermination;
mpf_stream_capabilities_t* pCapabilities;
apr_pool_t* pool = GetSessionPool();
/* create channel */
VerifierChannel* pVerifierChannel = new VerifierChannel;
/* create source stream capabilities */
pCapabilities = mpf_source_stream_capabilities_create(pool);
GetScenario()->InitCapabilities(pCapabilities);
static const mpf_audio_stream_vtable_t audio_stream_vtable =
{
NULL,
NULL,
NULL,
ReadStream,
NULL,
NULL,
NULL
};
pTermination = CreateAudioTermination(
&audio_stream_vtable, /* virtual methods table of audio stream */
pCapabilities, /* capabilities of audio stream */
pVerifierChannel); /* object to associate */
pChannel = CreateMrcpChannel(
MRCP_VERIFIER_RESOURCE, /* MRCP resource identifier */
pTermination, /* media termination, used to terminate audio stream */
NULL, /* RTP descriptor, used to create RTP termination (NULL by default) */
pVerifierChannel); /* object to associate */
if(!pChannel)
{
delete pVerifierChannel;
return NULL;
}
pVerifierChannel->m_pMrcpChannel = pChannel;
return pVerifierChannel;
}
bool VerifierSession::OnChannelAdd(mrcp_channel_t* pMrcpChannel, mrcp_sig_status_code_e status)
{
if(!UmcSession::OnChannelAdd(pMrcpChannel,status))
return false;
if(status != MRCP_SIG_STATUS_CODE_SUCCESS)
{
/* error case, just terminate the demo */
return Terminate();
}
return StartVerification(pMrcpChannel);
}
bool VerifierSession::OnMessageReceive(mrcp_channel_t* pMrcpChannel, mrcp_message_t* pMrcpMessage)
{
if(!UmcSession::OnMessageReceive(pMrcpChannel,pMrcpMessage))
return false;
VerifierChannel* pVerifierChannel = (VerifierChannel*) mrcp_application_channel_object_get(pMrcpChannel);
if(pMrcpMessage->start_line.message_type == MRCP_MESSAGE_TYPE_RESPONSE)
{
/* received MRCP response */
if(pMrcpMessage->start_line.method_id == VERIFIER_START_SESSION)
{
/* received the response to START-SESSION request */
/* create and send VERIFY request */
mrcp_message_t* pMrcpMessage = CreateVerificationRequest(pMrcpChannel);
if(pMrcpMessage)
{
SendMrcpRequest(pVerifierChannel->m_pMrcpChannel,pMrcpMessage);
}
}
else if(pMrcpMessage->start_line.method_id == VERIFIER_END_SESSION)
{
/* received the response to END-SESSION request */
Terminate();
}
else if(pMrcpMessage->start_line.method_id == VERIFIER_VERIFY)
{
/* received the response to VERIFY request */
if(pMrcpMessage->start_line.request_state == MRCP_REQUEST_STATE_INPROGRESS)
{
VerifierChannel* pVerifierChannel = (VerifierChannel*) mrcp_application_channel_object_get(pMrcpChannel);
if(pVerifierChannel)
pVerifierChannel->m_pVerificationRequest = GetMrcpMessage();
/* start to stream the speech to Verify */
if(pVerifierChannel)
pVerifierChannel->m_Streaming = true;
}
else
{
/* create and send END-SESSION request */
mrcp_message_t* pMrcpMessage = CreateEndSessionRequest(pMrcpChannel);
if(pMrcpMessage)
{
SendMrcpRequest(pVerifierChannel->m_pMrcpChannel,pMrcpMessage);
}
}
}
else
{
/* received unexpected response */
}
}
else if(pMrcpMessage->start_line.message_type == MRCP_MESSAGE_TYPE_EVENT)
{
if(pMrcpMessage->start_line.method_id == VERIFIER_VERIFICATION_COMPLETE)
{
if(pVerifierChannel)
pVerifierChannel->m_Streaming = false;
VerifierChannel* pVerifierChannel = (VerifierChannel*) mrcp_application_channel_object_get(pMrcpChannel);
if(pVerifierChannel)
pVerifierChannel->m_pVerificationRequest = NULL;
/* create and send END-SESSION request */
mrcp_message_t* pMrcpMessage = CreateEndSessionRequest(pMrcpChannel);
if(pMrcpMessage)
{
SendMrcpRequest(pVerifierChannel->m_pMrcpChannel,pMrcpMessage);
}
}
else if(pMrcpMessage->start_line.method_id == VERIFIER_START_OF_INPUT)
{
/* received start-of-input, do whatever you need here */
}
}
return true;
}
bool VerifierSession::StartVerification(mrcp_channel_t* pMrcpChannel)
{
VerifierChannel* pVerifierChannel = (VerifierChannel*) mrcp_application_channel_object_get(pMrcpChannel);
/* create and send Verification request */
mrcp_message_t* pMrcpMessage = CreateStartSessionRequest(pMrcpChannel);
if(pMrcpMessage)
{
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)
{
/* no audio input availble, set some estimated time to complete instead */
pVerifierChannel->m_TimeToComplete = 5000; // 5 sec
}
return true;
}
mrcp_message_t* VerifierSession::CreateStartSessionRequest(mrcp_channel_t* pMrcpChannel)
{
mrcp_message_t* pMrcpMessage = CreateMrcpMessage(pMrcpChannel,VERIFIER_START_SESSION);
if(!pMrcpMessage)
return NULL;
mrcp_verifier_header_t* pVerifierHeader;
/* get/allocate verifier header */
pVerifierHeader = (mrcp_verifier_header_t*) mrcp_resource_header_prepare(pMrcpMessage);
if(pVerifierHeader)
{
const VerifierScenario* pScenario = GetScenario();
const char* pRepositoryURI = pScenario->GetRepositoryURI();
if(pRepositoryURI)
{
apt_string_set(&pVerifierHeader->repository_uri,pRepositoryURI);
mrcp_resource_header_property_add(pMrcpMessage,VERIFIER_HEADER_REPOSITORY_URI);
}
const char* pVoiceprintIdentifier = pScenario->GetVoiceprintIdentifier();
if(pVoiceprintIdentifier)
{
apt_string_set(&pVerifierHeader->voiceprint_identifier,pVoiceprintIdentifier);
mrcp_resource_header_property_add(pMrcpMessage,VERIFIER_HEADER_VOICEPRINT_IDENTIFIER);
}
const char* pVerificationMode = pScenario->GetVerificationMode();
if(pVerificationMode)
{
apt_string_set(&pVerifierHeader->verification_mode,pVerificationMode);
mrcp_resource_header_property_add(pMrcpMessage,VERIFIER_HEADER_VERIFICATION_MODE);
}
}
return pMrcpMessage;
}
mrcp_message_t* VerifierSession::CreateEndSessionRequest(mrcp_channel_t* pMrcpChannel)
{
return CreateMrcpMessage(pMrcpChannel,VERIFIER_END_SESSION);
}
mrcp_message_t* VerifierSession::CreateVerificationRequest(mrcp_channel_t* pMrcpChannel)
{
mrcp_message_t* pMrcpMessage = CreateMrcpMessage(pMrcpChannel,VERIFIER_VERIFY);
if(!pMrcpMessage)
return NULL;
mrcp_verifier_header_t* pVerifierHeader;
/* get/allocate verifier header */
pVerifierHeader = (mrcp_verifier_header_t*) mrcp_resource_header_prepare(pMrcpMessage);
if(pVerifierHeader)
{
pVerifierHeader->no_input_timeout = 5000;
mrcp_resource_header_property_add(pMrcpMessage,VERIFIER_HEADER_NO_INPUT_TIMEOUT);
pVerifierHeader->start_input_timers = TRUE;
mrcp_resource_header_property_add(pMrcpMessage,VERIFIER_HEADER_START_INPUT_TIMERS);
}
return pMrcpMessage;
}
FILE* VerifierSession::GetAudioIn(const mpf_codec_descriptor_t* pDescriptor, apr_pool_t* pool) const
{
const VerifierScenario* pScenario = GetScenario();
const char* pVoiceprintIdentifier = pScenario->GetVoiceprintIdentifier();
if(!pVoiceprintIdentifier)
{
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"No Voiceprint Specified");
return NULL;
}
const char* pFileName = apr_psprintf(pool,"%s-%dkHz.pcm",
pVoiceprintIdentifier,
pDescriptor ? pDescriptor->sampling_rate/1000 : 8);
apt_dir_layout_t* pDirLayout = pScenario->GetDirLayout();
const char* pFilePath = apt_datadir_filepath_get(pDirLayout,pFileName,pool);
if(!pFilePath)
return NULL;
FILE* pFile = fopen(pFilePath,"rb");
if(!pFile)
{
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Cannot Find [%s]",pFilePath);
return NULL;
}
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Set [%s] as Speech Source",pFilePath);
return pFile;
}
+39
View File
@@ -0,0 +1,39 @@
#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 0x2L
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
+52
View File
@@ -339,6 +339,14 @@
RelativePath=".\src\umcsession.cpp"
>
</File>
<File
RelativePath=".\src\verifierscenario.cpp"
>
</File>
<File
RelativePath=".\src\verifiersession.cpp"
>
</File>
</Filter>
<Filter
Name="include"
@@ -401,7 +409,51 @@
RelativePath=".\include\umcsession.h"
>
</File>
<File
RelativePath=".\include\verifierscenario.h"
>
</File>
<File
RelativePath=".\include\verifiersession.h"
>
</File>
</Filter>
<File
RelativePath=".\umc.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>
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: demo_application.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __DEMO_APPLICATION_H__
#define __DEMO_APPLICATION_H__
#ifndef DEMO_APPLICATION_H
#define DEMO_APPLICATION_H
/**
* @file demo_application.h
@@ -58,4 +60,4 @@ demo_application_t* demo_discover_application_create(apr_pool_t *pool);
APT_END_EXTERN_C
#endif /*__DEMO_APPLICATION_H__*/
#endif /* DEMO_APPLICATION_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: demo_framework.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __DEMO_FRAMEWORK_H__
#define __DEMO_FRAMEWORK_H__
#ifndef DEMO_FRAMEWORK_H
#define DEMO_FRAMEWORK_H
/**
* @file demo_framework.h
@@ -50,4 +52,4 @@ apt_bool_t demo_framework_destroy(demo_framework_t *framework);
APT_END_EXTERN_C
#endif /*__DEMO_FRAMEWORK_H__*/
#endif /* DEMO_FRAMEWORK_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,10 +12,12 @@
* 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: demo_util.h 1474 2010-02-07 20:51:47Z achaloyan $
*/
#ifndef __DEMO_UTIL_H__
#define __DEMO_UTIL_H__
#ifndef DEMO_UTIL_H
#define DEMO_UTIL_H
/**
* @file demo_util.h
@@ -42,4 +44,4 @@ mpf_rtp_termination_descriptor_t* demo_rtp_descriptor_create(apr_pool_t *pool);
APT_END_EXTERN_C
#endif /*__DEMO_UTIL_H__*/
#endif /* DEMO_UTIL_H */
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: demo_bypass_application.c 1474 2010-02-07 20:51:47Z achaloyan $
*/
/*
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: demo_discover_application.c 1474 2010-02-07 20:51:47Z achaloyan $
*/
/*
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: demo_framework.c 1571 2010-03-07 20:33:39Z achaloyan $
*/
#include <apr_hash.h>
@@ -21,7 +23,7 @@
#include "apt_consumer_task.h"
#include "apt_log.h"
#define FRAMEWORK_TASK_NAME "Framework Task"
#define FRAMEWORK_TASK_NAME "Framework Agent"
#define MAX_APP_NAME_LENGTH 16
#define MAX_PROFILE_NAME_LENGTH 16
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: demo_recog_application.c 1474 2010-02-07 20:51:47Z achaloyan $
*/
/*
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: demo_synth_application.c 1474 2010-02-07 20:51:47Z achaloyan $
*/
/*
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: demo_util.c 1474 2010-02-07 20:51:47Z achaloyan $
*/
#include "demo_util.h"
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: main.c 1785 2010-09-22 06:14:29Z achaloyan $
*/
#include <stdio.h>
@@ -23,9 +25,9 @@
#include "apt_log.h"
typedef struct {
const char *root_dir_path;
apt_log_priority_e log_priority;
apt_log_output_e log_output;
const char *root_dir_path;
const char *log_priority;
const char *log_output;
} client_options_t;
static apt_bool_t demo_framework_cmdline_process(demo_framework_t *framework, char *cmdline)
@@ -40,7 +42,7 @@ static apt_bool_t demo_framework_cmdline_process(demo_framework_t *framework, ch
if(app_name) {
char *profile_name = apr_strtok(NULL, " ", &last);
if(!profile_name) {
profile_name = "MRCPv2-Default";
profile_name = "uni2";
}
demo_framework_app_run(framework,app_name,profile_name);
}
@@ -58,12 +60,12 @@ static apt_bool_t demo_framework_cmdline_process(demo_framework_t *framework, ch
printf("usage:\n"
"\n- run [app_name] [profile_name] (run demo application)\n"
" app_name is one of 'synth', 'recog', 'bypass', 'discover'\n"
" profile_name is one of 'MRCPv2-Default', 'MRCPv1-Default', ...\n"
" profile_name is one of 'uni2', 'uni1', ...\n"
"\n examples: \n"
" run synth\n"
" run recog\n"
" run synth MRCPv1-Default\n"
" run recog MRCPv1-Default\n"
" run synth uni1\n"
" run recog uni1\n"
"\n- loglevel [level] (set loglevel, one of 0,1...7)\n"
"\n- quit, exit\n");
}
@@ -145,14 +147,10 @@ static apt_bool_t demo_framework_options_load(client_options_t *options, int arg
options->root_dir_path = optarg;
break;
case 'l':
if(optarg) {
options->log_priority = atoi(optarg);
}
options->log_priority = optarg;
break;
case 'o':
if(optarg) {
options->log_output = atoi(optarg);
}
options->log_output = optarg;
break;
case 'h':
usage();
@@ -173,6 +171,7 @@ int main(int argc, const char * const *argv)
apr_pool_t *pool = NULL;
client_options_t options;
apt_dir_layout_t *dir_layout;
const char *log_conf_path;
demo_framework_t *framework;
/* APR global initialization */
@@ -190,8 +189,8 @@ int main(int argc, const char * const *argv)
/* set the default options */
options.root_dir_path = "../";
options.log_priority = APT_PRIO_INFO;
options.log_output = APT_LOG_OUTPUT_CONSOLE;
options.log_priority = NULL;
options.log_output = NULL;
/* load options */
if(demo_framework_options_load(&options,argc,argv,pool) != TRUE) {
@@ -202,12 +201,24 @@ int main(int argc, const char * const *argv)
/* create the structure of default directories layout */
dir_layout = apt_default_dir_layout_create(options.root_dir_path,pool);
/* create singleton logger */
apt_log_instance_create(options.log_output,options.log_priority,pool);
if((options.log_output & APT_LOG_OUTPUT_FILE) == APT_LOG_OUTPUT_FILE) {
/* get path to logger configuration file */
log_conf_path = apt_confdir_filepath_get(dir_layout,"logger.xml",pool);
/* create and load singleton logger */
apt_log_instance_load(log_conf_path,pool);
if(options.log_priority) {
/* override the log priority, if specified in command line */
apt_log_priority_set(atoi(options.log_priority));
}
if(options.log_output) {
/* override the log output mode, if specified in command line */
apt_log_output_mode_set(atoi(options.log_output));
}
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,pool);
apt_log_file_open(dir_layout->log_dir_path,"unimrcpclient",MAX_LOG_FILE_SIZE,MAX_LOG_FILE_COUNT,FALSE,pool);
}
/* create demo framework */
@@ -1,200 +0,0 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="unimrcpclient"
ProjectGUID="{57FAF32E-49FD-491F-895D-132D0D5EFE0A}"
RootNamespace="unimrcpclient"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpclient.vsprops"
>
<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"
AdditionalDependencies="$(UniMRCPClientLibs)"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="1"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpclient.vsprops"
>
<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"
AdditionalDependencies="$(UniMRCPClientLibs)"
LinkTimeCodeGeneration="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="src"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\src\demo_bypass_application.c"
>
</File>
<File
RelativePath=".\src\demo_discover_application.c"
>
</File>
<File
RelativePath=".\src\demo_framework.c"
>
</File>
<File
RelativePath=".\src\demo_recog_application.c"
>
</File>
<File
RelativePath=".\src\demo_synth_application.c"
>
</File>
<File
RelativePath=".\src\demo_util.c"
>
</File>
<File
RelativePath=".\src\main.c"
>
</File>
</Filter>
<Filter
Name="include"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\include\demo_application.h"
>
</File>
<File
RelativePath=".\include\demo_framework.h"
>
</File>
<File
RelativePath=".\include\demo_util.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
@@ -0,0 +1,39 @@
#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 0x2L
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
@@ -326,6 +326,42 @@
>
</File>
</Filter>
<File
RelativePath=".\unimrcpclient.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>
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: main.c 1785 2010-09-22 06:14:29Z achaloyan $
*/
#include <stdlib.h>
@@ -22,10 +24,10 @@
#include "apt_log.h"
typedef struct {
const char *root_dir_path;
apt_bool_t foreground;
apt_log_priority_e log_priority;
apt_log_output_e log_output;
const char *root_dir_path;
apt_bool_t foreground;
const char *log_priority;
const char *log_output;
} server_options_t;
#ifdef WIN32
@@ -98,14 +100,10 @@ static apt_bool_t options_load(server_options_t *options, int argc, const char *
options->root_dir_path = optarg;
break;
case 'l':
if(optarg) {
options->log_priority = atoi(optarg);
}
options->log_priority = optarg;
break;
case 'o':
if(optarg) {
options->log_output = atoi(optarg);
}
options->log_output = optarg;
break;
#ifdef WIN32
case 's':
@@ -135,6 +133,7 @@ int main(int argc, const char * const *argv)
apr_pool_t *pool = NULL;
server_options_t options;
apt_dir_layout_t *dir_layout;
const char *log_conf_path;
/* APR global initialization */
if(apr_initialize() != APR_SUCCESS) {
@@ -152,8 +151,8 @@ int main(int argc, const char * const *argv)
/* set the default options */
options.root_dir_path = "../";
options.foreground = TRUE;
options.log_priority = APT_PRIO_INFO;
options.log_output = APT_LOG_OUTPUT_CONSOLE;
options.log_priority = NULL;
options.log_output = NULL;
/* load options */
if(options_load(&options,argc,argv,pool) != TRUE) {
@@ -164,12 +163,24 @@ int main(int argc, const char * const *argv)
/* create the structure of default directories layout */
dir_layout = apt_default_dir_layout_create(options.root_dir_path,pool);
/* create singleton logger */
apt_log_instance_create(options.log_output,options.log_priority,pool);
/* get path to logger configuration file */
log_conf_path = apt_confdir_filepath_get(dir_layout,"logger.xml",pool);
/* create and load singleton logger */
apt_log_instance_load(log_conf_path,pool);
if((options.log_output & APT_LOG_OUTPUT_FILE) == APT_LOG_OUTPUT_FILE) {
if(options.log_priority) {
/* override the log priority, if specified in command line */
apt_log_priority_set(atoi(options.log_priority));
}
if(options.log_output) {
/* override the log output mode, if specified in command line */
apt_log_output_mode_set(atoi(options.log_output));
}
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,pool);
apt_log_file_open(dir_layout->log_dir_path,"unimrcpserver",MAX_LOG_FILE_SIZE,MAX_LOG_FILE_COUNT,TRUE,pool);
}
if(options.foreground == TRUE) {
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: uni_cmdline.c 1474 2010-02-07 20:51:47Z achaloyan $
*/
#include <stdio.h>
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: uni_daemon.c 1474 2010-02-07 20:51:47Z achaloyan $
*/
#include <apr_signal.h>
@@ -1,5 +1,5 @@
/*
* Copyright 2008 Arsen Chaloyan
* 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.
@@ -12,6 +12,8 @@
* 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: uni_service.c 1474 2010-02-07 20:51:47Z achaloyan $
*/
#include <windows.h>
@@ -1,174 +0,0 @@
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="unimrcpserver"
ProjectGUID="{592CF22D-3F8F-4A77-A174-130D77B7623B}"
RootNamespace="unimrcpserver"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unidebug.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpserver.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(UniMRCPServerLibs)"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="1"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unimrcpserver.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(UniMRCPServerLibs)"
LinkTimeCodeGeneration="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="src"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\src\main.c"
>
</File>
<File
RelativePath=".\src\uni_cmdline.c"
>
</File>
<File
RelativePath=".\src\uni_daemon.c"
>
</File>
<File
RelativePath=".\src\uni_service.c"
>
</File>
</Filter>
<Filter
Name="include"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
@@ -0,0 +1,39 @@
#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 0x2L
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
@@ -298,6 +298,42 @@
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<File
RelativePath=".\unimrcpserver.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>