From: jiyong.min Date: Thu, 7 Mar 2019 02:14:14 +0000 (+0900) Subject: Replace mm-utility function to mm_image_xxx() X-Git-Tag: submit/tizen/20190311.013617^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F86%2F200986%2F3;p=platform%2Fcore%2Fapi%2Fthumbnail-util.git Replace mm-utility function to mm_image_xxx() Change-Id: Ia1bc01dc36c21d0cbd83a3cb03e286a44c5624b5 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 5be24be..31c70e3 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ SET(submodule "thumbnail-util") SET(fw_name "${project_prefix}-${service}-${submodule}") # for package file -SET(dependents "dlog glib-2.0 capi-base-common media-thumbnail libmedia-utils storage aul mm-fileinfo mmutil-magick") +SET(dependents "dlog glib-2.0 capi-base-common media-thumbnail libmedia-utils storage aul mm-fileinfo mmutil-common mmutil-magick") SET(pc_dependents "capi-base-common") PROJECT(${fw_name}) diff --git a/packaging/capi-media-thumbnail-util.spec b/packaging/capi-media-thumbnail-util.spec index 9296444..52203f2 100755 --- a/packaging/capi-media-thumbnail-util.spec +++ b/packaging/capi-media-thumbnail-util.spec @@ -14,6 +14,7 @@ BuildRequires: pkgconfig(media-thumbnail) BuildRequires: pkgconfig(storage) BuildRequires: pkgconfig(aul) BuildRequires: pkgconfig(mm-fileinfo) +BuildRequires: pkgconfig(mmutil-common) BuildRequires: pkgconfig(mmutil-magick) Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig diff --git a/src/thumbnail_util.c b/src/thumbnail_util.c index 08770d4..1f4c5e0 100644 --- a/src/thumbnail_util.c +++ b/src/thumbnail_util.c @@ -354,9 +354,9 @@ int _thumbnail_util_extract_video(thumbnail_data_s *thumb) goto ERROR; } - ret = mm_util_create_handle(&img, frame, width, height, size, MM_UTIL_COLOR_RGB24); + ret = mm_image_create_image(width, height, MM_UTIL_COLOR_RGB24, frame, size, &img); if (ret != MM_UTIL_ERROR_NONE) { - thumbnail_util_error("Failed to mm_util_create_handle"); + thumbnail_util_error("Failed to mm_image_create_image"); goto ERROR; } @@ -365,7 +365,7 @@ int _thumbnail_util_extract_video(thumbnail_data_s *thumb) if (thumb->extract_type == THUMBNAIL_UTIL_FILE) { ret = mm_util_resize_B_P(img, thumb_width, thumb_height, thumb->thumbnail_path); - mm_util_destroy_handle(img); + mm_image_destroy_image(img); if (ret != MM_UTIL_ERROR_NONE) goto ERROR; } else { @@ -377,11 +377,11 @@ int _thumbnail_util_extract_video(thumbnail_data_s *thumb) mm_util_color_format_e res_format = MM_UTIL_COLOR_NUM; ret = mm_util_resize_B_B(img, thumb_width, thumb_height, &res_img); - mm_util_destroy_handle(img); + mm_image_destroy_image(img); if (ret != MM_UTIL_ERROR_NONE) goto ERROR; - ret = mm_util_get_image(res_img, &res_buf, &res_width, &res_height, &res_buf_size, &res_format); - mm_util_destroy_handle(res_img); + ret = mm_image_get_image(res_img, &res_width, &res_height, &res_format, &res_buf, &res_buf_size); + mm_image_destroy_image(res_img); if (ret != MM_UTIL_ERROR_NONE) goto ERROR; @@ -443,8 +443,8 @@ int _thumbnail_util_extract(thumbnail_data_s *thumb) ret = mm_util_resize_P_B(thumb->path, thumb_width, thumb_height, MM_UTIL_COLOR_BGRA, &res_img); thumbnail_util_retv_if(ret != MM_UTIL_ERROR_NONE, THUMBNAIL_UTIL_ERROR_INVALID_OPERATION); - ret = mm_util_get_image(res_img, &buf, &width, &height, &buf_size, &format); - mm_util_destroy_handle(res_img); + ret = mm_image_get_image(res_img, &width, &height, &format, &buf, &buf_size); + mm_image_destroy_image(res_img); thumbnail_util_retv_if(ret != MM_UTIL_ERROR_NONE, THUMBNAIL_UTIL_ERROR_INVALID_OPERATION); thumb->buffer = malloc(buf_size * sizeof(unsigned char));