delete dlog and tizen definition.
related issue : #807
TODO : determine log level defined in common header
Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
PROJECT(nnstreamer C CXX)
-OPTION(TIZEN "Enable Tizen build mode" OFF)
OPTION(ENABLE_TENSORFLOW_LITE "Enable tensorflow-lite support" ON)
OPTION(ENABLE_TENSORFLOW "Enable tensorflow support" OFF)
OPTION(ENABLE_MODEL_DOWNLOAD "Enable download the model files" ON)
glib-2.0
)
-IF(TIZEN)
- ADD_DEFINITIONS(-DTIZEN=1)
- # Enable dlog of Tizen.
- SET(PKG_MODULES ${PKG_MODULES} dlog)
-ENDIF(TIZEN)
-
pkg_check_modules(pkgs REQUIRED ${PKG_MODULES})
INCLUDE_DIRECTORIES(
#define str(s) xstr(s)
#define xstr(s) #s
-#include <glib/gprintf.h>
-#ifdef TIZEN
-#include <dlog.h>
-#else
-#define dlog_print(loglevel, component, ...) \
- do { \
- g_message(__VA_ARGS__); \
- } while (0)
-#endif
-
/**
- * @brief Debug message print. In Tizen, it uses dlog; otherwise,m it uses g_message().
+ * @brief Debug message print.
*/
-#define debug_print(cond, ...) \
+#define debug_print(cond,...) \
do { \
if ((cond) == TRUE) { \
- dlog_print(DLOG_DEBUG, "nnstreamer", __FILE__ ":" str(__LINE__) " " __VA_ARGS__); \
+ g_message (__FILE__ ":" str(__LINE__) " " __VA_ARGS__); \
} \
} while (0)
/**
- * @brief Error message print. In Tizen, it uses dlog; otherwise,m it uses g_message().
+ * @brief Error message print.
*/
-#define err_print(...) dlog_print(DLOG_ERROR, "nnstreamer", __VA_ARGS__)
+#define err_print(...) \
+ do { \
+ g_warning (__FILE__ ":" str(__LINE__) " " __VA_ARGS__); \
+ } while (0)
/**
* @brief A callback for typefind, trying to find whether a file is other/tensors or not.
gstreamer-base-1.0
gstreamer-controller-1.0
gstreamer-video-1.0
+ gstreamer-audio-1.0
gstreamer-app-1.0
)
pkg_check_modules(apppkgs REQUIRED ${PKGAPP_MODULES})
Source1001: nnstreamer.manifest
Requires: gstreamer >= 1.8.0
-Requires: libdlog
BuildRequires: gstreamer-devel
BuildRequires: gst-plugins-base-devel
BuildRequires: glib2-devel
BuildRequires: cmake
-BuildRequires: libdlog-devel
# To run test cases, we need gst plugins
BuildRequires: gst-plugins-good
pushd build
export GST_PLUGIN_PATH=$(pwd)
export LD_LIBRARY_PATH=$(pwd):$(pwd)/gst/tensor_filter
-%cmake .. -DTIZEN=ON -DGST_INSTALL_DIR=%{gstlibdir} -DENABLE_MODEL_DOWNLOAD=OFF
+%cmake .. -DGST_INSTALL_DIR=%{gstlibdir} -DENABLE_MODEL_DOWNLOAD=OFF
make %{?_smp_mflags}
./tests/unittest_common
./tests/unittest_sink --gst-plugin-path=.
FIND_LIBRARY(GTEST_LIB gtest)
-IF(TIZEN OR GTEST_LIB)
- # Use GTEST shared lib (Tizen supplied gtest as shared lib)
+IF(GTEST_LIB)
+ # Use GTEST shared lib
SET(gtestLink gtest pthread)
SET(gtestSrc "")
SET(gtestInc "")
-ELSE(TIZEN OR GTEST_LIB)
+ELSE(GTEST_LIB)
IF (NOT EXISTS /usr/src/gtest/src/gtest-all.cc)
MESSAGE(FATAL FATAL_ERROR "You need to install libgtest-dev or (supplied with GTEST_LIB) libgtest.so.")
ENDIF ()
SET(gtestLink pthread)
SET(gtestSrc /usr/src/gtest/src/gtest-all.cc)
SET(gtestInc /usr/src/gtest)
-ENDIF(TIZEN OR GTEST_LIB)
+ENDIF(GTEST_LIB)
pkg_check_modules(testpkgs REQUIRED ${PKGTEST_MODULES})