diff options
author | minje.ahn <minje.ahn@samsung.com> | 2022-09-01 11:22:33 +0900 |
---|---|---|
committer | minje.ahn <minje.ahn@samsung.com> | 2022-09-01 11:22:33 +0900 |
commit | c85df4905981e59b4edd81ae4fd847cf263b15db (patch) | |
tree | d1e1ad07c21bd5e8cb7996d856260451ac6d5ec9 | |
parent | ca1badcbcd326077d56ae8fa18b156e311aec9e4 (diff) | |
download | libmedia-thumbnail-c85df4905981e59b4edd81ae4fd847cf263b15db.tar.gz libmedia-thumbnail-c85df4905981e59b4edd81ae4fd847cf263b15db.tar.bz2 libmedia-thumbnail-c85df4905981e59b4edd81ae4fd847cf263b15db.zip |
Remove unused parameter
Change-Id: I99cf1370722028f14049ee925cbe4f824163d580
Signed-off-by: minje.ahn <minje.ahn@samsung.com>
-rwxr-xr-x | include/media-thumbnail.h | 2 | ||||
-rw-r--r-- | packaging/libmedia-thumbnail.spec | 2 | ||||
-rwxr-xr-x | src/media-thumbnail.c | 14 |
3 files changed, 7 insertions, 11 deletions
diff --git a/include/media-thumbnail.h b/include/media-thumbnail.h index e3f4d5d..f091f1a 100755 --- a/include/media-thumbnail.h +++ b/include/media-thumbnail.h @@ -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); diff --git a/packaging/libmedia-thumbnail.spec b/packaging/libmedia-thumbnail.spec index 66ae0a6..32a2f4f 100644 --- a/packaging/libmedia-thumbnail.spec +++ b/packaging/libmedia-thumbnail.spec @@ -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 diff --git a/src/media-thumbnail.c b/src/media-thumbnail.c index f0b3e2f..4d85f64 100755 --- a/src/media-thumbnail.c +++ b/src/media-thumbnail.c @@ -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; |