Remove mm-log dependency 36/150236/1
authorSeokHoon Lee <andy.shlee@samsung.com>
Fri, 15 Sep 2017 01:55:18 +0000 (10:55 +0900)
committerSeokHoon Lee <andy.shlee@samsung.com>
Fri, 15 Sep 2017 01:55:42 +0000 (10:55 +0900)
- change mm-log to dlog and
  remove mm-log dependency.

Signed-off-by: SeokHoon Lee <andy.shlee@samsung.com>
Change-Id: I8618bc17f89d1a177f3a67060d1cf18e745a32ce

configure.ac
mm-streamrecorder.pc.in
packaging/libmm-streamrecorder.spec
src/Makefile.am
src/include/mm_streamrecorder_util.h [changed mode: 0755->0644]
src/mm_streamrecorder_ini.c

index 91eadff..2de17cc 100644 (file)
@@ -40,9 +40,9 @@ PKG_CHECK_MODULES(MM_COMMON, mm-common)
 AC_SUBST(MM_COMMON_CFLAGS)
 AC_SUBST(MM_COMMON_LIBS)
 
-PKG_CHECK_MODULES(MM_LOG, mm-log)
-AC_SUBST(MM_LOG_CFLAGS)
-AC_SUBST(MM_LOG_LIBS)
+PKG_CHECK_MODULES(DLOG, dlog)
+AC_SUBST(DLOG_CFLAGS)
+AC_SUBST(DLOG_LIBS)
 
 PKG_CHECK_MODULES(GLIB, glib-2.0)
 AC_SUBST(GLIB_CFLAGS)
index 799aca2..7820809 100644 (file)
@@ -5,7 +5,7 @@ includedir=@includedir@
 
 Name: mm-streamrecorder
 Description: Multimedia Framework Stream Recorder Library
-Requires: gstreamer-1.0 gstreamer-base-1.0 mm-common mm-log
+Requires: gstreamer-1.0 gstreamer-base-1.0 mm-common dlog
 Version: $VERSION
 Libs: -L${libdir} -lmmfstreamrecorder
 Cflags: -I${includedir}/ -I${includedir}/mmf
index 81bf4e1..26fb19d 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-streamrecorder
 Summary:    Media Stream Recorder library
-Version:    0.0.15
+Version:    0.0.16
 Release:    0
 Group:      Multimedia/Other
 License:    Apache-2.0
@@ -8,7 +8,7 @@ Source0:    %{name}-%{version}.tar.gz
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
 BuildRequires:  pkgconfig(mm-common)
-BuildRequires:  pkgconfig(mm-log)
+BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(gstreamer-base-1.0)
 BuildRequires:  pkgconfig(gstreamer-video-1.0)
 BuildRequires:  pkgconfig(gstreamer-app-1.0)
index 13d6b6c..2138fc5 100644 (file)
@@ -37,7 +37,7 @@ libmmfstreamrecorder_la_CFLAGS = -I$(srcdir)/include \
                             $(GST_PLUGIN_BASE_CFLAGS) \
                             $(GST_VIDEO_CFLAGS) \
                             $(GST_INTERFACES_CFLAGS) \
-                            $(MM_LOG_CFLAGS) \
+                            $(DLOG_CFLAGS) \
                             $(MM_COMMON_CFLAGS) \
                             $(GST_APP_CFLAGS)
 
@@ -47,11 +47,7 @@ libmmfstreamrecorder_la_LIBADD = \
                            $(GST_VIDEO_LIBS) \
                            $(GST_INTERFACES_LIBS) \
                            $(MM_COMMON_LIBS) \
-                           $(MM_LOG_LIBS) \
+                           $(DLOG_LIBS) \
                            $(VCONF_LIBS) \
                            $(GST_APP_LIBS) \
                            $(INIPARSER_LIBS)
-
-libmmfstreamrecorder_la_CFLAGS += $(MMLOGSVR_CFLAGS) -DMMF_LOG_OWNER=0x00400000 -DMMF_DEBUG_PREFIX=\"MMF-STREAMRECORDER\"
-libmmfstreamrecorder_la_LIBADD += $(MMLOGSVR_LIBS)
-
old mode 100755 (executable)
new mode 100644 (file)
index 12f643b..93f9a72
@@ -28,9 +28,9 @@
 #include <gst/gst.h>
 #include <gst/gstutils.h>
 #include <gst/gstpad.h>
-#include "mm_debug.h"
 #include <glib.h>
-#include<stdio.h>
+#include <stdio.h>
+#include <dlog.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -53,11 +53,16 @@ extern "C" {
                x = NULL; \
        }
 
-#define _mmstreamrec_dbg_verb(fmt, args...)  debug_verbose(" "fmt"\n", ##args);
-#define _mmstreamrec_dbg_log(fmt, args...)   debug_log(" "fmt"\n", ##args);
-#define _mmstreamrec_dbg_warn(fmt, args...)  debug_warning(" "fmt"\n", ##args);
-#define _mmstreamrec_dbg_err(fmt, args...)   debug_error(" "fmt"\n", ##args);
-#define _mmstreamrec_dbg_crit(fmt, args...)  debug_critical(" "fmt"\n", ##args);
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+#define LOG_TAG "MM_STREAMRECORDER"
+
+#define _mmstreamrec_dbg_verb(fmt, args...)  SLOGI(fmt, ##args);
+#define _mmstreamrec_dbg_log(fmt, args...)   SLOGD(fmt, ##args);
+#define _mmstreamrec_dbg_warn(fmt, args...)  SLOGW(fmt, ##args);
+#define _mmstreamrec_dbg_err(fmt, args...)   SLOGE(fmt, ##args);
+#define _mmstreamrec_dbg_crit(fmt, args...)  SLOGF(fmt, ##args);
 
 /**
  *     Macro for checking validity and debugging
index 6c93740..d3f88c1 100644 (file)
@@ -23,7 +23,6 @@
 #include <glib/gstdio.h>
 #include <stdlib.h>
 #include <iniparser.h>
-#include <mm_debug.h>
 #include <mm_error.h>
 #include "mm_streamrecorder_ini.h"
 
@@ -64,7 +63,7 @@ do { \
        token = strtok_r(temp_arr, delimiters, &usr_ptr); \
        while (token) { \
                if (index > x_list_max -1) { \
-                       debug_error("%d is not valid index\n", index); \
+                       _mmstreamrec_dbg_err("%d is not valid index\n", index); \
                        break; \
                } else { \
                        value = atoi(token); \
@@ -79,7 +78,7 @@ int _mm_streamrecorder_ini_load(mm_streamrecorder_ini_t *ini)
 {
        dictionary *dict = NULL;
 
-       debug_fenter();
+       _mmstreamrec_dbg_warn("enter");
 
        __mm_streamrecorder_ini_check_status();
 
@@ -222,7 +221,7 @@ int _mm_streamrecorder_ini_load(mm_streamrecorder_ini_t *ini)
 
        loaded = TRUE;
 
-       debug_fleave();
+       _mmstreamrec_dbg_warn("leave");
 
        return MM_ERROR_NONE;
 }
@@ -326,7 +325,7 @@ void __mm_streamrecorder_ini_check_status(void)
 {
        struct stat ini_buff;
 
-       debug_fenter();
+       _mmstreamrec_dbg_warn("enter");
 
        if (g_stat(MM_STREAMRECORDER_INI_DEFAULT_PATH, &ini_buff) < 0) {
                _mmstreamrec_dbg_err("failed to get mmfw_streamrecorder.ini status\n");
@@ -337,16 +336,16 @@ void __mm_streamrecorder_ini_check_status(void)
                }
        }
 
-       debug_fleave();
+       _mmstreamrec_dbg_warn("leave");
 }
 
 int _mm_streamrecorder_ini_unload(mm_streamrecorder_ini_t *ini)
 {
-       debug_fenter();
+       _mmstreamrec_dbg_warn("enter");
 
        loaded = FALSE;
 
-       debug_fleave();
+       _mmstreamrec_dbg_warn("leave");
 
        return MM_ERROR_NONE;
 }