webrtc_private: Print handle pointer in __bus_watch_cb() 34/274134/1
authorSangchul Lee <sc11.lee@samsung.com>
Fri, 22 Apr 2022 02:18:41 +0000 (11:18 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Fri, 22 Apr 2022 02:18:53 +0000 (11:18 +0900)
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 <sc11.lee@samsung.com>
packaging/capi-media-webrtc.spec
src/webrtc_private.c

index 0ca9f639fec416aa3c2bfb3eb22e373b4e7852e0..63dc113c8307fd2f6c62a891e69b11e39bb759e7 100644 (file)
@@ -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
index 38079bab1524f52759c25ad7da170a65064fa7c6..8174d22072f3e3205c5e417cdafd89f0ce2fc0df 100644 (file)
@@ -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: