Remove unused parameter 78/280578/1
authorminje.ahn <minje.ahn@samsung.com>
Thu, 1 Sep 2022 02:22:33 +0000 (11:22 +0900)
committerminje.ahn <minje.ahn@samsung.com>
Thu, 1 Sep 2022 02:22:33 +0000 (11:22 +0900)
Change-Id: I99cf1370722028f14049ee925cbe4f824163d580
Signed-off-by: minje.ahn <minje.ahn@samsung.com>
include/media-thumbnail.h
packaging/libmedia-thumbnail.spec
src/media-thumbnail.c

index e3f4d5d..f091f1a 100755 (executable)
@@ -34,7 +34,7 @@ extern "C" {
 #define THUMB_STRING_VALID(str)        ((str != NULL && strlen(str) > 0) ? true : false)
 
 int create_video_thumbnail_to_file(const char *path, unsigned int width, unsigned int height, const char *thumb_path, bool auto_rotate);
-int create_video_thumbnail_to_buffer(const char *path, unsigned int width, unsigned int height, unsigned char **thumb_buffer, size_t *thumb_size, unsigned int *thumb_width, unsigned int *thumb_height, bool auto_rotate);
+int create_video_thumbnail_to_buffer(const char *path, unsigned int width, unsigned int height, unsigned char **thumb_buffer, size_t *thumb_size, unsigned int *thumb_width, unsigned int *thumb_height);
 int create_image_thumbnail_to_file(const char *path, unsigned int width, unsigned int height, const char *thumb_path, bool auto_rotate);
 int create_image_thumbnail_to_buffer(const char *path, unsigned int width, unsigned int height, unsigned char **thumb_buffer, size_t *thumb_size, unsigned int *thumb_width, unsigned int *thumb_height);
 
index 66ae0a6..32a2f4f 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmedia-thumbnail
 Summary:    Media thumbnail service library for multimedia applications
-Version:    0.4.1
+Version:    0.4.2
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index f0b3e2f..4d85f64 100755 (executable)
@@ -131,7 +131,8 @@ static int __get_video_info(const char *path, int *video_track_num, unsigned int
        __get_rotation_and_cdis(path, &_rot_type, &_cdis_value);
        err = __get_video_meta(_cdis_value, path, video_track_num, width, height, frame, frame_size);
 
-       *rot_type = _rot_type;
+       if (rot_type)
+               *rot_type = _rot_type;
 
        return err;
 }
@@ -356,8 +357,7 @@ int create_video_thumbnail_to_buffer(const char *path,
                                                                unsigned char **thumb_buffer,
                                                                size_t *thumb_size,
                                                                unsigned int *thumb_width,
-                                                               unsigned int *thumb_height,
-                                                               bool auto_rotate)
+                                                               unsigned int *thumb_height)
 {
        int err = MS_MEDIA_ERR_NONE;
        int video_track_num = 0;
@@ -366,21 +366,17 @@ int create_video_thumbnail_to_buffer(const char *path,
        void *frame = NULL;
        size_t frame_size = 0;
        mm_util_image_h img = NULL;
-       mm_util_rotate_type_e rot_type = MM_UTIL_ROTATE_NUM;
 
        err = __check_parameter_validity_for_buffer(path, width, height, thumb_buffer, thumb_size, thumb_width, thumb_height);
        thumb_retvm_if(err != MS_MEDIA_ERR_NONE, err, "Invalid parameter");
 
        //Get video info
-       err = __get_video_info(path, &video_track_num, &video_w, &video_h, &frame, &frame_size, &rot_type);
+       err = __get_video_info(path, &video_track_num, &video_w, &video_h, &frame, &frame_size, NULL);
        thumb_retvm_if(err != MM_UTIL_ERROR_NONE, err, "fail to __get_video_info [%d]", err);
        thumb_retvm_if(video_track_num == 0, MM_UTIL_ERROR_NONE, "No video track");
 
-       if (!auto_rotate)
-               rot_type = MM_UTIL_ROTATE_0;
-
        //Extract thumbnail
-       err = __get_video_thumb_to_buffer(video_w, video_h, frame, frame_size, rot_type, width, height, &img);
+       err = __get_video_thumb_to_buffer(video_w, video_h, frame, frame_size, MM_UTIL_ROTATE_0, width, height, &img);
        g_free(frame);
        if (err != MS_MEDIA_ERR_NONE)
                return err;