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: mrcp_recorder_engine.c 1706 2010-05-23 14:11:11Z achaloyan $
* $Id: mrcp_recorder_engine.c 2193 2014-10-08 03:44:33Z achaloyan@gmail.com $
*/
/*
@@ -77,7 +77,8 @@ static const mpf_audio_stream_vtable_t audio_stream_vtable = {
NULL,
recorder_stream_open,
recorder_stream_close,
recorder_stream_write
recorder_stream_write,
NULL
};
/** Declaration of recorder channel */
@@ -205,14 +206,22 @@ static apt_bool_t recorder_channel_close(mrcp_engine_channel_t *channel)
/** Open file to record */
static apt_bool_t recorder_file_open(recorder_channel_t *recorder_channel, mrcp_message_t *request)
{
char *file_path;
char *file_name;
mrcp_engine_channel_t *channel = recorder_channel->channel;
const apt_dir_layout_t *dir_layout = channel->engine->dir_layout;
const mpf_codec_descriptor_t *descriptor = mrcp_engine_sink_stream_codec_get(channel);
char *file_name = apr_psprintf(channel->pool,"rec-%dkHz-%s-%"MRCP_REQUEST_ID_FMT".pcm",
descriptor ? descriptor->sampling_rate/1000 : 8,
if(!descriptor) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Get Codec Descriptor "APT_SIDRES_FMT, MRCP_MESSAGE_SIDRES(request));
return FALSE;
}
file_name = apr_psprintf(channel->pool,"rec-%dkHz-%s-%"MRCP_REQUEST_ID_FMT".pcm",
descriptor->sampling_rate/1000,
request->channel_id.session_id.buf,
request->start_line.request_id);
char *file_path = apt_datadir_filepath_get(dir_layout,file_name,channel->pool);
file_path = apt_vardir_filepath_get(dir_layout,file_name,channel->pool);
if(!file_path) {
return FALSE;
}
@@ -222,8 +231,10 @@ static apt_bool_t recorder_file_open(recorder_channel_t *recorder_channel, mrcp_
recorder_channel->audio_out = NULL;
}
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Open Utterance Output File [%s] for Writing",file_path);
recorder_channel->audio_out = fopen(file_path,"wb");
if(!recorder_channel->audio_out) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Open Utterance Output File [%s] for Writing",file_path);
return FALSE;
}