summaryrefslogtreecommitdiff
path: root/src/include/util
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2015-08-07 00:40:46 (GMT)
committerMinje Ahn <minje.ahn@samsung.com>2015-08-07 01:10:15 (GMT)
commit7adbb6954d7f05fd02b9cded3741ce6ed2c9226b (patch)
tree5315a9e75f2283f559b18a8375f093b6eca10a3e /src/include/util
parent41f405edc8f31d877615c580ed6eb308d7eaebec (diff)
downloadlibmedia-thumbnail-7adbb6954d7f05fd02b9cded3741ce6ed2c9226b.zip
libmedia-thumbnail-7adbb6954d7f05fd02b9cded3741ce6ed2c9226b.tar.gz
libmedia-thumbnail-7adbb6954d7f05fd02b9cded3741ce6ed2c9226b.tar.bz2
Separate CMakeFiles for apply fPIE option Remove unused code Remove thumb_type Modify jpeg thumbnail creation logic when exif thumbnail is smaller than request thumbnail size Add scale down logic when request huge size image Fix bugs, memory leaks Remove unused parameters in function Change thumb path creation API position Remove thumbnail folder creation API Rename some functions Change-Id: I0e13d393dd524b61bcf44722c33b6f270649b732 Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src/include/util')
-rwxr-xr-xsrc/include/util/media-thumb-db.h2
-rwxr-xr-xsrc/include/util/media-thumb-util.h17
2 files changed, 8 insertions, 11 deletions
diff --git a/src/include/util/media-thumb-db.h b/src/include/util/media-thumb-db.h
index fcd284f..23ac277 100755
--- a/src/include/util/media-thumb-db.h
+++ b/src/include/util/media-thumb-db.h
@@ -21,8 +21,6 @@
#include <sqlite3.h>
#include <media-util.h>
-#include "media-thumb-types.h"
-#include "media-thumb-debug.h"
#ifndef _MEDIA_THUMB_DB_H_
#define _MEDIA_THUMB_DB_H_
diff --git a/src/include/util/media-thumb-util.h b/src/include/util/media-thumb-util.h
index 3bb71df..de6d9f6 100755
--- a/src/include/util/media-thumb-util.h
+++ b/src/include/util/media-thumb-util.h
@@ -19,8 +19,6 @@
*
*/
-#include "media-thumb-types.h"
-#include "media-thumb-debug.h"
#include "media-util.h"
#include <tzplatform_config.h>
@@ -28,6 +26,13 @@
#define _MEDIA_THUMB_UTIL_H_
#define SAFE_FREE(src) { if(src) {free(src); src = NULL;}}
+#define THUMB_MALLOC(src, size) { if (size <= 0) {src = NULL;} \
+ else { src = malloc(size); if(src) memset(src, 0x0, size);} }
+
+typedef enum {
+ MEDIA_THUMB_BGRA, /* BGRA, especially provided for evas users */
+ MEDIA_THUMB_RGB888, /* RGB888 */
+} media_thumb_format;
#define THUMB_NONE_TYPE -1 /* None */
#define THUMB_IMAGE_TYPE 0 /* Image */
@@ -47,23 +52,17 @@ typedef enum
THUMB_MMC /**< Stored only in MMC */
} media_thumb_store_type;
-int _media_thumb_get_length(media_thumb_type thumb_type);
-
int _media_thumb_get_store_type_by_path(const char *full_path);
int _media_thumb_get_file_ext(const char *file_path, char *file_ext, int max_len);
int _media_thumb_get_file_type(const char *file_full_path);
-int _media_thumb_remove_file(const char *path);
-
char* _media_thumb_generate_hash_name(const char *file);
int _media_thumb_get_hash_name(const char *file_full_path, char *thumb_hash_path, size_t max_thumb_path, uid_t uid);
-int _media_thumb_get_width(media_thumb_type thumb_type);
-
-int _media_thumb_get_height(media_thumb_type thumb_type);
+int _media_thumb_remove_file(const char *path);
#endif /*_MEDIA_THUMB_UTIL_H_*/