Prevent albumart resize for performance 80/224180/3 accepted/tizen/unified/20200207.122432 submit/tizen/20200206.031941
authorMinje Ahn <minje.ahn@samsung.com>
Fri, 7 Feb 2020 02:46:58 +0000 (11:46 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Fri, 7 Feb 2020 03:47:05 +0000 (12:47 +0900)
Change-Id: I7cbe3637d7b457135226dd13d12fc0b5964f98a6
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
packaging/libmedia-service.spec
src/common/media-svc-util.c

index 573075c..3e37eac 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmedia-service
 Summary:    Media information service library for multimedia applications
-Version: 0.4.6
+Version: 0.4.7
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0 and PD
index 1aa74d4..86d5de5 100644 (file)
@@ -493,7 +493,7 @@ static bool __media_svc_get_file_ext(const char *file_path, char *file_ext)
        }
        return false;
 }
-
+#if 0
 static int __media_svc_resize_artwork(const char *path, const char *img_format)
 {
        int ret = MS_MEDIA_ERR_NONE;
@@ -532,7 +532,7 @@ static int __media_svc_resize_artwork(const char *path, const char *img_format)
 
        return ret;
 }
-
+#endif
 static int __media_svc_safe_atoi(char *buffer, int *si)
 {
        char *end = NULL;
@@ -1319,6 +1319,12 @@ int _media_svc_extract_media_metadata(sqlite3 *handle, bool is_direct, media_svc
                                                if (ret != MS_MEDIA_ERR_NONE) {
                                                        media_svc_error("Fail to Save Image");
                                                } else {
+                                                       content_info->thumbnail_path = g_strdup(thumb_path);
+                                                       /* NOTICE : Prevent resize for performance (2020.02.07)
+                                                       *  In most cases, artwork's format is jpeg and size is under MEDIA_SVC_ARTWORK_SIZE * MEDIA_SVC_ARTWORK_SIZE.
+                                                       *  So, doing mm_util_extract_image_info to check image size is a time-consuming task.
+                                                       */
+#if 0
                                                        /* albumart resizing */
                                                        ret = __media_svc_resize_artwork(thumb_path, p);
                                                        if (ret != MS_MEDIA_ERR_NONE) {
@@ -1328,6 +1334,7 @@ int _media_svc_extract_media_metadata(sqlite3 *handle, bool is_direct, media_svc
                                                        } else {
                                                                content_info->thumbnail_path = g_strdup(thumb_path);
                                                        }
+#endif
                                                }
                                        }
                                }