remove dependency of mmutil-imgp 99/146099/2
authorHaejeong Kim <backto.kim@samsung.com>
Fri, 25 Aug 2017 02:48:21 +0000 (11:48 +0900)
committerHaejeong Kim <backto.kim@samsung.com>
Fri, 25 Aug 2017 05:59:45 +0000 (14:59 +0900)
Change-Id: I5e8d29b001af229c78ee7f216af4f30b03e0df0c

CMakeLists.txt
libdcm-util/dcm_image_codec.c
packaging/dcm-service.spec

index ec12657b2b60d710fbcb4609591d6e849b97f3f0..0d6f25f2ad84fdf052ba743979ef92a770608665 100755 (executable)
@@ -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}")
index 6ceaea1f532d209d3e19bb052de5bf8efa48f9bc..0cf333f634c36071ee668fe7b4e0e5764c3787da 100755 (executable)
@@ -19,7 +19,6 @@
 #include <stdlib.h>
 #include <image_util.h>
 #include <image_util_internal.h>
-#include <mm_util_imgp.h>
 #include <dcm_image_codec_debug.h>
 #include <dcm_image_codec.h>
 
@@ -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;
                        }
index 0b12c3808ce34a080f7edf4c8978c63ae31bf51d..dd72bd7cfdb984feda226a8e4b80e6ab1a66617d 100755 (executable)
@@ -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)