Add macro for log - LOG_ERROR_IF_REACHED() 24/242624/7
authorSangchul Lee <sc11.lee@samsung.com>
Fri, 28 Aug 2020 09:10:31 +0000 (18:10 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Tue, 8 Sep 2020 05:47:40 +0000 (14:47 +0900)
[Version] 0.1.6
[Issue Type] Debug

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

index 6c94088f11618e8227ea3da79fc12a26cc68011e..c177ddb5905d811293cee880938f38eb6af4d344 100644 (file)
@@ -60,6 +60,11 @@ do { \
        LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \
 } while (0)
 
+#define LOG_ERROR_IF_REACHED(fmt, arg...) \
+do { \
+       LOGE(FONT_COLOR_RED"should not be reached here. "fmt""FONT_COLOR_RESET, ##arg); \
+} while (0)
+
 #define LOG_DEBUG_ENTER() \
 do { \
        LOGD(FONT_COLOR_PURPLE"<Enter>"FONT_COLOR_RESET); \
index 7b78611bf14d265154bd02dd57a7bba6e3148c4b..dd4403c4a818fea99fb046e9b1f1fa067b773239 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-webrtc
 Summary:    A WebRTC library in Tizen Native API
-Version:    0.1.5
+Version:    0.1.6
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index e73f8c69f407be758f9757757add433de90ce3fb..7e93372dd7c0103b300937866685a769ccf5f671 100644 (file)
@@ -417,7 +417,7 @@ static GstCaps *__make_default_raw_caps(webrtc_media_source_type_e type)
                break;
 
        default:
-               LOG_ERROR("should not be reached here");
+               LOG_ERROR_IF_REACHED("type(%d)", type);
                break;
        }
 
@@ -448,7 +448,7 @@ static GstCaps *__make_default_encoded_caps(webrtc_media_source_type_e type)
                break;
 
        default:
-               LOG_ERROR("should not be reached here");
+               LOG_ERROR_IF_REACHED("type(%d)", type);
                break;
        }
 
@@ -701,7 +701,7 @@ static int __build_source_bin(webrtc_gst_slot_s *source)
                return __build_audiotestsrc(source->bin, source->type, src_pad);
 
        default:
-               LOG_ERROR("should not be reached here");
+               LOG_ERROR_IF_REACHED("type(%d)", source->type);
                return WEBRTC_ERROR_INVALID_PARAMETER;
        }