Use new video thumbnail extracting API provided by libmedia-thumbnail and Remove... 67/226867/5
authorhj kim <backto.kim@samsung.com>
Fri, 6 Mar 2020 05:10:40 +0000 (14:10 +0900)
committerhj kim <backto.kim@samsung.com>
Fri, 13 Mar 2020 05:49:58 +0000 (14:49 +0900)
Duplicated thumbnail extracing codes were unified into libmedia-thumbnail.

Change-Id: I317b819ae83994faa2edda8d72395449a4111210

src/thumbnail_util.c

index 88e4292..336077e 100644 (file)
@@ -547,6 +547,8 @@ int thumbnail_util_extract_to_buffer(const char *path, unsigned int width, unsig
                        thumbnail_util_error("This image format is not supported");
                        return THUMBNAIL_UTIL_ERROR_UNSUPPORTED_CONTENT;
                }
+       } else if (type == THUMBNAIL_UTIL_VIDEO) {
+               return __thumbnail_util_error_capi(create_video_thumbnail_to_buffer(path, width, height, thumb_buffer, thumb_size, thumb_width, thumb_height, false));
        }
 
        thumb = calloc(1, sizeof(thumbnail_data_s));
@@ -621,6 +623,8 @@ int thumbnail_util_extract_to_file(const char *path, unsigned int width, unsigne
                        thumbnail_util_error("Wrong file name[%s]", thumbnail_path);
                        return THUMBNAIL_UTIL_ERROR_INVALID_PARAMETER;
                }
+
+               return __thumbnail_util_error_capi(create_video_thumbnail_to_file(path, width, height, thumbnail_path, false));
        }
 
        thumb = calloc(1, sizeof(thumbnail_data_s));