Fix the data type size difference 84/283584/1 accepted/tizen_7.0_unified tizen_7.0 accepted/tizen/7.0/unified/20221103.165424 accepted/tizen/7.0/unified/20221110.061834
authorjiyong.min <jiyong.min@samsung.com>
Tue, 18 Oct 2022 00:15:23 +0000 (09:15 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Mon, 31 Oct 2022 04:26:04 +0000 (04:26 +0000)
Change-Id: Ibe5aedb1561ea75415fe0827c5fd086c5552ba4b
(cherry picked from commit c5a9666afb1e104083fc578852805cb82852f31f)

formats/ffmpeg/mm_file_format_frame.c
include/mm_file.h
include/mm_file_format_frame.h
mm_file.c
packaging/libmm-fileinfo.spec
tests/mm_file_test.c

index 5a3e22c..ed2e756 100755 (executable)
@@ -515,7 +515,7 @@ exception:
        return ret;
 }
 
-int mmfile_format_get_frame(const char *path, double timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height)
+int mmfile_format_get_frame(const char *path, int64_t timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height)
 {
        int ret = MMFILE_FORMAT_SUCCESS;
        AVFormatContext *pFormatCtx = NULL;
@@ -533,7 +533,7 @@ int mmfile_format_get_frame(const char *path, double timestamp, bool is_accurate
        return ret;
 }
 
-int mmfile_format_get_frame_from_memory(const void *data, unsigned int datasize, double timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height)
+int mmfile_format_get_frame_from_memory(const void *data, unsigned int datasize, int64_t timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height)
 {
        int ret = MMFILE_FORMAT_SUCCESS;
        int format = -1;
index f4ba486..f54cec6 100755 (executable)
@@ -655,9 +655,9 @@ int mm_file_get_synclyrics_info(MMHandleType tag_attrs, int index, unsigned long
  * @see metadata_extractor_create(), metadata_extractor_destroy()
  */
 
-int mm_file_get_video_frame(const char *path, double timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height);
+int mm_file_get_video_frame(const char *path, int64_t timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height);
 
-int mm_file_get_video_frame_from_memory(const void *data, unsigned int datasize, double timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height);
+int mm_file_get_video_frame_from_memory(const void *data, unsigned int datasize, int64_t timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height);
 
 int mm_file_check_uhqa(const char *filename, bool *is_uhqa);
 
index 62c6b33..256f286 100755 (executable)
@@ -20,7 +20,7 @@
  */
 
 #ifndef __MMFILE_DYN_LOADING__
-int mmfile_format_get_frame(const char *path, double timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height);
+int mmfile_format_get_frame(const char *path, int64_t timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height);
 
-int mmfile_format_get_frame_from_memory(const void *data, unsigned int datasize, double timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height);
+int mmfile_format_get_frame_from_memory(const void *data, unsigned int datasize, int64_t timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height);
 #endif
index f453169..719d445 100644 (file)
--- a/mm_file.c
+++ b/mm_file.c
@@ -167,8 +167,8 @@ static int (*mmfile_format_read_stream)(MMFileFormatContext *formatContext);
 static int (*mmfile_format_read_frame)(MMFileFormatContext *formatContext, unsigned int timestamp, MMFileFormatFrame *frame);
 static int (*mmfile_format_read_tag)(MMFileFormatContext *formatContext);
 static int (*mmfile_format_close)(MMFileFormatContext *formatContext);
-static int (*mmfile_format_get_frame)(const char *path, double timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height);
-static int (*mmfile_format_get_frame_from_memory)(const void *data, unsigned int datasize, double timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height);
+static int (*mmfile_format_get_frame)(const char *path, int64_t timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height);
+static int (*mmfile_format_get_frame_from_memory)(const void *data, unsigned int datasize, int64_t timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height);
 #endif
 
 #ifdef __MMFILE_DYN_LOADING__
@@ -945,7 +945,7 @@ int mm_file_create_content_attrs_safe(MMHandleType *contents_attrs, const char *
 }
 
 
-int mm_file_get_video_frame(const char *path, double timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height)
+int mm_file_get_video_frame(const char *path, int64_t timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height)
 {
        int ret = 0;
        void *formatFuncHandle = NULL;
@@ -988,7 +988,7 @@ exception:
 }
 
 
-int mm_file_get_video_frame_from_memory(const void *data, unsigned int datasize,  double timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height)
+int mm_file_get_video_frame_from_memory(const void *data, unsigned int datasize, int64_t timestamp, bool is_accurate, unsigned char **frame, int *size, int *width, int *height)
 {
        int ret = 0;
        void *formatFuncHandle = NULL;
index ce7325a..be58f11 100644 (file)
@@ -1,6 +1,6 @@
 Name:      libmm-fileinfo
 Summary:    Media Fileinfo
-Version:    1.0.16
+Version:    1.0.17
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index 66eacc5..7c658cd 100755 (executable)
@@ -604,12 +604,12 @@ static void __get_video_frame(const char *path, const char *accurate, bool file_
        int width = 0;
        int height = 0;
        bool is_accurate = false;
-       double time_stamp = 5. * 1000 * 1000;           //5sec
+       int64_t time_stamp = 5 * 1000 * 1000;           //5sec
 
        if (accurate && accurate[0] == '1')
                is_accurate = true;
 
-       printf("Extracting video frame for [%s] [%f] accurate [%d]\n", path, time_stamp, is_accurate);
+       printf("Extracting video frame for [%s] [%"PRId64"] accurate [%d]\n", path, time_stamp, is_accurate);
 
        if (file_test)
                ret = mm_file_get_video_frame(path, time_stamp, is_accurate, &_frame, &_frame_size, &width, &height);