webrtc_private: Append webrtc handle pointer address to webrtcbin name 26/265726/1
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 28 Oct 2021 01:16:38 +0000 (10:16 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 28 Oct 2021 01:16:38 +0000 (10:16 +0900)
This can help user analyze logs more easily.

[Version] 0.2.142
[Issue Type] Debug

Change-Id: I6afaa2d622f76cf57a63823dff4c80e6fd709b8f
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/capi-media-webrtc.spec
src/webrtc_private.c

index f8cd04d48f560a08893b6c7a401a2e45e286baba..7c5552f1f9d304bb1875008eda5cc06714126cce 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-webrtc
 Summary:    A WebRTC library in Tizen Native API
-Version:    0.2.141
+Version:    0.2.142
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 5cf5b10389ec14289b207263d0fd917cb01aafbd..213750f4b81bd74a7c548166928e889f72067578 100644 (file)
@@ -1203,6 +1203,8 @@ static void __webrtcbin_on_new_transceiver_cb(GstElement *webrtcbin, GstWebRTCRT
 
 int _gst_build_pipeline(webrtc_s *webrtc)
 {
+       gchar *webrtcbin_name;
+
        RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
 
        webrtc->gst.pipeline = gst_pipeline_new("main-pipeline");
@@ -1218,10 +1220,13 @@ int _gst_build_pipeline(webrtc_s *webrtc)
                goto error;
        }
 
-       if (!(webrtc->gst.webrtcbin = _create_element("webrtcbin", NULL))) {
+       webrtcbin_name = g_strdup_printf("webrtcbin_%p", webrtc);
+       if (!(webrtc->gst.webrtcbin = _create_element("webrtcbin", webrtcbin_name))) {
                LOG_ERROR("failed to create webrtcbin");
+               g_free(webrtcbin_name);
                goto error;
        }
+       g_free(webrtcbin_name);
 
        g_object_set(G_OBJECT(webrtc->gst.webrtcbin), "bundle-policy", 3, NULL); /* 3 for max-bundle */