From 4588212ac8b59c5c7b7af5cdda44b775bbcfe4cb Mon Sep 17 00:00:00 2001 From: "jiyong.min" Date: Thu, 7 Mar 2019 11:10:15 +0900 Subject: Replace mm-utility function to use mm_image_xxx() Change-Id: Ia216c2678d1d7fc84759c6e3f216cc22f7545f8b --- src/media-thumb-internal.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/media-thumb-internal.c b/src/media-thumb-internal.c index 47051d4..871e913 100755 --- a/src/media-thumb-internal.c +++ b/src/media-thumb-internal.c @@ -77,14 +77,14 @@ int _media_thumb_general(const char *origin_path, const char *thumb_path, int th return MS_MEDIA_ERR_INTERNAL; } - mm_util_get_image(img, &buf, &width, &height, &size, &format); + mm_image_get_image(img, &width, &height, &format, &buf, &size); thumb_info->data = calloc(1, size); memcpy(thumb_info->data, buf, size); thumb_info->size = size; thumb_info->width = width; thumb_info->height = height; SAFE_FREE(buf); - mm_util_destroy_handle(img); + mm_image_destroy_image(img); } return err; @@ -246,7 +246,7 @@ int _media_thumb_video(const char *origin_path, const char *thumb_path, int thum thumb_dbg("Origin:W[%d] H[%d] Proper:W[%d] H[%d]", width, height, thumb_width, thumb_height); - err = mm_util_create_handle(&img, (unsigned char *)frame, width, height, size, MM_UTIL_COLOR_RGB24); + err = mm_image_create_image(width, height, MM_UTIL_COLOR_RGB24, (unsigned char *)frame, size, &img); if (width > thumb_width || height > thumb_height) { if (rot_type != MM_UTIL_ROTATE_0) { if (STRING_VALID(thumb_path)) { @@ -261,7 +261,7 @@ int _media_thumb_video(const char *origin_path, const char *thumb_path, int thum err = mm_util_rotate_B_B(resize_img, rot_type, &dst_img); if (err != MM_UTIL_ERROR_NONE) goto ERROR; - mm_util_get_image(dst_img, &res_buf, &res_width, &res_height, &res_size, &res_format); + mm_image_get_image(dst_img, &res_width, &res_height, &res_format, &res_buf, &res_size); thumb_info->data = calloc(1, res_size); memcpy(thumb_info->data, res_buf, res_size); thumb_info->size = res_size; @@ -276,7 +276,7 @@ int _media_thumb_video(const char *origin_path, const char *thumb_path, int thum err = mm_util_resize_B_B(img, thumb_width, thumb_height, &resize_img); if (err != MM_UTIL_ERROR_NONE) goto ERROR; - mm_util_get_image(resize_img, &res_buf, &res_width, &res_height, &res_size, &res_format); + mm_image_get_image(resize_img, &res_width, &res_height, &res_format, &res_buf, &res_size); thumb_info->data = calloc(1, res_size); memcpy(thumb_info->data, res_buf, res_size); thumb_info->size = res_size; @@ -293,7 +293,7 @@ int _media_thumb_video(const char *origin_path, const char *thumb_path, int thum err = mm_util_rotate_B_B(img, rot_type, &dst_img); if (err != MM_UTIL_ERROR_NONE) goto ERROR; - mm_util_get_image(dst_img, &res_buf, &res_width, &res_height, &res_size, &res_format); + mm_image_get_image(dst_img, &res_width, &res_height, &res_format, &res_buf, &res_size); thumb_info->data = calloc(1, res_size); memcpy(thumb_info->data, res_buf, res_size); thumb_info->size = res_size; @@ -316,9 +316,9 @@ int _media_thumb_video(const char *origin_path, const char *thumb_path, int thum } ERROR: - mm_util_destroy_handle(img); - mm_util_destroy_handle(resize_img); - mm_util_destroy_handle(dst_img); + mm_image_destroy_image(img); + mm_image_destroy_image(resize_img); + mm_image_destroy_image(dst_img); mm_file_destroy_content_attrs(content); if (err != MS_MEDIA_ERR_NONE) -- cgit v1.2.3