summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjiyong.min <jiyong.min@samsung.com>2019-03-07 11:10:15 +0900
committerjiyong.min <jiyong.min@samsung.com>2019-03-07 11:11:30 +0900
commit4588212ac8b59c5c7b7af5cdda44b775bbcfe4cb (patch)
tree2012f1368cf67c0eb56a5fec8b51d9ac4116fa86 /src
parent066b1b2972efae4f93058d0f1af6781b18a507cb (diff)
downloadlibmedia-thumbnail-4588212ac8b59c5c7b7af5cdda44b775bbcfe4cb.tar.gz
libmedia-thumbnail-4588212ac8b59c5c7b7af5cdda44b775bbcfe4cb.tar.bz2
libmedia-thumbnail-4588212ac8b59c5c7b7af5cdda44b775bbcfe4cb.zip
Replace mm-utility function to use mm_image_xxx()submit/tizen/20190311.013617accepted/tizen/unified/20190311.220550
Change-Id: Ia216c2678d1d7fc84759c6e3f216cc22f7545f8b
Diffstat (limited to 'src')
-rwxr-xr-xsrc/media-thumb-internal.c18
1 files changed, 9 insertions, 9 deletions
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)