FS-6450 [unimrcp] Update library

[apr] Backport APR_RING_FOREACH and APR_RING_FOREACH_SAFE macros to APR for unimrcp compatibility.

 [unimrcp] configure.gnu - need full path, not relative path for library paths

 [unimrcp] added uni_revision.h - couldn't get it to autogenerate from build

 [mod_unimrcp] add better logging and error checking on module load.  Currently dumps core on MRCPv1 TTS attempt

 [mod_unimrcp] don't configure MRCPv1 session with a connection agent- causes crash
This commit is contained in:
Chris Rienzo committed 2014-11-18 14:23:54 -05:00
1 parent f198d82bac
commit 8330336e9a
533 files changed
+16386 -18997

No files matched your search

@@ -1,5 +1,5 @@
/*
* Copyright 2008-2010 Arsen Chaloyan
* Copyright 2008-2014 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* $Id: demo_verifier_engine.c 1776 2010-08-27 16:36:38Z achaloyan $
* $Id: demo_verifier_engine.c 2193 2014-10-08 03:44:33Z achaloyan@gmail.com $
*/
/*
@@ -80,7 +80,8 @@ static const mpf_audio_stream_vtable_t audio_stream_vtable = {
NULL,
demo_verifier_stream_open,
demo_verifier_stream_close,
demo_verifier_stream_write
demo_verifier_stream_write,
NULL
};
/** Declaration of demo verification engine */
@@ -261,6 +262,14 @@ static apt_bool_t demo_verifier_channel_verify(mrcp_engine_channel_t *channel, m
/* process verify request */
mrcp_verifier_header_t *verifier_header;
demo_verifier_channel_t *verifier_channel = channel->method_obj;
const mpf_codec_descriptor_t *descriptor = mrcp_engine_sink_stream_codec_get(channel);
if(!descriptor) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Codec Descriptor "APT_SIDRES_FMT, MRCP_MESSAGE_SIDRES(request));
response->start_line.status_code = MRCP_STATUS_CODE_METHOD_FAILED;
return FALSE;
}
verifier_channel->timers_started = TRUE;
/* get verifier header */
@@ -279,13 +288,16 @@ static apt_bool_t demo_verifier_channel_verify(mrcp_engine_channel_t *channel, m
if(!verifier_channel->audio_out) {
const apt_dir_layout_t *dir_layout = channel->engine->dir_layout;
const mpf_codec_descriptor_t *descriptor = mrcp_engine_sink_stream_codec_get(channel);
char *file_name = apr_psprintf(channel->pool,"voiceprint-%dkHz-%s.pcm",
descriptor ? descriptor->sampling_rate/1000 : 8,
request->channel_id.session_id.buf);
char *file_path = apt_datadir_filepath_get(dir_layout,file_name,channel->pool);
descriptor->sampling_rate/1000,
request->channel_id.session_id.buf);
char *file_path = apt_vardir_filepath_get(dir_layout,file_name,channel->pool);
if(file_path) {
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Open Utterance Output File [%s] for Writing",file_path);
verifier_channel->audio_out = fopen(file_path,"wb");
if(!verifier_channel->audio_out) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Open Utterance Output File [%s] for Writing",file_path);
}
}
}