From: sooyeon Date: Fri, 17 Dec 2021 09:00:48 +0000 (+0900) Subject: Rearrange logs X-Git-Tag: submit/tizen_6.5/20211223.020506~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b82b87a6a96d30042e04a565a891c609b6d3ce87;p=platform%2Fcore%2Fuifw%2Ftts.git Rearrange logs Change-Id: Ia6089503030001bd8072c79518fe05a997333c72 Signed-off-by: sooyeon --- diff --git a/server/ttsd_data.cpp b/server/ttsd_data.cpp index b31c580..2bf187a 100644 --- a/server/ttsd_data.cpp +++ b/server/ttsd_data.cpp @@ -130,13 +130,13 @@ int __data_show_used_voice_list(app_data_s& app_data) int ttsd_set_synth_control(ttsd_synthesis_control_e control) { + SLOG(LOG_INFO, tts_tag(), "[DATA INFO] set synth_control(%d)", control); g_synth_control = control; return 0; } ttsd_synthesis_control_e ttsd_get_synth_control() { - SLOG(LOG_INFO, tts_tag(), "g_synth_control(%d)", g_synth_control.load()); return g_synth_control.load(); } diff --git a/server/ttsd_player.c b/server/ttsd_player.c index d5ff1af..6309229 100644 --- a/server/ttsd_player.c +++ b/server/ttsd_player.c @@ -666,7 +666,9 @@ static void __play_thread(void *data, Ecore_Thread *thread) } /* If engine is not on processing */ - if (TTSD_SYNTHESIS_CONTROL_DOING != ttsd_get_synth_control()) { + ttsd_synthesis_control_e synth_control = ttsd_get_synth_control(); + if (TTSD_SYNTHESIS_CONTROL_DOING != synth_control) { + SLOG(LOG_INFO, tts_tag(), "[Server INFO] synth_control(%d)", synth_control); if (AUDIO_STATE_PLAY == g_audio_state) { /* release audio & recover session */ ret = audio_out_unprepare(g_audio_h); diff --git a/server/ttsd_server.c b/server/ttsd_server.c index c13273b..d489d7b 100644 --- a/server/ttsd_server.c +++ b/server/ttsd_server.c @@ -70,11 +70,13 @@ static Eina_Bool __wait_synthesis(void *data) int uid = ttsd_data_get_current_playing(); if (uid > 0) { - if (TTSD_SYNTHESIS_CONTROL_DOING == ttsd_get_synth_control()) { + ttsd_synthesis_control_e synth_control = ttsd_get_synth_control(); + if (TTSD_SYNTHESIS_CONTROL_DOING == synth_control) { return EINA_TRUE; } else { + SLOG(LOG_INFO, tts_tag(), "[Server] synth_control(%d)", synth_control); g_wait_timer = NULL; - if (TTSD_SYNTHESIS_CONTROL_DONE == ttsd_get_synth_control()) { + if (TTSD_SYNTHESIS_CONTROL_DONE == synth_control) { /* Start next synthesis */ __synthesis(uid, credential); } @@ -943,7 +945,9 @@ int ttsd_server_add_queue(int uid, const char* text, const char* lang, int voice } /* Check whether tts-engine is running or not */ - if (TTSD_SYNTHESIS_CONTROL_DOING == ttsd_get_synth_control()) { + ttsd_synthesis_control_e synth_control = ttsd_get_synth_control(); + SLOG(LOG_INFO, tts_tag(), "[Server INFO] synth_control(%d)", synth_control); + if (TTSD_SYNTHESIS_CONTROL_DOING == synth_control) { SLOG(LOG_WARN, tts_tag(), "[Server WARNING] Engine has already been running."); } else { __synthesis(uid, credential); @@ -1066,7 +1070,9 @@ int ttsd_server_play(int uid, const char* credential) /* Check whether tts-engine is running or not */ clock_gettime(CLOCK_MONOTONIC_RAW, &g_request_playing); - if (TTSD_SYNTHESIS_CONTROL_DOING == ttsd_get_synth_control()) { + ttsd_synthesis_control_e synth_control = ttsd_get_synth_control(); + SLOG(LOG_INFO, tts_tag(), "[Server INFO] synth_control(%d)", synth_control); + if (TTSD_SYNTHESIS_CONTROL_DOING == synth_control) { SLOG(LOG_WARN, tts_tag(), "[Server WARNING] Engine has already been running."); } else { __synthesis(uid, credential); @@ -1083,10 +1089,12 @@ int ttsd_server_stop(int uid) return TTSD_ERROR_INVALID_PARAMETER; } - SLOG(LOG_INFO, tts_tag(), "[Server] server stop, state(%d)", state); + SLOG(LOG_INFO, tts_tag(), "[Server] server stop, uid(%d), state(%d)", uid, state); if (APP_STATE_PLAYING == state || APP_STATE_PAUSED == state) { - if (TTSD_SYNTHESIS_CONTROL_DOING == ttsd_get_synth_control() && uid == ttsd_data_get_current_playing()) { + ttsd_synthesis_control_e synth_control = ttsd_get_synth_control(); + SLOG(LOG_INFO, tts_tag(), "[Server INFO] synth_control(%d)", synth_control); + if (TTSD_SYNTHESIS_CONTROL_DOING == synth_control && uid == ttsd_data_get_current_playing()) { SLOG(LOG_DEBUG, tts_tag(), "[Server] TTS-engine is running"); int ret = 0;