From: Ravi Kiran K N Date: Wed, 12 Feb 2014 11:12:09 +0000 (+0530) Subject: Use tz platform config API to get the user content directory instead of hard-wired... X-Git-Tag: submit/tizen_common/20140521.163740^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bd9a7e1a59dbee5b8ac911b9ebb7017d13a8112f;p=platform%2Fcore%2Fmultimedia%2Flibmm-utility.git Use tz platform config API to get the user content directory instead of hard-wired path configure.ac: module specification for libtzplatform-config Makefile.am: Include tz platform config flags and lib mm_util_jpeg_testsuite.c: Remove hard-wired path and get path from tzplatform_makepath libmm-utility.spec: include package tzplatform-config Bug-Tizen: PTREL-203 Change-Id: I9e7c15391e22156f695ec519afe4f22b6dd50c26 Signed-off-by: Ravi Kiran K N --- diff --git a/configure.ac b/configure.ac index caa2aba..ad84831 100755 --- a/configure.ac +++ b/configure.ac @@ -53,6 +53,11 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0) AC_SUBST(GMODULE_CFLAGS) AC_SUBST(GMODULE_LIBS) +#tz-platform-config lib +PKG_CHECK_MODULES(TZ_PLATFORM_CONFIG, libtzplatform-config) +AC_SUBST(TZ_PLATFORM_CONFIG_CFLAGS) +AC_SUBST(TZ_PLATFORM_CONFIG_LIBS) + AC_CONFIG_FILES([Makefile imgp/Makefile imgp/test/Makefile diff --git a/jpeg/test/Makefile.am b/jpeg/test/Makefile.am index 290d3ed..3efb66d 100755 --- a/jpeg/test/Makefile.am +++ b/jpeg/test/Makefile.am @@ -5,7 +5,8 @@ mm_util_jpeg_testsuite_SOURCES = mm_util_jpeg_testsuite.c mm_util_jpeg_testsuite_CFLAGS = -I$(srcdir)/../include mm_util_jpeg_testsuite_CFLAGS += $(MMTA_CFLAGS) -DGST_EXT_TIME_ANALYSIS \ $(MMCOMMON_CFLAGS) \ - $(MMLOG_CFLAGS) -DMMF_LOG_OWNER=0x0100 -DMMF_DEBUG_PREFIX=\"MMF-IMAGE\" + $(MMLOG_CFLAGS) -DMMF_LOG_OWNER=0x0100 -DMMF_DEBUG_PREFIX=\"MMF-IMAGE\" \ + $(TZ_PLATFORM_CONFIG_FLAGS) ############################################ @@ -14,5 +15,6 @@ mm_util_jpeg_testsuite_DEPENDENCIES = $(srcdir)/../libmmutil_jpeg.la mm_util_jpeg_testsuite_LDADD = $(srcdir)/../libmmutil_jpeg.la mm_util_jpeg_testsuite_LDADD += $(MMTA_LIBS) \ - $(MMCOMMON_LIBS) + $(MMCOMMON_LIBS) \ + $(TZ_PLATFORM_CONFIG_LIBS) diff --git a/jpeg/test/mm_util_jpeg_testsuite.c b/jpeg/test/mm_util_jpeg_testsuite.c index c41b365..9e1480a 100755 --- a/jpeg/test/mm_util_jpeg_testsuite.c +++ b/jpeg/test/mm_util_jpeg_testsuite.c @@ -30,8 +30,11 @@ #include #include #include -#define ENCODE_RESULT_PATH "/opt/usr/media/encode_test.jpg" -#define DECODE_RESULT_PATH "/opt/usr/media/decode_test." +#include + +#define ENCODE_RESULT_PATH tzplatform_mkpath(TZ_USER_CONTENT, "encode_test.jpg") +#define DECODE_RESULT_PATH tzplatform_mkpath(TZ_USER_CONTENT, "decode_test.") + #define TRUE 1 #define FALSE 0 #define BUFFER_SIZE 128 diff --git a/packaging/libmm-utility.spec b/packaging/libmm-utility.spec index 9e0bf42..2a1f9e3 100644 --- a/packaging/libmm-utility.spec +++ b/packaging/libmm-utility.spec @@ -14,6 +14,7 @@ BuildRequires: pkgconfig(mm-ta) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gmodule-2.0) BuildRequires: libjpeg-turbo-devel +BuildRequires: pkgconfig(libtzplatform-config) BuildRoot: %{_tmppath}/%{name}-%{version}-build