From 7c3b2041cf2884ca26f34ee858a43a61f1cb0a1d Mon Sep 17 00:00:00 2001 From: Haejeong Kim Date: Fri, 25 Aug 2017 11:48:21 +0900 Subject: [PATCH] remove dependency of mmutil-imgp Change-Id: I5e8d29b001af229c78ee7f216af4f30b03e0df0c --- CMakeLists.txt | 2 +- libdcm-util/dcm_image_codec.c | 13 ++++--------- packaging/dcm-service.spec | 3 +-- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec12657..0d6f25f 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/libdcm-util/ INCLUDE(FindPkgConfig) pkg_check_modules(pkgs REQUIRED glib-2.0 gthread-2.0 dlog sqlite3 capi-media-image-util capi-media-vision -media-thumbnail libmedia-utils mmutil-imgp uuid vconf libtzplatform-config) +media-thumbnail libmedia-utils uuid vconf libtzplatform-config) FOREACH(flag ${pkgs_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") diff --git a/libdcm-util/dcm_image_codec.c b/libdcm-util/dcm_image_codec.c index 6ceaea1..0cf333f 100755 --- a/libdcm-util/dcm_image_codec.c +++ b/libdcm-util/dcm_image_codec.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -200,7 +199,6 @@ int dcm_decode_image(const char *file_path, const dcm_image_format_e format, { int ret = IMAGE_UTIL_ERROR_NONE; image_util_colorspace_e colorspace = IMAGE_UTIL_COLORSPACE_RGBA8888; - mm_util_img_format mm_format = MM_UTIL_IMG_FMT_RGBA8888; unsigned char *decode_buffer = NULL; unsigned int decode_width = 0, decode_height = 0; unsigned char *resize_buffer = NULL; @@ -227,13 +225,10 @@ int dcm_decode_image(const char *file_path, const dcm_image_format_e format, if (strcmp(mimne_type, MIME_TYPE_JPEG) == 0) { if (format == DCM_IMAGE_FORMAT_I420) { colorspace = IMAGE_UTIL_COLORSPACE_I420; - mm_format = MM_UTIL_IMG_FMT_I420; } else if (format == DCM_IMAGE_FORMAT_RGB) { colorspace = IMAGE_UTIL_COLORSPACE_RGB888; - mm_format = MM_UTIL_IMG_FMT_RGB888; } else if (format == DCM_IMAGE_FORMAT_RGBA) { colorspace = IMAGE_UTIL_COLORSPACE_RGBA8888; - mm_format = MM_UTIL_IMG_FMT_RGBA8888; } else { image_util_decode_destroy(handle); return MS_MEDIA_ERR_UNSUPPORTED_CONTENT; @@ -278,7 +273,7 @@ int dcm_decode_image(const char *file_path, const dcm_image_format_e format, /* Resize the big size image to enhance performance for big size image */ if ((decode_width != *buff_width) || (decode_height != *buff_height)) { ret = image_util_calculate_buffer_size(*buff_width, *buff_height, colorspace, &buffer_size); - if (ret != MS_MEDIA_ERR_NONE) { + if (ret != IMAGE_UTIL_ERROR_NONE) { dcm_error("Failed to calculate image buffer size! err: %d", ret); return MS_MEDIA_ERR_INTERNAL; } @@ -286,10 +281,10 @@ int dcm_decode_image(const char *file_path, const dcm_image_format_e format, *size = buffer_size; resize_buffer = (unsigned char *)malloc(sizeof(unsigned char) * (buffer_size)); if (resize_buffer != NULL) { - ret = mm_util_resize_image(decode_buffer, decode_width, decode_height, mm_format, resize_buffer, buff_width, buff_height); + ret = image_util_resize(resize_buffer, (int *)buff_width, (int *)buff_height, decode_buffer, decode_width, decode_height, colorspace); DCM_SAFE_FREE(decode_buffer); - if (ret != MS_MEDIA_ERR_NONE) { - dcm_error("Failed to mm_util_resize_image"); + if (ret != IMAGE_UTIL_ERROR_NONE) { + dcm_error("Failed to image_util_resize"); DCM_SAFE_FREE(resize_buffer); return MS_MEDIA_ERR_INTERNAL; } diff --git a/packaging/dcm-service.spec b/packaging/dcm-service.spec index 0b12c38..dd72bd7 100755 --- a/packaging/dcm-service.spec +++ b/packaging/dcm-service.spec @@ -1,6 +1,6 @@ Name: dcm-service Summary: A media DCM(Digital Contents Management) Service -Version: 0.1.7 +Version: 0.1.8 Release: 0 Group: Multimedia/Service License: Apache-2.0 @@ -20,7 +20,6 @@ BuildRequires: pkgconfig(capi-media-vision) BuildRequires: pkgconfig(media-thumbnail) BuildRequires: pkgconfig(libmedia-utils) BuildRequires: pkgconfig(libtzplatform-config) -BuildRequires: pkgconfig(mmutil-imgp) BuildRequires: pkgconfig(vconf) BuildRequires: pkgconfig(uuid) -- 2.34.1