Add logs to check whether TTS engine is launched or not 92/279992/1
authorsooyeon <sooyeon.kim@samsung.com>
Fri, 18 Mar 2022 17:03:51 +0000 (02:03 +0900)
committerSooyeon Kim <sooyeon.kim@samsung.com>
Mon, 22 Aug 2022 06:21:32 +0000 (06:21 +0000)
Change-Id: I880fdb546a440334b0295d8ba80585e38d748a6b
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
(cherry picked from commit 8925dec19a67413070834ee9655bdc77633253bf)

client/tts_core.c

index a8db105..13552ed 100644 (file)
@@ -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);