From: Sangchul Lee Date: Fri, 22 Apr 2022 02:18:41 +0000 (+0900) Subject: webrtc_private: Print handle pointer in __bus_watch_cb() X-Git-Tag: submit/tizen/20220426.020921~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b47ad5c3c1010df5068f07ef43be570c3e1afc95;p=platform%2Fcore%2Fapi%2Fwebrtc.git webrtc_private: Print handle pointer in __bus_watch_cb() A case using multiple handles in one process is quite common, it is expected that this additional log will help in debugging. [Version] 0.3.92 [Issue Type] Log Change-Id: I1bca4152e8bce955d7a0e548b674e627771b840f Signed-off-by: Sangchul Lee --- diff --git a/packaging/capi-media-webrtc.spec b/packaging/capi-media-webrtc.spec index 0ca9f639..63dc113c 100644 --- a/packaging/capi-media-webrtc.spec +++ b/packaging/capi-media-webrtc.spec @@ -1,6 +1,6 @@ Name: capi-media-webrtc Summary: A WebRTC library in Tizen Native API -Version: 0.3.91 +Version: 0.3.92 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/webrtc_private.c b/src/webrtc_private.c index 38079bab..8174d220 100644 --- a/src/webrtc_private.c +++ b/src/webrtc_private.c @@ -480,10 +480,10 @@ static gboolean __bus_watch_cb(GstBus *bus, GstMessage *message, gpointer user_d g_autoptr(GMutexLocker) locker = NULL; RET_VAL_IF(webrtc == NULL, FALSE, "webrtc is NULL"); - RET_VAL_IF(webrtc->gst.pipeline == NULL, FALSE, "pipeline is NULL"); + RET_VAL_IF(webrtc->gst.pipeline == NULL, FALSE, "webrtc[%p]->gst.pipeline is NULL", webrtc); if (message == NULL) { - LOG_DEBUG("message is null"); + LOG_DEBUG("webrtc[%p] message is null", webrtc); return TRUE; } @@ -492,8 +492,9 @@ static gboolean __bus_watch_cb(GstBus *bus, GstMessage *message, gpointer user_d webrtc_error_e error = WEBRTC_ERROR_INVALID_OPERATION; gst_message_parse_error(message, &err, NULL); - LOG_ERROR("Error[from %s]: message[%s], code[%d]", - GST_OBJECT_NAME(GST_OBJECT_CAST(GST_ELEMENT(GST_MESSAGE_SRC(message)))), err->message, err->code); + LOG_ERROR("webrtc[%p] Error[from %s]: message[%s], code[%d]", + webrtc, GST_OBJECT_NAME(GST_OBJECT_CAST(GST_ELEMENT(GST_MESSAGE_SRC(message)))), + err->message, err->code); if (err->domain == GST_RESOURCE_ERROR) error = WEBRTC_ERROR_RESOURCE_FAILED; @@ -515,7 +516,7 @@ static gboolean __bus_watch_cb(GstBus *bus, GstMessage *message, gpointer user_d gst_element_state_get_name(gst_state_old), gst_element_state_get_name(gst_state_new), gst_element_state_get_name(gst_state_pending)); - LOG_INFO("GST_MESSAGE_STATE_CHANGED: %s", state_transition_name); + LOG_INFO("webrtc[%p] GST_MESSAGE_STATE_CHANGED: %s", webrtc, state_transition_name); g_free(state_transition_name); locker = g_mutex_locker_new(&webrtc->mutex); @@ -537,11 +538,11 @@ static gboolean __bus_watch_cb(GstBus *bus, GstMessage *message, gpointer user_d if (GST_MESSAGE_SRC(message) != GST_OBJECT(webrtc->gst.pipeline)) return TRUE; - LOG_INFO("GST_MESSAGE_ASYNC_DONE"); + LOG_INFO("webrtc[%p] GST_MESSAGE_ASYNC_DONE", webrtc); break; case GST_MESSAGE_EOS: - LOG_INFO("GST_MESSAGE_EOS end-of-stream"); + LOG_INFO("webrtc[%p] GST_MESSAGE_EOS end-of-stream", webrtc); break; default: