summaryrefslogtreecommitdiff
path: root/src/ipc/media-thumb-ipc.c
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2015-08-07 09:40:46 +0900
committerMinje Ahn <minje.ahn@samsung.com>2015-08-07 10:10:15 +0900
commit7adbb6954d7f05fd02b9cded3741ce6ed2c9226b (patch)
tree5315a9e75f2283f559b18a8375f093b6eca10a3e /src/ipc/media-thumb-ipc.c
parent41f405edc8f31d877615c580ed6eb308d7eaebec (diff)
downloadlibmedia-thumbnail-fa0e2f0b4c21b6507081e580efb70cbadea9176b.tar.gz
libmedia-thumbnail-fa0e2f0b4c21b6507081e580efb70cbadea9176b.tar.bz2
libmedia-thumbnail-fa0e2f0b4c21b6507081e580efb70cbadea9176b.zip
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/ipc/media-thumb-ipc.c')
-rwxr-xr-xsrc/ipc/media-thumb-ipc.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/ipc/media-thumb-ipc.c b/src/ipc/media-thumb-ipc.c
index 7a94900..7920fe7 100755
--- a/src/ipc/media-thumb-ipc.c
+++ b/src/ipc/media-thumb-ipc.c
@@ -379,7 +379,7 @@ _media_thumb_set_add_raw_data_buffer(thumbRawAddMsg *req_msg, unsigned char **bu
}
int
-_media_thumb_request(int msg_type, media_thumb_type thumb_type, const char *origin_path, char *thumb_path, int max_length, media_thumb_info *thumb_info, uid_t uid)
+_media_thumb_request(int msg_type, const char *origin_path, char *thumb_path, int max_length, media_thumb_info *thumb_info, uid_t uid)
{
int sock = -1;
struct sockaddr_un serv_addr;
@@ -419,7 +419,6 @@ _media_thumb_request(int msg_type, media_thumb_type thumb_type, const char *orig
/* Set requset message */
req_msg.msg_type = msg_type;
- req_msg.thumb_type = thumb_type;
req_msg.uid = uid;
strncpy(req_msg.org_path, origin_path, sizeof(req_msg.org_path));
req_msg.org_path[strlen(req_msg.org_path)] = '\0';
@@ -585,7 +584,7 @@ gboolean _media_thumb_raw_data_write_socket(GIOChannel *src, GIOCondition condit
return FALSE;
}
-int _media_thumb_request_async(int msg_type, media_thumb_type thumb_type, const char *origin_path, thumbUserData *userData, uid_t uid)
+int _media_thumb_request_async(int msg_type, const char *origin_path, thumbUserData *userData, uid_t uid)
{
int err = MS_MEDIA_ERR_NONE;
int sock = -1;
@@ -623,8 +622,6 @@ int _media_thumb_request_async(int msg_type, media_thumb_type thumb_type, const
}
if (msg_type != THUMB_REQUEST_CANCEL_MEDIA) {
- //source_id = g_io_add_watch(channel, G_IO_IN, _media_thumb_write_socket, userData );
-
/* Create new channel to watch udp socket */
GSource *source = NULL;
source = g_io_create_watch(channel, G_IO_IN);
@@ -640,7 +637,6 @@ int _media_thumb_request_async(int msg_type, media_thumb_type thumb_type, const
pid = getpid();
req_msg.pid = pid;
req_msg.msg_type = msg_type;
- req_msg.thumb_type = thumb_type;
req_msg.uid = uid;
strncpy(req_msg.org_path, origin_path, sizeof(req_msg.org_path));
@@ -677,8 +673,6 @@ int _media_thumb_request_async(int msg_type, media_thumb_type thumb_type, const
if (msg_type == THUMB_REQUEST_CANCEL_MEDIA) {
g_io_channel_shutdown(channel, TRUE, NULL);
-
- //thumb_dbg("Cancel : %s[%d]", origin_path, sock);
__media_thumb_pop_req_queue(origin_path, TRUE);
} else if (msg_type == THUMB_REQUEST_DB_INSERT) {
if (g_request_queue == NULL) {
@@ -753,7 +747,6 @@ int _media_thumb_request_raw_data_async(int msg_type, int request_id, const char
pid = getpid();
req_msg.pid = pid;
req_msg.msg_type = msg_type;
- req_msg.thumb_type = MEDIA_THUMB_LARGE;
req_msg.request_id = request_id;
req_msg.thumb_width = width;
req_msg.thumb_height = height;