#include "sttd_recorder.h"
#include "sttd_server.h"
+
+#define CLIENT_CLEAN_UP_TIME 500
+
+
static pthread_mutex_t stte_result_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t stte_result_time_mutex = PTHREAD_MUTEX_INITIALIZER;
static double g_recording_timeout = 60;
+static Ecore_Timer* g_check_client_timer = NULL;
Ecore_Timer* g_recording_timer = NULL;
Ecore_Timer* g_processing_timer = NULL;
return ret;
}
+ g_check_client_timer = ecore_timer_add(CLIENT_CLEAN_UP_TIME, sttd_cleanup_client, NULL);
+ if (NULL == g_check_client_timer) {
+ SLOG(LOG_WARN, TAG_STTD, "[Main Warning] Fail to create timer of client check");
+ }
+
SLOG(LOG_DEBUG, TAG_STTD, "[Server SUCCESS] initialize");
return 0;
sttd_engine_agent_release();
+ if (NULL != g_check_client_timer) {
+ ecore_timer_del(g_check_client_timer);
+ g_check_client_timer = NULL;
+
+ SLOG(LOG_INFO, TAG_STTD, "[INFO] Delete ecore timer handle");
+ }
+
return STTD_ERROR_NONE;
}
#include "stte.h"
-#define CLIENT_CLEAN_UP_TIME 500
-
-static Ecore_Timer* g_check_client_timer = NULL;
-
int stte_main(int argc, char**argv, stte_request_callback_s *callback)
{
SLOG(LOG_DEBUG, TAG_STTD, "===== Start engine");
stt_network_initialize();
- g_check_client_timer = ecore_timer_add(CLIENT_CLEAN_UP_TIME, sttd_cleanup_client, NULL);
- if (NULL == g_check_client_timer) {
- SLOG(LOG_WARN, TAG_STTD, "[Main Warning] Fail to create timer of client check");
- }
-
SLOG(LOG_DEBUG, TAG_STTD, "[Main] stt-service start...");
SLOG(LOG_DEBUG, TAG_STTD, "=====");
SLOG(LOG_ERROR, TAG_STTD, "[Server ERROR] Fail to send speech status");
}
return ret;
-}
+}
\ No newline at end of file