Add more logs for tracking detailed streaming process 48/240948/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Thu, 13 Aug 2020 05:32:28 +0000 (14:32 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Thu, 13 Aug 2020 05:33:08 +0000 (14:33 +0900)
Change-Id: Ic252bfc9af80f8fb49a882d49cc34f94e409d016

plugins/wakeup-manager/src/wakeup_engine_manager.cpp
plugins/wakeup-manager/src/wakeup_manager.cpp
src/client_manager.cpp
src/service_main.cpp
src/service_plugin.cpp

index 070612055b9bbda05b78ffd6e8c59a77ade594d3..276549805ba08ef371456fd04b7a8fd25eb6a437 100644 (file)
@@ -270,8 +270,10 @@ void CWakeupEngineManager::streaming_speech_data_thread_func()
 {
        MWR_LOGI("[ENTER]");
 
-       if (nullptr == mSelectedEngine)
+       if (nullptr == mSelectedEngine) {
+               MWR_LOGE("No Engine Selected");
                return;
+       }
 
        const wakeup_engine_interface *interface = &(mSelectedEngine->interface);
 
index d1331cb007a1b598f81c3998490bd982e5ccbaea..5b04280d4de307e28ef2ff8d50a43f9d236aedce 100644 (file)
@@ -888,7 +888,9 @@ void CWakeupManager::set_dependency_module_command(string engine_name, string co
 
 void CWakeupManager::start_streaming_duration_timer()
 {
+       MWR_LOGI("DURATION_TIMER START");
        ecore_main_loop_thread_safe_call_async([](void* data) {
+               MWR_LOGI("DURATION_TIMER START - async");
                CWakeupManager* manager = static_cast<CWakeupManager*>(data);
                if (!manager) return;
 
@@ -907,7 +909,9 @@ void CWakeupManager::stop_streaming_duration_timer()
 {
        MWR_LOGI("DURATION_TIMER STOP");
        if (mStreamingDurationTimer) {
+               MWR_LOGI("DURATION_TIMER STOP - has timer");
                ecore_main_loop_thread_safe_call_async([](void* data) {
+                       MWR_LOGI("DURATION_TIMER STOP - async");
                        CWakeupManager* manager = static_cast<CWakeupManager*>(data);
                        if (!manager) return;
 
@@ -921,6 +925,7 @@ void CWakeupManager::stop_streaming_duration_timer()
 
 void CWakeupManager::set_streaming_duration_timer(Ecore_Timer* timer)
 {
+       MWR_LOGI("DURATION_TIMER SET : %p", timer);
        mStreamingDurationTimer = timer;
 }
 
index 01cd9d557dd2cbb3719cee12b4fedff7161fb513..18339df8bed1f919d60a593b188a6e3222aaf118 100644 (file)
@@ -38,6 +38,7 @@ int CClientManager::create_client(pid_t pid, std::string appid)
                data->pid = pid;
                data->appid = appid;
                mClientList = g_slist_append(mClientList, data);
+               MAS_LOGI("Create client : %s %d", appid.c_str(), pid);
        } else {
                MAS_LOGE("[ERROR] data is NULL");
                return -1;// MA_ERROR_OUT_OF_MEMORY;
@@ -74,6 +75,7 @@ int CClientManager::destroy_client_by_appid(std::string appid)
 
 ma_client_s* CClientManager::find_client_by_appid(std::string appid)
 {
+       MAS_LOGI("Looking for client with appid : %s", appid.c_str());
        ma_client_s *data = NULL;
 
        int count = g_slist_length(mClientList);
@@ -84,6 +86,7 @@ ma_client_s* CClientManager::find_client_by_appid(std::string appid)
 
                if (NULL != data) {
                        if (0 == appid.compare(data->appid)) {
+                               MAS_LOGI("Found client : %s %d", data->appid.c_str(), data->pid);
                                return data;
                        }
                }
@@ -138,6 +141,7 @@ pid_t CClientManager::find_client_pid_by_index(unsigned int index)
 
 pid_t CClientManager::find_client_pid_by_appid(std::string appid)
 {
+       MAS_LOGI("Checking PID of appid : %s", appid.c_str());
        pid_t pid = -1;
 
        if (nullptr == mApplicationManager) {
@@ -147,6 +151,7 @@ pid_t CClientManager::find_client_pid_by_appid(std::string appid)
 
        ma_client_s* client = find_client_by_appid(appid);
        if (client) {
+               MAS_LOGI("Found client : %s %d", client->appid.c_str(), client->pid);
                bool running = mApplicationManager->is_application_running(client->pid);
                if (false == running) {
                        MAS_LOGE("The PID for %s was %d, but it seems to be terminated",
index a741ae0ae070e132f7a71034a036442f6b7f8641..bb377a22ddeb4cccff3a6fdc799bb4b064d029ff 100644 (file)
@@ -199,6 +199,7 @@ int CServiceMain::client_send_recognition_result(pid_t pid, int result)
 
 int CServiceMain::client_start_streaming_audio_data(pid_t pid, int type)
 {
+       MAS_LOGI("[ENTER");
        int ret = -1;
        const char *current_maclient_appid = NULL;
        if (mCurrentClientInfo >= 0 && mCurrentClientInfo < MAX_MACLIENT_INFO_NUM) {
@@ -748,6 +749,7 @@ pid_t CServiceMain::get_current_audio_processing_pid()
 
 pid_t CServiceMain::get_client_pid_by_appid(const char *appid)
 {
+       MAS_LOGI("Checking PID of appid : %s", appid);
        pid_t ret = -1;
 
        if (appid) {
index 254fb8e330bb84c306caaa943ebca3c15fc97e90..7f26d003ef7e8ee64f75cc0ca6cb3faddf5b97fa 100644 (file)
@@ -1020,6 +1020,7 @@ int CServicePlugin::process_event(int event, void *data, int len)
 
 int CServicePlugin::start_streaming_utterance_data(void)
 {
+       MAS_LOGI("[ENTER");
        int ret = -1;
        if (NULL != mPluginHandle) {
                wakeup_manager_start_streaming_utterance_data func = mWakeupManagerInterface.start_streaming_utterance_data;