From: Kwangyoun Kim Date: Tue, 5 Feb 2013 12:36:35 +0000 (+0900) Subject: Fix bug(Nabi S1-12186) and add smack rule X-Git-Tag: submit/tizen_2.1/20130424.234321~9^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ee0f6a62ae1b59d177897e4c1dc2ee134a43c31;p=platform%2Fcore%2Fuifw%2Ftts.git Fix bug(Nabi S1-12186) and add smack rule Change-Id: I2d5f78ca96333f2c631199390bab42faa1b316af --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 19ad256a..b163e212 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,4 +17,4 @@ ADD_SUBDIRECTORY(client) ADD_SUBDIRECTORY(server) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.APLv2 RENAME tts DESTINATION /usr/share/license) - +INSTALL(FILES ${CMAKE_SOURCE_DIR}/tts-server.rule DESTINATION /etc/smack/accesses2.d) diff --git a/changelog b/changelog new file mode 100755 index 00000000..f1f8bba5 --- /dev/null +++ b/changelog @@ -0,0 +1,367 @@ +tts (0.1.1-47) + + * Fix bug (Nabi S1-12186) + * Add smack rule + * Fix player sync problem + + -- Kwangyoun Kim Tue, 05 Feb 2013 + +tts (0.1.1-46slp2+1) unstable; urgency=low + + * Fix for GCC 4.7 + + -- Kwangyoun Kim Tue, 29 Jan 2013 17:00:41 +0900 + +tts (0.1.1-45slp2+1) unstable; urgency=low + + * Fix PLM issue(P121126-2493) + + -- Kwangyoun Kim Mon, 28 Jan 2013 17:07:57 +0900 + +tts (0.1.1-44slp2+1) unstable; urgency=low + + * Fix PLM issue(P130121-3243) + * Add Daemon termination + + -- Kwangyoun Kim Thu, 24 Jan 2013 17:52:28 +0900 + +tts (0.1.1-43slp2+1) unstable; urgency=low + + * Change license and notice file + + -- Kwangyoun Kim Wed, 23 Jan 2013 14:45:07 +0900 + +tts (0.1.1-42slp2+1) unstable; urgency=low + + * Fix prevent issue + * Change license file + + -- Kwangyoun Kim Tue, 15 Jan 2013 11:30:30 +0900 + +tts (0.1.1-41slp2+1) unstable; urgency=low + + * Fix prevent issue + * Fix bug when engine result is NULL + * Change config path + + -- Dongyeol Lee Tue, 18 Dec 2012 12:16:38 +0900 + +tts (0.1.1-40slp2+1) unstable; urgency=low + + * Fix prevent + * Git: framework/uifw/voice/tts + + -- Dongyeol Lee Tue, 04 Dec 2012 16:40:08 +0900 + +tts (0.1.1-39slp2+1) unstable; urgency=low + + * Remove dependency of openssl + * Fix bug of config + * Git: framework/uifw/voice/tts + * Tag: tts_0.1.1-39slp2+1 + + -- Dongyeol Lee Thu, 22 Nov 2012 16:31:53 +0900 + +tts (0.1.1-38slp2+1) unstable; urgency=low + + * Add manifest and license file + * Add tag for binary merge + * Git: framework/uifw/voice/tts + * Tag: tts_0.1.1-38slp2+1 + + -- Dongyeol Lee Wed, 10 Oct 2012 14:48:46 +0900 + +tts (0.1.1-37slp2+1) unstable; urgency=low + + * Fix the bug of player BS + * Git: framework/uifw/voice/tts + * Tag: tts_0.1.1-37slp2+1 + + -- Dongyeol Lee Thu, 16 Aug 2012 11:30:47 +0900 + +tts (0.1.1-36slp2+1) unstable; urgency=low + + * Update Setting API for async init + * Git: slp/pkgs/t/tts + * Tag: tts_0.1.1-36slp2+1 + + -- Dongyeol Lee Mon, 06 Aug 2012 19:30:59 +0900 + +tts (0.1.1-35slp2+1) unstable; urgency=low + + * Remove fd write option of dbus in client lib + * Git: slp/pkgs/t/tts + * Tag: tts_0.1.1-35slp2+1 + + -- Dongyeol Lee Tue, 31 Jul 2012 10:17:11 +0900 + +tts (0.1.1-34slp2+1) unstable; urgency=low + + * Fix the bug of setting client management + * Git: slp/pkgs/t/tts + * Tag: tts_0.1.1-34slp2+1 + + -- Dongyeol Lee Tue, 24 Jul 2012 13:47:43 +0900 + +tts (0.1.1-33slp2+1) unstable; urgency=low + + * Update API for async init + * Git: slp/pkgs/t/tts + * Tag: tts_0.1.1-33slp2+1 + + -- Dongyeol Lee Mon, 04 Jun 2012 19:48:29 +0900 + +tts (0.1.1-32slp2+1) unstable; urgency=low + + * Add config file + * Git: slp/pkgs/t/tts + * Tag: tts_0.1.1-32slp2+1 + + -- Dongyeol Lee Thu, 24 May 2012 14:50:30 +0900 + +tts (0.1.1-31slp2+1) unstable; urgency=low + + * update config not to depend on VConf + * Git: slp/pkgs/t/tts + * Tag: tts_0.1.1-31slp2+1 + + -- Dongyeol Lee Fri, 18 May 2012 18:56:19 +0900 + +tts (0.1.1-30slp2+1) unstable; urgency=low + + * fix bug about fork daemon + * Git: slp/pkgs/t/tts + * Tag: tts_0.1.1-30slp2+1 + + -- Dongyeol Lee Mon, 26 Mar 2012 15:48:37 +0900 + +tts (0.1.1-29slp2+1) unstable; urgency=low + + * udpate changelog + * Git: slp/pkgs/t/tts + * Tag: tts_0.1.1-29slp2+1 + + -- Dongyeol Lee Mon, 19 Mar 2012 19:20:22 +0900 + +tts (0.1.1-28slp2+1) unstable; urgency=low + + * udpate setting api + * Git: slp/pkgs/t/tts + * Tag: tts_0.1.1-28slp2+1 + + -- Dongyeol Lee Mon, 19 Mar 2012 11:37:32 +0900 + +tts (0.1.1-27slp2+1) unstable; urgency=low + + * fix IPC bug + * Git: slp/pkgs/t/tts + * Tag: tts_0.1.1-27slp2+1 + + -- Dongyeol Lee Wed, 14 Mar 2012 16:14:08 +0900 + +tts (0.1.1-26slp2+1) unstable; urgency=low + + * beta release + * Git: slp/pkgs/t/tts + * Tag: tts_0.1.1-26slp2+1 + + -- Dongyeol Lee Fri, 17 Feb 2012 17:42:12 +0900 + +tts (0.1.1-25slp2+1) unstable; urgency=low + + * fix player bug and update doxygen + * Git: slp/pkgs/t/tts + * Tag: tts_0.1.1-25slp2+1 + + -- Dongyeol Lee Fri, 17 Feb 2012 10:45:28 +0900 + +tts (0.1.1-24slp2+1) unstable; urgency=low + + * update engine api + * Git: slp/pkgs/t/tts + * Tag: tts_0.1.1-24slp2+1 + + -- Dongyeol Lee Thu, 05 Jan 2012 15:53:48 +0900 + +tts (0.1.1-23slp2+1) unstable; urgency=low + + * update changelog + * Git: slp/pkgs/t/tts + * Tag: tts_0.1.1-23slp2+1 + + -- Dongyeol Lee Mon, 19 Dec 2011 13:50:50 +0900 + +tts (0.1.1-22slp2+1) unstable; urgency=low + + * code cleanup and update log + * Git: slp/pkgs/t/tts + * Tag: tts_0.1.1-22slp2+1 + + -- Dongyeol Lee Fri, 16 Dec 2011 15:56:08 +0900 + +tts (0.1.1-21slp2+1) unstable; urgency=low + + * code cleanup and update log + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-21slp2+1 + + -- Dongyeol Lee Tue, 06 Dec 2011 19:01:19 +0900 + +tts (0.1.1-20slp2+1) unstable; urgency=low + + * change boiler plate + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-20slp2+1 + + -- Dongyeol Lee Fri, 02 Dec 2011 10:52:46 +0900 + +tts (0.1.1-19slp2+1) unstable; urgency=low + + * update for connman + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-19slp2+1 + + -- Dongyeol Lee Tue, 29 Nov 2011 16:14:14 +0900 + +tts (0.1.1-18slp2+1) unstable; urgency=low + + * bug fix about unref message + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-18slp2+1 + + -- Dongyeol Lee Wed, 23 Nov 2011 15:34:46 +0900 + +tts (0.1.1-17slp2+1) unstable; urgency=low + + * update API : change sync function and use add_text in 'Play' state + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-17slp2+1 + + -- Dongyeol Lee Wed, 16 Nov 2011 11:28:03 +0900 + +tts (0.1.1-16slp2+1) unstable; urgency=low + + * update Setting API + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-16slp2+1 + + -- Dongyeol Lee Tue, 01 Nov 2011 11:24:58 +0900 + +tts (0.1.1-15slp2+1) unstable; urgency=low + + * update API doxygen and fix bug about initial default voice + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-15slp2+1 + + -- Dongyeol Lee Thu, 27 Oct 2011 11:06:49 +0900 + +tts (0.1.1-14slp2+1) unstable; urgency=low + + * change API for SDK release + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-14slp2+1 + + -- Dongyeol Lee Fri, 21 Oct 2011 16:42:51 +0900 + +tts (0.1.1-13slp2+1) unstable; urgency=low + + * update API's new callback + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-13slp2+1 + + -- Dongyeol Lee Thu, 20 Oct 2011 17:49:13 +0900 + +tts (0.1.1-12slp2+1) unstable; urgency=low + + * update new API for sdk release and change boilerplate + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-12slp2+1 + + -- Dongyeol Lee Wed, 19 Oct 2011 16:31:50 +0900 + +tts (0.1.1-11slp2+1) unstable; urgency=low + + * update bug of prevent and remove dependency of gtk + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-11slp2+1 + + -- Dongyeol Lee Wed, 07 Sep 2011 14:47:34 +0900 + +tts (0.1.1-10slp2+1) unstable; urgency=low + + * update build file + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-10slp2+1 + + -- Dongyeol Lee Tue, 19 Jul 2011 16:15:13 +0900 + +tts (0.1.1-9slp2+1) unstable; urgency=low + + * update build file + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-9slp2+1 + + -- Dongyeol Lee Mon, 18 Jul 2011 10:27:52 +0900 + +tts (0.1.1-8slp2+1) unstable; urgency=low + + * Change IPC and Code Cleanup + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-8slp2+1 + + -- Dongyeol Lee Fri, 15 Jul 2011 18:01:31 +0900 + +tts (0.1.1-7slp2+1) unstable; urgency=low + + * support multi instance + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-7slp2+1 + + -- Dongyeol Lee Fri, 24 Jun 2011 14:36:36 +0900 + +tts (0.1.1-6slp2+1) unstable; urgency=low + + * fix defect from prevent + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-6slp2+1 + + -- Dongyeol Lee Tue, 07 Jun 2011 17:05:49 +0900 + +tts (0.1.1-5slp2+1) unstable; urgency=low + + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-5slp2+1 + + -- Dongyeol Lee Mon, 23 May 2011 15:14:10 +0900 + +tts (0.1.1-4slp2+1) unstable; urgency=low + + * Change API - change error code + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-4slp2+1 + + -- Dongyeol Lee Mon, 23 May 2011 09:00:57 +0900 + +tts (0.1.1-3slp2+1) unstable; urgency=low + + * change control file + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-3slp2+1 + + -- Jae-Yong Lee Mon, 16 May 2011 10:45:01 +0900 + +tts (0.1.1-2slp2+1) unstable; urgency=low + + * Initial Release (change files to unix type). + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-2slp2+1 + + -- Jae-Yong Lee Mon, 16 May 2011 10:11:02 +0900 + +tts (0.1.1-1slp2+1) unstable; urgency=low + + * Initial Release. + * Git: 165.213.180.234:slp/pkgs/t/tts + * Tag: tts_0.1.1-1slp2+1 + + -- Jae-Yong Lee Fri, 13 May 2011 16:15:22 +0900 diff --git a/client/tts.c b/client/tts.c index 97928628..2b673245 100755 --- a/client/tts.c +++ b/client/tts.c @@ -26,6 +26,8 @@ static bool g_is_daemon_started = false; +static Ecore_Timer* g_connect_timer = NULL; + /* Function definition */ static int __tts_check_tts_daemon(); static Eina_Bool __tts_notify_state_changed(void *data); @@ -86,6 +88,12 @@ int tts_destroy(tts_h tts) return TTS_ERROR_INVALID_PARAMETER; } + /* check used callback */ + if (0 != tts_client_get_use_callback(client)) { + SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Cannot destroy in Callback function"); + return TTS_ERROR_OPERATION_FAILED; + } + int ret = -1; /* check state */ @@ -100,6 +108,10 @@ int tts_destroy(tts_h tts) } g_is_daemon_started = false; case TTS_STATE_CREATED: + if (NULL != g_connect_timer) { + SLOG(LOG_DEBUG, TAG_TTSC, "Connect Timer is deleted"); + ecore_timer_del(g_connect_timer); + } /* Free resources */ tts_client_destroy(tts); break; @@ -109,7 +121,7 @@ int tts_destroy(tts_h tts) if (0 != tts_dbus_close_connection()) { SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to close connection"); } - } + } SLOG(LOG_DEBUG, TAG_TTSC, "====="); SLOG(LOG_DEBUG, TAG_TTSC, " "); @@ -247,6 +259,8 @@ static Eina_Bool __tts_connect_daemon(void *data) ecore_timer_add(0, __tts_notify_state_changed, (void*)client->tts); + g_connect_timer = NULL; + SLOG(LOG_DEBUG, TAG_TTSC, "[SUCCESS] uid(%d)", client->uid); SLOG(LOG_DEBUG, TAG_TTSC, "====="); @@ -277,7 +291,7 @@ int tts_prepare(tts_h tts) return TTS_ERROR_INVALID_STATE; } - ecore_timer_add(0, __tts_connect_daemon, (void*)tts); + g_connect_timer = ecore_timer_add(0, __tts_connect_daemon, (void*)tts); SLOG(LOG_DEBUG, TAG_TTSC, "====="); SLOG(LOG_DEBUG, TAG_TTSC, " "); diff --git a/client/tts_client.c b/client/tts_client.c index f0346dde..501bfbff 100755 --- a/client/tts_client.c +++ b/client/tts_client.c @@ -189,3 +189,8 @@ int tts_client_not_use_callback(tts_client_s* client) client->cb_ref_count--; return 0; } + +int tts_client_get_use_callback(tts_client_s* client) +{ + return client->cb_ref_count; +} \ No newline at end of file diff --git a/client/tts_client.h b/client/tts_client.h index 11856f19..e8eb89a3 100755 --- a/client/tts_client.h +++ b/client/tts_client.h @@ -67,6 +67,8 @@ int tts_client_use_callback(tts_client_s* client); int tts_client_not_use_callback(tts_client_s* client); +int tts_client_get_use_callback(tts_client_s* client); + #ifdef __cplusplus } #endif diff --git a/client/tts_setting.c b/client/tts_setting.c index 020314b1..0f4f5585 100755 --- a/client/tts_setting.c +++ b/client/tts_setting.c @@ -24,6 +24,8 @@ static bool g_is_daemon_started = false; +static Ecore_Timer* g_setting_connect_timer = NULL; + static int __check_setting_tts_daemon(); static tts_setting_state_e g_state = TTS_SETTING_STATE_NONE; @@ -72,6 +74,8 @@ static Eina_Bool __tts_setting_connect_daemon(void *data) ecore_timer_add(0, __tts_setting_initialized, NULL); + g_setting_connect_timer = NULL; + SLOG(LOG_DEBUG, TAG_TTSC, "====="); SLOG(LOG_DEBUG, TAG_TTSC, " "); @@ -156,7 +160,7 @@ int tts_setting_initialize_async(tts_setting_initialized_cb callback, void* user g_initialized_cb = callback; g_user_data = user_data; - ecore_timer_add(0, __tts_setting_connect_daemon, NULL); + g_setting_connect_timer = ecore_timer_add(0, __tts_setting_connect_daemon, NULL); SLOG(LOG_DEBUG, TAG_TTSC, "====="); SLOG(LOG_DEBUG, TAG_TTSC, " "); @@ -169,21 +173,20 @@ int tts_setting_finalize() { SLOG(LOG_DEBUG, TAG_TTSC, "===== Finalize TTS Setting"); + int ret = 0; + if (TTS_SETTING_STATE_NONE == g_state) { - SLOG(LOG_WARN, TAG_TTSC, "[WARNING] Not initialized"); - SLOG(LOG_DEBUG, TAG_TTSC, "====="); - SLOG(LOG_DEBUG, TAG_TTSC, " "); - return TTS_SETTING_ERROR_INVALID_STATE; + ret = tts_setting_dbus_request_finalilze(); + if (0 != ret) { + SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] result : %d", ret); + } } - int ret = tts_setting_dbus_request_finalilze(); - if (0 != ret) { - SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] result : %d", ret); - SLOG(LOG_DEBUG, TAG_TTSC, "====="); - SLOG(LOG_DEBUG, TAG_TTSC, " "); - - return TTS_SETTING_ERROR_OPERATION_FAILED; + if (NULL != g_setting_connect_timer) { + SLOG(LOG_DEBUG, TAG_TTSC, "Setting Connect Timer is remained"); + ecore_timer_del(g_setting_connect_timer); } + g_is_daemon_started = false; if (0 != tts_setting_dbus_close_connection()) { diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index ac0d5532..00000000 --- a/debian/changelog +++ /dev/null @@ -1,360 +0,0 @@ -tts (0.1.1-46slp2+1) unstable; urgency=low - - * Fix makefile for GCC 4.7 - - -- Kwangyoun Kim Tue, 29 Jan 2013 17:24:23 +0900 - -tts (0.1.1-45slp2+1) unstable; urgency=low - - * Fix PLM issue(P121126-2493) - * API is added - - -- Kwangyoun Kim Mon, 28 Jan 2013 17:31:31 +0900 - -tts (0.1.1-44slp2+1) unstable; urgency=low - - * Fix PLM issue(P130121-3243) - * Add Daemon termination - - -- Kwangyoun Kim Thu, 24 Jan 2013 18:08:17 +0900 - -tts (0.1.1-43slp2+1) unstable; urgency=low - - * Change License and notice file - - -- Kwangyoun Kim Wed, 23 Jan 2013 15:15:44 +0900 - -tts (0.1.1-42slp2+1) unstable; urgency=low - - * Fix prevent issue - * Change license file - - -- Kwangyoun Kim Tue, 15 Jan 2013 13:09:08 +0900 - -tts (0.1.1-41slp2+1) unstable; urgency=low - - * Fix prevent issue - * Fix bug when engine result is NULL - * Change config path - - -- Dongyeol Lee Tue, 18 Dec 2012 12:16:38 +0900 - -tts (0.1.1-40slp2+1) unstable; urgency=low - - * Fix prevent - * Git: framework/uifw/voice/tts - - -- Dongyeol Lee Tue, 04 Dec 2012 16:40:08 +0900 - -tts (0.1.1-39slp2+1) unstable; urgency=low - - * Remove dependency of openssl - * Fix bug of config - * Git: framework/uifw/voice/tts - * Tag: tts_0.1.1-39slp2+1 - - -- Dongyeol Lee Thu, 22 Nov 2012 16:31:53 +0900 - -tts (0.1.1-38slp2+1) unstable; urgency=low - - * Add manifest and license file - * Add tag for binary merge - * Git: framework/uifw/voice/tts - * Tag: tts_0.1.1-38slp2+1 - - -- Dongyeol Lee Wed, 10 Oct 2012 14:48:46 +0900 - -tts (0.1.1-37slp2+1) unstable; urgency=low - - * Fix the bug of player BS - * Git: framework/uifw/voice/tts - * Tag: tts_0.1.1-37slp2+1 - - -- Dongyeol Lee Thu, 16 Aug 2012 11:30:47 +0900 - -tts (0.1.1-36slp2+1) unstable; urgency=low - - * Update Setting API for async init - * Git: slp/pkgs/t/tts - * Tag: tts_0.1.1-36slp2+1 - - -- Dongyeol Lee Mon, 06 Aug 2012 19:30:59 +0900 - -tts (0.1.1-35slp2+1) unstable; urgency=low - - * Remove fd write option of dbus in client lib - * Git: slp/pkgs/t/tts - * Tag: tts_0.1.1-35slp2+1 - - -- Dongyeol Lee Tue, 31 Jul 2012 10:17:11 +0900 - -tts (0.1.1-34slp2+1) unstable; urgency=low - - * Fix the bug of setting client management - * Git: slp/pkgs/t/tts - * Tag: tts_0.1.1-34slp2+1 - - -- Dongyeol Lee Tue, 24 Jul 2012 13:47:43 +0900 - -tts (0.1.1-33slp2+1) unstable; urgency=low - - * Update API for async init - * Git: slp/pkgs/t/tts - * Tag: tts_0.1.1-33slp2+1 - - -- Dongyeol Lee Mon, 04 Jun 2012 19:48:29 +0900 - -tts (0.1.1-32slp2+1) unstable; urgency=low - - * Add config file - * Git: slp/pkgs/t/tts - * Tag: tts_0.1.1-32slp2+1 - - -- Dongyeol Lee Thu, 24 May 2012 14:50:30 +0900 - -tts (0.1.1-31slp2+1) unstable; urgency=low - - * update config not to depend on VConf - * Git: slp/pkgs/t/tts - * Tag: tts_0.1.1-31slp2+1 - - -- Dongyeol Lee Fri, 18 May 2012 18:56:19 +0900 - -tts (0.1.1-30slp2+1) unstable; urgency=low - - * fix bug about fork daemon - * Git: slp/pkgs/t/tts - * Tag: tts_0.1.1-30slp2+1 - - -- Dongyeol Lee Mon, 26 Mar 2012 15:48:37 +0900 - -tts (0.1.1-29slp2+1) unstable; urgency=low - - * udpate changelog - * Git: slp/pkgs/t/tts - * Tag: tts_0.1.1-29slp2+1 - - -- Dongyeol Lee Mon, 19 Mar 2012 19:20:22 +0900 - -tts (0.1.1-28slp2+1) unstable; urgency=low - - * udpate setting api - * Git: slp/pkgs/t/tts - * Tag: tts_0.1.1-28slp2+1 - - -- Dongyeol Lee Mon, 19 Mar 2012 11:37:32 +0900 - -tts (0.1.1-27slp2+1) unstable; urgency=low - - * fix IPC bug - * Git: slp/pkgs/t/tts - * Tag: tts_0.1.1-27slp2+1 - - -- Dongyeol Lee Wed, 14 Mar 2012 16:14:08 +0900 - -tts (0.1.1-26slp2+1) unstable; urgency=low - - * beta release - * Git: slp/pkgs/t/tts - * Tag: tts_0.1.1-26slp2+1 - - -- Dongyeol Lee Fri, 17 Feb 2012 17:42:12 +0900 - -tts (0.1.1-25slp2+1) unstable; urgency=low - - * fix player bug and update doxygen - * Git: slp/pkgs/t/tts - * Tag: tts_0.1.1-25slp2+1 - - -- Dongyeol Lee Fri, 17 Feb 2012 10:45:28 +0900 - -tts (0.1.1-24slp2+1) unstable; urgency=low - - * update engine api - * Git: slp/pkgs/t/tts - * Tag: tts_0.1.1-24slp2+1 - - -- Dongyeol Lee Thu, 05 Jan 2012 15:53:48 +0900 - -tts (0.1.1-23slp2+1) unstable; urgency=low - - * update changelog - * Git: slp/pkgs/t/tts - * Tag: tts_0.1.1-23slp2+1 - - -- Dongyeol Lee Mon, 19 Dec 2011 13:50:50 +0900 - -tts (0.1.1-22slp2+1) unstable; urgency=low - - * code cleanup and update log - * Git: slp/pkgs/t/tts - * Tag: tts_0.1.1-22slp2+1 - - -- Dongyeol Lee Fri, 16 Dec 2011 15:56:08 +0900 - -tts (0.1.1-21slp2+1) unstable; urgency=low - - * code cleanup and update log - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-21slp2+1 - - -- Dongyeol Lee Tue, 06 Dec 2011 19:01:19 +0900 - -tts (0.1.1-20slp2+1) unstable; urgency=low - - * change boiler plate - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-20slp2+1 - - -- Dongyeol Lee Fri, 02 Dec 2011 10:52:46 +0900 - -tts (0.1.1-19slp2+1) unstable; urgency=low - - * update for connman - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-19slp2+1 - - -- Dongyeol Lee Tue, 29 Nov 2011 16:14:14 +0900 - -tts (0.1.1-18slp2+1) unstable; urgency=low - - * bug fix about unref message - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-18slp2+1 - - -- Dongyeol Lee Wed, 23 Nov 2011 15:34:46 +0900 - -tts (0.1.1-17slp2+1) unstable; urgency=low - - * update API : change sync function and use add_text in 'Play' state - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-17slp2+1 - - -- Dongyeol Lee Wed, 16 Nov 2011 11:28:03 +0900 - -tts (0.1.1-16slp2+1) unstable; urgency=low - - * update Setting API - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-16slp2+1 - - -- Dongyeol Lee Tue, 01 Nov 2011 11:24:58 +0900 - -tts (0.1.1-15slp2+1) unstable; urgency=low - - * update API doxygen and fix bug about initial default voice - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-15slp2+1 - - -- Dongyeol Lee Thu, 27 Oct 2011 11:06:49 +0900 - -tts (0.1.1-14slp2+1) unstable; urgency=low - - * change API for SDK release - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-14slp2+1 - - -- Dongyeol Lee Fri, 21 Oct 2011 16:42:51 +0900 - -tts (0.1.1-13slp2+1) unstable; urgency=low - - * update API's new callback - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-13slp2+1 - - -- Dongyeol Lee Thu, 20 Oct 2011 17:49:13 +0900 - -tts (0.1.1-12slp2+1) unstable; urgency=low - - * update new API for sdk release and change boilerplate - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-12slp2+1 - - -- Dongyeol Lee Wed, 19 Oct 2011 16:31:50 +0900 - -tts (0.1.1-11slp2+1) unstable; urgency=low - - * update bug of prevent and remove dependency of gtk - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-11slp2+1 - - -- Dongyeol Lee Wed, 07 Sep 2011 14:47:34 +0900 - -tts (0.1.1-10slp2+1) unstable; urgency=low - - * update build file - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-10slp2+1 - - -- Dongyeol Lee Tue, 19 Jul 2011 16:15:13 +0900 - -tts (0.1.1-9slp2+1) unstable; urgency=low - - * update build file - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-9slp2+1 - - -- Dongyeol Lee Mon, 18 Jul 2011 10:27:52 +0900 - -tts (0.1.1-8slp2+1) unstable; urgency=low - - * Change IPC and Code Cleanup - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-8slp2+1 - - -- Dongyeol Lee Fri, 15 Jul 2011 18:01:31 +0900 - -tts (0.1.1-7slp2+1) unstable; urgency=low - - * support multi instance - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-7slp2+1 - - -- Dongyeol Lee Fri, 24 Jun 2011 14:36:36 +0900 - -tts (0.1.1-6slp2+1) unstable; urgency=low - - * fix defect from prevent - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-6slp2+1 - - -- Dongyeol Lee Tue, 07 Jun 2011 17:05:49 +0900 - -tts (0.1.1-5slp2+1) unstable; urgency=low - - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-5slp2+1 - - -- Dongyeol Lee Mon, 23 May 2011 15:14:10 +0900 - -tts (0.1.1-4slp2+1) unstable; urgency=low - - * Change API - change error code - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-4slp2+1 - - -- Dongyeol Lee Mon, 23 May 2011 09:00:57 +0900 - -tts (0.1.1-3slp2+1) unstable; urgency=low - - * change control file - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-3slp2+1 - - -- Jae-Yong Lee Mon, 16 May 2011 10:45:01 +0900 - -tts (0.1.1-2slp2+1) unstable; urgency=low - - * Initial Release (change files to unix type). - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-2slp2+1 - - -- Jae-Yong Lee Mon, 16 May 2011 10:11:02 +0900 - -tts (0.1.1-1slp2+1) unstable; urgency=low - - * Initial Release. - * Git: 165.213.180.234:slp/pkgs/t/tts - * Tag: tts_0.1.1-1slp2+1 - - -- Jae-Yong Lee Fri, 13 May 2011 16:15:22 +0900 diff --git a/packaging/tts.spec b/packaging/tts.spec old mode 100644 new mode 100755 index 36b90778..126a0a02 --- a/packaging/tts.spec +++ b/packaging/tts.spec @@ -50,6 +50,7 @@ mkdir -p %{buildroot}/usr/share/license %files %manifest tts-server.manifest +/etc/smack/accesses2.d/tts-server.rule %defattr(-,root,root,-) %{_libdir}/lib*.so %{_libdir}/voice/tts/1.0/ttsd.conf diff --git a/server/ttsd_player.cpp b/server/ttsd_player.cpp index 6e3ae014..f5bbfe2c 100755 --- a/server/ttsd_player.cpp +++ b/server/ttsd_player.cpp @@ -84,11 +84,14 @@ static player_result_callback_func g_result_callback; /** numbering for temp file */ static unsigned int g_index; +/** For resume when the 'Paused' state of player after end of play */ +static bool g_pause_info; +static int g_paused_uid; + /* * Internal Interfaces */ - player_s* __player_get_item(int uid); int __save_file(const int uid, const int index, const sound_data_s data, char** filename); @@ -99,7 +102,6 @@ int __init_wave_header(WavHeader* hdr, size_t nsamples, size_t sampling_rate, in static int msg_callback(int message, void *data, void *user_param) ; - /* * Player Interfaces */ @@ -118,6 +120,8 @@ int ttsd_player_init(player_result_callback_func result_cb) g_index = 1; g_player_init = true; + g_pause_info = false; + g_paused_uid = -1; return 0; } @@ -522,15 +526,29 @@ int ttsd_player_resume(const int uid) int ret = -1; if (MM_PLAYER_STATE_PAUSED == player_state) { - ret = mm_player_resume(current->player_handle); - if (MM_ERROR_NONE != ret) { - SLOG(LOG_ERROR, TAG_TTSD, "[Player ERROR] fail mm_player_resume() : %d", ret); - return -1; + /* When the 'Paused' state of player after end of play */ + if (g_pause_info == true && g_paused_uid == uid) { + g_playing_info = current; + + g_pause_info = false; + g_paused_uid = -1; + + /* Current state need load and play */ + ret = ttsd_player_next_play(uid); + if (0 != ret) { + SLOG(LOG_ERROR, TAG_TTSD, "[player] Fail to next play in resume function"); + } } else { - SLOG(LOG_DEBUG, TAG_TTSD, "[Player] Resume player"); - } + ret = mm_player_resume(current->player_handle); + if (MM_ERROR_NONE != ret) { + SLOG(LOG_ERROR, TAG_TTSD, "[Player ERROR] fail mm_player_resume() : %d", ret); + return -1; + } else { + SLOG(LOG_DEBUG, TAG_TTSD, "[Player] Resume player"); + } - g_playing_info = current; + g_playing_info = current; + } } else { SLOG(LOG_WARN, TAG_TTSD, "[Player WARNING] Current uid is NOT paused state."); } @@ -700,65 +718,7 @@ static int msg_callback(int message, void *data, void *user_param) break; /*MM_MESSAGE_ERROR*/ case MM_MESSAGE_BEGIN_OF_STREAM: - { - SLOG(LOG_DEBUG, TAG_TTSD, "===== BEGIN OF STREAM CALLBACK"); - - /* Check uid */ - player_s* current; - current = __player_get_item(uid); - if (NULL == current) { - SLOG(LOG_ERROR, TAG_TTSD, "[PLAYER] uid(%d) is NOT valid ", uid); - return -1; - } - - if (TTSP_RESULT_EVENT_START == user_data->event || - (TTSP_RESULT_EVENT_FINISH == current->event && TTSP_RESULT_EVENT_FINISH == user_data->event)) { - int pid; - pid = ttsd_data_get_pid(uid); - - /* send utterance start message */ - if (0 == ttsdc_send_utt_start_message(pid, uid, utt_id)) { - SLOG(LOG_DEBUG, TAG_TTSD, "[Send SUCCESS] Send Utterance Start Signal : pid(%d), uid(%d), uttid(%d)", pid, uid, utt_id); - } else - SLOG(LOG_ERROR, TAG_TTSD, "[Send ERROR] Fail to send Utterance Start Signal : pid(%d), uid(%d), uttid(%d)", pid, uid, utt_id); - } else { - SLOG(LOG_DEBUG, TAG_TTSD, "[PLAYER] Don't need to send Utterance Start Signal"); - } - - /* set current playing info */ - current->utt_id = utt_id; - current->event = user_data->event; - g_playing_info = current; - - app_state_e state; - if (0 != ttsd_data_get_client_state(uid, &state)) { - SLOG(LOG_ERROR, TAG_TTSD, "[PLAYER ERROR] uid is not valid : %d", uid); - SLOG(LOG_DEBUG, TAG_TTSD, "====="); - SLOG(LOG_DEBUG, TAG_TTSD, " "); - break; - } - - /* for sync problem */ - if (APP_STATE_PAUSED == state) { - MMPlayerStateType player_state; - mm_player_get_state(current->player_handle, &player_state); - - SLOG(LOG_DEBUG, TAG_TTSD, "[PLAYER] Current state(%d)", player_state); - - int ret = 0; - if (MM_PLAYER_STATE_PLAYING == player_state) { - ret = mm_player_pause(current->player_handle); - if (MM_ERROR_NONE != ret) { - SLOG(LOG_ERROR, TAG_TTSD, "[PLAYER ERROR] fail mm_player_pause() : %x", ret); - } else { - SLOG(LOG_DEBUG, TAG_TTSD, "[PLAYER] uid(%d) changes 'Pause' state ", uid); - } - } - } - SLOG(LOG_DEBUG, TAG_TTSD, "====="); - SLOG(LOG_DEBUG, TAG_TTSD, " "); - } break; case MM_MESSAGE_END_OF_STREAM: @@ -797,12 +757,22 @@ static int msg_callback(int message, void *data, void *user_param) SLOG(LOG_ERROR, TAG_TTSD, "[Send ERROR] Fail to send Utterance Completed Signal : pid(%d), uid(%d), uttid(%d)", pid, uid, utt_id); } - int* uid_data = (int*) g_malloc0(sizeof(int)); - *uid_data = uid; + /* for sync problem */ + MMPlayerStateType player_state; + mm_player_get_state(current->player_handle, &player_state); + + if (MM_PLAYER_STATE_PAUSED == player_state) { + g_pause_info = true; /* The current state of player is 'Paused' */ + g_paused_uid = uid; /* The current uid when the current state player is 'Paused' */ + } else { + /* play state */ + int* uid_data = (int*) g_malloc0(sizeof(int)); + *uid_data = uid; - SLOG(LOG_DEBUG, TAG_TTSD, "[PLAYER] uid = %d", *uid_data); + SLOG(LOG_DEBUG, TAG_TTSD, "[PLAYER] uid = %d", *uid_data); - ecore_timer_add(0, __player_next_play, (void*)uid_data); + ecore_timer_add(0, __player_next_play, (void*)uid_data); + } SLOG(LOG_DEBUG, TAG_TTSD, "====="); SLOG(LOG_DEBUG, TAG_TTSD, " "); @@ -1066,6 +1036,26 @@ int __set_and_start(player_s* player) return -3; } + /* If wdata's event is 'start', current wdata is first data of engine for synthesis. + * If wdata's event is 'finish', player should check previous event to know whether this wdata is first or not. + * When previous wdata's event is 'finish' and current wdata's event is 'finish', + * the player should send utt started event. + */ + if (TTSP_RESULT_EVENT_START == wdata.event || + (TTSP_RESULT_EVENT_FINISH == player->event && TTSP_RESULT_EVENT_FINISH == wdata.event)) { + int pid; + pid = ttsd_data_get_pid(player->uid); + + /* send utterance start message */ + if (0 != ttsdc_send_utt_start_message(pid, player->uid, wdata.utt_id)) { + SLOG(LOG_ERROR, TAG_TTSD, "[Send ERROR] Fail to send Utterance Start Signal : pid(%d), uid(%d), uttid(%d)", pid, player->uid, wdata.utt_id); + } + } else { + SLOG(LOG_DEBUG, TAG_TTSD, "[PLAYER] Don't need to send Utterance Start Signal"); + } + + g_playing_info = player; + if (NULL != sound_file) g_free(sound_file); if (NULL != wdata.data) diff --git a/tts-server.rule b/tts-server.rule new file mode 100755 index 00000000..aa88311e --- /dev/null +++ b/tts-server.rule @@ -0,0 +1,7 @@ +tts-server system::app_logging wx +tts-server tts-engine-samsung::vdata rx +tts-server system::vconf rwx +tts-server sound_server rw +tts-server system::share rwx +tts-server pulseaudio rwx +tts-server dbus rw