+tts (0.1.62) -- Tue, 14 May 2013
+
+ * Release version 0.1.62 (Kwangyoun Kim <ky85.kim@samsung.com>)
+
+tts (0.1.61-2) -- Tue, 14 May 2013
+
+ * Initialize default language from display language (Dongyeol Lee <dy3.lee@samsung.com>)
+
+tts (0.1.61-1) -- Tue, 07 May 2013
+
+ * Delete code about print (Kwangyoun Kim <ky85.kim@samsung.com>)
+
+tts (0.1.61) -- Thu, 02 May 2013
+
+ * Release version 0.1.61 (Dongyeol Lee <dy3.lee@samsung.com>)
+
+tts (0.1.60-2) -- Thu, 02 May 2013
+
+ * Add to remove timer when daemon is destroyed (Dongyeol Lee <dy3.lee@samsung.com>)
+
+tts (0.1.60-1) -- Fri, 19 Apr 2013
+
+ * Update interrupt scheduling of Screen reader (Dongyeol Lee <dy3.lee@samsung.com>)
+
tts (0.1.60) -- Tue, 16 Apr 2013
* Release version 0.1.60 (Kwangyoun Kim <ky85.kim@samsung.com>)
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] %s", err.message);
- printf("result message : %p\n", result_msg);
+ SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] result message : %p", result_msg);
}
if (NULL != result_msg) {
if (dbus_error_is_set(&err)) {
SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] %s", err.message);
- printf("result message : %p\n", result_msg);
+ SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] result message : %p", result_msg);
}
if (NULL != result_msg) {
}
if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret) {
- printf("fail dbus_bus_request_name()\n");
+ SLOG(LOG_ERROR, TAG_TTSC, "[Dbus ERROR] fail to be primary owner \n");
return TTS_SETTING_ERROR_OPERATION_FAILED;
}
Name: tts
Summary: Text To Speech client library and daemon
-Version: 0.1.60
+Version: 0.1.62
Release: 1
Group: libs
License: Samsung
#include <Ecore_File.h>
#include <runtime_info.h>
+#include <vconf.h>
+
#include "ttsd_main.h"
#include "ttsd_config.h"
#include "ttsd_engine_agent.h"
}
}
+ if (true == is_default_open) {
+ /* Change default language to display language */
+ char* value;
+ value = vconf_get_str(VCONFKEY_LANGSET);
+
+ if (NULL != value) {
+ SLOG(LOG_DEBUG, get_tag(), "[Config] System language : %s", value);
+ strncpy(g_language, value, strlen(g_language));
+ SLOG(LOG_DEBUG, get_tag(), "[Config] Default language : %s", g_language);
+
+ free(value);
+ } else {
+ SLOG(LOG_ERROR, get_tag(), "[Config ERROR] Fail to get system language");
+ }
+ }
+
/* Read speed */
if (EOF == fscanf(config_fp, "%s %d", buf_id, &int_param)) {
fclose(config_fp);
#include <Ecore_File.h>
#include <runtime_info.h>
#include <sys/inotify.h>
+#include <vconf.h>
+
#include "ttsd_main.h"
#include "ttsd_config.h"
#include "ttsd_engine_agent.h"
}
}
+ if (true == is_default_open) {
+ /* Change default language to display language */
+ char* value;
+ value = vconf_get_str(VCONFKEY_LANGSET);
+
+ if (NULL != value) {
+ SLOG(LOG_DEBUG, get_tag(), "[Config] System language : %s", value);
+ strncpy(g_language, value, strlen(g_language));
+ SLOG(LOG_DEBUG, get_tag(), "[Config] Default language : %s", g_language);
+
+ free(value);
+ } else {
+ SLOG(LOG_ERROR, get_tag(), "[Config ERROR] Fail to get system language");
+ }
+ }
+
/* Read speed */
if (EOF == fscanf(config_fp, "%s %d", buf_id, &int_param)) {
fclose(config_fp);
fprintf(fp, "----- Sound list -----\n");
for (i=0 ; i < g_app_list[index].m_wav_data.size() ; i++) {
- fprintf(fp, "[%dth] data size(%ld), uttid(%d), type(%d) \n",
+ fprintf(fp, "[%dth] data size(%d), uttid(%d), type(%d) \n",
i+1, g_app_list[index].m_wav_data[i].data_size, g_app_list[index].m_wav_data[i].utt_id, g_app_list[index].m_wav_data[i].audio_type );
}
fprintf(fp, "----------------------\n");
ret = dbus_bus_request_name(g_conn, g_service_name, DBUS_NAME_FLAG_REPLACE_EXISTING , &err);
if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret) {
- printf("Fail to be primary owner in dbus request. \n");
SLOG(LOG_ERROR, get_tag(), "[Dbus ERROR] fail to be primary owner \n");
return -1;
}
int ret = 0;
ret = g_cur_engine.ttsp_load_engine(g_cur_engine.pdfuncs, g_cur_engine.pefuncs);
if (0 != ret) {
- printf("Fail load '%s' engine", g_cur_engine.engine_path);
- SLOG(LOG_ERROR, get_tag(), "[Engine Agent ERROR] fail to load engine : result(%d)");
+ SLOG(LOG_ERROR, get_tag(), "[Engine Agent ERROR] fail to load engine - %s : result(%d)", g_cur_engine.engine_path, ret);
return TTSD_ERROR_OPERATION_FAILED;
}
if (0 == ret && 0 < g_list_length(voice_list)) {
GList *iter = NULL;
- voice_s* voice;
+ voice_s* voice = NULL;
iter = g_list_first(voice_list);
#define CLIENT_CLEAN_UP_TIME 500
+static Ecore_Timer* g_check_client_timer = NULL;
+
char* get_tag()
{
return "ttsd";
SLOG(LOG_DEBUG, get_tag(), " ");
SLOG(LOG_DEBUG, get_tag(), "===== TTS DAEMON DEFAULT INITIALIZE");
if (!ecore_init()) {
- SLOG(LOG_ERROR, get_tag(), "[Main ERROR] fail ecore_init() \n");
+ SLOG(LOG_ERROR, get_tag(), "[Main ERROR] Fail ecore_init()");
return -1;
}
if (0 != ttsd_initialize()) {
- printf("Fail to initialize tts-daemon \n");
- SLOG(LOG_ERROR, get_tag(), "[Main ERROR] fail to initialize tts-daemon");
+ SLOG(LOG_ERROR, get_tag(), "[Main ERROR] Fail to initialize tts-daemon");
return EXIT_FAILURE;
}
if (0 != ttsd_dbus_open_connection()) {
- printf("Fail to initialize IPC connection \n");
- SLOG(LOG_ERROR, get_tag(), "[Main ERROR] fail to open dbus connection");
+ SLOG(LOG_ERROR, get_tag(), "[Main ERROR] Fail to open dbus connection");
return EXIT_FAILURE;
}
if (0 != ttsd_network_initialize()) {
- SLOG(LOG_ERROR, get_tag(), "[Main ERROR] fail to initialize network");
+ SLOG(LOG_ERROR, get_tag(), "[Main ERROR] Fail to initialize network");
return EXIT_FAILURE;
}
- ecore_timer_add(CLIENT_CLEAN_UP_TIME, ttsd_cleanup_client, NULL);
+ g_check_client_timer = ecore_timer_add(CLIENT_CLEAN_UP_TIME, ttsd_cleanup_client, NULL);
+ if (NULL == g_check_client_timer) {
+ SLOG(LOG_WARN, get_tag(), "[Main Warning] Fail to create timer of client check");
+ }
SLOG(LOG_DEBUG, get_tag(), "[Main] tts-daemon start...\n");
SLOG(LOG_DEBUG, get_tag(), "=====");
SLOG(LOG_DEBUG, get_tag(), " ");
SLOG(LOG_DEBUG, get_tag(), " ");
-
- printf("Start tts-daemon ...\n");
ecore_main_loop_begin();
SLOG(LOG_DEBUG, get_tag(), "===== TTS DAEMON DEFAULT FINALIZE");
+ if (NULL != g_check_client_timer) {
+ ecore_timer_del(g_check_client_timer);
+ }
+
ttsd_network_finalize();
ttsd_dbus_close_connection();
#define CLIENT_CLEAN_UP_TIME 500
+static Ecore_Timer* g_check_client_timer = NULL;
+
char* get_tag()
{
return "ttsdnoti";
}
if (0 != ttsd_initialize()) {
- printf("Fail to initialize tts-daemon-noti \n");
SLOG(LOG_ERROR, get_tag(), "[Main ERROR] fail to initialize tts-daemon-noti");
return EXIT_FAILURE;
}
if (0 != ttsd_dbus_open_connection()) {
- printf("Fail to initialize IPC connection \n");
SLOG(LOG_ERROR, get_tag(), "[Main ERROR] fail to open dbus connection");
return EXIT_FAILURE;
}
return EXIT_FAILURE;
}
- ecore_timer_add(CLIENT_CLEAN_UP_TIME, ttsd_cleanup_client, NULL);
+ g_check_client_timer = ecore_timer_add(CLIENT_CLEAN_UP_TIME, ttsd_cleanup_client, NULL);
+ if (NULL == g_check_client_timer) {
+ SLOG(LOG_WARN, get_tag(), "[Main Warning] Fail to create timer of client check");
+ }
SLOG(LOG_DEBUG, get_tag(), "[Main] start tts-daemon-noti start...");
SLOG(LOG_DEBUG, get_tag(), "=====");
SLOG(LOG_DEBUG, get_tag(), " ");
SLOG(LOG_DEBUG, get_tag(), " ");
-
- printf("Start tts-daemon-noti ...\n");
ecore_main_loop_begin();
SLOG(LOG_DEBUG, get_tag(), "===== TTS DAEMON NOTI FINALIZE");
+ if (NULL != g_check_client_timer) {
+ ecore_timer_del(g_check_client_timer);
+ }
+
ttsd_network_finalize();
ttsd_dbus_close_connection();
#define CLIENT_CLEAN_UP_TIME 500
+static Ecore_Timer* g_check_client_timer = NULL;
+
char* get_tag()
{
return "ttsdsr";
}
if (0 != ttsd_initialize()) {
- printf("Fail to initialize tts-daemon-sr \n");
SLOG(LOG_ERROR, get_tag(), "[Main ERROR] fail to initialize tts-daemon-sr");
return EXIT_FAILURE;
}
if (0 != ttsd_dbus_open_connection()) {
- printf("Fail to initialize IPC connection \n");
SLOG(LOG_ERROR, get_tag(), "[Main ERROR] fail to open dbus connection");
return EXIT_FAILURE;
}
return EXIT_FAILURE;
}
- ecore_timer_add(CLIENT_CLEAN_UP_TIME, ttsd_cleanup_client, NULL);
+ g_check_client_timer = ecore_timer_add(CLIENT_CLEAN_UP_TIME, ttsd_cleanup_client, NULL);
+ if (NULL == g_check_client_timer) {
+ SLOG(LOG_WARN, get_tag(), "[Main Warning] Fail to create timer of client check");
+ }
SLOG(LOG_DEBUG, get_tag(), "[Main] tts-daemon-sr start...\n");
SLOG(LOG_DEBUG, get_tag(), "=====");
SLOG(LOG_DEBUG, get_tag(), " ");
SLOG(LOG_DEBUG, get_tag(), " ");
-
- printf("Start tts-daemon-sr...\n");
ecore_main_loop_begin();
SLOG(LOG_DEBUG, get_tag(), "===== TTS DAEMON SR FINALIZE");
+ if (NULL != g_check_client_timer) {
+ ecore_timer_del(g_check_client_timer);
+ }
+
ttsd_network_finalize();
ttsd_dbus_close_connection();
SLOG(LOG_DEBUG, get_tag(), "[PLAYER] State changed : state(%d)", player_state);
- int ret = -1;
/* destroy player */
switch (player_state) {
case MM_PLAYER_STATE_PLAYING:
if (NULL != uid) {
int pid = ttsd_data_get_pid(*uid);
- /* send message to client about changing state */
- ttsdc_send_set_state_message (pid, *uid, APP_STATE_PAUSED);
+
+ if (TTSD_MODE_SCREEN_READER == ttsd_get_mode()) {
+ /* send message to client about changing state */
+ ttsdc_send_set_state_message (pid, *uid, APP_STATE_READY);
+ } else {
+ ttsdc_send_set_state_message (pid, *uid, APP_STATE_PAUSED);
+ }
free(uid);
- }
+ }
return EINA_FALSE;
}
int current_uid = ttsd_data_get_current_playing();
if (uid != current_uid && -1 != current_uid) {
- /* Send interrupt message */
- SLOG(LOG_DEBUG, get_tag(), "[Server] Old uid(%d) will be interrupted into 'Pause' state ", current_uid);
+ if (TTSD_MODE_SCREEN_READER == ttsd_get_mode()) {
+ /* Send interrupt message */
+ SLOG(LOG_DEBUG, get_tag(), "[Server] Old uid(%d) will be interrupted into 'Stop' state ", current_uid);
+
+ /* pause player */
+ if (0 != ttsd_server_stop(current_uid)) {
+ SLOG(LOG_WARN, get_tag(), "[Server ERROR] fail to stop : uid (%d)", current_uid);
+ }
+
+ int* temp_uid = (int*)malloc(sizeof(int));
+ *temp_uid = current_uid;
+ ecore_timer_add(0, __send_interrupt_client, temp_uid);
+ } else {
+ /* Send interrupt message */
+ SLOG(LOG_DEBUG, get_tag(), "[Server] Old uid(%d) will be interrupted into 'Pause' state ", current_uid);
- /* pause player */
- if (0 != ttsd_player_pause(current_uid)) {
- SLOG(LOG_WARN, get_tag(), "[Server ERROR] fail to ttsd_player_pause() : uid (%d)", current_uid);
- }
+ /* pause player */
+ if (0 != ttsd_player_pause(current_uid)) {
+ SLOG(LOG_WARN, get_tag(), "[Server ERROR] fail to ttsd_player_pause() : uid (%d)", current_uid);
+ }
- /* change state */
- ttsd_data_set_client_state(current_uid, APP_STATE_PAUSED);
+ /* change state */
+ ttsd_data_set_client_state(current_uid, APP_STATE_PAUSED);
- int* temp_uid = (int*)malloc(sizeof(int));
- *temp_uid = current_uid;
- ecore_timer_add(0, __send_interrupt_client, temp_uid);
+ int* temp_uid = (int*)malloc(sizeof(int));
+ *temp_uid = current_uid;
+ ecore_timer_add(0, __send_interrupt_client, temp_uid);
+ }
}
/* Change current play */