Add more log 28/150028/2
authorSeokHoon Lee <andy.shlee@samsung.com>
Thu, 14 Sep 2017 04:59:13 +0000 (13:59 +0900)
committerSeokHoon Lee <andy.shlee@samsung.com>
Thu, 14 Sep 2017 05:01:06 +0000 (14:01 +0900)
Signed-off-by: SeokHoon Lee <andy.shlee@samsung.com>
Change-Id: Ib09f698c801bc285234acb3e66aa39520613e301

packaging/libmm-wfd.spec
src/include/mm_wfd_sink_dlog.h
src/mm_wfd_sink_priv.c

index 34bd2e8..c790a7e 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-wfd
 Summary:    Multimedia Framework Wifi-Display Library
-Version:    0.2.228
+Version:    0.2.229
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index 22b46df..3eddf47 100644 (file)
@@ -69,6 +69,14 @@ extern "C" {
        LOGE(FONT_COLOR_RED"NO-ERROR : <Leave>"FONT_COLOR_RESET);     \
        } while (0)
 
+#define wfd_sink_info_fenter() do { \
+       LOGI(FONT_COLOR_GREEN"<Enter>"FONT_COLOR_RESET);     \
+       } while (0)
+
+#define wfd_sink_info_fleave() do { \
+       LOGI(FONT_COLOR_GREEN"<Leave>"FONT_COLOR_RESET);     \
+       } while (0)
+
 #define wfd_sink_sucure_info(fmt, arg...) do { \
        SECURE_LOGI(FONT_COLOR_GREEN""fmt""FONT_COLOR_RESET, ##arg);     \
        } while (0)
index cb05745..1d73e8f 100644 (file)
@@ -671,7 +671,7 @@ int __mm_wfd_sink_activate_video_stream(mm_wfd_sink_t *wfd_sink)
        }
 
        if (gst_pad_is_linked(srcpad)) {
-               wfd_sink_debug("%s is already linked",
+               wfd_sink_debug("%s:%s is already linked",
                                                GST_ELEMENT_NAME(GST_PAD_PARENT(srcpad)), GST_PAD_NAME(srcpad));
                goto done;
        }
@@ -1423,7 +1423,7 @@ __mm_wfd_sink_unprepare_video_pipeline(mm_wfd_sink_t *wfd_sink)
                                        goto ERROR;
                                }
 
-                               wfd_sink_debug("try to unlink %s:%s and %s:%s",
+                               wfd_sink_error("try to unlink %s:%s and %s:%s",
                                                                GST_ELEMENT_NAME(GST_PAD_PARENT(srcpad)), GST_PAD_NAME(srcpad),
                                                                GST_ELEMENT_NAME(GST_PAD_PARENT(sinkpad)), GST_PAD_NAME(sinkpad));
                                if (!gst_pad_unlink(srcpad, sinkpad)) {
@@ -1440,6 +1440,9 @@ __mm_wfd_sink_unprepare_video_pipeline(mm_wfd_sink_t *wfd_sink)
                        gst_object_unref(sinkpad);
                        sinkpad = NULL;
 
+                       wfd_sink_error("try to remove %s from %s",
+                                       GST_ELEMENT_NAME(v_sinkbin), GST_ELEMENT_NAME(pipeline));
+
                        gst_object_ref(v_sinkbin);
                        if (!gst_bin_remove(GST_BIN(pipeline), GST_ELEMENT(v_sinkbin))) {
                                wfd_sink_error("failed to remove %s from %s",
@@ -1478,7 +1481,7 @@ __mm_wfd_sink_unprepare_video_pipeline(mm_wfd_sink_t *wfd_sink)
                                        goto ERROR;
                                }
 
-                               wfd_sink_debug("try to unlink %s:%s and %s:%s",
+                               wfd_sink_error("try to unlink %s:%s and %s:%s",
                                                                GST_ELEMENT_NAME(GST_PAD_PARENT(srcpad)), GST_PAD_NAME(srcpad),
                                                                GST_ELEMENT_NAME(GST_PAD_PARENT(sinkpad)), GST_PAD_NAME(sinkpad));
                                if (!gst_pad_unlink(srcpad, sinkpad)) {
@@ -1509,7 +1512,7 @@ __mm_wfd_sink_unprepare_video_pipeline(mm_wfd_sink_t *wfd_sink)
                                        goto ERROR;
                                }
 
-                               wfd_sink_debug("try to unlink %s:%s and %s:%s",
+                               wfd_sink_error("try to unlink %s:%s and %s:%s",
                                                                GST_ELEMENT_NAME(GST_PAD_PARENT(srcpad)), GST_PAD_NAME(srcpad),
                                                                GST_ELEMENT_NAME(GST_PAD_PARENT(sinkpad)), GST_PAD_NAME(sinkpad));
                                if (!gst_pad_unlink(srcpad, sinkpad)) {
@@ -1815,7 +1818,7 @@ __mm_wfd_sink_unprepare_audio_pipeline(mm_wfd_sink_t *wfd_sink)
                                        goto ERROR;
                                }
 
-                               wfd_sink_debug("try to unlink %s:%s and %s:%s",
+                               wfd_sink_error("try to unlink %s:%s and %s:%s",
                                                                GST_ELEMENT_NAME(GST_PAD_PARENT(srcpad)), GST_PAD_NAME(srcpad),
                                                                GST_ELEMENT_NAME(GST_PAD_PARENT(sinkpad)), GST_PAD_NAME(sinkpad));
                                if (!gst_pad_unlink(srcpad, sinkpad)) {
@@ -1832,6 +1835,8 @@ __mm_wfd_sink_unprepare_audio_pipeline(mm_wfd_sink_t *wfd_sink)
                        gst_object_unref(sinkpad);
                        sinkpad = NULL;
 
+                       wfd_sink_error("try to remove %s from %s", GST_ELEMENT_NAME(a_sinkbin), GST_ELEMENT_NAME(pipeline));
+
                        gst_object_ref(a_sinkbin);
                        if (!gst_bin_remove(GST_BIN(pipeline), GST_ELEMENT(a_sinkbin))) {
                                wfd_sink_error("failed to remove %s from %s",
@@ -1870,7 +1875,7 @@ __mm_wfd_sink_unprepare_audio_pipeline(mm_wfd_sink_t *wfd_sink)
                                        goto ERROR;
                                }
 
-                               wfd_sink_debug("try to unlink %s:%s and %s:%s",
+                               wfd_sink_error("try to unlink %s:%s and %s:%s",
                                                                GST_ELEMENT_NAME(GST_PAD_PARENT(srcpad)), GST_PAD_NAME(srcpad),
                                                                GST_ELEMENT_NAME(GST_PAD_PARENT(sinkpad)), GST_PAD_NAME(sinkpad));
                                if (!gst_pad_unlink(srcpad, sinkpad)) {
@@ -1901,7 +1906,7 @@ __mm_wfd_sink_unprepare_audio_pipeline(mm_wfd_sink_t *wfd_sink)
                                        return MM_ERROR_WFD_INTERNAL;
                                }
 
-                               wfd_sink_debug("try to unlink %s:%s and %s:%s",
+                               wfd_sink_error("try to unlink %s:%s and %s:%s",
                                                                GST_ELEMENT_NAME(GST_PAD_PARENT(srcpad)), GST_PAD_NAME(srcpad),
                                                                GST_ELEMENT_NAME(GST_PAD_PARENT(sinkpad)), GST_PAD_NAME(sinkpad));
                                if (!gst_pad_unlink(srcpad, sinkpad)) {
@@ -3339,7 +3344,7 @@ static int  __mm_wfd_sink_destroy_audio_decodebin(mm_wfd_sink_t *wfd_sink)
        GstObject *parent = NULL;
        int i;
 
-       wfd_sink_debug_fenter();
+       wfd_sink_error_fenter();
 
        wfd_sink_return_val_if_fail(wfd_sink, MM_ERROR_WFD_NOT_INITIALIZED);
 
@@ -3357,7 +3362,7 @@ static int  __mm_wfd_sink_destroy_audio_decodebin(mm_wfd_sink_t *wfd_sink)
                wfd_sink_debug("audio decodebin has no parent.. need to relase by itself");
 
                if (GST_STATE(a_decodebin[WFD_SINK_A_D_BIN].gst) >= GST_STATE_READY) {
-                       wfd_sink_debug("try to change state of audio decodebin to NULL");
+                       wfd_sink_error("try to change state of audio decodebin to NULL");
                        ret = gst_element_set_state(a_decodebin[WFD_SINK_A_D_BIN].gst, GST_STATE_NULL);
                        if (ret != GST_STATE_CHANGE_SUCCESS) {
                                wfd_sink_error("failed to change state of audio decodebin to NULL");
@@ -3403,7 +3408,7 @@ static int  __mm_wfd_sink_destroy_audio_decodebin(mm_wfd_sink_t *wfd_sink)
 
        MMWFDSINK_FREEIF(wfd_sink->pipeline->a_decodebin);
 
-       wfd_sink_debug_fleave();
+       wfd_sink_error_fleave();
 
        return MM_ERROR_NONE;
 }
@@ -3579,7 +3584,7 @@ static int  __mm_wfd_sink_destroy_audio_sinkbin(mm_wfd_sink_t *wfd_sink)
        GstObject *parent = NULL;
        int i;
 
-       wfd_sink_debug_fenter();
+       wfd_sink_error_fenter();
 
        wfd_sink_return_val_if_fail(wfd_sink, MM_ERROR_WFD_NOT_INITIALIZED);
 
@@ -3594,10 +3599,10 @@ static int  __mm_wfd_sink_destroy_audio_sinkbin(mm_wfd_sink_t *wfd_sink)
 
        parent = gst_element_get_parent(a_sinkbin[WFD_SINK_A_S_BIN].gst);
        if (!parent) {
-               wfd_sink_debug("audio sinkbin has no parent.. need to relase by itself");
+               wfd_sink_error("audio sinkbin has no parent.. need to relase by itself");
 
                if (GST_STATE(a_sinkbin[WFD_SINK_A_S_BIN].gst) >= GST_STATE_READY) {
-                       wfd_sink_debug("try to change state of audio sinkbin to NULL");
+                       wfd_sink_error("try to change state of audio sinkbin to NULL");
                        ret = gst_element_set_state(a_sinkbin[WFD_SINK_A_S_BIN].gst, GST_STATE_NULL);
                        if (ret != GST_STATE_CHANGE_SUCCESS) {
                                wfd_sink_error("failed to change state of audio sinkbin to NULL");
@@ -3640,7 +3645,7 @@ static int  __mm_wfd_sink_destroy_audio_sinkbin(mm_wfd_sink_t *wfd_sink)
 
        MMWFDSINK_FREEIF(wfd_sink->pipeline->a_sinkbin);
 
-       wfd_sink_debug_fleave();
+       wfd_sink_error_fleave();
 
        return MM_ERROR_NONE;
 }
@@ -4164,7 +4169,7 @@ static int __mm_wfd_sink_destroy_video_decodebin(mm_wfd_sink_t *wfd_sink)
        GstObject *parent = NULL;
        int i;
 
-       wfd_sink_debug_fenter();
+       wfd_sink_error_fenter();
 
        wfd_sink_return_val_if_fail(wfd_sink, MM_ERROR_WFD_NOT_INITIALIZED);
 
@@ -4183,7 +4188,7 @@ static int __mm_wfd_sink_destroy_video_decodebin(mm_wfd_sink_t *wfd_sink)
                wfd_sink_debug("video decodebin has no parent.. need to relase by itself");
 
                if (GST_STATE(v_decodebin[WFD_SINK_V_D_BIN].gst) >= GST_STATE_READY) {
-                       wfd_sink_debug("try to change state of video decodebin to NULL");
+                       wfd_sink_error("try to change state of video decodebin to NULL");
                        ret = gst_element_set_state(v_decodebin[WFD_SINK_V_D_BIN].gst, GST_STATE_NULL);
                        if (ret != GST_STATE_CHANGE_SUCCESS) {
                                wfd_sink_error("failed to change state of video decodebin to NULL");
@@ -4230,7 +4235,7 @@ static int __mm_wfd_sink_destroy_video_decodebin(mm_wfd_sink_t *wfd_sink)
 
        MMWFDSINK_FREEIF(wfd_sink->pipeline->v_decodebin);
 
-       wfd_sink_debug_fleave();
+       wfd_sink_error_fleave();
 
        return MM_ERROR_NONE;
 }
@@ -4422,7 +4427,7 @@ static int __mm_wfd_sink_destroy_video_sinkbin(mm_wfd_sink_t *wfd_sink)
        GstObject *parent = NULL;
        int i;
 
-       wfd_sink_debug_fenter();
+       wfd_sink_error_fenter();
 
        wfd_sink_return_val_if_fail(wfd_sink, MM_ERROR_WFD_NOT_INITIALIZED);
 
@@ -4441,7 +4446,7 @@ static int __mm_wfd_sink_destroy_video_sinkbin(mm_wfd_sink_t *wfd_sink)
                wfd_sink_debug("video sinkbin has no parent.. need to relase by itself");
 
                if (GST_STATE(v_sinkbin[WFD_SINK_V_S_BIN].gst) >= GST_STATE_READY) {
-                       wfd_sink_debug("try to change state of video sinkbin to NULL");
+                       wfd_sink_error("try to change state of video sinkbin to NULL");
                        ret = gst_element_set_state(v_sinkbin[WFD_SINK_V_S_BIN].gst, GST_STATE_NULL);
                        if (ret != GST_STATE_CHANGE_SUCCESS) {
                                wfd_sink_error("failed to change state of video sinkbin to NULL");
@@ -4482,7 +4487,7 @@ static int __mm_wfd_sink_destroy_video_sinkbin(mm_wfd_sink_t *wfd_sink)
 
        MMWFDSINK_FREEIF(wfd_sink->pipeline->v_sinkbin);
 
-       wfd_sink_debug_fleave();
+       wfd_sink_error_fleave();
 
        return MM_ERROR_NONE;
 }
@@ -4682,7 +4687,7 @@ static int __mm_wfd_sink_destroy_pipeline(mm_wfd_sink_t *wfd_sink)
 
                        ret = gst_element_set_state(mainbin[WFD_SINK_M_PIPE].gst, GST_STATE_NULL);
                        if (ret != GST_STATE_CHANGE_SUCCESS) {
-                               wfd_sink_error("failed to change state of pipeline to NULL");
+                               wfd_sink_error("failed to change state of pipeline to NULL. ret[%d]", ret);
                                return MM_ERROR_WFD_INTERNAL;
                        } else {
                                wfd_sink_debug("Successed to change state of pipeline to NULL");