From: sooyeon Date: Fri, 18 Mar 2022 17:03:51 +0000 (+0900) Subject: Add logs to check whether TTS engine is launched or not X-Git-Tag: accepted/tizen/unified/20220922.062106~5^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F92%2F279992%2F1;p=platform%2Fcore%2Fuifw%2Ftts.git Add logs to check whether TTS engine is launched or not Change-Id: I880fdb546a440334b0295d8ba80585e38d748a6b Signed-off-by: sooyeon (cherry picked from commit 8925dec19a67413070834ee9655bdc77633253bf) --- diff --git a/client/tts_core.c b/client/tts_core.c index a8db105..13552ed 100644 --- a/client/tts_core.c +++ b/client/tts_core.c @@ -651,11 +651,11 @@ static inline int __request_play(tts_client_s* client) } if (TTS_ERROR_NONE != ret) { - SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to request"); + SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to request. ret(%d)", ret); return ret; } - SLOG(LOG_INFO, TAG_TTSC, "[INFO] Success tts_dbus_request_play"); + SLOG(LOG_ERROR, TAG_TTSC, "[INFO] Success tts_dbus_request_play"); return tts_core_notify_state_changed(client, TTS_STATE_PLAYING); } @@ -1168,6 +1168,9 @@ int tts_core_add_text(tts_client_s* client, const char* text, const char* langua RETVM_IF(NULL == text || NULL == utt_id, TTS_ERROR_INVALID_PARAMETER, "[ERROR] Parameter is invalid."); RETVM_IF(false == tts_client_is_valid_client(client), TTS_ERROR_INVALID_PARAMETER, "[ERROR] Client is invalid."); + bool is_launched = __is_engine_launched(tts_client_get_mode(client)); + SLOG(LOG_ERROR, TAG_TTSC, "[INFO] tts engine is launched(%d)", is_launched); + tts_client_set_repeat_text(client, text); if (NULL != g_language) { @@ -1178,7 +1181,7 @@ int tts_core_add_text(tts_client_s* client, const char* text, const char* langua g_voice_type = voice_type; g_speed = speed; - SLOG(LOG_DEBUG, TAG_TTSC, "[DEBUG] text(%s), language(%s), voice type(%d), speed(%d)", text, (g_language) ? g_language : "NULL", g_voice_type, g_speed); + SLOG(LOG_ERROR, TAG_TTSC, "[DEBUG] text(%s), language(%s), voice type(%d), speed(%d)", text, (g_language) ? g_language : "NULL", g_voice_type, g_speed); return __request_add_text(client, text, language, voice_type, speed, utt_id); } @@ -1186,6 +1189,9 @@ int tts_core_play(tts_client_s* client) { RETVM_IF(false == tts_client_is_valid_client(client), TTS_ERROR_INVALID_PARAMETER, "[ERROR] Client is invalid."); + bool is_launched = __is_engine_launched(tts_client_get_mode(client)); + SLOG(LOG_ERROR, TAG_TTSC, "[INFO] tts engine is launched(%d)", is_launched); + return __request_play(client); } @@ -1193,6 +1199,9 @@ int tts_core_stop(tts_client_s* client) { RETVM_IF(false == tts_client_is_valid_client(client), TTS_ERROR_INVALID_PARAMETER, "[ERROR] Client is invalid."); + bool is_launched = __is_engine_launched(tts_client_get_mode(client)); + SLOG(LOG_ERROR, TAG_TTSC, "[INFO] tts engine is launched(%d)", is_launched); + unsigned int uid = tts_client_get_uid(client); int ret = -1; tts_client_set_reprepared(client, false);